|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r79778 - trunk/tools/build/v2/engine
From: jurko.gospodnetic_at_[hidden]
Date: 2012-07-28 04:58:41
Author: jurko
Date: 2012-07-28 04:58:39 EDT (Sat, 28 Jul 2012)
New Revision: 79778
URL: http://svn.boost.org/trac/boost/changeset/79778
Log:
Boost Jam code cleanup - minor stylistic changes.
Text files modified:
trunk/tools/build/v2/engine/filent.c | 2
trunk/tools/build/v2/engine/filesys.c | 2
trunk/tools/build/v2/engine/filesys.h | 6 ++--
trunk/tools/build/v2/engine/jam.c | 51 ++++++++++++++++++++-------------------
trunk/tools/build/v2/engine/timestamp.c | 2
5 files changed, 32 insertions(+), 31 deletions(-)
Modified: trunk/tools/build/v2/engine/filent.c
==============================================================================
--- trunk/tools/build/v2/engine/filent.c (original)
+++ trunk/tools/build/v2/engine/filent.c 2012-07-28 04:58:39 EDT (Sat, 28 Jul 2012)
@@ -183,7 +183,7 @@
/*
* 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).
Modified: trunk/tools/build/v2/engine/filesys.c
==============================================================================
--- trunk/tools/build/v2/engine/filesys.c (original)
+++ trunk/tools/build/v2/engine/filesys.c 2012-07-28 04:58:39 EDT (Sat, 28 Jul 2012)
@@ -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 );
Modified: trunk/tools/build/v2/engine/filesys.h
==============================================================================
--- trunk/tools/build/v2/engine/filesys.h (original)
+++ trunk/tools/build/v2/engine/filesys.h 2012-07-28 04:58:39 EDT (Sat, 28 Jul 2012)
@@ -34,7 +34,7 @@
} 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_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();
Modified: trunk/tools/build/v2/engine/jam.c
==============================================================================
--- trunk/tools/build/v2/engine/jam.c (original)
+++ trunk/tools/build/v2/engine/jam.c 2012-07-28 04:58:39 EDT (Sat, 28 Jul 2012)
@@ -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 @@
*/
#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 @@
#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 @@
BJAM_MEM_INIT();
-# ifdef OS_MAC
+#ifdef OS_MAC
InitGraf( &qd.thePort );
-# endif
+#endif
--argc;
++argv;
@@ -263,7 +263,8 @@
{
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 @@
*/
#if defined(_WIN32)
-#include <windows.h>
+# include <windows.h>
char * executable_path( char const * argv0 )
{
char buf[ 1024 ];
@@ -606,7 +607,7 @@
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 @@
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 @@
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
Modified: trunk/tools/build/v2/engine/timestamp.c
==============================================================================
--- trunk/tools/build/v2/engine/timestamp.c (original)
+++ trunk/tools/build/v2/engine/timestamp.c 2012-07-28 04:58:39 EDT (Sat, 28 Jul 2012)
@@ -331,7 +331,7 @@
static void free_timestamps( void * xbinding, void * data )
{
- object_free( ((BINDING *)xbinding)->name );
+ object_free( ( (BINDING *)xbinding )->name );
}
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