From b67a1758d0cbc87df2248ccff52a89621353a46f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Thu, 23 Aug 2012 12:56:39 +0000 Subject: [PATCH] Boost Jam cleanup - minor stylistic changes. [SVN r80155] --- src/engine/pathunix.c | 2 +- src/engine/pwd.c | 13 ++++++++----- src/engine/pwd.h | 13 +++++++++---- src/engine/search.c | 7 ++++--- src/engine/timestamp.c | 9 +++++---- src/engine/variable.h | 6 +++--- 6 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/engine/pathunix.c b/src/engine/pathunix.c index e712362fd..623926d49 100644 --- a/src/engine/pathunix.c +++ b/src/engine/pathunix.c @@ -471,7 +471,7 @@ void path_done( void ) { if ( path_key_cache ) { - hashenumerate( path_key_cache, &free_path_key_entry, (void *)0 ); + hashenumerate( path_key_cache, &free_path_key_entry, 0 ); hashdone( path_key_cache ); } } diff --git a/src/engine/pwd.c b/src/engine/pwd.c index 53feaeb9c..440fb17d5 100644 --- a/src/engine/pwd.c +++ b/src/engine/pwd.c @@ -1,11 +1,14 @@ -/* Copyright Vladimir Prus 2002, Rene Rivera 2005. +/* + * Copyright 2002. Vladimir Prus + * Copyright 2005. Rene Rivera * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) */ #include "jam.h" -#include "lists.h" +#include "pwd.h" + #include "mem.h" #include "object.h" #include "pathsys.h" @@ -13,8 +16,8 @@ #include #include -/* MinGW on windows declares PATH_MAX in limits.h */ -#if defined(NT) && ! defined(__GNUC__) +/* MinGW on Windows declares PATH_MAX in limits.h */ +#if defined(NT) && !defined(__GNUC__) # include # define PATH_MAX _MAX_PATH #else @@ -45,7 +48,7 @@ LIST * pwd( void ) { char * const buffer = BJAM_MALLOC_RAW( buffer_size ); result_buffer = getcwd( buffer, buffer_size ); - error = errno ; + error = errno; if ( result_buffer ) { /* We return the path using its canonical/long/key format. */ diff --git a/src/engine/pwd.h b/src/engine/pwd.h index e6ed268bb..0e0d6fba7 100644 --- a/src/engine/pwd.h +++ b/src/engine/pwd.h @@ -1,11 +1,16 @@ -/* Copyright Vladimir Prus 2002. Distributed under the Boost */ -/* Software License, Version 1.0. (See accompanying */ -/* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ +/* + * Copyright 2002. Vladimir Prus + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ #ifndef PWD_H #define PWD_H +#include "lists.h" + LIST * pwd( void ); -void pwd_done( void ); +void pwd_done( void ); #endif diff --git a/src/engine/search.c b/src/engine/search.c index ca99620bb..a41f9a506 100644 --- a/src/engine/search.c +++ b/src/engine/search.c @@ -38,7 +38,7 @@ static struct hash * explicit_bindings = 0; void call_bind_rule( OBJECT * target_, OBJECT * boundname_ ) { - LIST * bind_rule = var_get( root_module(), constant_BINDRULE ); + LIST * const bind_rule = var_get( root_module(), constant_BINDRULE ); if ( !list_empty( bind_rule ) ) { OBJECT * target = object_copy( target_ ); @@ -81,8 +81,9 @@ void call_bind_rule( OBJECT * target_, OBJECT * boundname_ ) * LOCATE setting, stop and return the location. In case of a previous target, * return its name via the 'another_target' argument. * - * This bevahiour allows handling dependencies on generated files. If caller - * does not expect that the target is generated, 0 can be passed as + * This behaviour allows handling dependencies on generated files. + * + * If caller does not expect that the target is generated, 0 can be passed as * 'another_target'. */ diff --git a/src/engine/timestamp.c b/src/engine/timestamp.c index ba5de3386..fa8963e6b 100644 --- a/src/engine/timestamp.c +++ b/src/engine/timestamp.c @@ -4,10 +4,11 @@ * This file is part of Jam - see jam.c for Copyright information. */ -/* This file is ALSO: - * Copyright 2001-2004 David Abrahams. - * Distributed under the Boost Software License, Version 1.0. - * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * http://www.boost.org/LICENSE_1_0.txt) */ /* diff --git a/src/engine/variable.h b/src/engine/variable.h index fb4b3185f..ddb452bc1 100644 --- a/src/engine/variable.h +++ b/src/engine/variable.h @@ -27,8 +27,8 @@ void var_done( struct module_t * ); * Defines for var_set(). */ -#define VAR_SET 0 /* override previous value */ -#define VAR_APPEND 1 /* append to previous value */ -#define VAR_DEFAULT 2 /* set only if no previous value */ +#define VAR_SET 0 /* override previous value */ +#define VAR_APPEND 1 /* append to previous value */ +#define VAR_DEFAULT 2 /* set only if no previous value */ #endif