Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59109 - in sandbox/filesystem-v3: boost/filesystem libs/filesystem/doc libs/filesystem/src
From: bdawes_at_[hidden]
Date: 2010-01-17 20:05:59


Author: bemandawes
Date: 2010-01-17 20:05:58 EST (Sun, 17 Jan 2010)
New Revision: 59109
URL: http://svn.boost.org/trac/boost/changeset/59109

Log:
Make ifdef formatting more consistent
Text files modified:
   sandbox/filesystem-v3/boost/filesystem/operations.hpp | 26 ++++------
   sandbox/filesystem-v3/boost/filesystem/path.hpp | 31 +++++--------
   sandbox/filesystem-v3/libs/filesystem/doc/reference.html | 50 +++++++++++----------
   sandbox/filesystem-v3/libs/filesystem/src/operations.cpp | 90 ++++++++++++++++++---------------------
   sandbox/filesystem-v3/libs/filesystem/src/path.cpp | 54 ++++++++---------------
   5 files changed, 110 insertions(+), 141 deletions(-)

Modified: sandbox/filesystem-v3/boost/filesystem/operations.hpp
==============================================================================
--- sandbox/filesystem-v3/boost/filesystem/operations.hpp (original)
+++ sandbox/filesystem-v3/boost/filesystem/operations.hpp 2010-01-17 20:05:58 EST (Sun, 17 Jan 2010)
@@ -39,10 +39,6 @@
 
 #include <boost/config/abi_prefix.hpp> // must be the last #include
 
-# ifdef BOOST_NO_STDC_NAMESPACE
- namespace std { using ::time_t; }
-# endif
-
 //--------------------------------------------------------------------------------------//
 
 namespace boost
@@ -59,9 +55,9 @@
   enum file_type
   {
     status_error,
-# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
     status_unknown = status_error,
-# endif
+# endif
     file_not_found,
     regular_file,
     directory_file,
@@ -426,7 +422,7 @@
   space_info space(const path& p, system::error_code& ec) {return detail::space(p, &ec);}
 
 # ifndef BOOST_FILESYSTEM_NO_DEPRECATED
- inline bool symbolic_link_exists(const path& p)
+ inline bool symbolic_link_exists(const path& p)
                                        { return is_symlink(symlink_status(p)); }
 # endif
 
@@ -512,9 +508,9 @@
   BOOST_FILESYSTEM_DECL
     system::error_code dir_itr_close(// never throws()
     void *& handle
-# if defined(BOOST_POSIX_API)
- , void *& buffer
-# endif
+# if defined(BOOST_POSIX_API)
+ , void *& buffer
+# endif
   );
 
   struct dir_itr_imp
@@ -523,13 +519,13 @@
     void* handle;
 
 # ifdef BOOST_POSIX_API
- void* buffer; // see dir_itr_increment implementation
+ void* buffer; // see dir_itr_increment implementation
 # endif
 
     dir_itr_imp() : handle(0)
-# ifdef BOOST_POSIX_API
- , buffer(0)
-# endif
+# ifdef BOOST_POSIX_API
+ , buffer(0)
+# endif
     {}
 
     ~dir_itr_imp() // never throws
@@ -792,7 +788,7 @@
   };
 
 # if !defined(BOOST_FILESYSTEM_NO_DEPRECATED)
- typedef recursive_directory_iterator wrecursive_directory_iterator;
+ typedef recursive_directory_iterator wrecursive_directory_iterator;
 # endif
 
 //--------------------------------------------------------------------------------------//

Modified: sandbox/filesystem-v3/boost/filesystem/path.hpp
==============================================================================
--- sandbox/filesystem-v3/boost/filesystem/path.hpp (original)
+++ sandbox/filesystem-v3/boost/filesystem/path.hpp 2010-01-17 20:05:58 EST (Sun, 17 Jan 2010)
@@ -31,11 +31,6 @@
 #include <locale>
 #include <algorithm>
 
-# ifdef BOOST_WINDOWS_API
-# else // BOOST_POSIX_API
-# endif
-
-
 #include <boost/config/abi_prefix.hpp> // must be the last #include
 
 namespace boost
@@ -71,11 +66,11 @@
     // value_type is the character type used by the operating system API to
     // represent paths.
 
-# ifdef BOOST_WINDOWS_API
+# ifdef BOOST_WINDOWS_API
     typedef wchar_t value_type;
-# else
+# else
     typedef char value_type;
