Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/usr.bin/make/var.c,v rcsdiff: /ftp/cvs/cvsroot/src/usr.bin/make/var.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.88 retrieving revision 1.89 diff -u -p -r1.88 -r1.89 --- src/usr.bin/make/var.c 2004/05/07 00:04:40 1.88 +++ src/usr.bin/make/var.c 2004/07/01 04:39:31 1.89 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.88 2004/05/07 00:04:40 ross Exp $ */ +/* $NetBSD: var.c,v 1.89 2004/07/01 04:39:31 jmc Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.88 2004/05/07 00:04:40 ross Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.89 2004/07/01 04:39:31 jmc Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.88 2004/05/07 00:04:40 ross Exp $"); +__RCSID("$NetBSD: var.c,v 1.89 2004/07/01 04:39:31 jmc Exp $"); #endif #endif /* not lint */ #endif @@ -716,9 +716,15 @@ Var_Value(const char *name, GNode *ctxt, *----------------------------------------------------------------------- */ static Boolean +#if __GNUC__ +VarHead(GNode *ctx __attribute__((unused)), Var_Parse_State *vpstate, + char *word, Boolean addSpace, Buffer buf, + ClientData dummy) +#else VarHead(GNode *ctx, Var_Parse_State *vpstate, char *word, Boolean addSpace, Buffer buf, ClientData dummy) +#endif { char *slash; @@ -764,9 +770,15 @@ VarHead(GNode *ctx, Var_Parse_State *vps *----------------------------------------------------------------------- */ static Boolean +#if __GNUC__ +VarTail(GNode *ctx __attribute__((unused)), Var_Parse_State *vpstate, + char *word, Boolean addSpace, Buffer buf, + ClientData dummy) +#else VarTail(GNode *ctx, Var_Parse_State *vpstate, char *word, Boolean addSpace, Buffer buf, ClientData dummy) +#endif { char *slash; @@ -806,9 +818,15 @@ VarTail(GNode *ctx, Var_Parse_State *vps *----------------------------------------------------------------------- */ static Boolean +#if __GNUC__ +VarSuffix(GNode *ctx __attribute__((unused)), Var_Parse_State *vpstate, + char *word, Boolean addSpace, Buffer buf, + ClientData dummy) +#else VarSuffix(GNode *ctx, Var_Parse_State *vpstate, char *word, Boolean addSpace, Buffer buf, ClientData dummy) +#endif { char *dot; @@ -847,9 +865,15 @@ VarSuffix(GNode *ctx, Var_Parse_State *v *----------------------------------------------------------------------- */ static Boolean +#if __GNUC__ +VarRoot(GNode *ctx __attribute__((unused)), Var_Parse_State *vpstate, + char *word, Boolean addSpace, Buffer buf, + ClientData dummy) +#else VarRoot(GNode *ctx, Var_Parse_State *vpstate, char *word, Boolean addSpace, Buffer buf, ClientData dummy) +#endif { char *dot; @@ -891,9 +915,15 @@ VarRoot(GNode *ctx, Var_Parse_State *vps *----------------------------------------------------------------------- */ static Boolean +#if __GNUC__ +VarMatch(GNode *ctx __attribute__((unused)), Var_Parse_State *vpstate, + char *word, Boolean addSpace, Buffer buf, + ClientData pattern) +#else VarMatch(GNode *ctx, Var_Parse_State *vpstate, char *word, Boolean addSpace, Buffer buf, ClientData pattern) +#endif { if (Str_Match(word, (char *) pattern)) { if (addSpace && vpstate->varSpace) { @@ -980,9 +1010,15 @@ VarSYSVMatch(GNode *ctx, Var_Parse_State *----------------------------------------------------------------------- */ static Boolean +#if __GNUC__ +VarNoMatch(GNode *ctx __attribute__((unused)), Var_Parse_State *vpstate, + char *word, Boolean addSpace, Buffer buf, + ClientData pattern) +#else VarNoMatch(GNode *ctx, Var_Parse_State *vpstate, char *word, Boolean addSpace, Buffer buf, ClientData pattern) +#endif { if (!Str_Match(word, (char *) pattern)) { if (addSpace && vpstate->varSpace) { @@ -1017,9 +1053,15 @@ VarNoMatch(GNode *ctx, Var_Parse_State * *----------------------------------------------------------------------- */ static Boolean +#if __GNUC__ +VarSubstitute(GNode *ctx __attribute__((unused)), Var_Parse_State *vpstate, + char *word, Boolean addSpace, Buffer buf, + ClientData patternp) +#else VarSubstitute(GNode *ctx, Var_Parse_State *vpstate, char *word, Boolean addSpace, Buffer buf, ClientData patternp) +#endif { int wordLen; /* Length of word */ char *cp; /* General pointer */ @@ -1217,9 +1259,16 @@ VarREError(int err, regex_t *pat, const *----------------------------------------------------------------------- */ static Boolean +#if __GNUC__ +VarRESubstitute(GNode *ctx __attribute__((unused)), + Var_Parse_State *vpstate __attribute__((unused)), + char *word, Boolean addSpace, Buffer buf, + ClientData patternp) +#else VarRESubstitute(GNode *ctx, Var_Parse_State *vpstate, char *word, Boolean addSpace, Buffer buf, ClientData patternp) +#endif { VarREPattern *pat; int xrv; @@ -1357,9 +1406,16 @@ VarRESubstitute(GNode *ctx, Var_Parse_St *----------------------------------------------------------------------- */ static Boolean +#if __GNUC__ +VarLoopExpand(GNode *ctx __attribute__((unused)), + Var_Parse_State *vpstate __attribute__((unused)), + char *word, Boolean addSpace, Buffer buf, + ClientData loopp) +#else VarLoopExpand(GNode *ctx, Var_Parse_State *vpstate, char *word, Boolean addSpace, Buffer buf, ClientData loopp) +#endif { VarLoop_t *loop = (VarLoop_t *) loopp; char *s; @@ -1400,8 +1456,13 @@ VarLoopExpand(GNode *ctx, Var_Parse_Stat *----------------------------------------------------------------------- */ static char * +#if __GNUC__ +VarSelectWords(GNode *ctx __attribute__((unused)), Var_Parse_State *vpstate, + const char *str, VarSelectWords_t *seldata) +#else VarSelectWords(GNode *ctx, Var_Parse_State *vpstate, const char *str, VarSelectWords_t *seldata) +#endif { Buffer buf; /* Buffer for the new string */ Boolean addSpace; /* TRUE if need to add a space to the @@ -1660,9 +1721,15 @@ VarUniq(const char *str) *----------------------------------------------------------------------- */ static char * +#if __GNUC__ +VarGetPattern(GNode *ctxt, Var_Parse_State *vpstate __attribute__((unused)), + int err, const char **tstr, int delim, int *flags, + int *length, VarPattern *pattern) +#else VarGetPattern(GNode *ctxt, Var_Parse_State *vpstate, int err, const char **tstr, int delim, int *flags, int *length, VarPattern *pattern) +#endif { const char *cp; Buffer buf = Buf_Init(0); @@ -1878,7 +1945,7 @@ Var_Parse(const char *str, GNode *ctxt, * expanding it in a non-local context. This * is done to support dynamic sources. The * result is just the invocation, unaltered */ - Var_Parse_State parsestate = {0}; /* Flags passed to helper functions */ + Var_Parse_State parsestate; /* Flags passed to helper functions */ *freePtr = FALSE; dynamic = FALSE;