Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80033 - trunk/tools/build/v2/engine
From: jurko.gospodnetic_at_[hidden]
Date: 2012-08-14 10:07:09


Author: jurko
Date: 2012-08-14 10:07:09 EDT (Tue, 14 Aug 2012)
New Revision: 80033
URL: http://svn.boost.org/trac/boost/changeset/80033

Log:
Boost Jam cleanup - removed the internal short_path_to_long_path() function as it has now been completely superseded by path_as_key(). Updated several related code comments.
Text files modified:
   trunk/tools/build/v2/engine/pathsys.h | 19 +++++--------------
   trunk/tools/build/v2/engine/pathunix.c | 6 ------
   trunk/tools/build/v2/engine/pwd.c | 7 ++-----
   3 files changed, 7 insertions(+), 25 deletions(-)

Modified: trunk/tools/build/v2/engine/pathsys.h
==============================================================================
--- trunk/tools/build/v2/engine/pathsys.h (original)
+++ trunk/tools/build/v2/engine/pathsys.h 2012-08-14 10:07:09 EDT (Tue, 14 Aug 2012)
@@ -51,30 +51,21 @@
 void path_parse( char const * file, PATHNAME * f );
 void path_parent( PATHNAME * f );
 
-#ifdef NT
-
-/* Returns object_new-allocated string with long equivivalent of 'short_name'.
- * If none exists, i.e. 'short_path' is already long, it is returned unaltered.
- */
-OBJECT * short_path_to_long_path( OBJECT * short_path );
-
-#endif
-
-/* Given a path, returns an object that can be used as a unique key for that
- * path. Equivalent paths such as a/b, A\B, and a\B on NT all yield the same
- * key.
+/* Given a path, returns an object containing an equivalent path in canonical
+ * format that can be used as a unique key for that path. Equivalent paths such
+ * as a/b, A\B, and a\B on NT all yield the same key.
  */
 OBJECT * path_as_key( OBJECT * path );
 
 /* Called as an optimization when we know we have a path that is already in its
- * long form. Avoids the need for some subsequent path_as_key() call to do a
+ * long/key form. Avoids the need for some subsequent path_as_key() call to do a
  * potentially expensive short-->long path conversion.
  */
 void path_key__register_long_path( OBJECT * long_path );
 
 #ifdef USE_PATHUNIX
 /* Returns a static pointer to the system dependent path to the temporary
- * directory. NOTE: *without* a trailing path separator.
+ * directory. NOTE: Does *not* include a trailing path separator.
  */
 string const * path_tmpdir( void );
 

Modified: trunk/tools/build/v2/engine/pathunix.c
==============================================================================
--- trunk/tools/build/v2/engine/pathunix.c (original)
+++ trunk/tools/build/v2/engine/pathunix.c 2012-08-14 10:07:09 EDT (Tue, 14 Aug 2012)
@@ -406,12 +406,6 @@
 }
 
 
-OBJECT * short_path_to_long_path( OBJECT * short_path )
-{
- return path_as_key( short_path );
-}
-
-
 static void normalize_path( string * path )
 {
     char * s;

Modified: trunk/tools/build/v2/engine/pwd.c
==============================================================================
--- trunk/tools/build/v2/engine/pwd.c (original)
+++ trunk/tools/build/v2/engine/pwd.c 2012-08-14 10:07:09 EDT (Tue, 14 Aug 2012)
@@ -46,13 +46,10 @@
             result_buffer = getcwd( buffer, buffer_size );
             if ( result_buffer )
             {
- #ifdef NT
+ /* We return the path using its canonical/long/key format. */
                 OBJECT * const result = object_new( result_buffer );
- pwd_result = short_path_to_long_path( result );
+ pwd_result = path_as_key( result );
                 object_free( result );
- #else
- pwd_result = object_new( result_buffer );
- #endif
             }
             buffer_size *= 2;
             BJAM_FREE_RAW( buffer );


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