summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-07-29 13:49:55 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-07-29 13:49:55 +0000
commit4696ff97cbacab51a76a3a693ff9d4307a3b70c0 (patch)
tree41b163c033796c0324a21d709543df26e468e711
parenta7ebc714d963055c526618bb095759760812cbe0 (diff)
reindent, no code change
-rw-r--r--usr.bin/make/lst.lib/lstAddNew.c14
-rw-r--r--usr.bin/make/lst.lib/lstAppend.c60
-rw-r--r--usr.bin/make/lst.lib/lstConcat.c62
-rw-r--r--usr.bin/make/lst.lib/lstConcatDestroy.c34
-rw-r--r--usr.bin/make/lst.lib/lstDeQueue.c28
-rw-r--r--usr.bin/make/lst.lib/lstDestroy.c28
-rw-r--r--usr.bin/make/lst.lib/lstDupl.c20
-rw-r--r--usr.bin/make/lst.lib/lstFindFrom.c12
-rw-r--r--usr.bin/make/lst.lib/lstForEachFrom.c22
-rw-r--r--usr.bin/make/lst.lib/lstInit.c6
-rw-r--r--usr.bin/make/lst.lib/lstInsert.c60
-rw-r--r--usr.bin/make/lst.lib/lstMember.c12
-rw-r--r--usr.bin/make/lst.lib/lstRemove.c34
-rw-r--r--usr.bin/make/lst.lib/lstReplace.c6
-rw-r--r--usr.bin/make/lst.lib/lstSucc.c10
15 files changed, 204 insertions, 204 deletions
diff --git a/usr.bin/make/lst.lib/lstAddNew.c b/usr.bin/make/lst.lib/lstAddNew.c
index 194b977e2d9..0339a195d20 100644
--- a/usr.bin/make/lst.lib/lstAddNew.c
+++ b/usr.bin/make/lst.lib/lstAddNew.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: lstAddNew.c,v 1.4 2004/04/07 13:11:36 espie Exp $ */
+/* $OpenBSD: lstAddNew.c,v 1.5 2007/07/29 13:49:54 espie Exp $ */
/* ex:ts=8 sw=4:
*/
@@ -39,11 +39,11 @@
bool
Lst_AddNew(Lst l, void *d)
{
- if (Lst_Member(l, d) != NULL)
- return false;
- else {
- Lst_AtEnd(l, d);
- return true;
- }
+ if (Lst_Member(l, d) != NULL)
+ return false;
+ else {
+ Lst_AtEnd(l, d);
+ return true;
+ }
}
diff --git a/usr.bin/make/lst.lib/lstAppend.c b/usr.bin/make/lst.lib/lstAppend.c
index 54e3d1a5da5..09876dfc619 100644
--- a/usr.bin/make/lst.lib/lstAppend.c
+++ b/usr.bin/make/lst.lib/lstAppend.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: lstAppend.c,v 1.16 2004/04/07 13:11:36 espie Exp $ */
+/* $OpenBSD: lstAppend.c,v 1.17 2007/07/29 13:49:54 espie Exp $ */
/* $NetBSD: lstAppend.c,v 1.5 1996/11/06 17:59:31 christos Exp $ */
/*
@@ -60,46 +60,46 @@
void
Lst_Append(Lst l, LstNode after, void *d)
{
- LstNode nLNode;
+ LstNode nLNode;
- if (after == NULL && !Lst_IsEmpty(l))
- return;
+ if (after == NULL && !Lst_IsEmpty(l))
+ return;
- if (after != NULL && Lst_IsEmpty(l))
- return;
+ if (after != NULL && Lst_IsEmpty(l))
+ return;
- PAlloc(nLNode, LstNode);
- nLNode->datum = d;
+ PAlloc(nLNode, LstNode);
+ nLNode->datum = d;
- if (after == NULL) {
- nLNode->nextPtr = nLNode->prevPtr = NULL;
- l->firstPtr = l->lastPtr = nLNode;
- } else {
- nLNode->prevPtr = after;
- nLNode->nextPtr = after->nextPtr;
+ if (after == NULL) {
+ nLNode->nextPtr = nLNode->prevPtr = NULL;
+ l->firstPtr = l->lastPtr = nLNode;
+ } else {
+ nLNode->prevPtr = after;
+ nLNode->nextPtr = after->nextPtr;
- after->nextPtr = nLNode;
- if (nLNode->nextPtr != NULL)
- nLNode->nextPtr->prevPtr = nLNode;
+ after->nextPtr = nLNode;
+ if (nLNode->nextPtr != NULL)
+ nLNode->nextPtr->prevPtr = nLNode;
- if (after == l->lastPtr)
- l->lastPtr = nLNode;
- }
+ if (after == l->lastPtr)
+ l->lastPtr = nLNode;
+ }
}
void
Lst_AtEnd(Lst l, void *d)
{
- LstNode ln;
+ LstNode ln;
- PAlloc(ln, LstNode);
- ln->datum = d;
+ PAlloc(ln, LstNode);
+ ln->datum = d;
- ln->prevPtr = l->lastPtr;
- ln->nextPtr = NULL;
- if (l->lastPtr == NULL)
- l->firstPtr = ln;
- else
- l->lastPtr->nextPtr = ln;
- l->lastPtr = ln;
+ ln->prevPtr = l->lastPtr;
+ ln->nextPtr = NULL;
+ if (l->lastPtr == NULL)
+ l->firstPtr = ln;
+ else
+ l->lastPtr->nextPtr = ln;
+ l->lastPtr = ln;
}
diff --git a/usr.bin/make/lst.lib/lstConcat.c b/usr.bin/make/lst.lib/lstConcat.c
index 585a45a560e..262f8e48d18 100644
--- a/usr.bin/make/lst.lib/lstConcat.c
+++ b/usr.bin/make/lst.lib/lstConcat.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: lstConcat.c,v 1.16 2004/04/07 13:11:36 espie Exp $ */
+/* $OpenBSD: lstConcat.c,v 1.17 2007/07/29 13:49:54 espie Exp $ */
/* $NetBSD: lstConcat.c,v 1.6 1996/11/06 17:59:34 christos Exp $ */
/*
@@ -60,36 +60,36 @@
void
Lst_Concat(Lst l1, Lst l2)
{
- LstNode ln; /* original LstNode */
- LstNode nln; /* new LstNode */
- LstNode last; /* the last element in the list. Keeps
- * bookkeeping until the end */
- if (l2->firstPtr != NULL) {
- /* The loop simply goes through the entire second list creating new
- * LstNodes and filling in the nextPtr, and prevPtr to fit into l1
- * and its datum field from the datum field of the corresponding
- * element in l2. The 'last' node follows the last of the new nodes
- * along until the entire l2 has been appended. Only then does the
- * bookkeeping catch up with the changes. During the first iteration
- * of the loop, if 'last' is NULL, the first list must have been empty
- * so the newly-created node is made the first node of the list. */
- for (last = l1->lastPtr, ln = l2->firstPtr;
- ln != NULL;
- ln = ln->nextPtr) {
- PAlloc(nln, LstNode);
- nln->datum = ln->datum;
- if (last != NULL)
- last->nextPtr = nln;
- else
- l1->firstPtr = nln;
- nln->prevPtr = last;
- last = nln;
- }
+ LstNode ln; /* original LstNode */
+ LstNode nln; /* new LstNode */
+ LstNode last; /* the last element in the list. Keeps
+ * bookkeeping until the end */
+ if (l2->firstPtr != NULL) {
+ /* The loop simply goes through the entire second list creating
+ * new LstNodes and filling in the nextPtr, and prevPtr to fit
+ * into l1 and its datum field from the datum field of the
+ * corresponding element in l2. The 'last' node follows the
+ * last of the new nodes along until the entire l2 has been
+ * appended. Only then does the bookkeeping catch up with the
+ * changes. During the first iteration of the loop, if 'last'
+ * is NULL, the first list must have been empty so the
+ * newly-created node is made the first node of the list. */
+ for (last = l1->lastPtr, ln = l2->firstPtr; ln != NULL;
+ ln = ln->nextPtr) {
+ PAlloc(nln, LstNode);
+ nln->datum = ln->datum;
+ if (last != NULL)
+ last->nextPtr = nln;
+ else
+ l1->firstPtr = nln;
+ nln->prevPtr = last;
+ last = nln;
+ }
- /* Finish bookkeeping. The last new element becomes the last element
- * of l1. */
- l1->lastPtr = last;
- last->nextPtr = NULL;
- }
+ /* Finish bookkeeping. The last new element becomes the last
+ * element of l1. */
+ l1->lastPtr = last;
+ last->nextPtr = NULL;
+ }
}
diff --git a/usr.bin/make/lst.lib/lstConcatDestroy.c b/usr.bin/make/lst.lib/lstConcatDestroy.c
index e1abf31a85f..9afb730b0ae 100644
--- a/usr.bin/make/lst.lib/lstConcatDestroy.c
+++ b/usr.bin/make/lst.lib/lstConcatDestroy.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: lstConcatDestroy.c,v 1.7 2004/04/07 13:11:36 espie Exp $ */
+/* $OpenBSD: lstConcatDestroy.c,v 1.8 2007/07/29 13:49:54 espie Exp $ */
/* $NetBSD: lstConcat.c,v 1.6 1996/11/06 17:59:34 christos Exp $ */
/*
@@ -57,21 +57,21 @@
void
Lst_ConcatDestroy(Lst l1, Lst l2)
{
- if (l2->firstPtr != NULL) {
- /*
- * So long as the second list isn't empty, we just link the
- * first element of the second list to the last element of the
- * first list. If the first list isn't empty, we then link the
- * last element of the list to the first element of the second list
- * The last element of the second list, if it exists, then becomes
- * the last element of the first list.
- */
- l2->firstPtr->prevPtr = l1->lastPtr;
- if (l1->lastPtr != NULL)
- l1->lastPtr->nextPtr = l2->firstPtr;
- else
- l1->firstPtr = l2->firstPtr;
- l1->lastPtr = l2->lastPtr;
- }
+ if (l2->firstPtr != NULL) {
+ /*
+ * So long as the second list isn't empty, we just link the
+ * first element of the second list to the last element of the
+ * first list. If the first list isn't empty, we then link the
+ * last element of the list to the first element of the second
+ * list The last element of the second list, if it exists, then
+ * becomes the last element of the first list.
+ */
+ l2->firstPtr->prevPtr = l1->lastPtr;
+ if (l1->lastPtr != NULL)
+ l1->lastPtr->nextPtr = l2->firstPtr;
+ else
+ l1->firstPtr = l2->firstPtr;
+ l1->lastPtr = l2->lastPtr;
+ }
}
diff --git a/usr.bin/make/lst.lib/lstDeQueue.c b/usr.bin/make/lst.lib/lstDeQueue.c
index 573a6ca26f3..5503efdf770 100644
--- a/usr.bin/make/lst.lib/lstDeQueue.c
+++ b/usr.bin/make/lst.lib/lstDeQueue.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: lstDeQueue.c,v 1.15 2004/04/07 13:11:36 espie Exp $ */
+/* $OpenBSD: lstDeQueue.c,v 1.16 2007/07/29 13:49:54 espie Exp $ */
/* $NetBSD: lstDeQueue.c,v 1.5 1996/11/06 17:59:36 christos Exp $ */
/*
@@ -57,20 +57,20 @@
void *
Lst_DeQueue(Lst l)
{
- void *rd;
- LstNode tln;
+ void *rd;
+ LstNode tln;
- tln = l->firstPtr;
- if (tln == NULL)
- return NULL;
+ tln = l->firstPtr;
+ if (tln == NULL)
+ return NULL;
- rd = tln->datum;
- l->firstPtr = tln->nextPtr;
- if (l->firstPtr)
- l->firstPtr->prevPtr = NULL;
- else
- l->lastPtr = NULL;
- free(tln);
- return rd;
+ rd = tln->datum;
+ l->firstPtr = tln->nextPtr;
+ if (l->firstPtr)
+ l->firstPtr->prevPtr = NULL;
+ else
+ l->lastPtr = NULL;
+ free(tln);
+ return rd;
}
diff --git a/usr.bin/make/lst.lib/lstDestroy.c b/usr.bin/make/lst.lib/lstDestroy.c
index 42a280834b7..3452fc55a57 100644
--- a/usr.bin/make/lst.lib/lstDestroy.c
+++ b/usr.bin/make/lst.lib/lstDestroy.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: lstDestroy.c,v 1.16 2004/04/07 13:11:36 espie Exp $ */
+/* $OpenBSD: lstDestroy.c,v 1.17 2007/07/29 13:49:54 espie Exp $ */
/* $NetBSD: lstDestroy.c,v 1.6 1996/11/06 17:59:37 christos Exp $ */
/*
@@ -57,20 +57,20 @@
void
Lst_Destroy(Lst l, SimpleProc freeProc)
{
- LstNode ln;
- LstNode tln;
+ LstNode ln;
+ LstNode tln;
- if (freeProc) {
- for (ln = l->firstPtr; ln != NULL; ln = tln) {
- tln = ln->nextPtr;
- (*freeProc)(ln->datum);
- free(ln);
+ if (freeProc) {
+ for (ln = l->firstPtr; ln != NULL; ln = tln) {
+ tln = ln->nextPtr;
+ (*freeProc)(ln->datum);
+ free(ln);
+ }
+ } else {
+ for (ln = l->firstPtr; ln != NULL; ln = tln) {
+ tln = ln->nextPtr;
+ free(ln);
+ }
}
- } else {
- for (ln = l->firstPtr; ln != NULL; ln = tln) {
- tln = ln->nextPtr;
- free(ln);
- }
- }
}
diff --git a/usr.bin/make/lst.lib/lstDupl.c b/usr.bin/make/lst.lib/lstDupl.c
index 9689423a4f0..5b66ac4caa8 100644
--- a/usr.bin/make/lst.lib/lstDupl.c
+++ b/usr.bin/make/lst.lib/lstDupl.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: lstDupl.c,v 1.18 2004/04/07 13:11:36 espie Exp $ */
+/* $OpenBSD: lstDupl.c,v 1.19 2007/07/29 13:49:54 espie Exp $ */
/* $NetBSD: lstDupl.c,v 1.6 1996/11/06 17:59:37 christos Exp $ */
/*
@@ -59,16 +59,16 @@
Lst
Lst_Clone(Lst nl, Lst l, DuplicateProc copyProc)
{
- LstNode ln;
+ LstNode ln;
- Lst_Init(nl);
+ Lst_Init(nl);
- for (ln = l->firstPtr; ln != NULL; ln = ln->nextPtr) {
- if (copyProc != NOCOPY)
- Lst_AtEnd(nl, (*copyProc)(ln->datum));
- else
- Lst_AtEnd(nl, ln->datum);
- }
- return nl;
+ for (ln = l->firstPtr; ln != NULL; ln = ln->nextPtr) {
+ if (copyProc != NOCOPY)
+ Lst_AtEnd(nl, (*copyProc)(ln->datum));
+ else
+ Lst_AtEnd(nl, ln->datum);
+ }
+ return nl;
}
diff --git a/usr.bin/make/lst.lib/lstFindFrom.c b/usr.bin/make/lst.lib/lstFindFrom.c
index 8bdb564c245..3da40032d9e 100644
--- a/usr.bin/make/lst.lib/lstFindFrom.c
+++ b/usr.bin/make/lst.lib/lstFindFrom.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: lstFindFrom.c,v 1.14 2004/04/07 13:11:36 espie Exp $ */
+/* $OpenBSD: lstFindFrom.c,v 1.15 2007/07/29 13:49:54 espie Exp $ */
/* $NetBSD: lstFindFrom.c,v 1.6 1996/11/06 17:59:40 christos Exp $ */
/*
@@ -56,12 +56,12 @@
LstNode
Lst_FindFrom(LstNode ln, FindProc cProc, void *d)
{
- LstNode tln;
+ LstNode tln;
- for (tln = ln; tln != NULL; tln = tln->nextPtr)
- if ((*cProc)(tln->datum, d) == 0)
- return tln;
+ for (tln = ln; tln != NULL; tln = tln->nextPtr)
+ if ((*cProc)(tln->datum, d) == 0)
+ return tln;
- return NULL;
+ return NULL;
}
diff --git a/usr.bin/make/lst.lib/lstForEachFrom.c b/usr.bin/make/lst.lib/lstForEachFrom.c
index 1329d3ec9a6..d8ae435f2a5 100644
--- a/usr.bin/make/lst.lib/lstForEachFrom.c
+++ b/usr.bin/make/lst.lib/lstForEachFrom.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: lstForEachFrom.c,v 1.15 2007/01/04 17:55:35 espie Exp $ */
+/* $OpenBSD: lstForEachFrom.c,v 1.16 2007/07/29 13:49:54 espie Exp $ */
/* $NetBSD: lstForEachFrom.c,v 1.5 1996/11/06 17:59:42 christos Exp $ */
/*
@@ -57,27 +57,27 @@
void
Lst_ForEachFrom(LstNode ln, ForEachProc proc, void *d)
{
- LstNode tln;
+ LstNode tln;
- for (tln = ln; tln != NULL; tln = tln->nextPtr)
- (*proc)(tln->datum, d);
+ for (tln = ln; tln != NULL; tln = tln->nextPtr)
+ (*proc)(tln->datum, d);
}
void
Lst_Every(Lst l, SimpleProc proc)
{
- LstNode tln;
+ LstNode tln;
- for (tln = l->firstPtr; tln != NULL; tln = tln->nextPtr)
- (*proc)(tln->datum);
+ for (tln = l->firstPtr; tln != NULL; tln = tln->nextPtr)
+ (*proc)(tln->datum);
}
void
Lst_ForEachNodeWhile(Lst l, ForEachNodeWhileProc proc, void *d)
{
- LstNode it;
+ LstNode it;
- for (it = l->firstPtr; it != NULL; it = it->nextPtr)
- if ((*proc)(it, d) == 0)
- return;
+ for (it = l->firstPtr; it != NULL; it = it->nextPtr)
+ if ((*proc)(it, d) == 0)
+ return;
}
diff --git a/usr.bin/make/lst.lib/lstInit.c b/usr.bin/make/lst.lib/lstInit.c
index fecea57ed5d..86839ed1cb4 100644
--- a/usr.bin/make/lst.lib/lstInit.c
+++ b/usr.bin/make/lst.lib/lstInit.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: lstInit.c,v 1.15 2004/04/07 13:11:36 espie Exp $ */
+/* $OpenBSD: lstInit.c,v 1.16 2007/07/29 13:49:54 espie Exp $ */
/* $NetBSD: lstInit.c,v 1.5 1996/11/06 17:59:43 christos Exp $ */
/*
@@ -51,7 +51,7 @@
void
Lst_Init(Lst l)
{
- l->firstPtr = NULL;
- l->lastPtr = NULL;
+ l->firstPtr = NULL;
+ l->lastPtr = NULL;
}
diff --git a/usr.bin/make/lst.lib/lstInsert.c b/usr.bin/make/lst.lib/lstInsert.c
index 5b9c89fd493..4b590b3899f 100644
--- a/usr.bin/make/lst.lib/lstInsert.c
+++ b/usr.bin/make/lst.lib/lstInsert.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: lstInsert.c,v 1.16 2004/04/07 13:11:36 espie Exp $ */
+/* $OpenBSD: lstInsert.c,v 1.17 2007/07/29 13:49:54 espie Exp $ */
/* $NetBSD: lstInsert.c,v 1.5 1996/11/06 17:59:44 christos Exp $ */
/*
@@ -59,48 +59,48 @@
void
Lst_Insert(Lst l, LstNode before, void *d)
{
- LstNode nLNode; /* new lnode for d */
+ LstNode nLNode;
- if (before == NULL && !Lst_IsEmpty(l))
- return;
+ if (before == NULL && !Lst_IsEmpty(l))
+ return;
- if (before != NULL && Lst_IsEmpty(l))
- return;
+ if (before != NULL && Lst_IsEmpty(l))
+ return;
- PAlloc(nLNode, LstNode);
+ PAlloc(nLNode, LstNode);
- nLNode->datum = d;
+ nLNode->datum = d;
- if (before == NULL) {
- nLNode->prevPtr = nLNode->nextPtr = NULL;
- l->firstPtr = l->lastPtr = nLNode;
- } else {
- nLNode->prevPtr = before->prevPtr;
- nLNode->nextPtr = before;
+ if (before == NULL) {
+ nLNode->prevPtr = nLNode->nextPtr = NULL;
+ l->firstPtr = l->lastPtr = nLNode;
+ } else {
+ nLNode->prevPtr = before->prevPtr;
+ nLNode->nextPtr = before;
- if (nLNode->prevPtr != NULL)
- nLNode->prevPtr->nextPtr = nLNode;
- before->prevPtr = nLNode;
+ if (nLNode->prevPtr != NULL)
+ nLNode->prevPtr->nextPtr = nLNode;
+ before->prevPtr = nLNode;
- if (before == l->firstPtr)
- l->firstPtr = nLNode;
- }
+ if (before == l->firstPtr)
+ l->firstPtr = nLNode;
+ }
}
void
Lst_AtFront(Lst l, void *d)
{
- LstNode ln;
+ LstNode ln;
- PAlloc(ln, LstNode);
- ln->datum = d;
+ PAlloc(ln, LstNode);
+ ln->datum = d;
- ln->nextPtr = l->firstPtr;
- ln->prevPtr = NULL;
- if (l->firstPtr == NULL)
- l->lastPtr = ln;
- else
- l->firstPtr->prevPtr = ln;
- l->firstPtr = ln;
+ ln->nextPtr = l->firstPtr;
+ ln->prevPtr = NULL;
+ if (l->firstPtr == NULL)
+ l->lastPtr = ln;
+ else
+ l->firstPtr->prevPtr = ln;
+ l->firstPtr = ln;
}
diff --git a/usr.bin/make/lst.lib/lstMember.c b/usr.bin/make/lst.lib/lstMember.c
index bd1cdf4c0d3..d7290cc7d6e 100644
--- a/usr.bin/make/lst.lib/lstMember.c
+++ b/usr.bin/make/lst.lib/lstMember.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: lstMember.c,v 1.13 2004/04/07 13:11:36 espie Exp $ */
+/* $OpenBSD: lstMember.c,v 1.14 2007/07/29 13:49:54 espie Exp $ */
/* $NetBSD: lstMember.c,v 1.5 1996/11/06 17:59:48 christos Exp $ */
/*
@@ -45,10 +45,10 @@
LstNode
Lst_Member(Lst l, void *d)
{
- LstNode lNode;
+ LstNode lNode;
- for (lNode = l->firstPtr; lNode != NULL; lNode = lNode->nextPtr)
- if (lNode->datum == d)
- return lNode;
- return NULL;
+ for (lNode = l->firstPtr; lNode != NULL; lNode = lNode->nextPtr)
+ if (lNode->datum == d)
+ return lNode;
+ return NULL;
}
diff --git a/usr.bin/make/lst.lib/lstRemove.c b/usr.bin/make/lst.lib/lstRemove.c
index 25802d493e0..8b8b97eeee9 100644
--- a/usr.bin/make/lst.lib/lstRemove.c
+++ b/usr.bin/make/lst.lib/lstRemove.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: lstRemove.c,v 1.15 2004/04/07 13:11:36 espie Exp $ */
+/* $OpenBSD: lstRemove.c,v 1.16 2007/07/29 13:49:54 espie Exp $ */
/* $NetBSD: lstRemove.c,v 1.5 1996/11/06 17:59:50 christos Exp $ */
/*
@@ -58,24 +58,24 @@
void
Lst_Remove(Lst l, LstNode ln)
{
- if (ln == NULL)
- return;
+ if (ln == NULL)
+ return;
- /* unlink it from the list */
- if (ln->nextPtr != NULL)
- ln->nextPtr->prevPtr = ln->prevPtr;
- if (ln->prevPtr != NULL)
- ln->prevPtr->nextPtr = ln->nextPtr;
+ /* unlink it from the list */
+ if (ln->nextPtr != NULL)
+ ln->nextPtr->prevPtr = ln->prevPtr;
+ if (ln->prevPtr != NULL)
+ ln->prevPtr->nextPtr = ln->nextPtr;
- /* if either the firstPtr or lastPtr of the list point to this node,
- * adjust them accordingly */
- if (l->firstPtr == ln)
- l->firstPtr = ln->nextPtr;
- if (l->lastPtr == ln)
- l->lastPtr = ln->prevPtr;
+ /* if either the firstPtr or lastPtr of the list point to this node,
+ * adjust them accordingly */
+ if (l->firstPtr == ln)
+ l->firstPtr = ln->nextPtr;
+ if (l->lastPtr == ln)
+ l->lastPtr = ln->prevPtr;
- /* note that the datum is unmolested. The caller must free it as
- * necessary and as expected. */
- free(ln);
+ /* note that the datum is unmolested. The caller must free it as
+ * necessary and as expected. */
+ free(ln);
}
diff --git a/usr.bin/make/lst.lib/lstReplace.c b/usr.bin/make/lst.lib/lstReplace.c
index 897b650aefe..3230a503553 100644
--- a/usr.bin/make/lst.lib/lstReplace.c
+++ b/usr.bin/make/lst.lib/lstReplace.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: lstReplace.c,v 1.14 2004/04/07 13:11:36 espie Exp $ */
+/* $OpenBSD: lstReplace.c,v 1.15 2007/07/29 13:49:54 espie Exp $ */
/* $NetBSD: lstReplace.c,v 1.5 1996/11/06 17:59:51 christos Exp $ */
/*
@@ -51,7 +51,7 @@
void
Lst_Replace(LstNode ln, void *d)
{
- if (ln != NULL)
- ln->datum = d;
+ if (ln != NULL)
+ ln->datum = d;
}
diff --git a/usr.bin/make/lst.lib/lstSucc.c b/usr.bin/make/lst.lib/lstSucc.c
index 6db016dbb2e..265c7101858 100644
--- a/usr.bin/make/lst.lib/lstSucc.c
+++ b/usr.bin/make/lst.lib/lstSucc.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: lstSucc.c,v 1.13 2004/04/07 13:11:36 espie Exp $ */
+/* $OpenBSD: lstSucc.c,v 1.14 2007/07/29 13:49:54 espie Exp $ */
/* $NetBSD: lstSucc.c,v 1.5 1996/11/06 17:59:52 christos Exp $ */
/*
@@ -55,9 +55,9 @@
LstNode
Lst_Succ(LstNode ln)
{
- if (ln == NULL)
- return NULL;
- else
- return ln->nextPtr;
+ if (ln == NULL)
+ return NULL;
+ else
+ return ln->nextPtr;
}