diff options
author | gibbs <gibbs@FreeBSD.org> | 1996-01-29 03:20:44 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 1996-01-29 03:20:44 +0000 |
commit | 2d24ffe647290dcbf969b95b9a51daa87c5301fd (patch) | |
tree | 81767cd7e4caad81656c422e2f443d79831bf0e0 | |
parent | cab528dc9e181055b45685c22f46be08c3c594c5 (diff) | |
download | FreeBSD-src-2d24ffe647290dcbf969b95b9a51daa87c5301fd.zip FreeBSD-src-2d24ffe647290dcbf969b95b9a51daa87c5301fd.tar.gz |
Add LIST_INSERT_BEFORE and TAILQ_INSERT_BEFORE. These are used by the
new eisaconf code.
-rw-r--r-- | sys/sys/queue.h | 16 | ||||
-rw-r--r-- | sys/sys/systm.h | 4 |
2 files changed, 17 insertions, 3 deletions
diff --git a/sys/sys/queue.h b/sys/sys/queue.h index 0501551..1fb7b95 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)queue.h 8.4 (Berkeley) 1/4/94 - * $Id: queue.h,v 1.3 1995/05/30 08:14:30 rgrimes Exp $ + * $Id: queue.h,v 1.4 1995/12/03 13:45:34 bde Exp $ */ #ifndef _SYS_QUEUE_H_ @@ -95,6 +95,13 @@ struct { \ (elm)->field.le_prev = &(listelm)->field.le_next; \ } +#define LIST_INSERT_BEFORE(listelm, elm, field) { \ + (elm)->field.le_prev = (listelm)->field.le_prev; \ + (elm)->field.le_next = (listelm); \ + *(listelm)->field.le_prev = (elm); \ + (listelm)->field.le_prev = &(elm)->field.le_next; \ +} + #define LIST_INSERT_HEAD(head, elm, field) { \ if (((elm)->field.le_next = (head)->lh_first) != NULL) \ (head)->lh_first->field.le_prev = &(elm)->field.le_next;\ @@ -159,6 +166,13 @@ struct { \ (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ } +#define TAILQ_INSERT_BEFORE(head, listelm, elm, field) { \ + (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ + (elm)->field.tqe_next = (listelm); \ + *(listelm)->field.tqe_prev = (elm); \ + (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ +} + #define TAILQ_REMOVE(head, elm, field) { \ if (((elm)->field.tqe_next) != NULL) \ (elm)->field.tqe_next->field.tqe_prev = \ diff --git a/sys/sys/systm.h b/sys/sys/systm.h index e398850..2065b24 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)systm.h 8.4 (Berkeley) 2/23/94 - * $Id: systm.h,v 1.33 1996/01/16 09:57:25 bde Exp $ + * $Id: systm.h,v 1.34 1996/01/16 10:22:20 bde Exp $ */ #ifndef _SYS_SYSTM_H_ @@ -118,7 +118,7 @@ void tablefull __P((const char *)); void addlog __P((const char *, ...)); int kvprintf __P((char const *, void (*)(int, void*), void *, int, va_list)); void log __P((int, const char *, ...)); -void printf __P((const char *, ...)); +int printf __P((const char *, ...)); int sprintf __P((char *buf, const char *, ...)); void uprintf __P((const char *, ...)); void vprintf __P((const char *, va_list)); |