diff options
author | 2001-05-03 13:40:59 +0000 | |
---|---|---|
committer | 2001-05-03 13:40:59 +0000 | |
commit | 04ed836e6d5ae76799154a2aa175f9935e7e18a6 (patch) | |
tree | dc05061c51e5fa0a5086e2d01d3570791cb2ba15 /usr.bin/make/lst.lib/lstDeQueue.c | |
parent | old file (diff) | |
download | wireguard-openbsd-04ed836e6d5ae76799154a2aa175f9935e7e18a6.tar.xz wireguard-openbsd-04ed836e6d5ae76799154a2aa175f9935e7e18a6.zip |
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/lstDeQueue.c')
-rw-r--r-- | usr.bin/make/lst.lib/lstDeQueue.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/usr.bin/make/lst.lib/lstDeQueue.c b/usr.bin/make/lst.lib/lstDeQueue.c index 3c09db5e7dc..272e8a41ebe 100644 --- a/usr.bin/make/lst.lib/lstDeQueue.c +++ b/usr.bin/make/lst.lib/lstDeQueue.c @@ -1,4 +1,5 @@ -/* $OpenBSD: lstDeQueue.c,v 1.10 2000/09/14 13:32:09 espie Exp $ */ +/* $OpenPackages$ */ +/* $OpenBSD: lstDeQueue.c,v 1.11 2001/05/03 13:41:19 espie Exp $ */ /* $NetBSD: lstDeQueue.c,v 1.5 1996/11/06 17:59:36 christos Exp $ */ /* @@ -43,43 +44,46 @@ */ #include "lstInt.h" + #ifndef lint #if 0 static char sccsid[] = "@(#)lstDeQueue.c 8.1 (Berkeley) 6/6/93"; #else UNUSED -static char rcsid[] = "$OpenBSD: lstDeQueue.c,v 1.10 2000/09/14 13:32:09 espie Exp $"; +static char rcsid[] = "$OpenBSD: lstDeQueue.c,v 1.11 2001/05/03 13:41:19 espie Exp $"; #endif #endif /* not lint */ - /*- *----------------------------------------------------------------------- * Lst_DeQueue -- * Remove and return the datum at the head of the given list. * * Results: - * The datum in the node at the head or (ick) NULL if the list - * is empty. + * The datum in the node at the head or NULL if the list is empty. * * Side Effects: * The head node is removed from the list. - * *----------------------------------------------------------------------- */ void * Lst_DeQueue(l) - Lst l; + Lst l; { - void *rd; - LstNode tln; + void *rd; + LstNode tln; - tln = Lst_First(l); + tln = l->firstPtr; if (tln == NULL) return NULL; rd = tln->datum; - Lst_Remove(l, tln); + l->firstPtr = tln->nextPtr; + if (l->firstPtr) + l->firstPtr->prevPtr = NULL; + else + l->lastPtr = NULL; + free(tln); return rd; } |