Module Name:    othersrc
Committed By:   dholland
Date:           Sat Mar 23 22:17:51 UTC 2013

Modified Files:
        othersrc/usr.bin/dholland-make2: make.c parse.c

Log Message:
Remove remaining references to the linked list library.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 othersrc/usr.bin/dholland-make2/make.c
cvs rdiff -u -r1.11 -r1.12 othersrc/usr.bin/dholland-make2/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: othersrc/usr.bin/dholland-make2/make.c
diff -u othersrc/usr.bin/dholland-make2/make.c:1.13 othersrc/usr.bin/dholland-make2/make.c:1.14
--- othersrc/usr.bin/dholland-make2/make.c:1.13	Sat Mar 23 21:33:28 2013
+++ othersrc/usr.bin/dholland-make2/make.c	Sat Mar 23 22:17:51 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: make.c,v 1.13 2013/03/23 21:33:28 dholland Exp $	*/
+/*	$NetBSD: make.c,v 1.14 2013/03/23 22:17:51 dholland Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -111,7 +111,7 @@
 #include    "dir.h"
 #include    "job.h"
 
-MAKE_RCSID("$NetBSD: make.c,v 1.13 2013/03/23 21:33:28 dholland Exp $");
+MAKE_RCSID("$NetBSD: make.c,v 1.14 2013/03/23 22:17:51 dholland Exp $");
 
 typedef struct {
 	GList nodes;
@@ -284,7 +284,7 @@ make_abort(GNode *gn, int line)
  *-----------------------------------------------------------------------
  * Make_TimeStamp --
  *	Set the cmgn field of a parent node based on the mtime stamp in its
- *	child. Called from MakeOODate via Lst_ForEach.
+ *	child.
  *
  * Input:
  *	pgn		the current parent
@@ -635,15 +635,15 @@ Make_HandleUse(GNode *cgn, GNode *pgn)
 /*-
  *-----------------------------------------------------------------------
  * MakeHandleUse --
- *	Callback function for Lst_ForEach, used by Make_Run on the downward
+ *	Used by Make_Run (via Make_ExpandUse) on the downward
  *	pass to handle .USE nodes. Should be called before the children
  *	are enqueued to be looked at by MakeAddChild.
  *	This function calls Make_HandleUse to copy the .USE node's commands,
  *	type flags and children to the parent node.
  *
  * Input:
- *	cgnp		the child we've just examined
- *	pgnp		the current parent
+ *	cgn		the child we've just examined
+ *	pgn		the current parent
  *
  * Results:
  *	None
@@ -726,7 +726,7 @@ Make_Recheck(GNode *gn)
      * To force things that depend on FRC to be made, so we have to
      * check for gn->children being empty as well...
      */
-    if (!Lst_IsEmpty(gn->commands) || Lst_IsEmpty(gn->children)) {
+    if (stringarray_num(&gn->commands) > 0 || glist_num(gn->children) == 0) {
 	gn->mtime = now;
     }
 #else
@@ -961,7 +961,7 @@ Make_Update(GNode *cgn)
      * Set the .PREFIX and .IMPSRC variables for all the implied parents
      * of this node.
      */
-    /*if (Lst_Open(cgn->iParents) == SUCCESS)*/ {
+    {
 	char	*cpref = Var_Value(PREFIX, cgn, &p1);
 	unsigned i;
 
@@ -975,7 +975,6 @@ Make_Update(GNode *cgn)
 	}
 	if (p1)
 	    free(p1);
-	/*Lst_Close(cgn->iParents);*/
     }
 }
 
@@ -983,7 +982,7 @@ Make_Update(GNode *cgn)
  *-----------------------------------------------------------------------
  * MakeAddAllSrc --
  *	Add a child's name to the ALLSRC and OODATE variables of the given
- *	node. Called from Make_DoAllVar via Lst_ForEach. A child is added only
+ *	node. Called from Make_DoAllVar. A child is added only
  *	if it has not been given the .EXEC, .USE or .INVISIBLE attributes.
  *	.EXEC and .USE children are very rarely going to be files, so...
  *	If the child is a .JOIN node, its ALLSRC is propagated to the parent.
@@ -1322,7 +1321,7 @@ MakeStartJobs(void)
  * MakePrintStatus --
  *	Print the status of a top-level node, viz. it being up-to-date
  *	already or not created due to an error in a lower level.
- *	Callback function for Make_Run via Lst_ForEach.
+ *	Callback function for Make_Run.
  *
  * Input:
  *	gnp		Node to examine

Index: othersrc/usr.bin/dholland-make2/parse.c
diff -u othersrc/usr.bin/dholland-make2/parse.c:1.11 othersrc/usr.bin/dholland-make2/parse.c:1.12
--- othersrc/usr.bin/dholland-make2/parse.c:1.11	Sat Mar 23 19:15:40 2013
+++ othersrc/usr.bin/dholland-make2/parse.c	Sat Mar 23 22:17:51 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.11 2013/03/23 19:15:40 dholland Exp $	*/
+/*	$NetBSD: parse.c,v 1.12 2013/03/23 22:17:51 dholland Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -137,7 +137,7 @@
 #include "buf.h"
 #include "pathnames.h"
 
-MAKE_RCSID("$NetBSD: parse.c,v 1.11 2013/03/23 19:15:40 dholland Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.12 2013/03/23 22:17:51 dholland Exp $");
 
 //#define CLEANUP
 
@@ -826,8 +826,8 @@ ParseMessage(char *line)
 /*-
  *---------------------------------------------------------------------
  * ParseLinkSrc  --
- *	Link the parent node to its new child. Used in a Lst_ForEach by
- *	ParseDoDependency. If the specType isn't 'Not', the parent
+ *	Link the parent node to its new child. Used by
+ *	ParseDoSrc. If the specType isn't 'Not', the parent
  *	isn't linked as a parent of the child.
  *
  * Input:
@@ -863,8 +863,8 @@ ParseLinkSrc(GNode *pgn, GNode *cgn)
 /*-
  *---------------------------------------------------------------------
  * ParseDoOp  --
- *	Apply the parsed operator to the given target node. Used in a
- *	Lst_ForEach call by ParseDoDependency once all targets have
+ *	Apply the parsed operator to the given target node. Used
+ *	by ParseDoDependency once all targets have
  *	been found and their operator parsed. If the previous and new
  *	operators are incompatible, a major error is taken.
  *
@@ -1922,7 +1922,8 @@ Parse_DoVar(char *line, GNode *ctxt)
 
 /*-
  * ParseAddCmd  --
- *	Lst_ForEach function to add a command line to all targets
+ *	add a command line to all targets
+ *      (XXX: all??)
  *
  * Input:
  *	gnp		the node to which the command is to be added
@@ -1950,7 +1951,7 @@ ParseAddCmd(GNode *gn, char *cmd)
     } else {
 #ifdef notyet
 	/* XXX: We cannot do this until we fix the tree */
-	(void)Lst_AtEnd(gn->commands, cmd);
+	stringarray_add(&gn->commands, cmd, NULL);
 	Parse_Error(PARSE_WARNING,
 		     "overriding commands for target \"%s\"; "
 		     "previous commands defined at %s: %d ignored",

Reply via email to