-# endif
+# endif
     typedef std::basic_string<value_type> string_type;
     typedef path_traits::codecvt_type codecvt_type;
 
@@ -210,11 +205,9 @@
     path& replace_extension(const path& new_extension = path());
 
 # ifdef BOOST_POSIX_API
-
     path& localize() { return *this; } // POSIX m_pathname already localized
 
 # else // BOOST_WINDOWS_API
-
     path& localize(); // change slashes to backslashes
 
 # endif
@@ -246,11 +239,11 @@
     template <class String>
     String string() const;
 
-# ifdef BOOST_WINDOWS_API
+# ifdef BOOST_WINDOWS_API
     const std::string string() const;
     const std::wstring& wstring() const { return m_pathname; }
 
-# else // BOOST_POSIX_API
+# else // BOOST_POSIX_API
     const std::string& string() const { return m_pathname; }
     const std::wstring wstring() const
     {
@@ -261,22 +254,22 @@
       return tmp;
     }
 
-# endif
+# endif
 
     // ----- generic format observers -----
 
     template <class String>
     String generic_string() const;
 
-# ifdef BOOST_WINDOWS_API
+# ifdef BOOST_WINDOWS_API
     const std::string generic_string() const;
     const std::wstring generic_wstring() const;
 
-# else // BOOST_POSIX_API
+# else // BOOST_POSIX_API
     const std::string& generic_string() const { return m_pathname; }
     const std::wstring generic_wstring() const { return wstring(); }
 
-# endif
+# endif
 
     // ----- composition -----
 
@@ -307,11 +300,11 @@
     bool has_extension() const { return !extension().empty(); }
     bool is_absolute() const
     {
-# ifdef BOOST_WINDOWS_PATH
+# ifdef BOOST_WINDOWS_PATH
       return has_root_name() && has_root_directory();
-# else
+# else
       return has_root_directory();
-# endif
+# endif
     }
     bool is_relative() const { return !is_absolute(); }
 

Modified: sandbox/filesystem-v3/libs/filesystem/doc/reference.html
==============================================================================
--- sandbox/filesystem-v3/libs/filesystem/doc/reference.html (original)
+++ sandbox/filesystem-v3/libs/filesystem/doc/reference.html 2010-01-17 20:05:58 EST (Sun, 17 Jan 2010)
@@ -39,6 +39,8 @@
 
 <h1>Reference Documentation</h1>
 
+<p>dummy</p>
+
 <h2><a name="TOC">Table of Contents</a></h2>
 
 <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
@@ -1576,7 +1578,7 @@
 entry in the directory <code>p</code> resolves to, if any; otherwise, the end iterator.</p>
 
 <p><i>Throws:</i> As specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>.</p>
 
 <p>[<i>Note:</i> To iterate over the current directory, use <code>
@@ -1592,7 +1594,7 @@
 <p><i>Returns:</i> <code>*this</code>.</p>
 
 <p><i>Throws:</i> As specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>.</p>
 
 </blockquote>
@@ -1672,7 +1674,7 @@
 level() == 0</code>, <code>no_push_request() == false</code>.</p>
 
 <p><i>Throws:</i> As specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>.</p>
 
 <p>[<i>Note:</i> To iterate over the current directory, use <code>recursive_directory_iterator(&quot;.&quot;)</code> rather than
@@ -1704,7 +1706,7 @@
 <p><i>Returns:</i> <code>*this</code>.</p>
 
 <p><i>Throws:</i> As specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>.</p>
 
 </blockquote>
@@ -1827,7 +1829,7 @@
   copy_option::fail_if_exists)</code>.</p>
   
   <p><i>Throws:</i> As specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>.</p>
   
 </blockquote>
@@ -1837,7 +1839,7 @@
   copy_option::fail_if_exists, ec)</code>.</p>
   
   <p><i>Throws:</i> As specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>.</p>
   
 </blockquote>
@@ -1848,7 +1850,7 @@
   &amp;&amp; exists(to)</code>, an error is reported. Otherwise, t</span>he contents and attributes of the file <code>from</code>
   resolves to are copied to the file <code>to</code> resolves to.</p>
   <p><i>Throws:</i> As specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>.</p>
 </blockquote>
 <pre>bool <a name="create_directories">create_directories</a>(const path&amp; p);
