diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2001-05-03 13:41:28 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2001-05-03 13:41:28 +0000 |
commit | 32d5cfe8f4f4bd9647d36fc0f609479f02311103 (patch) | |
tree | 06bd5d3e7a2a46bf77a1da707955bfdc16acf068 /usr.bin/make/lst.lib/lstDupl.c | |
parent | a50fea6f0032902e640160d4c42a8c9ce003fc2d (diff) |
Synch with my current work.
Numerous changes:
- generate can build several tables
- style cleanup
- statistics code
- use variable names throughout (struct Name)
- recursive variables everywhere
- faster parser (pass buffer along instead of allocating multiple copies)
- correct parser. Handles comments everywhere, and ; correctly
- more string intervals
- simplified dir.c, less recursion.
- extended for loops
- sinclude()
- finished removing extra junk from Lst_*
- handles ${@D} and friends in a simpler way
- cleaned up and modular VarModifiers handling.
- recognizes some gnu Makefile usages and errors out about them.
Additionally, some extra functionality is defined by FEATURES. The set of
functionalities is currently hardcoded to OpenBSD defaults, but this may
include support for some NetBSD extensions, like ODE modifiers.
Backed by miod@ and millert@, who finally got sick of my endless patches...
Diffstat (limited to 'usr.bin/make/lst.lib/lstDupl.c')
-rw-r--r-- | usr.bin/make/lst.lib/lstDupl.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/usr.bin/make/lst.lib/lstDupl.c b/usr.bin/make/lst.lib/lstDupl.c index d8e28c0915a..55abac5ad87 100644 --- a/usr.bin/make/lst.lib/lstDupl.c +++ b/usr.bin/make/lst.lib/lstDupl.c @@ -1,4 +1,5 @@ -/* $OpenBSD: lstDupl.c,v 1.13 2000/09/14 13:32:09 espie Exp $ */ +/* $OpenPackages$ */ +/* $OpenBSD: lstDupl.c,v 1.14 2001/05/03 13:41:20 espie Exp $ */ /* $NetBSD: lstDupl.c,v 1.6 1996/11/06 17:59:37 christos Exp $ */ /* @@ -44,16 +45,16 @@ */ #include "lstInt.h" + #ifndef lint #if 0 static char sccsid[] = "@(#)lstDupl.c 8.1 (Berkeley) 6/6/93"; #else UNUSED -static char rcsid[] = "$OpenBSD: lstDupl.c,v 1.13 2000/09/14 13:32:09 espie Exp $"; +static char rcsid[] = "$OpenBSD: lstDupl.c,v 1.14 2001/05/03 13:41:20 espie Exp $"; #endif #endif /* not lint */ - /*- *----------------------------------------------------------------------- * Lst_Clone -- @@ -61,7 +62,7 @@ static char rcsid[] = "$OpenBSD: lstDupl.c,v 1.13 2000/09/14 13:32:09 espie Exp * given, the individual client elements will be duplicated as well. * * Results: - * Returns the new list. + * returns the new list. * * Side Effects: * The new list is created. @@ -69,20 +70,20 @@ static char rcsid[] = "$OpenBSD: lstDupl.c,v 1.13 2000/09/14 13:32:09 espie Exp */ Lst Lst_Clone(nl, l, copyProc) - Lst nl; - Lst l; - DuplicateProc copyProc; + Lst nl; + Lst l; /* the list to duplicate */ + DuplicateProc copyProc; /* A function to duplicate each void * */ { - LstNode ln; + LstNode ln; Lst_Init(nl); for (ln = l->firstPtr; ln != NULL; ln = ln->nextPtr) { - if (copyProc != NOCOPY) + if (copyProc != NOCOPY) Lst_AtEnd(nl, (*copyProc)(ln->datum)); else Lst_AtEnd(nl, ln->datum); } - return nl; } + |