diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2000-09-14 13:36:47 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2000-09-14 13:36:47 +0000 |
commit | 937fd0dd5bc639d679b0cab57293af3791cac7c4 (patch) | |
tree | 2bf2b36f65f2b1a73ef15f72d568624692ac8305 | |
parent | 546678723becd8086b3d2fb9f652f2397662e8c5 (diff) |
Clean-up, systematic use of UNUSED, white space...
-rw-r--r-- | usr.bin/make/parse.c | 15 | ||||
-rw-r--r-- | usr.bin/make/varmodifiers.c | 66 |
2 files changed, 40 insertions, 41 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index 8c3d78fdb1a..9f3c4a8e587 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.c,v 1.53 2000/09/14 13:32:07 espie Exp $ */ +/* $OpenBSD: parse.c,v 1.54 2000/09/14 13:36:46 espie Exp $ */ /* $NetBSD: parse.c,v 1.29 1997/03/10 21:20:04 christos Exp $ */ /* @@ -102,7 +102,7 @@ static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94"; #else UNUSED -static char rcsid[] = "$OpenBSD: parse.c,v 1.53 2000/09/14 13:32:07 espie Exp $"; +static char rcsid[] = "$OpenBSD: parse.c,v 1.54 2000/09/14 13:36:46 espie Exp $"; #endif #endif /* not lint */ @@ -544,17 +544,16 @@ ParseDoSrc (tOp, src, allsrc) */ static int ParseFindMain(gnp, dummy) - void *gnp; /* Node to examine */ - void *dummy; + void *gnp; /* Node to examine */ + void *dummy UNUSED; { GNode *gn = (GNode *) gnp; if ((gn->type & OP_NOTARGET) == 0) { mainNode = gn; Targ_SetMain(gn); - return (dummy ? 0 : 0); - } else { - return (dummy ? 1 : 1); - } + return 0; + } else + return 1; } /*- diff --git a/usr.bin/make/varmodifiers.c b/usr.bin/make/varmodifiers.c index e2b7eee46c1..9f390f1a6c8 100644 --- a/usr.bin/make/varmodifiers.c +++ b/usr.bin/make/varmodifiers.c @@ -1,4 +1,4 @@ -/* $OpenBSD: varmodifiers.c,v 1.5 2000/09/14 13:35:38 espie Exp $ */ +/* $OpenBSD: varmodifiers.c,v 1.6 2000/09/14 13:36:46 espie Exp $ */ /* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */ /* @@ -138,11 +138,11 @@ static Boolean VarLowercase __P((const char *, Boolean, Buffer, void *)); */ static Boolean VarUppercase(word, addSpace, buf, dummy) - const char *word; /* Word to Upper Case */ - Boolean addSpace; /* True if need to add a space to the buffer + const char *word; /* Word to Upper Case */ + Boolean addSpace; /* True if need to add a space to the buffer * before sticking in the head */ - Buffer buf; /* Buffer in which to store it */ - void *dummy; + Buffer buf; /* Buffer in which to store it */ + void *dummy UNUSED; { size_t len = strlen(word); @@ -169,11 +169,11 @@ VarUppercase(word, addSpace, buf, dummy) */ static Boolean VarLowercase(word, addSpace, buf, dummy) - const char *word; /* Word to Lower Case */ - Boolean addSpace; /* True if need to add a space to the buffer + const char *word; /* Word to Lower Case */ + Boolean addSpace; /* True if need to add a space to the buffer * before sticking in the head */ - Buffer buf; /* Buffer in which to store it */ - void *dummy; + Buffer buf; /* Buffer in which to store it */ + void *dummy UNUSED; { size_t len = strlen(word); @@ -201,13 +201,13 @@ VarLowercase(word, addSpace, buf, dummy) */ static Boolean VarHead(word, addSpace, buf, dummy) - const char *word; /* Word to trim */ - Boolean addSpace; /* True if need to add a space to the buffer + const char *word; /* Word to trim */ + Boolean addSpace; /* True if need to add a space to the buffer * before sticking in the head */ - Buffer buf; /* Buffer in which to store it */ - void *dummy; + Buffer buf; /* Buffer in which to store it */ + void *dummy UNUSED; { - const char *slash; + const char *slash; slash = strrchr(word, '/'); if (slash != NULL) { @@ -222,7 +222,7 @@ VarHead(word, addSpace, buf, dummy) else Buf_AddChar(buf, '.'); } - return(dummy ? TRUE : TRUE); + return TRUE; } /*- @@ -242,13 +242,13 @@ VarHead(word, addSpace, buf, dummy) */ static Boolean VarTail(word, addSpace, buf, dummy) - const char *word; /* Word to trim */ - Boolean addSpace; /* TRUE if need to stick a space in the + const char *word; /* Word to trim */ + Boolean addSpace; /* TRUE if need to stick a space in the * buffer before adding the tail */ - Buffer buf; /* Buffer in which to store it */ - void *dummy; + Buffer buf; /* Buffer in which to store it */ + void *dummy UNUSED; { - const char *slash; + const char *slash; if (addSpace) Buf_AddSpace(buf); @@ -257,7 +257,7 @@ VarTail(word, addSpace, buf, dummy) Buf_AddString(buf, slash+1); else Buf_AddString(buf, word); - return (dummy ? TRUE : TRUE); + return TRUE; } /*- @@ -276,13 +276,13 @@ VarTail(word, addSpace, buf, dummy) */ static Boolean VarSuffix(word, addSpace, buf, dummy) - const char *word; /* Word to trim */ - Boolean addSpace; /* TRUE if need to add a space before placing + const char *word; /* Word to trim */ + Boolean addSpace; /* TRUE if need to add a space before placing * the suffix in the buffer */ - Buffer buf; /* Buffer in which to store it */ - void *dummy; + Buffer buf; /* Buffer in which to store it */ + void *dummy UNUSED; { - const char *dot; + const char *dot; dot = strrchr(word, '.'); if (dot != NULL) { @@ -291,7 +291,7 @@ VarSuffix(word, addSpace, buf, dummy) Buf_AddString(buf, dot+1); addSpace = TRUE; } - return (dummy ? addSpace : addSpace); + return addSpace; } /*- @@ -311,13 +311,13 @@ VarSuffix(word, addSpace, buf, dummy) */ static Boolean VarRoot(word, addSpace, buf, dummy) - const char *word; /* Word to trim */ - Boolean addSpace; /* TRUE if need to add a space to the buffer + const char *word; /* Word to trim */ + Boolean addSpace; /* TRUE if need to add a space to the buffer * before placing the root in it */ - Buffer buf; /* Buffer in which to store it */ - void *dummy; + Buffer buf; /* Buffer in which to store it */ + void *dummy UNUSED; { - const char *dot; + const char *dot; if (addSpace) Buf_AddSpace(buf); @@ -327,7 +327,7 @@ VarRoot(word, addSpace, buf, dummy) Buf_AddInterval(buf, word, dot); else Buf_AddString(buf, word); - return (dummy ? TRUE : TRUE); + return TRUE; } /*- |