@@ -1861,7 +1863,7 @@
   <p><i>Returns:</i> The value of <code>!exists(p)</code> prior to the
   establishment of the postcondition.</p>
   <p><i>Throws:</i> As specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>.</p>
 </blockquote>
 <pre>bool <a name="create_directory">create_directory</a>(const path&amp; p);
@@ -1874,7 +1876,7 @@
   <p><i>Returns:</i> <code>true</code> if a new directory was created, otherwise
   <code>false</code>.</p>
   <p><i>Throws:</i> As specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>.</p>
 </blockquote>
 <pre><span style="background-color: #FFFFFF">void <a name="create_hard_link">create_hard_link</a>(const path&amp; to, const path&amp; from);
@@ -1894,7 +1896,7 @@
     <code>to</code> resolves to are unchanged.</span></li>
   </ul>
   <p><i>Throws:</i> As specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>.</p>
   <p><span style="background-color: #FFFFFF">[</span><i><span style="background-color: #FFFFFF">Note:</span></i><span style="background-color: #FFFFFF">
   Some <b>operating systems</b> do not support hard links at all or support
@@ -1917,7 +1919,7 @@
   Postconditions:</i> <code>from</code> resolves to a symbolic link file that
   contains an unspecified representation of <code>to</code>.</span></p>
   <p style="font-size: 10pt"><i>Throws:</i> As specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>.</p>
   <p><span style="background-color: #FFFFFF">[</span><i><span style="background-color: #FFFFFF">Note:</span></i><span style="background-color: #FFFFFF">
   Some <b>operating systems</b> do not support symbolic links at all or support
@@ -1938,7 +1940,7 @@
   <a href="http://www.opengroup.org/onlinepubs/000095399/functions/getcwd.html">
   getcwd()</a></code>. <code>is_absolute()</code> is true for the returned path.</p>
   <p><i>Throws:</i> As specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>.</p>
   <p>[<i>Note:</i> The current path as returned by many operating systems is a
   dangerous global variable. It may be changed unexpectedly by a third-party or
@@ -1958,7 +1960,7 @@
   chdir()</a></span></code><span style="background-color: #FFFFFF">.</span></p>
 <p><i>Postconditions:</i> <code>equivalent(p, current_path())</code>.</p>
 <p><i>Throws:</i> As specified in
-<a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+<a href="#Error-reporting">
 Error reporting</a>.</p>
 </blockquote>
 <pre><span style="background-color: #FFFFFF">bool <a name="exists-file_status">exists</a>(file_status s);</span></pre>
@@ -2007,7 +2009,7 @@
   <p style="font-size: 10pt"><i>Throws:</i> <code>filesystem_error</code><span style="background-color: #FFFFFF">
   </span>if <code>(!exists(s1) &amp;&amp; !exists(s2)) || (is_other(s1) &amp;&amp; is_other(s2))</code>,
   otherwise as specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>.</p>
 </blockquote>
 <pre><span style="background-color: #FFFFFF; ">uintmax_t</span> <a name="file_size">file_size</a>(const path&amp; p);<span style="background-color: #FFFFFF; ">
@@ -2023,7 +2025,7 @@
   <a href="http://www.opengroup.org/onlinepubs/000095399/functions/stat.html">stat()</a></code>.
   Otherwise, <code>static_cast&lt;uintmax_t&gt;(-1)</code>.</p>
   <p style="font-size: 10pt"><i>Throws:</i> As specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>.</p>
 </blockquote>
 <pre>const path&amp; <a name="initial_path">initial_path</a>();
@@ -2148,7 +2150,7 @@
   <a href="http://www.opengroup.org/onlinepubs/000095399/functions/utime.html">
   <code>utime()</code></a>.</p>
   <p><i>Throws:</i> As specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>.</p>
   <p>[<i>Note:</i> A postcondition of <code>last_write_time(p) ==
   new_time</code> is not specified since it might not hold for file systems
@@ -2161,7 +2163,7 @@
   link, a <code>path</code> object containing the contents of that symbolic
   link. Otherwise an empty <code>path</code> object.</p>
   <p><i>Throws:</i> As specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>. [<i>Note:</i> It is an error if <code>p</code> does not
   resolve to a symbolic link. <i>-- end note</i>]</p>
 </blockquote>
@@ -2180,7 +2182,7 @@
   <p><i>Returns:</i>&nbsp; <code>false</code> if p did not exist in the first
   place, otherwise <code>true</code>.</p>
   <p><i>Throws:</i> As specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>.</p>
 </blockquote>
 <pre>uintmax_t <a name="remove_all">remove_all</a>(const path&amp; p);
@@ -2197,7 +2199,7 @@
   <p><i>Postcondition:</i> <code>!exists(p)</code></p>
   <p><i>Returns:</i> The number of files removed.</p>
   <p><i>Throws:</i> As specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>.</p>
 </blockquote>
 <pre>void <a name="rename">rename</a>(const path&amp; old_p, const path&amp; new_p);
@@ -2215,7 +2217,7 @@
   the file it resolves to being renamed. <i>-- end note</i>]</p>
   </blockquote>
   <p><i>Throws:</i> As specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>.</p>
 </blockquote>
 <pre>void <a name="resize_file">resize_file</a>(const path&amp; p, <span style="background-color: #FFFFFF; ">uintmax_t new_size</span>);
@@ -2223,7 +2225,7 @@
 <blockquote>
 <p><i>Postconditions:</i> <code>file_size() == new_size</code>.</p>
 <p><i>Throws:</i> As specified in
-<a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+<a href="#Error-reporting">
 Error reporting</a>.</p>
   <p style="font-size: 10pt"><i>Remarks:</i> Achieves its postconditions as if by
   POSIX <code>
@@ -2245,7 +2247,7 @@
   and <code>available</code> members respectively. Any members for which the
   value cannot be determined shall be set to -1.</span></p>
   <p><i>Throws:</i> As specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>.</p>
 </blockquote>
 <pre>file_status <a name="status">status</a>(const path&amp; p);</pre>
@@ -2425,7 +2427,7 @@
   occurrence of a percent sign character is replaced by a random hexadecimal
   digit character in the range 0-9, a-f.</p>
   <p><i>Throws:</i> As specified in
- <a href="file:///C:/boost/filesystem-v3-sandbox/libs/filesystem/doc/reference.html#Error-reporting">
+ <a href="#Error-reporting">
   Error reporting</a>.</p>
   <p><i>Remarks:</i> Implementations are encouraged to obtain the required
   randomness via a
@@ -3198,7 +3200,7 @@
 <p>Distributed under the Boost Software License, Version 1.0. See
 <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a></p>
 <p>Revised
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->13 January 2010<!--webbot bot="Timestamp" endspan i-checksum="32139" --></p>
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->17 January 2010<!--webbot bot="Timestamp" endspan i-checksum="32147" --></p>
 
 </body>
 

Modified: sandbox/filesystem-v3/libs/filesystem/src/operations.cpp
==============================================================================
--- sandbox/filesystem-v3/libs/filesystem/src/operations.cpp (original)
+++ sandbox/filesystem-v3/libs/filesystem/src/operations.cpp 2010-01-17 20:05:58 EST (Sun, 17 Jan 2010)
@@ -157,10 +157,6 @@
 #include <cassert>
 // #include <iostream> // for debugging only; comment out when not in use
 
-#ifdef BOOST_NO_STDC_NAMESPACE
-namespace std { using ::strcmp; using ::remove; using ::rename; }
-#endif
-
 // POSIX/Windows macros ----------------------------------------------------//
 
 // Portions of the POSIX and Windows API's are very similar, except for name,
@@ -567,7 +563,7 @@
 
 //--------------------------------------------------------------------------------------//
 // //
-// operations functions declared in operations.hpp //
+// operations functions declared in operations.hpp //
 // in alphabetic order //
 // //
 //--------------------------------------------------------------------------------------//
@@ -580,12 +576,12 @@
 {
   BOOST_FILESYSTEM_DECL bool possible_large_file_size_support()
   {
-# ifdef BOOST_POSIX_API
+# ifdef BOOST_POSIX_API
     struct stat lcl_stat;
     return sizeof(lcl_stat.st_size)> 4;
-# else
+# else
     return true;
-# endif
+# endif
   }
 
   BOOST_FILESYSTEM_DECL
@@ -654,16 +650,16 @@
   BOOST_FILESYSTEM_DECL
   void copy_symlink(const path& from, const path& to, system::error_code* ec)
   {
-# ifdef BOOST_POSIX_API
+# ifdef BOOST_POSIX_API
     path p(read_symlink(from, ec));
     if (ec != 0 && ec) return;
     create_symlink(p, to, ec);
 
-# elif _WIN32_WINNT < 0x0600 // SDK earlier than Vista and Server 2008
+# elif _WIN32_WINNT < 0x0600 // SDK earlier than Vista and Server 2008
     error(true, error_code(BOOST_ERROR_NOT_SUPPORTED, system_category), to, from, ec,
       "boost::filesystem::copy_symlink");
 
-# else // modern Windows
+# else // modern Windows
 
     // see if actually supported by Windows runtime dll
     if (error(!create_symbolic_link_api,
@@ -672,11 +668,11 @@
         "boost::filesystem::copy_symlink"))
       return;
 
- // preconditions met, so attempt the copy
- error(!::CopyFileExW(from.c_str(), to.c_str(), 0, 0, 0,
- COPY_FILE_COPY_SYMLINK | COPY_FILE_FAIL_IF_EXISTS), to, from, ec,
- "boost::filesystem::copy_symlink");
-# endif
+ // preconditions met, so attempt the copy
+ error(!::CopyFileExW(from.c_str(), to.c_str(), 0, 0, 0,
+ COPY_FILE_COPY_SYMLINK | COPY_FILE_FAIL_IF_EXISTS), to, from, ec,
+ "boost::filesystem::copy_symlink");
+# endif
 
   }
 
@@ -803,7 +799,7 @@
   BOOST_FILESYSTEM_DECL
   path current_path(error_code* ec)
   {
-# ifdef BOOST_POSIX_API
+# ifdef BOOST_POSIX_API
     path cur;
     for (long path_max = 128;; path_max *=2)// loop 'til buffer large enough
     {
@@ -830,14 +826,14 @@
     }
     return cur;
 
-# else
+# else
     DWORD sz;
     if ((sz = ::GetCurrentDirectoryW(0, NULL))== 0)sz = 1;
     boost::scoped_array<path::value_type> buf(new path::value_type[sz]);
     error(::GetCurrentDirectoryW(sz, buf.get())== 0, ec,
       "boost::filesystem::current_path");
     return path(buf.get());
-# endif
+# endif
   }
 
 
@@ -851,7 +847,7 @@
   BOOST_FILESYSTEM_DECL
   bool equivalent(const path& p1, const path& p2, system::error_code* ec)
   {
-# ifdef BOOST_POSIX_API
+# ifdef BOOST_POSIX_API
     struct stat s2;
     int e2(::stat(p2.c_str(), &s2));
     struct stat s1;
@@ -872,7 +868,7 @@
         // Just to be sure, size and mod time are also checked.
         && s1.st_size == s2.st_size && s1.st_mtime == s2.st_mtime;
 
-# else // Windows
+# else // Windows
 
     // Note well: Physical location on external media is part of the
     // equivalence criteria. If there are no open handles, physical location
@@ -938,13 +934,13 @@
         && info1.ftLastWriteTime.dwHighDateTime
           == info2.ftLastWriteTime.dwHighDateTime;
 
-# endif
+# endif
   }
 
   BOOST_FILESYSTEM_DECL
   boost::uintmax_t file_size(const path& p, error_code* ec)
   {
-# ifdef BOOST_POSIX_API
+# ifdef BOOST_POSIX_API
 
     struct stat path_stat;
     if (error(::stat(p.c_str(), &path_stat)!= 0,
@@ -957,7 +953,7 @@
 
     return static_cast<boost::uintmax_t>(path_stat.st_size);
 
-# else // Windows
+# else // Windows
 
     // assume uintmax_t is 64-bits on all Windows compilers
 
@@ -974,13 +970,13 @@
 
     return (static_cast<boost::uintmax_t>(fad.nFileSizeHigh)
               << (sizeof(fad.nFileSizeLow)*8)) + fad.nFileSizeLow;
-# endif
+# endif
   }
 
   BOOST_FILESYSTEM_DECL
   boost::uintmax_t hard_link_count(const path& p, system::error_code* ec)
   {
-# ifdef BOOST_POSIX_API
+# ifdef BOOST_POSIX_API
 
     struct stat path_stat;
     return error(::stat(p.c_str(), &path_stat)!= 0,
@@ -988,7 +984,7 @@
            ? 0
            : static_cast<boost::uintmax_t>(path_stat.st_nlink);
 
-# else // Windows
+# else // Windows
 
     // Link count info is only available through GetFileInformationByHandle
     BY_HANDLE_FILE_INFORMATION info;
@@ -1003,7 +999,7 @@
                  p, ec, "boost::filesystem::hard_link_count")
            ? info.nNumberOfLinks
            : 0;
-# endif
+# endif
   }
 
   BOOST_FILESYSTEM_DECL
@@ -1115,7 +1111,7 @@
   {
     path symlink_path;
 
-# ifdef BOOST_POSIX_API
+# ifdef BOOST_POSIX_API
 
     for (std::size_t path_max = 64;; path_max *= 2)// loop 'til buffer large enough
     {
@@ -1140,10 +1136,10 @@
       }
     }
 
-# elif _WIN32_WINNT < 0x0600 // SDK earlier than Vista and Server 2008
+# elif _WIN32_WINNT < 0x0600 // SDK earlier than Vista and Server 2008
     error(true, error_code(BOOST_ERROR_NOT_SUPPORTED, system_category), p, ec,
           "boost::filesystem::read_symlink");
-# else // Vista and Server 2008 SDK, or later
+# else // Vista and Server 2008 SDK, or later
 
     union info_t
     {
@@ -1169,7 +1165,7 @@
         static_cast<wchar_t*>(info.rdb.SymbolicLinkReparseBuffer.PathBuffer)
         + info.rdb.SymbolicLinkReparseBuffer.PrintNameOffset/sizeof(wchar_t)
         + info.rdb.SymbolicLinkReparseBuffer.PrintNameLength/sizeof(wchar_t));
-# endif
+# endif
     return symlink_path;
   }
   
@@ -1215,8 +1211,7 @@
   BOOST_FILESYSTEM_DECL
   space_info space(const path& p, error_code* ec)
   {
-# ifdef BOOST_POSIX_API
-
+# ifdef BOOST_POSIX_API
     struct BOOST_STATVFS vfs;
     space_info info;
     if (!error(::BOOST_STATVFS(p.c_str(), &vfs)!= 0,
@@ -1229,8 +1224,8 @@
       info.available
         = static_cast<boost::uintmax_t>(vfs.f_bavail)* BOOST_STATVFS_F_FRSIZE;
     }
-# else
 
+# else
     ULARGE_INTEGER avail, total, free;
     space_info info;
 
@@ -1247,7 +1242,8 @@
         = (static_cast<boost::uintmax_t>(avail.HighPart)<< 32)
           + avail.LowPart;
     }
-# endif
+
+# endif
 
     else
     {
@@ -1277,7 +1273,6 @@
         p, error_code(errval, system_category)));
     return file_status(status_error);
   }
-
 # endif
 
   BOOST_FILESYSTEM_DECL
@@ -1483,9 +1478,9 @@
 {
   void dispatch(const directory_entry & de,
 # ifdef BOOST_WINDOWS_API
- std::wstring& to,
+ std::wstring& to,
 # else
- std::string& to,
+ std::string& to,
 # endif
                  const codecvt_type &)
   {
@@ -1686,8 +1681,7 @@
 # endif
    )
   {
-# ifdef BOOST_POSIX_API
-
+# ifdef BOOST_POSIX_API
     std::free(buffer);
     buffer = 0;
     if (handle == 0)return ok;
@@ -1695,15 +1689,15 @@
     handle = 0;
     return error_code(::closedir(h)== 0 ? 0 : errno, system_category);
 
-# else
-
+# else
     if (handle != 0)
     {
       ::FindClose(handle);
       handle = 0;
     }
     return ok;
-# endif
+
+# endif
   }
 
   void directory_iterator_construct(directory_iterator& it,
@@ -1715,9 +1709,9 @@
     path::string_type filename;
     file_status file_stat, symlink_file_stat;
     error_code result = dir_itr_first(it.m_imp->handle,
- #if defined(BOOST_POSIX_API)
+# if defined(BOOST_POSIX_API)
       it.m_imp->buffer,
- #endif
+# endif
       p.c_str(), filename, file_stat, symlink_file_stat);
 
     if (result)
@@ -1754,9 +1748,9 @@
     for (;;)
     {
       temp_ec = dir_itr_increment(it.m_imp->handle,
-#if defined(BOOST_POSIX_API)
+# if defined(BOOST_POSIX_API)
         it.m_imp->buffer,
-#endif
+# endif
         filename, file_stat, symlink_file_stat);
 
       if (temp_ec)

Modified: sandbox/filesystem-v3/libs/filesystem/src/path.cpp
==============================================================================
--- sandbox/filesystem-v3/libs/filesystem/src/path.cpp (original)
+++ sandbox/filesystem-v3/libs/filesystem/src/path.cpp 2010-01-17 20:05:58 EST (Sun, 17 Jan 2010)
@@ -110,11 +110,11 @@
       const string_type& src,
       size_type& element_pos,
       size_type& element_size,
-# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1310) // VC++ 7.1
+# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1310) // VC++ 7.1
       size_type size = string_type::npos
-# else
+# else
       size_type size = -1
-# endif
+# endif
     );
 
 } // unnamed namespace
@@ -193,9 +193,9 @@
   path::string_type::size_type path::m_append_separator_if_needed()
   {
     if (!m_pathname.empty() &&
-# ifdef BOOST_WINDOWS_PATH
+# ifdef BOOST_WINDOWS_PATH
       *(m_pathname.end()-1) != colon &&
-# endif
+# endif
       !is_separator(*(m_pathname.end()-1)))
     {
       string_type::size_type tmp(m_pathname.size());
@@ -212,9 +212,9 @@
     if (sep_pos // a separator was added
       && sep_pos < m_pathname.size() // and something was appended
       && (m_pathname[sep_pos+1] == separator // and it was also separator
-# ifdef BOOST_WINDOWS_PATH
+# ifdef BOOST_WINDOWS_PATH
        || m_pathname[sep_pos+1] == preferred_separator // or preferred_separator
-# endif
+# endif
 )) { m_pathname.erase(sep_pos, 1); } // erase the added separator
   }
 
@@ -234,22 +234,6 @@
 # endif
 
     BOOST_ASSERT(!this_root_directory.empty() || base.has_root_directory());
-//
-// if (has_root_directory() // is_absolute
-// # ifdef BOOST_WINDOWS_PATH
-// && !this_root_name.empty()
-// # endif
-// ) return *this;
-//
-// return (!this_root_name.empty() ? this_root_name : base_root_name)
-//# ifdef BOOST_POSIX_PATH
-// / separator
-//# else // BOOST_WINDOWS_PATH
-// // use actual separator, which may be slash or backslash
-// / (!this_root_directory.empty() ? this_root_directory : base.root_directory())
-//# endif
-// / base.relative_path()
-// / relative_path();
 
     if (empty())
       return base;
@@ -306,9 +290,9 @@
 
     for (; itr.m_pos != m_pathname.size()
       && (is_separator(itr.m_element.m_pathname[0])
-# ifdef BOOST_WINDOWS_PATH
+# ifdef BOOST_WINDOWS_PATH
       || itr.m_element.m_pathname[itr.m_element.m_pathname.size()-1] == colon
-# endif
+# endif
     ); ++itr) {}
 
     return path(m_pathname.c_str() + itr.m_pos);
@@ -490,9 +474,9 @@
     return pos != 0
       && (pos <= 2 || !is_separator(str[1])
         || str.find_first_of(separators, 2) != pos)
-# ifdef BOOST_WINDOWS_PATH
+# ifdef BOOST_WINDOWS_PATH
       && (pos !=2 || str[1] != colon)
-# endif
+# endif
         ;
   }
 
@@ -514,10 +498,10 @@
     // set pos to start of last element
     size_type pos(str.find_last_of(separators, end_pos-1));
 
-# ifdef BOOST_WINDOWS_PATH
+# ifdef BOOST_WINDOWS_PATH
     if (pos == string_type::npos)
       pos = str.find_last_of(colon, end_pos-2);
-# endif
+# endif
 
     return (pos == string_type::npos // path itself must be a filename (or empty)
       || (pos == 1 && is_separator(str[0]))) // or net
@@ -772,18 +756,18 @@
 
   std::locale default_locale()
   {
-# ifdef BOOST_WINDOWS_API
+# ifdef BOOST_WINDOWS_API
     std::locale global_loc = std::locale();
     std::locale loc(global_loc, new windows_file_codecvt);
     return loc;
-# else
- // ISO C calls this "the locale-specific native environment":
-# if !defined(macintosh) && !defined(__APPLE__) && !defined(__APPLE_CC__)
- return std::locale("");
 # else
+ // ISO C calls this "the locale-specific native environment":
+# if !defined(macintosh) && !defined(__APPLE__) && !defined(__APPLE_CC__)
+ return std::locale("");
+# else
       return std::locale(); // std::locale("") throws on Mac OS
+# endif
 # endif
-# endif
   }
 
   std::locale & path_locale()


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