Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52498 - in website/public_html/beta: common/code doc
From: daniel_james_at_[hidden]
Date: 2009-04-20 03:27:57


Author: danieljames
Date: 2009-04-20 03:27:56 EDT (Mon, 20 Apr 2009)
New Revision: 52498
URL: http://svn.boost.org/trac/boost/changeset/52498

Log:
Use boolean values when appropriate in the library list xml.
Text files modified:
   website/public_html/beta/common/code/boost_libraries.php | 14 ++++++++++++--
   website/public_html/beta/doc/libraries.php | 8 ++++----
   2 files changed, 16 insertions(+), 6 deletions(-)

Modified: website/public_html/beta/common/code/boost_libraries.php
==============================================================================
--- website/public_html/beta/common/code/boost_libraries.php (original)
+++ website/public_html/beta/common/code/boost_libraries.php 2009-04-20 03:27:56 EDT (Mon, 20 Apr 2009)
@@ -54,13 +54,23 @@
                     case 'authors':
                     case 'description':
                     case 'documentation':
+ {
+ if (isset($val['value'])) { $lib[$val['tag']] = trim($val['value']); }
+ else { $lib[$val['tag']] = ''; }
+ }
+ break;
                     case 'std-proposal':
                     case 'std-tr1':
                     case 'header-only':
                     case 'autolink':
                     {
- if (isset($val['value'])) { $lib[$val['tag']] = trim($val['value']); }
- else { $lib[$val['tag']] = ''; }
+ $value = isset($val['value']) ? trim($val['value']) : false;
+ if($value && $value != 'true' && $value != 'false') {
+ echo 'Invalid value for ',htmlentities($val['tag']),
+ ': ', $value;
+ exit(0);
+ }
+ $lib[$val['tag']] = ($value == 'true');
                     }
                     break;
                     case 'category':

Modified: website/public_html/beta/doc/libraries.php
==============================================================================
--- website/public_html/beta/doc/libraries.php (original)
+++ website/public_html/beta/doc/libraries.php 2009-04-20 03:27:56 EDT (Mon, 20 Apr 2009)
@@ -115,15 +115,15 @@
 function libstandard($lib)
 {
   $p = array();
- if ($lib['std-proposal'] == 'true') { $p[] = 'Proposed'; }
- if ($lib['std-tr1'] == 'true') { $p[] = 'TR1'; }
+ if ($lib['std-proposal']) { $p[] = 'Proposed'; }
+ if ($lib['std-tr1']) { $p[] = 'TR1'; }
   print ($p ? implode(', ',$p) : ' ');
 }
 function libbuildlink($lib)
 {
   $p = array();
- if ($lib['header-only'] == 'true') { $p[] = 'Header only'; }
- if ($lib['autolink'] == 'true') { $p[] = 'Automatic linking'; }
+ if ($lib['header-only']) { $p[] = 'Header only'; }
+ if ($lib['autolink']) { $p[] = 'Automatic linking'; }
   print ($p ? implode(', ',$p) : ' ');
 }
 function libcategories($lib, $categories)


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk