summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/lst.lib
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1995-05-30 06:41:30 +0000
committerrgrimes <rgrimes@FreeBSD.org>1995-05-30 06:41:30 +0000
commita14d555c873398b14776ca4f2c33f9c69617afb9 (patch)
tree350f6f98843363254f9afe467ae0c92d5a9d7f43 /usr.bin/make/lst.lib
parentf3a2b348daf9fa6063c38d2d69563f732a2f80e7 (diff)
downloadFreeBSD-src-a14d555c873398b14776ca4f2c33f9c69617afb9.zip
FreeBSD-src-a14d555c873398b14776ca4f2c33f9c69617afb9.tar.gz
Remove trailing whitespace.
Diffstat (limited to 'usr.bin/make/lst.lib')
-rw-r--r--usr.bin/make/lst.lib/lstAppend.c14
-rw-r--r--usr.bin/make/lst.lib/lstAtEnd.c4
-rw-r--r--usr.bin/make/lst.lib/lstAtFront.c2
-rw-r--r--usr.bin/make/lst.lib/lstClose.c2
-rw-r--r--usr.bin/make/lst.lib/lstConcat.c4
-rw-r--r--usr.bin/make/lst.lib/lstDeQueue.c4
-rw-r--r--usr.bin/make/lst.lib/lstDestroy.c4
-rw-r--r--usr.bin/make/lst.lib/lstDupl.c4
-rw-r--r--usr.bin/make/lst.lib/lstEnQueue.c2
-rw-r--r--usr.bin/make/lst.lib/lstFindFrom.c8
-rw-r--r--usr.bin/make/lst.lib/lstForEachFrom.c14
-rw-r--r--usr.bin/make/lst.lib/lstInit.c6
-rw-r--r--usr.bin/make/lst.lib/lstInsert.c16
-rw-r--r--usr.bin/make/lst.lib/lstMember.c2
-rw-r--r--usr.bin/make/lst.lib/lstNext.c8
-rw-r--r--usr.bin/make/lst.lib/lstRemove.c8
16 files changed, 51 insertions, 51 deletions
diff --git a/usr.bin/make/lst.lib/lstAppend.c b/usr.bin/make/lst.lib/lstAppend.c
index 0a1d52b..16f9d87 100644
--- a/usr.bin/make/lst.lib/lstAppend.c
+++ b/usr.bin/make/lst.lib/lstAppend.c
@@ -70,23 +70,23 @@ Lst_Append (l, ln, d)
register List list;
register ListNode lNode;
register ListNode nLNode;
-
+
if (LstValid (l) && (ln == NILLNODE && LstIsEmpty (l))) {
goto ok;
}
-
+
if (!LstValid (l) || LstIsEmpty (l) || ! LstNodeValid (ln, l)) {
return (FAILURE);
}
ok:
-
+
list = (List)l;
lNode = (ListNode)ln;
PAlloc (nLNode, ListNode);
nLNode->datum = d;
nLNode->useCount = nLNode->flags = 0;
-
+
if (lNode == NilListNode) {
if (list->isCirc) {
nLNode->nextPtr = nLNode->prevPtr = nLNode;
@@ -97,17 +97,17 @@ Lst_Append (l, ln, d)
} else {
nLNode->prevPtr = lNode;
nLNode->nextPtr = lNode->nextPtr;
-
+
lNode->nextPtr = nLNode;
if (nLNode->nextPtr != NilListNode) {
nLNode->nextPtr->prevPtr = nLNode;
}
-
+
if (lNode == list->lastPtr) {
list->lastPtr = nLNode;
}
}
-
+
return (SUCCESS);
}
diff --git a/usr.bin/make/lst.lib/lstAtEnd.c b/usr.bin/make/lst.lib/lstAtEnd.c
index dce8a07..5513453 100644
--- a/usr.bin/make/lst.lib/lstAtEnd.c
+++ b/usr.bin/make/lst.lib/lstAtEnd.c
@@ -44,7 +44,7 @@ static char sccsid[] = "@(#)lstAtEnd.c 8.1 (Berkeley) 6/6/93";
*/
#include "lstInt.h"
-
+
/*-
*-----------------------------------------------------------------------
* Lst_AtEnd --
@@ -64,7 +64,7 @@ Lst_AtEnd (l, d)
ClientData d; /* Datum to add */
{
register LstNode end;
-
+
end = Lst_Last (l);
return (Lst_Append (l, end, d));
}
diff --git a/usr.bin/make/lst.lib/lstAtFront.c b/usr.bin/make/lst.lib/lstAtFront.c
index 58a235d..490cb9b 100644
--- a/usr.bin/make/lst.lib/lstAtFront.c
+++ b/usr.bin/make/lst.lib/lstAtFront.c
@@ -65,7 +65,7 @@ Lst_AtFront (l, d)
ClientData d;
{
register LstNode front;
-
+
front = Lst_First (l);
return (Lst_Insert (l, front, d));
}
diff --git a/usr.bin/make/lst.lib/lstClose.c b/usr.bin/make/lst.lib/lstClose.c
index 624e6c6..19a8d2e 100644
--- a/usr.bin/make/lst.lib/lstClose.c
+++ b/usr.bin/make/lst.lib/lstClose.c
@@ -68,7 +68,7 @@ Lst_Close (l)
Lst l; /* The list to close */
{
register List list = (List) l;
-
+
if (LstValid(l) == TRUE) {
list->isOpen = FALSE;
list->atEnd = Unknown;
diff --git a/usr.bin/make/lst.lib/lstConcat.c b/usr.bin/make/lst.lib/lstConcat.c
index cac2d11..3c90872 100644
--- a/usr.bin/make/lst.lib/lstConcat.c
+++ b/usr.bin/make/lst.lib/lstConcat.c
@@ -149,7 +149,7 @@ Lst_Concat (l1, l2, flags)
/*
* Finish bookkeeping. The last new element becomes the last element
- * of list one.
+ * of list one.
*/
list1->lastPtr = last;
@@ -173,4 +173,4 @@ Lst_Concat (l1, l2, flags)
return (SUCCESS);
}
-
+
diff --git a/usr.bin/make/lst.lib/lstDeQueue.c b/usr.bin/make/lst.lib/lstDeQueue.c
index 921889a..dbb4da6 100644
--- a/usr.bin/make/lst.lib/lstDeQueue.c
+++ b/usr.bin/make/lst.lib/lstDeQueue.c
@@ -65,12 +65,12 @@ Lst_DeQueue (l)
{
ClientData rd;
register ListNode tln;
-
+
tln = (ListNode) Lst_First (l);
if (tln == NilListNode) {
return ((ClientData) NIL);
}
-
+
rd = tln->datum;
if (Lst_Remove (l, (LstNode)tln) == FAILURE) {
return ((ClientData) NIL);
diff --git a/usr.bin/make/lst.lib/lstDestroy.c b/usr.bin/make/lst.lib/lstDestroy.c
index 7b7b4b2..7891e74 100644
--- a/usr.bin/make/lst.lib/lstDestroy.c
+++ b/usr.bin/make/lst.lib/lstDestroy.c
@@ -68,7 +68,7 @@ Lst_Destroy (l, freeProc)
register ListNode ln;
register ListNode tln = NilListNode;
register List list = (List)l;
-
+
if (l == NILLST || ! l) {
/*
* Note the check for l == (Lst)0 to catch uninitialized static Lst's.
@@ -97,6 +97,6 @@ Lst_Destroy (l, freeProc)
free ((Address)ln);
}
}
-
+
free ((Address)l);
}
diff --git a/usr.bin/make/lst.lib/lstDupl.c b/usr.bin/make/lst.lib/lstDupl.c
index 152c1d1..30124c1 100644
--- a/usr.bin/make/lst.lib/lstDupl.c
+++ b/usr.bin/make/lst.lib/lstDupl.c
@@ -68,7 +68,7 @@ Lst_Duplicate (l, copyProc)
register Lst nl;
register ListNode ln;
register List list = (List)l;
-
+
if (!LstValid (l)) {
return (NILLST);
}
@@ -94,6 +94,6 @@ Lst_Duplicate (l, copyProc)
ln = ln->nextPtr;
}
}
-
+
return (nl);
}
diff --git a/usr.bin/make/lst.lib/lstEnQueue.c b/usr.bin/make/lst.lib/lstEnQueue.c
index 14e36e3..8987adc 100644
--- a/usr.bin/make/lst.lib/lstEnQueue.c
+++ b/usr.bin/make/lst.lib/lstEnQueue.c
@@ -67,7 +67,7 @@ Lst_EnQueue (l, d)
if (LstValid (l) == FALSE) {
return (FAILURE);
}
-
+
return (Lst_Append (l, Lst_Last(l), d));
}
diff --git a/usr.bin/make/lst.lib/lstFindFrom.c b/usr.bin/make/lst.lib/lstFindFrom.c
index aaa5697..530f307 100644
--- a/usr.bin/make/lst.lib/lstFindFrom.c
+++ b/usr.bin/make/lst.lib/lstFindFrom.c
@@ -69,13 +69,13 @@ Lst_FindFrom (l, ln, d, cProc)
{
register ListNode tln;
Boolean found = FALSE;
-
+
if (!LstValid (l) || LstIsEmpty (l) || !LstNodeValid (ln, l)) {
return (NILLNODE);
}
-
+
tln = (ListNode)ln;
-
+
do {
if ((*cProc) (tln->datum, d) == 0) {
found = TRUE;
@@ -84,7 +84,7 @@ Lst_FindFrom (l, ln, d, cProc)
tln = tln->nextPtr;
}
} while (tln != (ListNode)ln && tln != NilListNode);
-
+
if (found) {
return ((LstNode)tln);
} else {
diff --git a/usr.bin/make/lst.lib/lstForEachFrom.c b/usr.bin/make/lst.lib/lstForEachFrom.c
index f19357f..6ae43ef 100644
--- a/usr.bin/make/lst.lib/lstForEachFrom.c
+++ b/usr.bin/make/lst.lib/lstForEachFrom.c
@@ -51,7 +51,7 @@ static char sccsid[] = "@(#)lstForEachFrom.c 8.1 (Berkeley) 6/6/93";
* Lst_ForEachFrom --
* Apply the given function to each element of the given list. The
* function should return 0 if traversal should continue and non-
- * zero if it should abort.
+ * zero if it should abort.
*
* Results:
* None.
@@ -74,19 +74,19 @@ Lst_ForEachFrom (l, ln, proc, d)
register ListNode next;
Boolean done;
int result;
-
+
if (!LstValid (list) || LstIsEmpty (list)) {
return;
}
-
+
do {
/*
* Take care of having the current element deleted out from under
* us.
*/
-
+
next = tln->nextPtr;
-
+
(void) tln->useCount++;
result = (*proc) (tln->datum, d);
(void) tln->useCount--;
@@ -99,7 +99,7 @@ Lst_ForEachFrom (l, ln, proc, d)
*/
done = (next == tln->nextPtr &&
(next == NilListNode || next == list->firstPtr));
-
+
next = tln->nextPtr;
if (tln->flags & LN_DELETED) {
@@ -107,5 +107,5 @@ Lst_ForEachFrom (l, ln, proc, d)
}
tln = next;
} while (!result && !LstIsEmpty(list) && !done);
-
+
}
diff --git a/usr.bin/make/lst.lib/lstInit.c b/usr.bin/make/lst.lib/lstInit.c
index c548c7f..8e696cd 100644
--- a/usr.bin/make/lst.lib/lstInit.c
+++ b/usr.bin/make/lst.lib/lstInit.c
@@ -63,14 +63,14 @@ Lst_Init(circ)
Boolean circ; /* TRUE if the list should be made circular */
{
register List nList;
-
+
PAlloc (nList, List);
-
+
nList->firstPtr = NilListNode;
nList->lastPtr = NilListNode;
nList->isOpen = FALSE;
nList->isCirc = circ;
nList->atEnd = Unknown;
-
+
return ((Lst)nList);
}
diff --git a/usr.bin/make/lst.lib/lstInsert.c b/usr.bin/make/lst.lib/lstInsert.c
index 45577c4..e07df21 100644
--- a/usr.bin/make/lst.lib/lstInsert.c
+++ b/usr.bin/make/lst.lib/lstInsert.c
@@ -76,17 +76,17 @@ Lst_Insert (l, ln, d)
*/
if (LstValid (l) && (LstIsEmpty (l) && ln == NILLNODE))
goto ok;
-
+
if (!LstValid (l) || LstIsEmpty (l) || !LstNodeValid (ln, l)) {
return (FAILURE);
}
-
+
ok:
PAlloc (nLNode, ListNode);
-
+
nLNode->datum = d;
nLNode->useCount = nLNode->flags = 0;
-
+
if (ln == NILLNODE) {
if (list->isCirc) {
nLNode->prevPtr = nLNode->nextPtr = nLNode;
@@ -97,17 +97,17 @@ Lst_Insert (l, ln, d)
} else {
nLNode->prevPtr = lNode->prevPtr;
nLNode->nextPtr = lNode;
-
+
if (nLNode->prevPtr != NilListNode) {
nLNode->prevPtr->nextPtr = nLNode;
}
lNode->prevPtr = nLNode;
-
+
if (lNode == list->firstPtr) {
list->firstPtr = nLNode;
}
}
-
+
return (SUCCESS);
}
-
+
diff --git a/usr.bin/make/lst.lib/lstMember.c b/usr.bin/make/lst.lib/lstMember.c
index 23070b7..9c1aac7 100644
--- a/usr.bin/make/lst.lib/lstMember.c
+++ b/usr.bin/make/lst.lib/lstMember.c
@@ -57,7 +57,7 @@ Lst_Member (l, d)
if (lNode == NilListNode) {
return NILLNODE;
}
-
+
do {
if (lNode->datum == d) {
return (LstNode)lNode;
diff --git a/usr.bin/make/lst.lib/lstNext.c b/usr.bin/make/lst.lib/lstNext.c
index 0745b1c..b371eca 100644
--- a/usr.bin/make/lst.lib/lstNext.c
+++ b/usr.bin/make/lst.lib/lstNext.c
@@ -71,14 +71,14 @@ Lst_Next (l)
{
register ListNode tln;
register List list = (List)l;
-
+
if ((LstValid (l) == FALSE) ||
(list->isOpen == FALSE)) {
return (NILLNODE);
}
-
+
list->prevPtr = list->curPtr;
-
+
if (list->curPtr == NilListNode) {
if (list->atEnd == Unknown) {
/*
@@ -108,7 +108,7 @@ Lst_Next (l)
list->atEnd = Middle;
}
}
-
+
return ((LstNode)tln);
}
diff --git a/usr.bin/make/lst.lib/lstRemove.c b/usr.bin/make/lst.lib/lstRemove.c
index 48a4c00..c43e3da 100644
--- a/usr.bin/make/lst.lib/lstRemove.c
+++ b/usr.bin/make/lst.lib/lstRemove.c
@@ -72,7 +72,7 @@ Lst_Remove (l, ln)
!LstNodeValid (ln, l)) {
return (FAILURE);
}
-
+
/*
* unlink it from the list
*/
@@ -82,7 +82,7 @@ Lst_Remove (l, ln)
if (lNode->prevPtr != NilListNode) {
lNode->prevPtr->nextPtr = lNode->nextPtr;
}
-
+
/*
* if either the firstPtr or lastPtr of the list point to this node,
* adjust them accordingly
@@ -115,7 +115,7 @@ Lst_Remove (l, ln)
if (list->firstPtr == lNode) {
list->firstPtr = NilListNode;
}
-
+
/*
* note that the datum is unmolested. The caller must free it as
* necessary and as expected.
@@ -125,7 +125,7 @@ Lst_Remove (l, ln)
} else {
lNode->flags |= LN_DELETED;
}
-
+
return (SUCCESS);
}
OpenPOWER on IntegriCloud