diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2008-03-31 13:15:54 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2008-03-31 13:15:54 +0000 |
commit | 71518622f031d09813d93ff8abf4ed0b6f79bed7 (patch) | |
tree | 9893c7c6e7dfee06dbe64acb4425dc2bb2b1008c | |
parent | 379c824056d20093f0099e78b9b275fe30415980 (diff) |
some missing bits; from Girish Venkatachalam
ok henning
while here, clean up the queue MLINKS
-rw-r--r-- | share/man/man3/Makefile | 48 | ||||
-rw-r--r-- | share/man/man3/queue.3 | 27 |
2 files changed, 50 insertions, 25 deletions
diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile index 2a64b09ee4a..2fd1dfb15d3 100644 --- a/share/man/man3/Makefile +++ b/share/man/man3/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.18 2005/07/04 03:03:16 jaredy Exp $ +# $OpenBSD: Makefile,v 1.19 2008/03/31 13:15:53 jmc Exp $ # @(#)Makefile 8.2 (Berkeley) 12/13/93 MAN= assert.3 bitstring.3 CMSG_DATA.3 dlfcn.3 dl_iterate_phdr.3 end.3 \ @@ -11,43 +11,47 @@ MLINKS+=bitstring.3 bit_alloc.3 bitstring.3 bit_clear.3 \ MLINKS+=CMSG_DATA.3 CMSG_FIRSTHDR.3 CMSG_DATA.3 CMSG_LEN.3 \ CMSG_DATA.3 CMSG_NXTHDR.3 CMSG_DATA.3 CMSG_SPACE.3 MLINKS+=end.3 edata.3 end.3 etext.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 queue.3 SLIST_EMPTY.3 \ + queue.3 SLIST_FOREACH.3 queue.3 SLIST_FOREACH_PREVPTR.3 \ + queue.3 SLIST_INIT.3 \ + queue.3 SLIST_INSERT_AFTER.3 queue.3 SLIST_INSERT_HEAD.3 \ + queue.3 SLIST_REMOVE_HEAD.3 queue.3 SLIST_REMOVE_NEXT.3 \ + queue.3 SLIST_REMOVE.3 MLINKS+=queue.3 LIST_ENTRY.3 queue.3 LIST_HEAD.3 \ queue.3 LIST_HEAD_INITIALIZER.3 queue.3 LIST_FIRST.3 \ - queue.3 LIST_NEXT.3 queue.3 LIST_END.3 queue.3 LIST_INIT.3 \ + queue.3 LIST_NEXT.3 queue.3 LIST_END.3 \ + queue.3 LIST_EMPTY.3 queue.3 LIST_FOREACH.3 \ + queue.3 LIST_INIT.3 \ queue.3 LIST_INSERT_AFTER.3 queue.3 LIST_INSERT_BEFORE.3 \ queue.3 LIST_INSERT_HEAD.3 queue.3 LIST_REMOVE.3 \ - queue.3 LIST_REPLACE.3 queue.3 LIST_EMPTY.3 queue.3 LIST_FOREACH.3 + queue.3 LIST_REPLACE.3 MLINKS+=queue.3 SIMPLEQ_ENTRY.3 queue.3 SIMPLEQ_HEAD.3 \ queue.3 SIMPLEQ_HEAD_INITIALIZER.3 queue.3 SIMPLEQ_FIRST.3 \ - queue.3 SIMPLEQ_NEXT.3 queue.3 SIMPLEQ_END.3 queue.3 SIMPLEQ_INIT.3 \ + queue.3 SIMPLEQ_NEXT.3 queue.3 SIMPLEQ_END.3 \ + queue.3 SIMPLEQ_EMPTY.3 queue.3 SIMPLEQ_FOREACH.3 \ + queue.3 SIMPLEQ_INIT.3 \ queue.3 SIMPLEQ_INSERT_HEAD.3 queue.3 SIMPLEQ_INSERT_TAIL.3 \ - queue.3 SIMPLEQ_INSERT_AFTER.3 queue.3 SIMPLEQ_REMOVE_HEAD.3 \ - queue.3 SIMPLEQ_EMPTY.3 queue.3 SIMPLEQ_FOREACH.3 + queue.3 SIMPLEQ_INSERT_AFTER.3 queue.3 SIMPLEQ_REMOVE_HEAD.3 MLINKS+=queue.3 TAILQ_ENTRY.3 queue.3 TAILQ_HEAD.3 \ queue.3 TAILQ_HEAD_INITIALIZER.3 queue.3 TAILQ_FIRST.3 \ queue.3 TAILQ_NEXT.3 queue.3 TAILQ_END.3 queue.3 TAILQ_LAST.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_PREV.3 queue.3 TAILQ_EMPTY.3 \ queue.3 TAILQ_FOREACH.3 queue.3 TAILQ_FOREACH_REVERSE.3 \ - queue.3 TAILQ_EMPTY.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_REPLACE.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_PREV.3 queue.3 CIRCLEQ_EMPTY.3 \ + queue.3 CIRCLEQ_FOREACH.3 queue.3 CIRCLEQ_FOREACH_REVERSE.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_FOREACH.3 queue.3 CIRCLEQ_FOREACH_REVERSE.3 \ - queue.3 CIRCLEQ_EMPTY.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_FOREACH_PREVPTR.3 queue.3 SLIST_NEXT.3 \ - queue.3 SLIST_END.3 queue.3 SLIST_EMPTY.3 \ - queue.3 SLIST_FOREACH.3 queue.3 SLIST_INIT.3 \ - queue.3 SLIST_INSERT_AFTER.3 queue.3 SLIST_INSERT_HEAD.3 \ - queue.3 SLIST_REMOVE_HEAD.3 queue.3 SLIST_REMOVE.3 \ - queue.3 SLIST_REMOVE_NEXT.3 + queue.3 CIRCLEQ_REMOVE.3 queue.3 CIRCLEQ_REPLACE.3 MLINKS+=stdarg.3 varargs.3 stdarg.3 va_arg.3 stdarg.3 va_end.3 MLINKS+=stdarg.3 va_start.3 stdarg.3 va_copy.3 MLINKS+=dlfcn.3 dlopen.3 dlfcn.3 dlclose.3 dlfcn.3 dlsym.3 dlfcn.3 dlctl.3 \ diff --git a/share/man/man3/queue.3 b/share/man/man3/queue.3 index 23b7abb0415..ceafdb62856 100644 --- a/share/man/man3/queue.3 +++ b/share/man/man3/queue.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: queue.3,v 1.45 2007/12/24 10:30:27 jmc Exp $ +.\" $OpenBSD: queue.3,v 1.46 2008/03/31 13:15:53 jmc 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. @@ -30,7 +30,7 @@ .\" .\" @(#)queue.3 8.1 (Berkeley) 12/13/93 .\" -.Dd $Mdocdate: December 24 2007 $ +.Dd $Mdocdate: March 31 2008 $ .Dt QUEUE 3 .Os .Sh NAME @@ -93,6 +93,7 @@ .Nm TAILQ_INSERT_HEAD , .Nm TAILQ_INSERT_TAIL , .Nm TAILQ_REMOVE , +.Nm TAILQ_REPLACE , .Nm CIRCLEQ_ENTRY , .Nm CIRCLEQ_HEAD , .Nm CIRCLEQ_HEAD_INITIALIZER , @@ -109,7 +110,8 @@ .Nm CIRCLEQ_INSERT_BEFORE , .Nm CIRCLEQ_INSERT_HEAD , .Nm CIRCLEQ_INSERT_TAIL , -.Nm CIRCLEQ_REMOVE +.Nm CIRCLEQ_REMOVE , +.Nm CIRCLEQ_REPLACE .Nd "implementations of singly-linked lists, doubly-linked lists, simple queues, tail queues, and circular queues" .Sh SYNOPSIS .Fd #include <sys/queue.h> @@ -176,6 +178,7 @@ .Fn SIMPLEQ_END "SIMPLEQ_HEAD *head" .Ft int .Fn SIMPLEQ_EMPTY "SIMPLEQ_HEAD *head" +.Fn SIMPLEQ_FOREACH "VARNAME" "SIMPLEQ_HEAD *head" "SIMPLEQ_ENTRY NAME" .Ft void .Fn SIMPLEQ_INIT "SIMPLEQ_HEAD *head" .Ft void @@ -216,6 +219,8 @@ .Fn TAILQ_INSERT_TAIL "TAILQ_HEAD *head" "struct TYPE *elm" "TAILQ_ENTRY NAME" .Ft void .Fn TAILQ_REMOVE "TAILQ_HEAD *head" "struct TYPE *elm" "TAILQ_ENTRY NAME" +.Ft void +.Fn TAILQ_REPLACE "struct TYPE *elm" "struct TYPE *elm2" "TAILQ_ENTRY NAME" .Pp .Fn CIRCLEQ_ENTRY "TYPE" .Fn CIRCLEQ_HEAD "HEADNAME" "TYPE" @@ -246,6 +251,8 @@ .Fn CIRCLEQ_INSERT_TAIL "CIRCLEQ_HEAD *head" "struct TYPE *elm" "CIRCLEQ_ENTRY NAME" .Ft void .Fn CIRCLEQ_REMOVE "CIRCLEQ_HEAD *head" "struct TYPE *elm" "CIRCLEQ_ENTRY NAME" +.Ft void +.Fn CIRCLEQ_REPLACE "struct TYPE *elm" "struct TYPE *elm2" "CIRCLEQ_ENTRY NAME" .Sh DESCRIPTION These macros define and operate on five types of data structures: singly-linked lists, simple queues, lists, tail queues, and circular queues. @@ -839,6 +846,13 @@ macro removes the element .Fa elm from the tail queue. .Pp +The +.Fn TAILQ_REPLACE +macro replaces the list element +.Fa elm +with the new element +.Fa elm2 . +.Pp .Fn TAILQ_FOREACH and .Fn TAILQ_FOREACH_REVERSE @@ -977,6 +991,13 @@ macro removes the element from the circular queue. .Pp The +.Fn CIRCLEQ_REPLACE +macro replaces the list element +.Fa elm +with the new element +.Fa elm2 . +.Pp +The .Fn CIRCLEQ_FIRST , .Fn CIRCLEQ_LAST , .Fn CIRCLEQ_END , |