diff options
author | peter <peter@FreeBSD.org> | 1996-10-06 15:57:15 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-10-06 15:57:15 +0000 |
commit | 4370a5a248c28b9ebcc0cf8c4b8280ffaabf8e00 (patch) | |
tree | 1a7a5d8132f1feb3d2ce835bc720e0d9f208ff62 /usr.bin/make/lst.lib | |
parent | 7bee03ad1db0ca4a78d6e5ff8dd19b3286eea5eb (diff) | |
download | FreeBSD-src-4370a5a248c28b9ebcc0cf8c4b8280ffaabf8e00.zip FreeBSD-src-4370a5a248c28b9ebcc0cf8c4b8280ffaabf8e00.tar.gz |
Import the 4.4BSD-Lite2 version of make onto the vendor branch
"for reference". This doesn't change anything since all files
have been touched.
Diffstat (limited to 'usr.bin/make/lst.lib')
27 files changed, 51 insertions, 44 deletions
diff --git a/usr.bin/make/lst.lib/lstAppend.c b/usr.bin/make/lst.lib/lstAppend.c index 0a1d52b..93800db 100644 --- a/usr.bin/make/lst.lib/lstAppend.c +++ b/usr.bin/make/lst.lib/lstAppend.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstAppend.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstAppend.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- diff --git a/usr.bin/make/lst.lib/lstAtEnd.c b/usr.bin/make/lst.lib/lstAtEnd.c index dce8a07..e61a28c 100644 --- a/usr.bin/make/lst.lib/lstAtEnd.c +++ b/usr.bin/make/lst.lib/lstAtEnd.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstAtEnd.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstAtEnd.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- diff --git a/usr.bin/make/lst.lib/lstAtFront.c b/usr.bin/make/lst.lib/lstAtFront.c index 58a235d..5e8b7f1 100644 --- a/usr.bin/make/lst.lib/lstAtFront.c +++ b/usr.bin/make/lst.lib/lstAtFront.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstAtFront.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstAtFront.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- diff --git a/usr.bin/make/lst.lib/lstClose.c b/usr.bin/make/lst.lib/lstClose.c index 624e6c6..6f9174f 100644 --- a/usr.bin/make/lst.lib/lstClose.c +++ b/usr.bin/make/lst.lib/lstClose.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstClose.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstClose.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- diff --git a/usr.bin/make/lst.lib/lstConcat.c b/usr.bin/make/lst.lib/lstConcat.c index 505d49f..e7726a8 100644 --- a/usr.bin/make/lst.lib/lstConcat.c +++ b/usr.bin/make/lst.lib/lstConcat.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstConcat.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstConcat.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- @@ -102,6 +102,8 @@ Lst_Concat (l1, l2, flags) list2->firstPtr->prevPtr = list1->lastPtr; if (list1->lastPtr != NilListNode) { list1->lastPtr->nextPtr = list2->firstPtr; + } else { + list1->firstPtr = list2->firstPtr; } list1->lastPtr = list2->lastPtr; } diff --git a/usr.bin/make/lst.lib/lstDatum.c b/usr.bin/make/lst.lib/lstDatum.c index 542898b..6b0988e 100644 --- a/usr.bin/make/lst.lib/lstDatum.c +++ b/usr.bin/make/lst.lib/lstDatum.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstDatum.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstDatum.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- diff --git a/usr.bin/make/lst.lib/lstDeQueue.c b/usr.bin/make/lst.lib/lstDeQueue.c index 921889a..4b90125 100644 --- a/usr.bin/make/lst.lib/lstDeQueue.c +++ b/usr.bin/make/lst.lib/lstDeQueue.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstDeQueue.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstDeQueue.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- diff --git a/usr.bin/make/lst.lib/lstDestroy.c b/usr.bin/make/lst.lib/lstDestroy.c index 3dedbf1..56ea5c5 100644 --- a/usr.bin/make/lst.lib/lstDestroy.c +++ b/usr.bin/make/lst.lib/lstDestroy.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstDestroy.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstDestroy.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- @@ -63,7 +63,7 @@ static char sccsid[] = "@(#)lstDestroy.c 8.1 (Berkeley) 6/6/93"; void Lst_Destroy (l, freeProc) Lst l; - register void (*freeProc)(); + register void (*freeProc) __P((ClientData)); { register ListNode ln; register ListNode tln = NilListNode; @@ -76,21 +76,25 @@ Lst_Destroy (l, freeProc) */ return; } - + + /* To ease scanning */ + if (list->lastPtr != NilListNode) + list->lastPtr->nextPtr = NilListNode; + else { + free ((Address)l); + return; + } + if (freeProc) { - for (ln = list->firstPtr; - ln != NilListNode && tln != list->firstPtr; - ln = tln) { - tln = ln->nextPtr; - (*freeProc) (ln->datum); - free ((Address)ln); + for (ln = list->firstPtr; ln != NilListNode; ln = tln) { + tln = ln->nextPtr; + (*freeProc) (ln->datum); + free ((Address)ln); } } else { - for (ln = list->firstPtr; - ln != NilListNode && tln != list->firstPtr; - ln = tln) { - tln = ln->nextPtr; - free ((Address)ln); + for (ln = list->firstPtr; ln != NilListNode; ln = tln) { + tln = ln->nextPtr; + free ((Address)ln); } } diff --git a/usr.bin/make/lst.lib/lstDupl.c b/usr.bin/make/lst.lib/lstDupl.c index 302bb30..184b386 100644 --- a/usr.bin/make/lst.lib/lstDupl.c +++ b/usr.bin/make/lst.lib/lstDupl.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstDupl.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstDupl.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- @@ -62,7 +62,8 @@ static char sccsid[] = "@(#)lstDupl.c 8.1 (Berkeley) 6/6/93"; Lst Lst_Duplicate (l, copyProc) Lst l; /* the list to duplicate */ - ClientData (*copyProc)(); /* A function to duplicate each ClientData */ + /* A function to duplicate each ClientData */ + ClientData (*copyProc) __P((ClientData)); { register Lst nl; register ListNode ln; diff --git a/usr.bin/make/lst.lib/lstEnQueue.c b/usr.bin/make/lst.lib/lstEnQueue.c index 14e36e3..1016c88 100644 --- a/usr.bin/make/lst.lib/lstEnQueue.c +++ b/usr.bin/make/lst.lib/lstEnQueue.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstEnQueue.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstEnQueue.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- diff --git a/usr.bin/make/lst.lib/lstFind.c b/usr.bin/make/lst.lib/lstFind.c index 1efdc54..bab85cc 100644 --- a/usr.bin/make/lst.lib/lstFind.c +++ b/usr.bin/make/lst.lib/lstFind.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstFind.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstFind.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- @@ -63,7 +63,7 @@ LstNode Lst_Find (l, d, cProc) Lst l; ClientData d; - int (*cProc)(); + int (*cProc) __P((ClientData, ClientData)); { return (Lst_FindFrom (l, Lst_First(l), d, cProc)); } diff --git a/usr.bin/make/lst.lib/lstFindFrom.c b/usr.bin/make/lst.lib/lstFindFrom.c index e1da033..08de990 100644 --- a/usr.bin/make/lst.lib/lstFindFrom.c +++ b/usr.bin/make/lst.lib/lstFindFrom.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstFindFrom.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstFindFrom.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- @@ -65,7 +65,7 @@ Lst_FindFrom (l, ln, d, cProc) Lst l; register LstNode ln; register ClientData d; - register int (*cProc)(); + register int (*cProc) __P((ClientData, ClientData)); { register ListNode tln; Boolean found = FALSE; diff --git a/usr.bin/make/lst.lib/lstFirst.c b/usr.bin/make/lst.lib/lstFirst.c index 95e0893..9a95018 100644 --- a/usr.bin/make/lst.lib/lstFirst.c +++ b/usr.bin/make/lst.lib/lstFirst.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstFirst.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstFirst.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- diff --git a/usr.bin/make/lst.lib/lstForEach.c b/usr.bin/make/lst.lib/lstForEach.c index 9fbdca5..1d6ba93 100644 --- a/usr.bin/make/lst.lib/lstForEach.c +++ b/usr.bin/make/lst.lib/lstForEach.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstForEach.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstForEach.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- @@ -64,7 +64,7 @@ static char sccsid[] = "@(#)lstForEach.c 8.1 (Berkeley) 6/6/93"; void Lst_ForEach (l, proc, d) Lst l; - register int (*proc)(); + register int (*proc) __P((ClientData, ClientData)); register ClientData d; { Lst_ForEachFrom(l, Lst_First(l), proc, d); diff --git a/usr.bin/make/lst.lib/lstForEachFrom.c b/usr.bin/make/lst.lib/lstForEachFrom.c index f19357f..7c9e51e 100644 --- a/usr.bin/make/lst.lib/lstForEachFrom.c +++ b/usr.bin/make/lst.lib/lstForEachFrom.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstForEachFrom.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstForEachFrom.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- diff --git a/usr.bin/make/lst.lib/lstInit.c b/usr.bin/make/lst.lib/lstInit.c index c548c7f..17276be 100644 --- a/usr.bin/make/lst.lib/lstInit.c +++ b/usr.bin/make/lst.lib/lstInit.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstInit.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstInit.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- diff --git a/usr.bin/make/lst.lib/lstInsert.c b/usr.bin/make/lst.lib/lstInsert.c index 45577c4..724924a 100644 --- a/usr.bin/make/lst.lib/lstInsert.c +++ b/usr.bin/make/lst.lib/lstInsert.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstInsert.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstInsert.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- diff --git a/usr.bin/make/lst.lib/lstInt.h b/usr.bin/make/lst.lib/lstInt.h index 0296558..1253660 100644 --- a/usr.bin/make/lst.lib/lstInt.h +++ b/usr.bin/make/lst.lib/lstInt.h @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)lstInt.h 8.1 (Berkeley) 6/6/93 + * @(#)lstInt.h 8.2 (Berkeley) 4/28/95 */ /*- diff --git a/usr.bin/make/lst.lib/lstIsAtEnd.c b/usr.bin/make/lst.lib/lstIsAtEnd.c index 2a8fc2f..7fdf68d 100644 --- a/usr.bin/make/lst.lib/lstIsAtEnd.c +++ b/usr.bin/make/lst.lib/lstIsAtEnd.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstIsAtEnd.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstIsAtEnd.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- diff --git a/usr.bin/make/lst.lib/lstIsEmpty.c b/usr.bin/make/lst.lib/lstIsEmpty.c index c2a6509..da47561 100644 --- a/usr.bin/make/lst.lib/lstIsEmpty.c +++ b/usr.bin/make/lst.lib/lstIsEmpty.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstIsEmpty.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstIsEmpty.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- diff --git a/usr.bin/make/lst.lib/lstLast.c b/usr.bin/make/lst.lib/lstLast.c index 176aafb..a87c50c 100644 --- a/usr.bin/make/lst.lib/lstLast.c +++ b/usr.bin/make/lst.lib/lstLast.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstLast.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstLast.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- diff --git a/usr.bin/make/lst.lib/lstMember.c b/usr.bin/make/lst.lib/lstMember.c index 23070b7..a6145ee 100644 --- a/usr.bin/make/lst.lib/lstMember.c +++ b/usr.bin/make/lst.lib/lstMember.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstMember.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstMember.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- diff --git a/usr.bin/make/lst.lib/lstNext.c b/usr.bin/make/lst.lib/lstNext.c index 0745b1c..b6986d8 100644 --- a/usr.bin/make/lst.lib/lstNext.c +++ b/usr.bin/make/lst.lib/lstNext.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstNext.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstNext.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- diff --git a/usr.bin/make/lst.lib/lstOpen.c b/usr.bin/make/lst.lib/lstOpen.c index f1decd7..9da8cfa 100644 --- a/usr.bin/make/lst.lib/lstOpen.c +++ b/usr.bin/make/lst.lib/lstOpen.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstOpen.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstOpen.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- diff --git a/usr.bin/make/lst.lib/lstRemove.c b/usr.bin/make/lst.lib/lstRemove.c index 48a4c00..98eb3ce 100644 --- a/usr.bin/make/lst.lib/lstRemove.c +++ b/usr.bin/make/lst.lib/lstRemove.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstRemove.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstRemove.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- diff --git a/usr.bin/make/lst.lib/lstReplace.c b/usr.bin/make/lst.lib/lstReplace.c index 344631a..8adb689 100644 --- a/usr.bin/make/lst.lib/lstReplace.c +++ b/usr.bin/make/lst.lib/lstReplace.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstReplace.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstReplace.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- diff --git a/usr.bin/make/lst.lib/lstSucc.c b/usr.bin/make/lst.lib/lstSucc.c index 06b354d..a5875f68 100644 --- a/usr.bin/make/lst.lib/lstSucc.c +++ b/usr.bin/make/lst.lib/lstSucc.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lstSucc.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)lstSucc.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ /*- |