summaryrefslogtreecommitdiff
path: root/lst.lib
diff options
context:
space:
mode:
Diffstat (limited to 'lst.lib')
-rw-r--r--lst.lib/lstAppend.c11
-rw-r--r--lst.lib/lstAtEnd.c8
-rw-r--r--lst.lib/lstAtFront.c8
-rw-r--r--lst.lib/lstClose.c7
-rw-r--r--lst.lib/lstConcat.c11
-rw-r--r--lst.lib/lstDatum.c9
-rw-r--r--lst.lib/lstDeQueue.c9
-rw-r--r--lst.lib/lstDupl.c8
-rw-r--r--lst.lib/lstEnQueue.c11
-rw-r--r--lst.lib/lstFind.c9
-rw-r--r--lst.lib/lstFindFrom.c9
-rw-r--r--lst.lib/lstFirst.c9
-rw-r--r--lst.lib/lstForEach.c7
-rw-r--r--lst.lib/lstForEachFrom.c7
-rw-r--r--lst.lib/lstInit.c8
-rw-r--r--lst.lib/lstInsert.c11
-rw-r--r--lst.lib/lstIsAtEnd.c11
-rw-r--r--lst.lib/lstIsEmpty.c9
-rw-r--r--lst.lib/lstLast.c9
-rw-r--r--lst.lib/lstNext.c9
-rw-r--r--lst.lib/lstOpen.c11
-rw-r--r--lst.lib/lstPrev.c9
-rw-r--r--lst.lib/lstRemove.c14
-rw-r--r--lst.lib/lstReplace.c11
-rw-r--r--lst.lib/lstSucc.c9
25 files changed, 106 insertions, 128 deletions
diff --git a/lst.lib/lstAppend.c b/lst.lib/lstAppend.c
index 4dafe831450e7..97e60d959d7d0 100644
--- a/lst.lib/lstAppend.c
+++ b/lst.lib/lstAppend.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstAppend.c,v 1.14 2009/01/23 21:26:30 dsl Exp $ */
+/* $NetBSD: lstAppend.c,v 1.15 2020/07/03 08:37:56 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstAppend.c,v 1.14 2009/01/23 21:26:30 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstAppend.c,v 1.15 2020/07/03 08:37:56 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstAppend.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstAppend.c,v 1.14 2009/01/23 21:26:30 dsl Exp $");
+__RCSID("$NetBSD: lstAppend.c,v 1.15 2020/07/03 08:37:56 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -85,7 +85,7 @@ Lst_InsertAfter(Lst l, LstNode ln, void *d)
}
if (!LstValid (l) || LstIsEmpty (l) || ! LstNodeValid (ln, l)) {
- return (FAILURE);
+ return FAILURE;
}
ok:
@@ -117,6 +117,5 @@ Lst_InsertAfter(Lst l, LstNode ln, void *d)
}
}
- return (SUCCESS);
+ return SUCCESS;
}
-
diff --git a/lst.lib/lstAtEnd.c b/lst.lib/lstAtEnd.c
index 10f191a2060c1..4eadfdb0e7f32 100644
--- a/lst.lib/lstAtEnd.c
+++ b/lst.lib/lstAtEnd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstAtEnd.c,v 1.13 2009/01/23 21:26:30 dsl Exp $ */
+/* $NetBSD: lstAtEnd.c,v 1.14 2020/07/03 08:37:56 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstAtEnd.c,v 1.13 2009/01/23 21:26:30 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstAtEnd.c,v 1.14 2020/07/03 08:37:56 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstAtEnd.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstAtEnd.c,v 1.13 2009/01/23 21:26:30 dsl Exp $");
+__RCSID("$NetBSD: lstAtEnd.c,v 1.14 2020/07/03 08:37:56 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -75,5 +75,5 @@ Lst_AtEnd(Lst l, void *d)
LstNode end;
end = Lst_Last(l);
- return (Lst_InsertAfter(l, end, d));
+ return Lst_InsertAfter(l, end, d);
}
diff --git a/lst.lib/lstAtFront.c b/lst.lib/lstAtFront.c
index d8be166473875..724713c092ed6 100644
--- a/lst.lib/lstAtFront.c
+++ b/lst.lib/lstAtFront.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstAtFront.c,v 1.13 2009/01/23 21:26:30 dsl Exp $ */
+/* $NetBSD: lstAtFront.c,v 1.14 2020/07/03 08:37:56 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstAtFront.c,v 1.13 2009/01/23 21:26:30 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstAtFront.c,v 1.14 2020/07/03 08:37:56 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstAtFront.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstAtFront.c,v 1.13 2009/01/23 21:26:30 dsl Exp $");
+__RCSID("$NetBSD: lstAtFront.c,v 1.14 2020/07/03 08:37:56 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -72,5 +72,5 @@ Lst_AtFront(Lst l, void *d)
LstNode front;
front = Lst_First(l);
- return (Lst_InsertBefore(l, front, d));
+ return Lst_InsertBefore(l, front, d);
}
diff --git a/lst.lib/lstClose.c b/lst.lib/lstClose.c
index 06b68c5c038a0..a1a3e9da80de6 100644
--- a/lst.lib/lstClose.c
+++ b/lst.lib/lstClose.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstClose.c,v 1.11 2006/10/27 21:37:25 dsl Exp $ */
+/* $NetBSD: lstClose.c,v 1.12 2020/07/03 08:37:56 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstClose.c,v 1.11 2006/10/27 21:37:25 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstClose.c,v 1.12 2020/07/03 08:37:56 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstClose.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstClose.c,v 1.11 2006/10/27 21:37:25 dsl Exp $");
+__RCSID("$NetBSD: lstClose.c,v 1.12 2020/07/03 08:37:56 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -83,4 +83,3 @@ Lst_Close(Lst l)
list->atEnd = Unknown;
}
}
-
diff --git a/lst.lib/lstConcat.c b/lst.lib/lstConcat.c
index 534d34e45424c..2f667c5b0119e 100644
--- a/lst.lib/lstConcat.c
+++ b/lst.lib/lstConcat.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstConcat.c,v 1.16 2008/12/13 15:19:29 dsl Exp $ */
+/* $NetBSD: lstConcat.c,v 1.17 2020/07/03 08:37:56 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstConcat.c,v 1.16 2008/12/13 15:19:29 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstConcat.c,v 1.17 2020/07/03 08:37:56 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstConcat.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstConcat.c,v 1.16 2008/12/13 15:19:29 dsl Exp $");
+__RCSID("$NetBSD: lstConcat.c,v 1.17 2020/07/03 08:37:56 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -86,7 +86,7 @@ Lst_Concat(Lst l1, Lst l2, int flags)
List list2 = l2;
if (!LstValid (l1) || !LstValid (l2)) {
- return (FAILURE);
+ return FAILURE;
}
if (flags == LST_CONCLINK) {
@@ -180,6 +180,5 @@ Lst_Concat(Lst l1, Lst l2, int flags)
}
}
- return (SUCCESS);
+ return SUCCESS;
}
-
diff --git a/lst.lib/lstDatum.c b/lst.lib/lstDatum.c
index 6e2d9ad0e73be..c8ccb558f3dc1 100644
--- a/lst.lib/lstDatum.c
+++ b/lst.lib/lstDatum.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstDatum.c,v 1.13 2009/01/23 21:26:30 dsl Exp $ */
+/* $NetBSD: lstDatum.c,v 1.14 2020/07/03 08:37:56 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstDatum.c,v 1.13 2009/01/23 21:26:30 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstDatum.c,v 1.14 2020/07/03 08:37:56 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstDatum.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstDatum.c,v 1.13 2009/01/23 21:26:30 dsl Exp $");
+__RCSID("$NetBSD: lstDatum.c,v 1.14 2020/07/03 08:37:56 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -69,9 +69,8 @@ void *
Lst_Datum(LstNode ln)
{
if (ln != NULL) {
- return ((ln)->datum);
+ return ln->datum;
} else {
return NULL;
}
}
-
diff --git a/lst.lib/lstDeQueue.c b/lst.lib/lstDeQueue.c
index bdb05cc1168d7..0f1452e4ac7ea 100644
--- a/lst.lib/lstDeQueue.c
+++ b/lst.lib/lstDeQueue.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstDeQueue.c,v 1.14 2009/01/23 21:26:30 dsl Exp $ */
+/* $NetBSD: lstDeQueue.c,v 1.15 2020/07/03 08:37:56 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstDeQueue.c,v 1.14 2009/01/23 21:26:30 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstDeQueue.c,v 1.15 2020/07/03 08:37:56 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstDeQueue.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstDeQueue.c,v 1.14 2009/01/23 21:26:30 dsl Exp $");
+__RCSID("$NetBSD: lstDeQueue.c,v 1.15 2020/07/03 08:37:56 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -81,7 +81,6 @@ Lst_DeQueue(Lst l)
if (Lst_Remove(l, tln) == FAILURE) {
return NULL;
} else {
- return (rd);
+ return rd;
}
}
-
diff --git a/lst.lib/lstDupl.c b/lst.lib/lstDupl.c
index 2174ff7822820..6318ee4e462a6 100644
--- a/lst.lib/lstDupl.c
+++ b/lst.lib/lstDupl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstDupl.c,v 1.16 2009/01/23 21:26:30 dsl Exp $ */
+/* $NetBSD: lstDupl.c,v 1.17 2020/07/03 08:37:56 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstDupl.c,v 1.16 2009/01/23 21:26:30 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstDupl.c,v 1.17 2020/07/03 08:37:56 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstDupl.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstDupl.c,v 1.16 2009/01/23 21:26:30 dsl Exp $");
+__RCSID("$NetBSD: lstDupl.c,v 1.17 2020/07/03 08:37:56 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -103,5 +103,5 @@ Lst_Duplicate(Lst l, DuplicateProc *copyProc)
}
}
- return (nl);
+ return nl;
}
diff --git a/lst.lib/lstEnQueue.c b/lst.lib/lstEnQueue.c
index be386c91a5128..c6941a8eb9d30 100644
--- a/lst.lib/lstEnQueue.c
+++ b/lst.lib/lstEnQueue.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstEnQueue.c,v 1.13 2009/01/23 21:26:30 dsl Exp $ */
+/* $NetBSD: lstEnQueue.c,v 1.14 2020/07/03 08:37:56 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstEnQueue.c,v 1.13 2009/01/23 21:26:30 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstEnQueue.c,v 1.14 2020/07/03 08:37:56 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstEnQueue.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstEnQueue.c,v 1.13 2009/01/23 21:26:30 dsl Exp $");
+__RCSID("$NetBSD: lstEnQueue.c,v 1.14 2020/07/03 08:37:56 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -70,9 +70,8 @@ ReturnStatus
Lst_EnQueue(Lst l, void *d)
{
if (LstValid (l) == FALSE) {
- return (FAILURE);
+ return FAILURE;
}
- return (Lst_InsertAfter(l, Lst_Last(l), d));
+ return Lst_InsertAfter(l, Lst_Last(l), d);
}
-
diff --git a/lst.lib/lstFind.c b/lst.lib/lstFind.c
index d07dbe7f9f8c4..a1d27d3ad6860 100644
--- a/lst.lib/lstFind.c
+++ b/lst.lib/lstFind.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstFind.c,v 1.15 2009/01/23 21:58:28 dsl Exp $ */
+/* $NetBSD: lstFind.c,v 1.16 2020/07/03 08:37:56 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstFind.c,v 1.15 2009/01/23 21:58:28 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstFind.c,v 1.16 2020/07/03 08:37:56 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstFind.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstFind.c,v 1.15 2009/01/23 21:58:28 dsl Exp $");
+__RCSID("$NetBSD: lstFind.c,v 1.16 2020/07/03 08:37:56 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -69,6 +69,5 @@ __RCSID("$NetBSD: lstFind.c,v 1.15 2009/01/23 21:58:28 dsl Exp $");
LstNode
Lst_Find(Lst l, const void *d, int (*cProc)(const void *, const void *))
{
- return (Lst_FindFrom(l, Lst_First(l), d, cProc));
+ return Lst_FindFrom(l, Lst_First(l), d, cProc);
}
-
diff --git a/lst.lib/lstFindFrom.c b/lst.lib/lstFindFrom.c
index e2beab6321d50..676c073920390 100644
--- a/lst.lib/lstFindFrom.c
+++ b/lst.lib/lstFindFrom.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstFindFrom.c,v 1.15 2009/01/23 21:58:28 dsl Exp $ */
+/* $NetBSD: lstFindFrom.c,v 1.16 2020/07/03 08:37:56 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstFindFrom.c,v 1.15 2009/01/23 21:58:28 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstFindFrom.c,v 1.16 2020/07/03 08:37:56 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstFindFrom.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstFindFrom.c,v 1.15 2009/01/23 21:58:28 dsl Exp $");
+__RCSID("$NetBSD: lstFindFrom.c,v 1.16 2020/07/03 08:37:56 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -81,10 +81,9 @@ Lst_FindFrom(Lst l, LstNode ln, const void *d,
do {
if ((*cProc)(tln->datum, d) == 0)
- return (tln);
+ return tln;
tln = tln->nextPtr;
} while (tln != ln && tln != NULL);
return NULL;
}
-
diff --git a/lst.lib/lstFirst.c b/lst.lib/lstFirst.c
index 4e8334f8bcc90..a79db57120dd9 100644
--- a/lst.lib/lstFirst.c
+++ b/lst.lib/lstFirst.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstFirst.c,v 1.12 2008/12/13 15:19:29 dsl Exp $ */
+/* $NetBSD: lstFirst.c,v 1.13 2020/07/03 08:37:56 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstFirst.c,v 1.12 2008/12/13 15:19:29 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstFirst.c,v 1.13 2020/07/03 08:37:56 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstFirst.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstFirst.c,v 1.12 2008/12/13 15:19:29 dsl Exp $");
+__RCSID("$NetBSD: lstFirst.c,v 1.13 2020/07/03 08:37:56 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -71,7 +71,6 @@ Lst_First(Lst l)
if (!LstValid (l) || LstIsEmpty (l)) {
return NULL;
} else {
- return (l->firstPtr);
+ return l->firstPtr;
}
}
-
diff --git a/lst.lib/lstForEach.c b/lst.lib/lstForEach.c
index 917e4ea80236f..dc2fdd8bfc573 100644
--- a/lst.lib/lstForEach.c
+++ b/lst.lib/lstForEach.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstForEach.c,v 1.13 2009/01/23 21:26:30 dsl Exp $ */
+/* $NetBSD: lstForEach.c,v 1.14 2020/07/03 08:37:57 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstForEach.c,v 1.13 2009/01/23 21:26:30 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstForEach.c,v 1.14 2020/07/03 08:37:57 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstForEach.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstForEach.c,v 1.13 2009/01/23 21:26:30 dsl Exp $");
+__RCSID("$NetBSD: lstForEach.c,v 1.14 2020/07/03 08:37:57 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -73,4 +73,3 @@ Lst_ForEach(Lst l, int (*proc)(void *, void *), void *d)
{
return Lst_ForEachFrom(l, Lst_First(l), proc, d);
}
-
diff --git a/lst.lib/lstForEachFrom.c b/lst.lib/lstForEachFrom.c
index c7f44adc476af..a08ddf35935b8 100644
--- a/lst.lib/lstForEachFrom.c
+++ b/lst.lib/lstForEachFrom.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstForEachFrom.c,v 1.17 2009/01/23 21:26:30 dsl Exp $ */
+/* $NetBSD: lstForEachFrom.c,v 1.18 2020/07/03 08:37:57 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstForEachFrom.c,v 1.17 2009/01/23 21:26:30 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstForEachFrom.c,v 1.18 2020/07/03 08:37:57 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstForEachFrom.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstForEachFrom.c,v 1.17 2009/01/23 21:26:30 dsl Exp $");
+__RCSID("$NetBSD: lstForEachFrom.c,v 1.18 2020/07/03 08:37:57 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -122,4 +122,3 @@ Lst_ForEachFrom(Lst l, LstNode ln, int (*proc)(void *, void *),
return result;
}
-
diff --git a/lst.lib/lstInit.c b/lst.lib/lstInit.c
index f98ac42b06a01..3255da7e59a15 100644
--- a/lst.lib/lstInit.c
+++ b/lst.lib/lstInit.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstInit.c,v 1.12 2008/12/13 15:19:29 dsl Exp $ */
+/* $NetBSD: lstInit.c,v 1.13 2020/07/03 08:37:57 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstInit.c,v 1.12 2008/12/13 15:19:29 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstInit.c,v 1.13 2020/07/03 08:37:57 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstInit.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstInit.c,v 1.12 2008/12/13 15:19:29 dsl Exp $");
+__RCSID("$NetBSD: lstInit.c,v 1.13 2020/07/03 08:37:57 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -81,5 +81,5 @@ Lst_Init(Boolean circ)
nList->isCirc = circ;
nList->atEnd = Unknown;
- return (nList);
+ return nList;
}
diff --git a/lst.lib/lstInsert.c b/lst.lib/lstInsert.c
index 77187bb327e29..845b8899e03bc 100644
--- a/lst.lib/lstInsert.c
+++ b/lst.lib/lstInsert.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstInsert.c,v 1.14 2009/01/23 21:26:30 dsl Exp $ */
+/* $NetBSD: lstInsert.c,v 1.15 2020/07/03 08:37:57 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstInsert.c,v 1.14 2009/01/23 21:26:30 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstInsert.c,v 1.15 2020/07/03 08:37:57 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstInsert.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstInsert.c,v 1.14 2009/01/23 21:26:30 dsl Exp $");
+__RCSID("$NetBSD: lstInsert.c,v 1.15 2020/07/03 08:37:57 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -87,7 +87,7 @@ Lst_InsertBefore(Lst l, LstNode ln, void *d)
goto ok;
if (!LstValid (l) || LstIsEmpty (l) || !LstNodeValid (ln, l)) {
- return (FAILURE);
+ return FAILURE;
}
ok:
@@ -117,6 +117,5 @@ Lst_InsertBefore(Lst l, LstNode ln, void *d)
}
}
- return (SUCCESS);
+ return SUCCESS;
}
-
diff --git a/lst.lib/lstIsAtEnd.c b/lst.lib/lstIsAtEnd.c
index 70270d2956c1b..c5add4d9867f1 100644
--- a/lst.lib/lstIsAtEnd.c
+++ b/lst.lib/lstIsAtEnd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstIsAtEnd.c,v 1.13 2008/02/15 21:29:50 christos Exp $ */
+/* $NetBSD: lstIsAtEnd.c,v 1.14 2020/07/03 08:37:57 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstIsAtEnd.c,v 1.13 2008/02/15 21:29:50 christos Exp $";
+static char rcsid[] = "$NetBSD: lstIsAtEnd.c,v 1.14 2020/07/03 08:37:57 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstIsAtEnd.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstIsAtEnd.c,v 1.13 2008/02/15 21:29:50 christos Exp $");
+__RCSID("$NetBSD: lstIsAtEnd.c,v 1.14 2020/07/03 08:37:57 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -81,7 +81,6 @@ Lst_IsAtEnd(Lst l)
{
List list = l;
- return (!LstValid (l) || !list->isOpen ||
- (list->atEnd == Head) || (list->atEnd == Tail));
+ return !LstValid (l) || !list->isOpen ||
+ list->atEnd == Head || list->atEnd == Tail;
}
-
diff --git a/lst.lib/lstIsEmpty.c b/lst.lib/lstIsEmpty.c
index 8b1d6ed0dd91b..ccf4525a35066 100644
--- a/lst.lib/lstIsEmpty.c
+++ b/lst.lib/lstIsEmpty.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstIsEmpty.c,v 1.11 2008/12/13 15:19:29 dsl Exp $ */
+/* $NetBSD: lstIsEmpty.c,v 1.12 2020/07/03 08:37:57 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstIsEmpty.c,v 1.11 2008/12/13 15:19:29 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstIsEmpty.c,v 1.12 2020/07/03 08:37:57 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstIsEmpty.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstIsEmpty.c,v 1.11 2008/12/13 15:19:29 dsl Exp $");
+__RCSID("$NetBSD: lstIsEmpty.c,v 1.12 2020/07/03 08:37:57 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -70,6 +70,5 @@ __RCSID("$NetBSD: lstIsEmpty.c,v 1.11 2008/12/13 15:19:29 dsl Exp $");
Boolean
Lst_IsEmpty(Lst l)
{
- return ( ! LstValid (l) || LstIsEmpty(l));
+ return !LstValid(l) || LstIsEmpty(l);
}
-
diff --git a/lst.lib/lstLast.c b/lst.lib/lstLast.c
index 096ca24d13724..1d65bf19473ec 100644
--- a/lst.lib/lstLast.c
+++ b/lst.lib/lstLast.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstLast.c,v 1.12 2008/12/13 15:19:29 dsl Exp $ */
+/* $NetBSD: lstLast.c,v 1.13 2020/07/03 08:37:57 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstLast.c,v 1.12 2008/12/13 15:19:29 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstLast.c,v 1.13 2020/07/03 08:37:57 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstLast.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstLast.c,v 1.12 2008/12/13 15:19:29 dsl Exp $");
+__RCSID("$NetBSD: lstLast.c,v 1.13 2020/07/03 08:37:57 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -71,7 +71,6 @@ Lst_Last(Lst l)
if (!LstValid(l) || LstIsEmpty (l)) {
return NULL;
} else {
- return (l->lastPtr);
+ return l->lastPtr;
}
}
-
diff --git a/lst.lib/lstNext.c b/lst.lib/lstNext.c
index 5c2e0eece592d..9c180d2cfad1a 100644
--- a/lst.lib/lstNext.c
+++ b/lst.lib/lstNext.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstNext.c,v 1.12 2008/12/13 15:19:29 dsl Exp $ */
+/* $NetBSD: lstNext.c,v 1.13 2020/07/03 08:37:57 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstNext.c,v 1.12 2008/12/13 15:19:29 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstNext.c,v 1.13 2020/07/03 08:37:57 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstNext.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstNext.c,v 1.12 2008/12/13 15:19:29 dsl Exp $");
+__RCSID("$NetBSD: lstNext.c,v 1.13 2020/07/03 08:37:57 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -115,6 +115,5 @@ Lst_Next(Lst l)
}
}
- return (tln);
+ return tln;
}
-
diff --git a/lst.lib/lstOpen.c b/lst.lib/lstOpen.c
index 941293e7abb23..919dd6d5000c4 100644
--- a/lst.lib/lstOpen.c
+++ b/lst.lib/lstOpen.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstOpen.c,v 1.12 2008/12/13 15:19:29 dsl Exp $ */
+/* $NetBSD: lstOpen.c,v 1.13 2020/07/03 08:37:57 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstOpen.c,v 1.12 2008/12/13 15:19:29 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstOpen.c,v 1.13 2020/07/03 08:37:57 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstOpen.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstOpen.c,v 1.12 2008/12/13 15:19:29 dsl Exp $");
+__RCSID("$NetBSD: lstOpen.c,v 1.13 2020/07/03 08:37:57 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -76,12 +76,11 @@ ReturnStatus
Lst_Open(Lst l)
{
if (LstValid (l) == FALSE) {
- return (FAILURE);
+ return FAILURE;
}
(l)->isOpen = TRUE;
(l)->atEnd = LstIsEmpty (l) ? Head : Unknown;
(l)->curPtr = NULL;
- return (SUCCESS);
+ return SUCCESS;
}
-
diff --git a/lst.lib/lstPrev.c b/lst.lib/lstPrev.c
index 0ec865d516526..b6c548d9a5234 100644
--- a/lst.lib/lstPrev.c
+++ b/lst.lib/lstPrev.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstPrev.c,v 1.3 2008/12/13 15:19:29 dsl Exp $ */
+/* $NetBSD: lstPrev.c,v 1.4 2020/07/03 08:37:57 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstPrev.c,v 1.3 2008/12/13 15:19:29 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstPrev.c,v 1.4 2020/07/03 08:37:57 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstSucc.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstPrev.c,v 1.3 2008/12/13 15:19:29 dsl Exp $");
+__RCSID("$NetBSD: lstPrev.c,v 1.4 2020/07/03 08:37:57 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -73,7 +73,6 @@ Lst_Prev(LstNode ln)
if (ln == NULL) {
return NULL;
} else {
- return (ln->prevPtr);
+ return ln->prevPtr;
}
}
-
diff --git a/lst.lib/lstRemove.c b/lst.lib/lstRemove.c
index 7480d30ba4f43..59245499bdc46 100644
--- a/lst.lib/lstRemove.c
+++ b/lst.lib/lstRemove.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstRemove.c,v 1.16 2014/09/07 20:55:34 joerg Exp $ */
+/* $NetBSD: lstRemove.c,v 1.17 2020/07/03 08:37:57 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstRemove.c,v 1.16 2014/09/07 20:55:34 joerg Exp $";
+static char rcsid[] = "$NetBSD: lstRemove.c,v 1.17 2020/07/03 08:37:57 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstRemove.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstRemove.c,v 1.16 2014/09/07 20:55:34 joerg Exp $");
+__RCSID("$NetBSD: lstRemove.c,v 1.17 2020/07/03 08:37:57 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -73,9 +73,8 @@ Lst_Remove(Lst l, LstNode ln)
List list = l;
ListNode lNode = ln;
- if (!LstValid (l) ||
- !LstNodeValid (ln, l)) {
- return (FAILURE);
+ if (!LstValid (l) || !LstNodeValid (ln, l)) {
+ return FAILURE;
}
/*
@@ -131,6 +130,5 @@ Lst_Remove(Lst l, LstNode ln)
lNode->flags |= LN_DELETED;
}
- return (SUCCESS);
+ return SUCCESS;
}
-
diff --git a/lst.lib/lstReplace.c b/lst.lib/lstReplace.c
index 090e91a72c6ef..f30cb00855e3e 100644
--- a/lst.lib/lstReplace.c
+++ b/lst.lib/lstReplace.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstReplace.c,v 1.13 2009/01/23 21:26:30 dsl Exp $ */
+/* $NetBSD: lstReplace.c,v 1.14 2020/07/03 08:37:57 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstReplace.c,v 1.13 2009/01/23 21:26:30 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstReplace.c,v 1.14 2020/07/03 08:37:57 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstReplace.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstReplace.c,v 1.13 2009/01/23 21:26:30 dsl Exp $");
+__RCSID("$NetBSD: lstReplace.c,v 1.14 2020/07/03 08:37:57 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -69,10 +69,9 @@ ReturnStatus
Lst_Replace(LstNode ln, void *d)
{
if (ln == NULL) {
- return (FAILURE);
+ return FAILURE;
} else {
(ln)->datum = d;
- return (SUCCESS);
+ return SUCCESS;
}
}
-
diff --git a/lst.lib/lstSucc.c b/lst.lib/lstSucc.c
index 3f13aa5e7f660..b3f73bb15fd2b 100644
--- a/lst.lib/lstSucc.c
+++ b/lst.lib/lstSucc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstSucc.c,v 1.13 2008/12/13 15:19:29 dsl Exp $ */
+/* $NetBSD: lstSucc.c,v 1.14 2020/07/03 08:37:57 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstSucc.c,v 1.13 2008/12/13 15:19:29 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstSucc.c,v 1.14 2020/07/03 08:37:57 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstSucc.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstSucc.c,v 1.13 2008/12/13 15:19:29 dsl Exp $");
+__RCSID("$NetBSD: lstSucc.c,v 1.14 2020/07/03 08:37:57 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -73,7 +73,6 @@ Lst_Succ(LstNode ln)
if (ln == NULL) {
return NULL;
} else {
- return (ln->nextPtr);
+ return ln->nextPtr;
}
}
-