-# $OpenBSD: Makefile,v 1.5 2000/03/28 22:50:07 deraadt Exp $
+# $OpenBSD: Makefile,v 1.6 2000/04/15 01:37:28 deraadt Exp $
# @(#)Makefile 8.2 (Berkeley) 12/13/93
MAN= assert.3 bitstring.3 dlfcn.3 end.3 intro.3 queue.3 stdarg.3
queue.3 TAILQ_PREV.3 queue.3 TAILQ_INIT.3 queue.3 TAILQ_INSERT_AFTER.3 \
queue.3 TAILQ_INSERT_BEFORE.3 queue.3 TAILQ_INSERT_HEAD.3 \
queue.3 TAILQ_INSERT_TAIL.3 queue.3 TAILQ_REMOVE.3 \
- queue.3 TAILQ_INSERT_AFTER.3
+ queue.3 TAILQ_INSERT_AFTER.3 \
+ queue.3 TAILQ_FOREACH.3 queue.3 TAILQ_FOREACH_REVERSE.3
MLINKS+=queue.3 CIRCLEQ_ENTRY.3 queue.3 CIRCLEQ_HEAD.3 \
queue.3 CIRCLEQ_HEAD_INITIALIZER.3 queue.3 CIRCLEQ_FIRST.3 \
queue.3 CIRCLEQ_LAST.3 queue.3 CIRCLEQ_END.3 queue.3 CIRCLEQ_NEXT.3 \
queue.3 CIRCLEQ_PREV.3 queue.3 CIRCLEQ_INIT.3 \
queue.3 CIRCLEQ_INSERT_AFTER.3 queue.3 CIRCLEQ_INSERT_BEFORE.3 \
queue.3 CIRCLEQ_INSERT_HEAD.3 queue.3 CIRCLEQ_INSERT_TAIL.3 \
- queue.3 CIRCLEQ_REMOVE.3
+ queue.3 CIRCLEQ_REMOVE.3 \
+ queue.3 CIRCLEQ_FOREACH.3 queue.3 CIRCLEQ_FOREACH_REVERSE.3
MLINKS+=queue.3 SLIST_ENTRY.3 queue.3 SLIST_HEAD.3 \
queue.3 SLIST_HEAD_INITIALIZER.3 queue.3 SLIST_FIRST.3 \
queue.3 SLIST_NEXT.3 queue.3 SLIST_END.3 \
-.\" $OpenBSD: queue.3,v 1.9 2000/03/19 19:25:24 aaron Exp $
+.\" $OpenBSD: queue.3,v 1.10 2000/04/15 01:37:28 deraadt Exp $
.\" $NetBSD: queue.3,v 1.4 1995/07/03 00:25:36 mycroft Exp $
.\"
.\" Copyright (c) 1993 The Regents of the University of California.
.Nm TAILQ_PREV ,
.Nm TAILQ_EMPTY ,
.Nm TAILQ_FOREACH ,
+.Nm TAILQ_FOREACH_REVERSE ,
.Nm TAILQ_INIT ,
.Nm TAILQ_INSERT_AFTER ,
.Nm TAILQ_INSERT_BEFORE ,
.Ft "struct TYPE *"
.Fn TAILQ_LAST "TAILQ_HEAD *head" "HEADNAME NAME"
.Fn TAILQ_PREV "TAILQ_HEAD *head" "HEADNAME NAME"
+.Ft "bool"
+.Fn TAILQ_EMPTY "TAILQ_HEAD *head"
+.Fn TAILQ_FOREACH "VARNAME" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME"
+.Fn TAILQ_FOREACH_REVERSE "VARNAME" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME"
.Ft void
.Fn TAILQ_INIT "TAILQ_HEAD *head"
.Ft void
.Fn CIRCLEQ_NEXT "struct TYPE *listelm" "CIRCLEQ_ENTRY NAME"
.Ft "struct TYPE *"
.Fn CIRCLEQ_PREV "struct TYPE *listelm" "CIRCLEQ_ENTRY NAME"
+.Ft "bool"
+.Fn CIRCLEQ_EMPTY "CIRCLEQ_HEAD *head"
+.Fn CIRCLEQ_FOREACH "VARNAME" "CIRCLEQ_HEAD *head" "CIRCLEQ_ENTRY NAME"
+.Fn CIRCLEQ_FOREACH_REVERSE "VARNAME" "CIRCLEQ_HEAD *head" "CIRCLEQ_ENTRY NAME"
.Ft void
.Fn CIRCLEQ_INIT "CIRCLEQ_HEAD *head"
.Ft void
TAILQ_FOREACH(np, head, NAME)
.Ed
.Pp
+The
+.Fn TAILQ_FOREACH_REVERSE
+acts like
+.Fn TAILQ_FOREACH
+but traveres the tail queue in reverse.
+.Pp
The
.Fn TAILQ_EMPTY
macro should be used to check whether a tail queue is empty.
CIRCLEQ_FOREACH(np, head, NAME)
.Ed
.Pp
+The
+.Fn CIRCLEQ_FOREACH_REVERSE
+macro acts like
+.Fn CIRCLEQ_FOREACH
+but traverses the circular queue backwards.
+.Pp
The
.Fn CIRCLEQ_EMPTY
macro should be used to check whether a circular queue is empty.