From c9cbb67dcaca7fb80f5de60c708ba314101ed83c Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 15 Apr 2000 01:37:28 +0000 Subject: [PATCH] doc some missing macros --- share/man/man3/Makefile | 8 +++++--- share/man/man3/queue.3 | 23 ++++++++++++++++++++++- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile index 1989b80899b..15d2989eeba 100644 --- a/share/man/man3/Makefile +++ b/share/man/man3/Makefile @@ -1,4 +1,4 @@ -# $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 @@ -25,14 +25,16 @@ MLINKS+=queue.3 TAILQ_ENTRY.3 queue.3 TAILQ_HEAD.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 \ diff --git a/share/man/man3/queue.3 b/share/man/man3/queue.3 index a678b2d6e67..cd7781d46ed 100644 --- a/share/man/man3/queue.3 +++ b/share/man/man3/queue.3 @@ -1,4 +1,4 @@ -.\" $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. @@ -86,6 +86,7 @@ .Nm TAILQ_PREV , .Nm TAILQ_EMPTY , .Nm TAILQ_FOREACH , +.Nm TAILQ_FOREACH_REVERSE , .Nm TAILQ_INIT , .Nm TAILQ_INSERT_AFTER , .Nm TAILQ_INSERT_BEFORE , @@ -188,6 +189,10 @@ .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 @@ -214,6 +219,10 @@ .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 @@ -793,6 +802,12 @@ is used for tail queue traversal 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. @@ -922,6 +937,12 @@ is used for circular queue forward traversal 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. -- 2.20.1