2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 13:02:11 +00:00

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.

[SVN r80033]
This commit is contained in:
Jurko Gospodnetić
2012-08-14 14:07:09 +00:00
parent 9d9b2d87b9
commit 07a55d2e85
3 changed files with 7 additions and 25 deletions

View File

@@ -51,30 +51,21 @@ void path_build( PATHNAME * f, string * file );
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 );

View File

@@ -406,12 +406,6 @@ static void ShortPathToLongPath( char const * const path, int const path_length,
}
OBJECT * short_path_to_long_path( OBJECT * short_path )
{
return path_as_key( short_path );
}
static void normalize_path( string * path )
{
char * s;

View File

@@ -46,13 +46,10 @@ LIST * pwd( void )
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 );