=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/parse.c,v retrieving revision 1.68 retrieving revision 1.69 diff -c -r1.68 -r1.69 *** src/usr.bin/make/parse.c 2003/06/03 02:56:12 1.68 --- src/usr.bin/make/parse.c 2004/04/07 13:11:36 1.69 *************** *** 1,5 **** /* $OpenPackages$ */ ! /* $OpenBSD: parse.c,v 1.68 2003/06/03 02:56:12 millert Exp $ */ /* $NetBSD: parse.c,v 1.29 1997/03/10 21:20:04 christos Exp $ */ /* --- 1,5 ---- /* $OpenPackages$ */ ! /* $OpenBSD: parse.c,v 1.69 2004/04/07 13:11:36 espie Exp $ */ /* $NetBSD: parse.c,v 1.29 1997/03/10 21:20:04 christos Exp $ */ /* *************** *** 233,240 **** *---------------------------------------------------------------------- */ static int ! ParseFindKeyword(str) ! const char *str; /* String to find */ { int start, end, --- 233,239 ---- *---------------------------------------------------------------------- */ static int ! ParseFindKeyword(const char *str) /* keyword to look up */ { int start, end, *************** *** 272,280 **** *--------------------------------------------------------------------- */ static void ! ParseLinkSrc(pgn, cgn) ! GNode *pgn; /* The parent node */ ! GNode *cgn; /* The child node */ { if (Lst_AddNew(&pgn->children, cgn)) { if (specType == Not) --- 271,279 ---- *--------------------------------------------------------------------- */ static void ! ParseLinkSrc( ! GNode *pgn, /* The parent node */ ! GNode *cgn) /* The child node */ { if (Lst_AddNew(&pgn->children, cgn)) { if (specType == Not) *************** *** 297,306 **** *--------------------------------------------------------------------- */ static int ! ParseDoOp(gn, op) ! GNode *gn; /* The node to which the operator is to be ! * applied */ ! int op; /* The operator to apply */ { /* * If the dependency mask of the operator and the node don't match and --- 296,304 ---- *--------------------------------------------------------------------- */ static int ! ParseDoOp( ! GNode *gn, /* The node to which the operator is to be applied */ ! int op) /* The operator to apply */ { /* * If the dependency mask of the operator and the node don't match and *************** *** 367,375 **** *--------------------------------------------------------------------- */ static int ! ParseAddDep(p, s) ! GNode *p; ! GNode *s; { if (p->order < s->order) { /* XXX: This can cause loops, and loops can cause unmade targets, --- 365,371 ---- *--------------------------------------------------------------------- */ static int ! ParseAddDep(GNode *p, GNode *s) { if (p->order < s->order) { /* XXX: This can cause loops, and loops can cause unmade targets, *************** *** 399,408 **** *--------------------------------------------------------------------- */ static void ! ParseDoSrc(tOp, src) ! int tOp; /* operator (if any) from special targets */ ! const char *src; /* name of the source to handle */ ! { GNode *gn = NULL; --- 395,403 ---- *--------------------------------------------------------------------- */ static void ! ParseDoSrc( ! int tOp, /* operator (if any) from special targets */ ! const char *src) /* name of the source to handle */ { GNode *gn = NULL; *************** *** 511,519 **** *----------------------------------------------------------------------- */ static int ! ParseFindMain(gnp, dummy) ! void *gnp; /* Node to examine */ ! void *dummy UNUSED; { GNode *gn = (GNode *)gnp; if ((gn->type & OP_NOTARGET) == 0) { --- 506,514 ---- *----------------------------------------------------------------------- */ static int ! ParseFindMain( ! void *gnp, /* Node to examine */ ! void *dummy UNUSED) { GNode *gn = (GNode *)gnp; if ((gn->type & OP_NOTARGET) == 0) { *************** *** 535,543 **** *----------------------------------------------------------------------- */ static void ! ParseAddDir(path, name) ! void *path; ! void *name; { Dir_AddDir((Lst)path, (char *)name); } --- 530,536 ---- *----------------------------------------------------------------------- */ static void ! ParseAddDir(void *path, void *name) { Dir_AddDir((Lst)path, (char *)name); } *************** *** 549,556 **** *----------------------------------------------------------------------- */ static void ! ParseClearPath(p) ! void *p; { Lst path = (Lst)p; --- 542,548 ---- *----------------------------------------------------------------------- */ static void ! ParseClearPath(void *p) { Lst path = (Lst)p; *************** *** 590,597 **** *--------------------------------------------------------------------- */ static void ! ParseDoDependency(line) ! char *line; /* the line to parse */ { char *cp; /* our current position */ GNode *gn; /* a general purpose temporary node */ --- 582,588 ---- *--------------------------------------------------------------------- */ static void ! ParseDoDependency(char *line) /* the line to parse */ { char *cp; /* our current position */ GNode *gn; /* a general purpose temporary node */ *************** *** 1081,1089 **** * A new element is added to the commands list of the node. */ static void ! ParseAddCmd(gnp, cmd) ! void *gnp; /* the node to which the command is to be added */ ! void *cmd; /* the command to add */ { GNode *gn = (GNode *)gnp; /* if target already supplied, ignore commands */ --- 1072,1080 ---- * A new element is added to the commands list of the node. */ static void ! ParseAddCmd( ! void *gnp, /* the node to which the command is to be added */ ! void *cmd) /* the command to add */ { GNode *gn = (GNode *)gnp; /* if target already supplied, ignore commands */ *************** *** 1109,1116 **** *----------------------------------------------------------------------- */ static void ! ParseHasCommands(gnp) ! void *gnp; /* Node to examine */ { GNode *gn = (GNode *)gnp; if (!Lst_IsEmpty(&gn->commands)) { --- 1100,1106 ---- *----------------------------------------------------------------------- */ static void ! ParseHasCommands(void *gnp) /* Node to examine */ { GNode *gn = (GNode *)gnp; if (!Lst_IsEmpty(&gn->commands)) { *************** *** 1126,1133 **** *----------------------------------------------------------------------- */ void ! Parse_AddIncludeDir(dir) ! const char *dir; /* The name of the directory to add */ { Dir_AddDir(parseIncPath, dir); } --- 1116,1122 ---- *----------------------------------------------------------------------- */ void ! Parse_AddIncludeDir(const char *dir) /* The name of the directory to add */ { Dir_AddDir(parseIncPath, dir); } *************** *** 1148,1155 **** *--------------------------------------------------------------------- */ static void ! ParseDoInclude(file) ! char *file; /* file specification */ { char endc; /* the character which ends the file spec */ char *cp; /* current position in file spec */ --- 1137,1143 ---- *--------------------------------------------------------------------- */ static void ! ParseDoInclude(char *file)/* file specification */ { char endc; /* the character which ends the file spec */ char *cp; /* current position in file spec */ *************** *** 1204,1211 **** *--------------------------------------------------------------------- */ static void ! ParseTraditionalInclude(file) ! char *file; /* file specification */ { char *cp; /* current position in file spec */ --- 1192,1198 ---- *--------------------------------------------------------------------- */ static void ! ParseTraditionalInclude(char *file) /* file specification */ { char *cp; /* current position in file spec */ *************** *** 1234,1241 **** *--------------------------------------------------------------------- */ static void ! ParseConditionalInclude(file) ! char *file; /* file specification */ { char *cp; /* current position in file spec */ --- 1221,1227 ---- *--------------------------------------------------------------------- */ static void ! ParseConditionalInclude(char *file)/* file specification */ { char *cp; /* current position in file spec */ *************** *** 1256,1266 **** /* Common part to lookup and read an include file. */ static void ! ParseLookupIncludeFile(spec, endSpec, isSystem, errIfNotFound) ! char *spec; ! char *endSpec; ! bool isSystem; ! bool errIfNotFound; { char *file; char *fullname; --- 1242,1249 ---- /* Common part to lookup and read an include file. */ static void ! ParseLookupIncludeFile(char *spec, char *endSpec, bool isSystem, ! bool errIfNotFound) { char *file; char *fullname; *************** *** 1342,1350 **** /* Strip comments from the line. May return either a copy of the line, or * the line itself. */ static char * ! strip_comments(copy, line) ! Buffer copy; ! const char *line; { const char *comment; const char *p; --- 1325,1331 ---- /* Strip comments from the line. May return either a copy of the line, or * the line itself. */ static char * ! strip_comments(Buffer copy, const char *line) { const char *comment; const char *p; *************** *** 1375,1384 **** } static bool ! ParseIsCond(linebuf, copy, line) ! Buffer linebuf; ! Buffer copy; ! char *line; { char *stripped; --- 1356,1362 ---- } static bool ! ParseIsCond(Buffer linebuf, Buffer copy, char *line) { char *stripped; *************** *** 1456,1462 **** *----------------------------------------------------------------------- */ static void ! ParseFinishDependency() { Array_Every(>argets, Suff_EndTransform); Array_Every(>argets, ParseHasCommands); --- 1434,1440 ---- *----------------------------------------------------------------------- */ static void ! ParseFinishDependency(void) { Array_Every(>argets, Suff_EndTransform); Array_Every(>argets, ParseHasCommands); *************** *** 1464,1471 **** } static void ! ParseDoCommands(line) ! const char *line; { /* add the command to the list of * commands of all targets in the dependency spec */ --- 1442,1448 ---- } static void ! ParseDoCommands(const char *line) { /* add the command to the list of * commands of all targets in the dependency spec */ *************** *** 1478,1486 **** } void ! Parse_File(name, stream) ! const char *name; /* the name of the file being read */ ! FILE *stream; /* Stream open to makefile to parse */ { char *cp, /* pointer into the line */ *line; /* the line we're working on */ --- 1455,1463 ---- } void ! Parse_File( ! const char *name, /* the name of the file being read */ ! FILE *stream) /* Stream open to makefile to parse */ { char *cp, /* pointer into the line */ *line; /* the line we're working on */ *************** *** 1584,1590 **** } void ! Parse_Init() { mainNode = NULL; Static_Lst_Init(parseIncPath); --- 1561,1567 ---- } void ! Parse_Init(void) { mainNode = NULL; Static_Lst_Init(parseIncPath); *************** *** 1600,1606 **** #ifdef CLEANUP void ! Parse_End() { Lst_Destroy(&targCmds, (SimpleProc)free); Lst_Destroy(sysIncPath, Dir_Destroy); --- 1577,1583 ---- #ifdef CLEANUP void ! Parse_End(void) { Lst_Destroy(&targCmds, (SimpleProc)free); Lst_Destroy(sysIncPath, Dir_Destroy); *************** *** 1611,1618 **** void ! Parse_MainName(listmain) ! Lst listmain; /* result list */ { if (mainNode == NULL) { --- 1588,1594 ---- void ! Parse_MainName(Lst listmain) /* result list */ { if (mainNode == NULL) {