diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-11-17 17:21:45 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-11-17 17:21:45 +0000 |
commit | 1c653ad0dc959b5815bafa6869f02ff53cb53f6a (patch) | |
tree | 476d767caa8af938b1cfa331dfb0ebd8186c2981 | |
parent | fa0628f7540c9f4859ee2a0aaf2d86b695e454b9 (diff) |
For macro arguments that are type or member names, consistently
show them as a single word in the macro and _not_ as something
that looks like a function argument (i.e., with declarator).
ok beck@ schwarze@
-rw-r--r-- | share/man/man3/queue.3 | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/share/man/man3/queue.3 b/share/man/man3/queue.3 index 04d99538ba6..c54e932e629 100644 --- a/share/man/man3/queue.3 +++ b/share/man/man3/queue.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: queue.3,v 1.56 2012/04/11 13:29:14 naddy Exp $ +.\" $OpenBSD: queue.3,v 1.57 2012/11/17 17:21:44 guenther 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: April 11 2012 $ +.Dd $Mdocdate: November 17 2012 $ .Dt QUEUE 3 .Os .Sh NAME @@ -128,25 +128,25 @@ .Ft "struct TYPE *" .Fn SLIST_FIRST "SLIST_HEAD *head" .Ft "struct TYPE *" -.Fn SLIST_NEXT "struct TYPE *listelm" "SLIST_ENTRY NAME" +.Fn SLIST_NEXT "struct TYPE *listelm" "FIELDNAME" .Ft "struct TYPE *" .Fn SLIST_END "SLIST_HEAD *head" .Ft int .Fn SLIST_EMPTY "SLIST_HEAD *head" -.Fn SLIST_FOREACH "VARNAME" "SLIST_HEAD *head" "SLIST_ENTRY NAME" -.Fn SLIST_FOREACH_SAFE "VARNAME" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TEMP_VARNAME" +.Fn SLIST_FOREACH "VARNAME" "SLIST_HEAD *head" "FIELDNAME" +.Fn SLIST_FOREACH_SAFE "VARNAME" "SLIST_HEAD *head" "FIELDNAME" "TEMP_VARNAME" .Ft void .Fn SLIST_INIT "SLIST_HEAD *head" .Ft void -.Fn SLIST_INSERT_AFTER "struct TYPE *listelm" "struct TYPE *elm" "SLIST_ENTRY NAME" +.Fn SLIST_INSERT_AFTER "struct TYPE *listelm" "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn SLIST_INSERT_HEAD "SLIST_HEAD *head" "struct TYPE *elm" "SLIST_ENTRY NAME" +.Fn SLIST_INSERT_HEAD "SLIST_HEAD *head" "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn SLIST_REMOVE_AFTER "struct TYPE *elm" "SLIST_ENTRY NAME" +.Fn SLIST_REMOVE_AFTER "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn SLIST_REMOVE_HEAD "SLIST_HEAD *head" "SLIST_ENTRY NAME" +.Fn SLIST_REMOVE_HEAD "SLIST_HEAD *head" "FIELDNAME" .Ft void -.Fn SLIST_REMOVE "SLIST_HEAD *head" "struct TYPE *elm" "TYPE" "SLIST_ENTRY NAME" +.Fn SLIST_REMOVE "SLIST_HEAD *head" "struct TYPE *elm" "TYPE" "FIELDNAME" .Pp .Fn LIST_ENTRY "TYPE" .Fn LIST_HEAD "HEADNAME" "TYPE" @@ -154,25 +154,25 @@ .Ft "struct TYPE *" .Fn LIST_FIRST "LIST_HEAD *head" .Ft "struct TYPE *" -.Fn LIST_NEXT "struct TYPE *listelm" "LIST_ENTRY NAME" +.Fn LIST_NEXT "struct TYPE *listelm" "FIELDNAME" .Ft "struct TYPE *" .Fn LIST_END "LIST_HEAD *head" .Ft int .Fn LIST_EMPTY "LIST_HEAD *head" -.Fn LIST_FOREACH "VARNAME" "LIST_HEAD *head" "LIST_ENTRY NAME" -.Fn LIST_FOREACH_SAFE "VARNAME" "LIST_HEAD *head" "LIST_ENTRY NAME" "TEMP_VARNAME" +.Fn LIST_FOREACH "VARNAME" "LIST_HEAD *head" "FIELDNAME" +.Fn LIST_FOREACH_SAFE "VARNAME" "LIST_HEAD *head" "FIELDNAME" "TEMP_VARNAME" .Ft void .Fn LIST_INIT "LIST_HEAD *head" .Ft void -.Fn LIST_INSERT_AFTER "struct TYPE *listelm" "struct TYPE *elm" "LIST_ENTRY NAME" +.Fn LIST_INSERT_AFTER "struct TYPE *listelm" "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn LIST_INSERT_BEFORE "struct TYPE *listelm" "struct TYPE *elm" "LIST_ENTRY NAME" +.Fn LIST_INSERT_BEFORE "struct TYPE *listelm" "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn LIST_INSERT_HEAD "LIST_HEAD *head" "struct TYPE *elm" "LIST_ENTRY NAME" +.Fn LIST_INSERT_HEAD "LIST_HEAD *head" "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn LIST_REMOVE "struct TYPE *elm" "LIST_ENTRY NAME" +.Fn LIST_REMOVE "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn LIST_REPLACE "struct TYPE *elm" "struct TYPE *elm2" "LIST_ENTRY NAME" +.Fn LIST_REPLACE "struct TYPE *elm" "struct TYPE *elm2" "FIELDNAME" .Pp .Fn SIMPLEQ_ENTRY "TYPE" .Fn SIMPLEQ_HEAD "HEADNAME" "TYPE" @@ -180,25 +180,25 @@ .Ft "struct TYPE *" .Fn SIMPLEQ_FIRST "SIMPLEQ_HEAD *head" .Ft "struct TYPE *" -.Fn SIMPLEQ_NEXT "struct TYPE *listelm" "SIMPLEQ_ENTRY NAME" +.Fn SIMPLEQ_NEXT "struct TYPE *listelm" "FIELDNAME" .Ft "struct TYPE *" .Fn SIMPLEQ_END "SIMPLEQ_HEAD *head" .Ft int .Fn SIMPLEQ_EMPTY "SIMPLEQ_HEAD *head" -.Fn SIMPLEQ_FOREACH "VARNAME" "SIMPLEQ_HEAD *head" "SIMPLEQ_ENTRY NAME" -.Fn SIMPLEQ_FOREACH_SAFE "VARNAME" "SIMPLEQ_HEAD *head" "SIMPLEQ_ENTRY NAME" "TEMP_VARNAME" +.Fn SIMPLEQ_FOREACH "VARNAME" "SIMPLEQ_HEAD *head" "FIELDNAME" +.Fn SIMPLEQ_FOREACH_SAFE "VARNAME" "SIMPLEQ_HEAD *head" "FIELDNAME" "TEMP_VARNAME" .Ft void .Fn SIMPLEQ_INIT "SIMPLEQ_HEAD *head" .Ft void -.Fn SIMPLEQ_INSERT_AFTER "SIMPLEQ_HEAD *head" "struct TYPE *listelm" "struct TYPE *elm" "SIMPLEQ_ENTRY NAME" +.Fn SIMPLEQ_INSERT_AFTER "SIMPLEQ_HEAD *head" "struct TYPE *listelm" "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn SIMPLEQ_INSERT_HEAD "SIMPLEQ_HEAD *head" "struct TYPE *elm" "SIMPLEQ_ENTRY NAME" +.Fn SIMPLEQ_INSERT_HEAD "SIMPLEQ_HEAD *head" "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn SIMPLEQ_INSERT_TAIL "SIMPLEQ_HEAD *head" "struct TYPE *elm" "SIMPLEQ_ENTRY NAME" +.Fn SIMPLEQ_INSERT_TAIL "SIMPLEQ_HEAD *head" "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn SIMPLEQ_REMOVE_AFTER "SIMPLEQ_HEAD *head" "struct TYPE *elm" "SIMPLEQ_ENTRY NAME" +.Fn SIMPLEQ_REMOVE_AFTER "SIMPLEQ_HEAD *head" "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn SIMPLEQ_REMOVE_HEAD "SIMPLEQ_HEAD *head" "SIMPLEQ_ENTRY NAME" +.Fn SIMPLEQ_REMOVE_HEAD "SIMPLEQ_HEAD *head" "FIELDNAME" .Pp .Fn TAILQ_ENTRY "TYPE" .Fn TAILQ_HEAD "HEADNAME" "TYPE" @@ -206,33 +206,33 @@ .Ft "struct TYPE *" .Fn TAILQ_FIRST "TAILQ_HEAD *head" .Ft "struct TYPE *" -.Fn TAILQ_NEXT "struct TYPE *listelm" "TAILQ_ENTRY NAME" +.Fn TAILQ_NEXT "struct TYPE *listelm" "FIELDNAME" .Ft "struct TYPE *" .Fn TAILQ_END "TAILQ_HEAD *head" .Ft "struct TYPE *" -.Fn TAILQ_LAST "TAILQ_HEAD *head" "HEADNAME NAME" +.Fn TAILQ_LAST "TAILQ_HEAD *head" "HEADNAME" .Ft "struct TYPE *" -.Fn TAILQ_PREV "struct TYPE *listelm" "HEADNAME NAME" "TAILQ_ENTRY NAME" +.Fn TAILQ_PREV "struct TYPE *listelm" "HEADNAME" "FIELDNAME" .Ft int .Fn TAILQ_EMPTY "TAILQ_HEAD *head" -.Fn TAILQ_FOREACH "VARNAME" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" -.Fn TAILQ_FOREACH_SAFE "VARNAME" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" "TEMP_VARNAME" -.Fn TAILQ_FOREACH_REVERSE "VARNAME" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" -.Fn TAILQ_FOREACH_REVERSE_SAFE "VARNAME" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" "TEMP_VARNAME" +.Fn TAILQ_FOREACH "VARNAME" "TAILQ_HEAD *head" "FIELDNAME" +.Fn TAILQ_FOREACH_SAFE "VARNAME" "TAILQ_HEAD *head" "FIELDNAME" "TEMP_VARNAME" +.Fn TAILQ_FOREACH_REVERSE "VARNAME" "TAILQ_HEAD *head" "HEADNAME" "FIELDNAME" +.Fn TAILQ_FOREACH_REVERSE_SAFE "VARNAME" "TAILQ_HEAD *head" "HEADNAME" "FIELDNAME" "TEMP_VARNAME" .Ft void .Fn TAILQ_INIT "TAILQ_HEAD *head" .Ft void -.Fn TAILQ_INSERT_AFTER "TAILQ_HEAD *head" "struct TYPE *listelm" "struct TYPE *elm" "TAILQ_ENTRY NAME" +.Fn TAILQ_INSERT_AFTER "TAILQ_HEAD *head" "struct TYPE *listelm" "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn TAILQ_INSERT_BEFORE "struct TYPE *listelm" "struct TYPE *elm" "TAILQ_ENTRY NAME" +.Fn TAILQ_INSERT_BEFORE "struct TYPE *listelm" "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn TAILQ_INSERT_HEAD "TAILQ_HEAD *head" "struct TYPE *elm" "TAILQ_ENTRY NAME" +.Fn TAILQ_INSERT_HEAD "TAILQ_HEAD *head" "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn TAILQ_INSERT_TAIL "TAILQ_HEAD *head" "struct TYPE *elm" "TAILQ_ENTRY NAME" +.Fn TAILQ_INSERT_TAIL "TAILQ_HEAD *head" "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn TAILQ_REMOVE "TAILQ_HEAD *head" "struct TYPE *elm" "TAILQ_ENTRY NAME" +.Fn TAILQ_REMOVE "TAILQ_HEAD *head" "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn TAILQ_REPLACE "TAILQ_HEAD *head" "struct TYPE *elm" "struct TYPE *elm2" "TAILQ_ENTRY NAME" +.Fn TAILQ_REPLACE "TAILQ_HEAD *head" "struct TYPE *elm" "struct TYPE *elm2" "FIELDNAME" .Pp .Fn CIRCLEQ_ENTRY "TYPE" .Fn CIRCLEQ_HEAD "HEADNAME" "TYPE" @@ -244,29 +244,29 @@ .Ft "struct TYPE *" .Fn CIRCLEQ_END "CIRCLEQ_HEAD *head" .Ft "struct TYPE *" -.Fn CIRCLEQ_NEXT "struct TYPE *listelm" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_NEXT "struct TYPE *listelm" "FIELDNAME" .Ft "struct TYPE *" -.Fn CIRCLEQ_PREV "struct TYPE *listelm" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_PREV "struct TYPE *listelm" "FIELDNAME" .Ft int .Fn CIRCLEQ_EMPTY "CIRCLEQ_HEAD *head" -.Fn CIRCLEQ_FOREACH "VARNAME" "CIRCLEQ_HEAD *head" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_FOREACH_SAFE "VARNAME" "CIRCLEQ_HEAD *head" "CIRCLEQ_ENTRY NAME" "TEMP_VARNAME" -.Fn CIRCLEQ_FOREACH_REVERSE "VARNAME" "CIRCLEQ_HEAD *head" "CIRCLEQ_ENTRY NAME" -.Fn CIRCLEQ_FOREACH_REVERSE_SAFE "VARNAME" "CIRCLEQ_HEAD *head" "CIRCLEQ_ENTRY NAME" "TEMP_VARNAME" +.Fn CIRCLEQ_FOREACH "VARNAME" "CIRCLEQ_HEAD *head" "FIELDNAME" +.Fn CIRCLEQ_FOREACH_SAFE "VARNAME" "CIRCLEQ_HEAD *head" "FIELDNAME" "TEMP_VARNAME" +.Fn CIRCLEQ_FOREACH_REVERSE "VARNAME" "CIRCLEQ_HEAD *head" "FIELDNAME" +.Fn CIRCLEQ_FOREACH_REVERSE_SAFE "VARNAME" "CIRCLEQ_HEAD *head" "FIELDNAME" "TEMP_VARNAME" .Ft void .Fn CIRCLEQ_INIT "CIRCLEQ_HEAD *head" .Ft void -.Fn CIRCLEQ_INSERT_AFTER "CIRCLEQ_HEAD *head" "struct TYPE *listelm" "struct TYPE *elm" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_INSERT_AFTER "CIRCLEQ_HEAD *head" "struct TYPE *listelm" "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn CIRCLEQ_INSERT_BEFORE "CIRCLEQ_HEAD *head" "struct TYPE *listelm" "struct TYPE *elm" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_INSERT_BEFORE "CIRCLEQ_HEAD *head" "struct TYPE *listelm" "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn CIRCLEQ_INSERT_HEAD "CIRCLEQ_HEAD *head" "struct TYPE *elm" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_INSERT_HEAD "CIRCLEQ_HEAD *head" "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn CIRCLEQ_INSERT_TAIL "CIRCLEQ_HEAD *head" "struct TYPE *elm" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_INSERT_TAIL "CIRCLEQ_HEAD *head" "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn CIRCLEQ_REMOVE "CIRCLEQ_HEAD *head" "struct TYPE *elm" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_REMOVE "CIRCLEQ_HEAD *head" "struct TYPE *elm" "FIELDNAME" .Ft void -.Fn CIRCLEQ_REPLACE "CIRCLEQ_HEAD *head" "struct TYPE *elm" "struct TYPE *elm2" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_REPLACE "CIRCLEQ_HEAD *head" "struct TYPE *elm" "struct TYPE *elm2" "FIELDNAME" .Sh DESCRIPTION These macros define and operate on five types of data structures: singly-linked lists, simple queues, lists, tail queues, and circular queues. @@ -386,7 +386,7 @@ is the name tag of a user defined structure that must contain a field of type or .Li CIRCLEQ_ENTRY , named -.Fa NAME . +.Fa FIELDNAME . The argument .Fa HEADNAME is the name tag of a user defined structure that must be declared @@ -489,14 +489,14 @@ and .Fn SLIST_NEXT macros can be used to traverse the list: .Bd -literal -offset indent -for (np = SLIST_FIRST(&head); np != NULL; np = SLIST_NEXT(np, NAME)) +for (np = SLIST_FIRST(&head); np != NULL; np = SLIST_NEXT(np, FIELDNAME)) .Ed .Pp Or, for simplicity, one can use the .Fn SLIST_FOREACH macro: .Bd -literal -offset indent -SLIST_FOREACH(np, head, NAME) +SLIST_FOREACH(np, head, FIELDNAME) .Ed .Pp The macro @@ -632,14 +632,14 @@ and .Fn LIST_NEXT macros can be used to traverse the list: .Bd -literal -offset indent -for (np = LIST_FIRST(&head); np != NULL; np = LIST_NEXT(np, NAME)) +for (np = LIST_FIRST(&head); np != NULL; np = LIST_NEXT(np, FIELDNAME)) .Ed .Pp Or, for simplicity, one can use the .Fn LIST_FOREACH macro: .Bd -literal -offset indent -LIST_FOREACH(np, head, NAME) +LIST_FOREACH(np, head, FIELDNAME) .Ed .Pp The macro @@ -770,7 +770,7 @@ The .Fn SIMPLEQ_FOREACH is used for queue traversal: .Bd -literal -offset indent -SIMPLEQ_FOREACH(np, head, NAME) +SIMPLEQ_FOREACH(np, head, FIELDNAME) .Ed .Pp The macro @@ -909,8 +909,8 @@ starts at the first element and proceeds towards the last. .Fn TAILQ_FOREACH_REVERSE starts at the last element and proceeds towards the first. .Bd -literal -offset indent -TAILQ_FOREACH(np, &head, NAME) -TAILQ_FOREACH_REVERSE(np, &head, HEADNAME, NAME) +TAILQ_FOREACH(np, &head, FIELDNAME) +TAILQ_FOREACH_REVERSE(np, &head, HEADNAME, FIELDNAME) .Ed .Pp The macros @@ -1071,7 +1071,7 @@ The .Fn CIRCLEQ_FOREACH is used for circular queue forward traversal: .Bd -literal -offset indent -CIRCLEQ_FOREACH(np, head, NAME) +CIRCLEQ_FOREACH(np, head, FIELDNAME) .Ed .Pp The |