From: Alejandro Colomar Date: Tue, 20 Oct 2020 21:31:04 +0000 (+0200) Subject: list.3: Copy and adapt code from queue.3 X-Git-Tag: man-pages-5.09~137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=481854f548757e7da16fee9a88414892c54b4cda;p=thirdparty%2Fman-pages.git list.3: Copy and adapt code from queue.3 list.3: SYNOPSIS: Copy include from queue.3 list.3: DESCRIPTION: Copy description about naming of macros from queue.3 list.3: DESCRIPTION: Remove unrelated code to adapt to this page list.3: DESCRIPTION: Remove lines pointing to the EXAMPLES list.3: CONFORMING TO: Copy from queue.3 list.3: CONFORMING TO: Adapt to this page Signed-off-by: Alejandro Colomar Signed-off-by: Michael Kerrisk --- diff --git a/man3/list.3 b/man3/list.3 index 6252aaf6a7..4c36b08465 100644 --- a/man3/list.3 +++ b/man3/list.3 @@ -49,6 +49,8 @@ .Nm LIST_REMOVE , .\" .Nm LIST_SWAP , .SH SYNOPSIS +.In sys/queue.h +.\" .Fn LIST_EMPTY "LIST_HEAD *head" .Fn LIST_ENTRY "TYPE" .Fn LIST_FIRST "LIST_HEAD *head" @@ -68,6 +70,18 @@ .\" .Fn LIST_SWAP "LIST_HEAD *head1" "LIST_HEAD *head2" "TYPE" "LIST_ENTRY NAME" .\" .SH DESCRIPTION +In the macro definitions, +.Fa TYPE +is the name of a user defined structure, +that must contain a field of type +.Li LIST_ENTRY , +named +.Fa NAME . +The argument +.Fa HEADNAME +is the name of a user defined structure that must be declared +using the macro +.Li LIST_HEAD . .Ss Lists A list is headed by a structure defined by the .Nm LIST_HEAD @@ -215,10 +229,12 @@ from the list. .\" .Fa head1 .\" and .\" .Fa head2 . -.Pp -See the EXAMPLES section below for an example program using a linked list. .SH RETURN VALUE .SH CONFORMING TO +Not in POSIX.1, POSIX.1-2001 or POSIX.1-2008. +Present on the BSDs +(LIST macros first appeared in +.Bx 4.4 ). .SH BUGS .SH EXAMPLES .Ss List example