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

Boost Jam code cleanup - minor stylistic changes.

[SVN r79778]
This commit is contained in:
Jurko Gospodnetić
2012-07-28 08:58:39 +00:00
parent 938636b176
commit 511a7d6188
5 changed files with 32 additions and 31 deletions

View File

@@ -183,7 +183,7 @@ int file_mkdir( char const * const path )
/*
* file_query_() - query information about a path from the OS
*
*
* The following code for collecting information about a single file needs to be
* synchronized with how the file_collect_dir_content_() operation is
* implemented (collects information about all files in a folder).

View File

@@ -45,7 +45,7 @@
*/
void file_dirscan_( file_info_t * const dir, scanback func, void * closure );
int file_collect_dir_content_( file_info_t * const dir );
int file_query_( file_info_t * const info );
int file_query_( file_info_t * const );
static void file_dirscan_impl( OBJECT * dir, scanback func, void * closure );
static void free_file_info( void * xfile, void * data );

View File

@@ -34,7 +34,7 @@ typedef struct file_info_t
} file_info_t;
typedef void (*scanback)( void * closure, OBJECT * path, int found,
timestamp const * const t );
timestamp const * const );
void file_archscan( char const * arch, scanback func, void * closure );
@@ -45,10 +45,10 @@ int file_is_file( OBJECT * const path );
int file_mkdir( char const * const path );
file_info_t * file_query( OBJECT * const path );
void file_remove_atexit( OBJECT * const path );
int file_time( OBJECT * const path, timestamp * const time );
int file_time( OBJECT * const path, timestamp * const );
/* Internal utility worker functions. */
int file_query_posix_( file_info_t * const info );
int file_query_posix_( file_info_t * const );
void file_done();

View File

@@ -123,13 +123,13 @@
/* Macintosh is "special" */
#ifdef OS_MAC
#include <QuickDraw.h>
# include <QuickDraw.h>
#endif
/* And UNIX for this. */
#ifdef unix
#include <sys/utsname.h>
#include <signal.h>
# include <sys/utsname.h>
# include <signal.h>
#endif
struct globs globs =
@@ -159,27 +159,27 @@ static char * othersyms[] = { OSMAJOR, OSMINOR, OSPLAT, JAMVERSYM, 0 };
*/
#ifdef OS_MAC
#define use_environ arg_environ
#ifdef MPW
QDGlobals qd;
#endif
# define use_environ arg_environ
# ifdef MPW
QDGlobals qd;
# endif
#endif
/* on Win32-LCC */
#if defined( OS_NT ) && defined( __LCC__ )
#define use_environ _environ
# define use_environ _environ
#endif
# if defined( __MWERKS__)
#define use_environ _environ
#if defined( __MWERKS__)
# define use_environ _environ
extern char * * _environ;
#endif
#ifndef use_environ
#define use_environ environ
#if !defined( __WATCOM__ ) && !defined( OS_OS2 ) && !defined( OS_NT )
extern char **environ;
#endif
# define use_environ environ
# if !defined( __WATCOM__ ) && !defined( OS_OS2 ) && !defined( OS_NT )
extern char **environ;
# endif
#endif
#if YYDEBUG != 0
@@ -189,10 +189,10 @@ static char * othersyms[] = { OSMAJOR, OSMINOR, OSPLAT, JAMVERSYM, 0 };
#ifndef NDEBUG
static void run_unit_tests()
{
#if defined( USE_EXECNT )
# if defined( USE_EXECNT )
extern void execnt_unit_test();
execnt_unit_test();
#endif
# endif
string_unit_test();
}
#endif
@@ -228,9 +228,9 @@ int main( int argc, char * * argv, char * * arg_environ )
BJAM_MEM_INIT();
# ifdef OS_MAC
#ifdef OS_MAC
InitGraf( &qd.thePort );
# endif
#endif
--argc;
++argv;
@@ -263,7 +263,8 @@ int main( int argc, char * * argv, char * * arg_environ )
{
printf( "Boost.Jam " );
printf( "Version %s. %s.\n", VERSION, OSMINOR );
printf( " Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.\n" );
printf( " Copyright 1993-2002 Christopher Seiwald and Perforce "
"Software, Inc.\n" );
printf( " Copyright 2001 David Turner.\n" );
printf( " Copyright 2001-2004 David Abrahams.\n" );
printf( " Copyright 2002-2008 Rene Rivera.\n" );
@@ -598,7 +599,7 @@ int main( int argc, char * * argv, char * * arg_environ )
*/
#if defined(_WIN32)
#include <windows.h>
# include <windows.h>
char * executable_path( char const * argv0 )
{
char buf[ 1024 ];
@@ -606,7 +607,7 @@ char * executable_path( char const * argv0 )
return ( !ret || ret == sizeof( buf ) ) ? NULL : strdup( buf );
}
#elif defined(__APPLE__) /* Not tested */
#include <mach-o/dyld.h>
# include <mach-o/dyld.h>
char *executable_path( char const * argv0 )
{
char buf[ 1024 ];
@@ -614,14 +615,14 @@ char *executable_path( char const * argv0 )
return _NSGetExecutablePath( buf, &size ) ? NULL : strdup( buf );
}
#elif defined(sun) || defined(__sun) /* Not tested */
#include <stdlib.h>
# include <stdlib.h>
char * executable_path( char const * argv0 )
{
return strdup( getexecname() );
}
#elif defined(__FreeBSD__)
#include <sys/sysctl.h>
# include <sys/sysctl.h>
char * executable_path( char const * argv0 )
{
int mib[ 4 ] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
@@ -631,11 +632,11 @@ char * executable_path( char const * argv0 )
return ( !size || size == sizeof( buf ) ) ? NULL : strndup( buf, size );
}
#elif defined(__linux__)
#include <unistd.h>
# include <unistd.h>
char * executable_path( char const * argv0 )
{
char buf[ 1024 ];
ssize_t ret = readlink("/proc/self/exe", buf, sizeof(buf));
ssize_t const ret = readlink( "/proc/self/exe", buf, sizeof( buf ) );
return ( !ret || ret == sizeof( buf ) ) ? NULL : strndup( buf, ret );
}
#else

View File

@@ -331,7 +331,7 @@ static void time_enter( void * closure, OBJECT * target, int const found,
static void free_timestamps( void * xbinding, void * data )
{
object_free( ((BINDING *)xbinding)->name );
object_free( ( (BINDING *)xbinding )->name );
}