|
Boost-Commit : |
From: daniel_james_at_[hidden]
Date: 2008-07-25 13:33:45
Author: danieljames
Date: 2008-07-25 13:33:44 EDT (Fri, 25 Jul 2008)
New Revision: 47806
URL: http://svn.boost.org/trac/boost/changeset/47806
Log:
Merge changes from beta. Fixes #2147.
Text files modified:
website/public_html/live/common/code/boost_archive.php | 34 ++++++++++--
website/public_html/live/development/requirements.html | 102 ++++++++++++++++++++++++++++++---------
website/public_html/live/development/running_regression_tests.html | 2
website/public_html/live/feed/history/boost_1_35_0.qbk | 2
website/public_html/live/style/css_0/content.css | 1
5 files changed, 110 insertions(+), 31 deletions(-)
Modified: website/public_html/live/common/code/boost_archive.php
==============================================================================
--- website/public_html/live/common/code/boost_archive.php (original)
+++ website/public_html/live/common/code/boost_archive.php 2008-07-25 13:33:44 EDT (Fri, 25 Jul 2008)
@@ -53,7 +53,7 @@
$this->file_ = $archive_file_prefix . $this->key_;
}
$this->archive_ = str_replace('\\','/', $archive_dir . '/' . $this->version_ . '.zip');
-
+
foreach ($info_map as $i)
{
if (preg_match($i[1],$this->key_))
@@ -137,11 +137,9 @@
## header('Content-Disposition: attachment; filename="downloaded.pdf"');
$file_handle = popen($unzip,'rb');
fpassthru($file_handle);
- if(pclose($file_handle) != 0) {
- // TODO: Maybe I should buffer the file so that I can return a
- // proper 404 error.
- echo "File not found.";
- }
+ $exit_status = pclose($file_handle);
+ if($exit_status != 0)
+ echo 'Error extracting file: '.unzip_error($exit_status);
}
function content()
@@ -512,4 +510,28 @@
print '<h1>404 Not Found</h1><p>File "' . $this->file_ . '"not found.</p>';
}
}
+
+// Return a readable error message for unzip exit state.
+
+function unzip_error($exit_status) {
+ switch($exit_status) {
+ case 0: return 'No error.';
+ case 1: return 'One or more warning errors were encountered.';
+ case 2: return 'A generic error in the zipfile format was detected.';
+ case 3: return 'A severe error in the zipfile format was detected.';
+ case 4: return 'Unzip was unable to allocate memory for one or more buffers during program initialization.';
+ case 5: return 'Unzip was unable to allocate memory or unable to obtain a tty to read the decryption password(s).';
+ case 6: return 'Unzip was unable to allocate memory during decompression to disk.';
+ case 7: return 'Unzip was unable to allocate memory during in-memory decompression.';
+ case 9: return 'The specified zipfiles were not found.';
+ case 10: return 'Invalid options were specified on the command line.';
+ case 11: return 'No matching files were found.';
+ case 50: return 'The disk is (or was) full during extraction.';
+ case 51: return 'The end of the ZIP archive was encountered prematurely.';
+ case 80: return 'The user aborted unzip prematurely with control-C (or similar).';
+ case 81: return 'Testing or extraction of one or more files failed due to unsupported compression methods or unsupported decryption.';
+ case 82: return 'No files were found due to bad decryption password(s).';
+ default: return 'Unknown unzip error code: ' + $exit_status;
+ }
+}
?>
Modified: website/public_html/live/development/requirements.html
==============================================================================
--- website/public_html/live/development/requirements.html (original)
+++ website/public_html/live/development/requirements.html 2008-07-25 13:33:44 EDT (Fri, 25 Jul 2008)
@@ -8,7 +8,8 @@
<link rel="icon" href="/favicon.ico" type="image/ico" />
<link rel="stylesheet" type="text/css" href=
"../style/section-development.css" />
- <!--[if IE]> <style type="text/css"> body { behavior: url(/style/csshover.htc); } </style> <![endif]-->
+ <!--[if IE]> <style type="text/css"> body { behavior: url(/style/csshover.htc); } </style>
+ <![endif]-->
</head><!--
Note: Editing website content is documented at:
http://www.boost.org/development/website_updating.html
@@ -78,6 +79,9 @@
<li>Tabs rationale</li>
+ <li><a href="#FileNamesRat">Directory and filename
+ rationale</a></li>
+
<li><a href="#JavaScript">ECMAScript/JavaScript
rationale</a></li>
@@ -411,29 +415,41 @@
"Directory_structure"></a>Directory Structure and
Filenames</h3>
- <p>Naming requirements ensure file and directory names are
- relatively portable, including to ISO 9660:1999 and other
- relatively limited file systems.</p>
-
- <ul>
- <li>File and directory names include only
- <strong>lowercase</strong> ASCII letters
- (<code>"a"</code>-<code>"z"</code>), numbers
- (<code>"0"</code>-<code>"9"</code>), and underscores
- (<code>"_"</code>). Spaces are not allowed.</li>
-
- <li>File names may include one dot character
- (<code>"."</code>), but it must not be the first or last
- character..</li>
-
- <li>Directory names must not include dot characters
- (<code>"."</code>).</li>
-
- <li>The first character of both directory and file names must
- be alphabetic.</li>
+ <p>Naming requirements ensure that file and directory names are
+ relatively portable, including to ISO 9660:1999 (with
+ extensions) and other relatively limited file systems.
+ Superscript links are provided to detailed rationale for each
+ choice.</p>
+
+ <ul>
+ <li>Names must contain only
+ <strong>lowercase</strong><sup><a href=
+ "#Filename_rationale_1">1</a></sup> ASCII letters
+ (<code>'a'</code>-<code>'z'</code>), numbers
+ (<code>'0'</code>-<code>'9'</code>), underscores
+ (<code>'_'</code>), hyphens (<code>'-'</code>), and periods
+ (<code>'.'</code>). Spaces are not allowed<sup><a href=
+ "#Filename_rationale_2">2</a></sup>.</li>
+
+ <li>Directory names must not contain periods
+ (<code>'.'</code>)<sup><a href=
+ "#Filename_Rationale_3">3</a></sup>.</li>
+
+ <li>The first and last character of a file name must not be a
+ period (<code>'.'</code>)<sup><a href=
+ "#Filename_rationale_4">4</a></sup>.</li>
+
+ <li>The first character of names must not be a hyphen
+ (<code>'-'</code>)<sup><a href=
+ "#Filename_rationale_5">5</a></sup>.</li>
<li>The maximum length of directory and file names is 31
- characters.</li>
+ characters<sup><a href=
+ "#Filename_rationale_6">6</a></sup>.</li>
+
+ <li>The total path length must not exceed 207
+ characters<sup><a href=
+ "#Filename_rationale_7">7</a></sup>.</li>
</ul>
<p>Other conventions ease communication:</p>
@@ -692,7 +708,7 @@
<p>Exception specifications [ISO 15.4] are sometimes coded to
indicate what exceptions may be thrown, or because the
- programmer hopes they will improved performance. But consider
+ programmer hopes they will improve performance. But consider
the following member from a smart pointer:</p>
<pre>
T& operator*() const throw() { return *ptr; }
@@ -772,6 +788,46 @@
all use tabs, or all use spaces, and thus the decision to stick
with spaces.</p>
+ <h3><a name="FileNamesRat" id="FileNamesRat"></a>Directory and
+ File Names rationale</h3>
+
+ <p><a name="Filename_rationale_1" id=
+ "Filename_rationale_1">1</a>. Some legacy file systems require
+ single-case names. Single-case names eliminate casing mistakes
+ when moving from case-insensitive to case-sensitive file
+ systems.</p>
+
+ <p><a name="Filename_rationale_2" id=
+ "Filename_rationale_2">2</a>. This is the lowercase portion of
+ the POSIX portable filename character set. To quote the POSIX
+ standard, "Filenames should be constructed from the portable
+ filename character set because the use of other characters can
+ be confusing or ambiguous in certain contexts."</p>
+
+ <p><a name="Filename_Rationale_3" id=
+ "Filename_Rationale_3">3</a>. Strict implementations of ISO
+ 9660:1999 and some legacy operating systems prohibit dots in
+ directory names. The need for this restriction is fading, and
+ it will probably be removed fairly soon.</p>
+
+ <p><a name="Filename_rationale_4" id=
+ "Filename_rationale_4">4</a>. POSIX has special rules for names
+ beginning with a period. Windows prohibits names ending in a
+ period.</p>
+
+ <p><a name="Filename_rationale_5" id=
+ "Filename_rationale_5">5</a>. Would be too confusing or
+ ambiguous in certain contexts.</p>
+
+ <p><a name="Filename_rationale_6" id=
+ "Filename_rationale_6">6</a>. We had to draw the line
+ somewhere, and so the limit imposed by a now obsolete Apple
+ file system was chosen years ago. It still seems a reasonable
+ limit to aid human comprehension.</p>
+
+ <p><a name="Filename_rationale_7" id=
+ "Filename_rationale_7">7</a>. ISO 9660:1999.</p>
+
<h3><a name="JavaScript" id=
"JavaScript"></a>ECMAScript/JavaScript rationale</h3>
Modified: website/public_html/live/development/running_regression_tests.html
==============================================================================
--- website/public_html/live/development/running_regression_tests.html (original)
+++ website/public_html/live/development/running_regression_tests.html 2008-07-25 13:33:44 EDT (Fri, 25 Jul 2008)
@@ -134,7 +134,7 @@
<ul>
<li>Download the most recent regression scripts.</li>
- <li>Download the desingated testing tool sources including
+ <li>Download the designated testing tool sources including
Boost.Jam, Boost.Build, and the various regression
programs.</li>
Modified: website/public_html/live/feed/history/boost_1_35_0.qbk
==============================================================================
--- website/public_html/live/feed/history/boost_1_35_0.qbk (original)
+++ website/public_html/live/feed/history/boost_1_35_0.qbk 2008-07-25 13:33:44 EDT (Fri, 25 Jul 2008)
@@ -178,7 +178,7 @@
* Microsoft Visual C++ 7.1 and 8 on Windows (Visual Sudio .NET 2003 and 2005).
In addition the following compilers should be well supported, but weren't part of
-out release criteria for 1.35:
+our release criteria for 1.35:
* IBM Visual Age 9.0 on AIX.
* Intel C++ 10 and later on Linux.
Modified: website/public_html/live/style/css_0/content.css
==============================================================================
--- website/public_html/live/style/css_0/content.css (original)
+++ website/public_html/live/style/css_0/content.css 2008-07-25 13:33:44 EDT (Fri, 25 Jul 2008)
@@ -363,6 +363,7 @@
#content .section dl.fields dd {
margin: 0em 0em 0em 7.5em;
padding: 0em 0em 0em 0em;
+ line-height: 1.3em;
}
/* A directory, as in the index for the people. */
#content .section ul.directory,
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