From 0db324e2e5d9d3347ea0e93138372fb65aac09e6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 21:41:09 +0200 Subject: Merging upstream version 6.7. Signed-off-by: Daniel Baumann --- man3/slist.3 | 56 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'man3/slist.3') diff --git a/man3/slist.3 b/man3/slist.3 index 98ce859..396b9cb 100644 --- a/man3/slist.3 +++ b/man3/slist.3 @@ -5,7 +5,7 @@ .\" SPDX-License-Identifier: BSD-3-Clause .\" .\" -.TH SLIST 3 2023-05-03 "Linux man-pages 6.05.01" +.TH SLIST 3 2023-10-31 "Linux man-pages 6.7" .SH NAME SLIST_EMPTY, SLIST_ENTRY, @@ -31,45 +31,45 @@ Standard C library .SH SYNOPSIS .nf .B #include -.PP +.P .B SLIST_ENTRY(TYPE); -.PP +.P .B SLIST_HEAD(HEADNAME, TYPE); .BI "SLIST_HEAD SLIST_HEAD_INITIALIZER(SLIST_HEAD " head ); .BI "void SLIST_INIT(SLIST_HEAD *" head ); -.PP +.P .BI "int SLIST_EMPTY(SLIST_HEAD *" head ); -.PP +.P .BI "void SLIST_INSERT_HEAD(SLIST_HEAD *" head , .BI " struct TYPE *" elm ", SLIST_ENTRY " NAME ); .BI "void SLIST_INSERT_AFTER(struct TYPE *" listelm , .BI " struct TYPE *" elm ", SLIST_ENTRY " NAME ); -.PP +.P .BI "struct TYPE *SLIST_FIRST(SLIST_HEAD *" head ); .BI "struct TYPE *SLIST_NEXT(struct TYPE *" elm ", SLIST_ENTRY " NAME ); -.PP +.P .BI "SLIST_FOREACH(struct TYPE *" var ", SLIST_HEAD *" head ", SLIST_ENTRY " NAME ); .\" .BI "SLIST_FOREACH_FROM(struct TYPE *" var ", SLIST_HEAD *" head , .\" .BI " SLIST_ENTRY " NAME ); -.\" .PP +.\" .P .\" .BI "SLIST_FOREACH_SAFE(struct TYPE *" var ", SLIST_HEAD *" head , .\" .BI " SLIST_ENTRY " NAME ", struct TYPE *" temp_var ); .\" .BI "SLIST_FOREACH_FROM_SAFE(struct TYPE *" var ", SLIST_HEAD *" head , .\" .BI " SLIST_ENTRY " NAME ", struct TYPE *" temp_var ); -.PP +.P .BI "void SLIST_REMOVE(SLIST_HEAD *" head ", struct TYPE *" elm , .BI " SLIST_ENTRY " NAME ); .BI "void SLIST_REMOVE_HEAD(SLIST_HEAD *" head , .BI " SLIST_ENTRY " NAME ); .\" .BI "void SLIST_REMOVE_AFTER(struct TYPE *" elm , .\" .BI " SLIST_ENTRY " NAME ); -.\" .PP +.\" .P .\" .BI "void SLIST_SWAP(SLIST_HEAD *" head1 ", SLIST_HEAD *" head2 , .\" .BI " SLIST_ENTRY " NAME ); .fi .SH DESCRIPTION These macros define and operate on doubly linked lists. -.PP +.P In the macro definitions, .I TYPE is the name of a user-defined structure, @@ -96,44 +96,44 @@ or at the head of the list. An .I SLIST_HEAD structure is declared as follows: -.PP +.P .in +4 .EX SLIST_HEAD(HEADNAME, TYPE) head; .EE .in -.PP +.P where .I struct HEADNAME is the structure to be defined, and .I struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as: -.PP +.P .in +4 .EX struct HEADNAME *headp; .EE .in -.PP +.P (The names .I head and .I headp are user selectable.) -.PP +.P .BR SLIST_ENTRY () declares a structure that connects the elements in the list. -.PP +.P .BR SLIST_HEAD_INITIALIZER () evaluates to an initializer for the list .IR head . -.PP +.P .BR SLIST_INIT () initializes the list referenced by .IR head . -.PP +.P .BR SLIST_EMPTY () evaluates to true if there are no elements in the list. .SS Insertion @@ -141,7 +141,7 @@ evaluates to true if there are no elements in the list. inserts the new element .I elm at the head of the list. -.PP +.P .BR SLIST_INSERT_AFTER () inserts the new element .I elm @@ -150,17 +150,17 @@ after the element .SS Traversal .BR SLIST_FIRST () returns the first element in the list, or NULL if the list is empty. -.PP +.P .BR SLIST_NEXT () returns the next element in the list. -.PP +.P .BR SLIST_FOREACH () traverses the list referenced by .I head in the forward direction, assigning each element in turn to .IR var . -.\" .PP +.\" .P .\" .BR SLIST_FOREACH_FROM () .\" behaves identically to .\" .BR SLIST_FOREACH () @@ -185,7 +185,7 @@ assigning each element in turn to .\" .I var .\" as well as free it from within the loop safely without interfering with the .\" traversal. -.\" .PP +.\" .P .\" .BR SLIST_FOREACH_FROM_SAFE () .\" behaves identically to .\" .BR SLIST_FOREACH_SAFE () @@ -202,7 +202,7 @@ assigning each element in turn to removes the element .I elm from the list. -.PP +.P .BR SLIST_REMOVE_HEAD () removes the element .I elm @@ -211,7 +211,7 @@ For optimum efficiency, elements being removed from the head of the list should explicitly use this macro instead of the generic .BR SLIST_REMOVE (). -.\" .PP +.\" .P .\" .BR SLIST_REMOVE_AFTER () .\" removes the element after .\" .I elm @@ -229,14 +229,14 @@ should explicitly use this macro instead of the generic .BR SLIST_EMPTY () returns nonzero if the list is empty, and zero if the list contains at least one entry. -.PP +.P .BR SLIST_FIRST (), and .BR SLIST_NEXT () return a pointer to the first or next .I TYPE structure, respectively. -.PP +.P .BR SLIST_HEAD_INITIALIZER () returns an initializer that can be assigned to the list .IR head . -- cgit v1.2.3