Document STAILQ_CONCAT and TAILQ_CONCAT.
PR: 20024 Submitted by: Tony Finch <dot@dotat.at> (TAILQ_CONCAT, slightly changed by me) Reviewed by: ru (earlier version)
This commit is contained in:
@@ -37,6 +37,7 @@ MLINKS+=queue.3 SLIST_INSERT_HEAD.3
|
|||||||
MLINKS+=queue.3 SLIST_NEXT.3
|
MLINKS+=queue.3 SLIST_NEXT.3
|
||||||
MLINKS+=queue.3 SLIST_REMOVE.3
|
MLINKS+=queue.3 SLIST_REMOVE.3
|
||||||
MLINKS+=queue.3 SLIST_REMOVE_HEAD.3
|
MLINKS+=queue.3 SLIST_REMOVE_HEAD.3
|
||||||
|
MLINKS+=queue.3 STAILQ_CONCAT.3
|
||||||
MLINKS+=queue.3 STAILQ_EMPTY.3
|
MLINKS+=queue.3 STAILQ_EMPTY.3
|
||||||
MLINKS+=queue.3 STAILQ_ENTRY.3
|
MLINKS+=queue.3 STAILQ_ENTRY.3
|
||||||
MLINKS+=queue.3 STAILQ_FIRST.3
|
MLINKS+=queue.3 STAILQ_FIRST.3
|
||||||
@@ -51,6 +52,7 @@ MLINKS+=queue.3 STAILQ_LAST.3
|
|||||||
MLINKS+=queue.3 STAILQ_NEXT.3
|
MLINKS+=queue.3 STAILQ_NEXT.3
|
||||||
MLINKS+=queue.3 STAILQ_REMOVE.3
|
MLINKS+=queue.3 STAILQ_REMOVE.3
|
||||||
MLINKS+=queue.3 STAILQ_REMOVE_HEAD.3
|
MLINKS+=queue.3 STAILQ_REMOVE_HEAD.3
|
||||||
|
MLINKS+=queue.3 TAILQ_CONCAT.3
|
||||||
MLINKS+=queue.3 TAILQ_EMPTY.3
|
MLINKS+=queue.3 TAILQ_EMPTY.3
|
||||||
MLINKS+=queue.3 TAILQ_ENTRY.3
|
MLINKS+=queue.3 TAILQ_ENTRY.3
|
||||||
MLINKS+=queue.3 TAILQ_FIRST.3
|
MLINKS+=queue.3 TAILQ_FIRST.3
|
||||||
|
|||||||
@@ -48,6 +48,7 @@
|
|||||||
.Nm SLIST_NEXT ,
|
.Nm SLIST_NEXT ,
|
||||||
.Nm SLIST_REMOVE_HEAD ,
|
.Nm SLIST_REMOVE_HEAD ,
|
||||||
.Nm SLIST_REMOVE ,
|
.Nm SLIST_REMOVE ,
|
||||||
|
.Nm STAILQ_CONCAT ,
|
||||||
.Nm STAILQ_EMPTY ,
|
.Nm STAILQ_EMPTY ,
|
||||||
.Nm STAILQ_ENTRY ,
|
.Nm STAILQ_ENTRY ,
|
||||||
.Nm STAILQ_FIRST ,
|
.Nm STAILQ_FIRST ,
|
||||||
@@ -74,6 +75,7 @@
|
|||||||
.Nm LIST_INSERT_HEAD ,
|
.Nm LIST_INSERT_HEAD ,
|
||||||
.Nm LIST_NEXT ,
|
.Nm LIST_NEXT ,
|
||||||
.Nm LIST_REMOVE ,
|
.Nm LIST_REMOVE ,
|
||||||
|
.Nm TAILQ_CONCAT ,
|
||||||
.Nm TAILQ_EMPTY ,
|
.Nm TAILQ_EMPTY ,
|
||||||
.Nm TAILQ_ENTRY ,
|
.Nm TAILQ_ENTRY ,
|
||||||
.Nm TAILQ_FIRST ,
|
.Nm TAILQ_FIRST ,
|
||||||
@@ -108,6 +110,7 @@ lists and tail queues
|
|||||||
.Fn SLIST_REMOVE_HEAD "SLIST_HEAD *head" "SLIST_ENTRY NAME"
|
.Fn SLIST_REMOVE_HEAD "SLIST_HEAD *head" "SLIST_ENTRY NAME"
|
||||||
.Fn SLIST_REMOVE "SLIST_HEAD *head" "TYPE *elm" "TYPE" "SLIST_ENTRY NAME"
|
.Fn SLIST_REMOVE "SLIST_HEAD *head" "TYPE *elm" "TYPE" "SLIST_ENTRY NAME"
|
||||||
.\"
|
.\"
|
||||||
|
.Fn STAILQ_CONCAT "STAILQ_HEAD *head1" "STAILQ_HEAD *head2"
|
||||||
.Fn STAILQ_EMPTY "STAILQ_HEAD *head"
|
.Fn STAILQ_EMPTY "STAILQ_HEAD *head"
|
||||||
.Fn STAILQ_ENTRY "TYPE"
|
.Fn STAILQ_ENTRY "TYPE"
|
||||||
.Fn STAILQ_FIRST "STAILQ_HEAD *head"
|
.Fn STAILQ_FIRST "STAILQ_HEAD *head"
|
||||||
@@ -136,6 +139,7 @@ lists and tail queues
|
|||||||
.Fn LIST_NEXT "TYPE *elm" "LIST_ENTRY NAME"
|
.Fn LIST_NEXT "TYPE *elm" "LIST_ENTRY NAME"
|
||||||
.Fn LIST_REMOVE "TYPE *elm" "LIST_ENTRY NAME"
|
.Fn LIST_REMOVE "TYPE *elm" "LIST_ENTRY NAME"
|
||||||
.\"
|
.\"
|
||||||
|
.Fn TAILQ_CONCAT "TAILQ_HEAD *head1" "TAILQ_HEAD *head2" "TAILQ_ENTRY NAME"
|
||||||
.Fn TAILQ_EMPTY "TAILQ_HEAD *head"
|
.Fn TAILQ_EMPTY "TAILQ_HEAD *head"
|
||||||
.Fn TAILQ_ENTRY "TYPE"
|
.Fn TAILQ_ENTRY "TYPE"
|
||||||
.Fn TAILQ_FIRST "TAILQ_HEAD *head"
|
.Fn TAILQ_FIRST "TAILQ_HEAD *head"
|
||||||
@@ -180,6 +184,8 @@ Singly-linked tail queues add the following functionality:
|
|||||||
.Bl -enum -compact -offset indent
|
.Bl -enum -compact -offset indent
|
||||||
.It
|
.It
|
||||||
Entries can be added at the end of a list.
|
Entries can be added at the end of a list.
|
||||||
|
.It
|
||||||
|
They may be concatenated.
|
||||||
.El
|
.El
|
||||||
However:
|
However:
|
||||||
.Bl -enum -compact -offset indent
|
.Bl -enum -compact -offset indent
|
||||||
@@ -222,6 +228,8 @@ Tail queues add the following functionality:
|
|||||||
Entries can be added at the end of a list.
|
Entries can be added at the end of a list.
|
||||||
.It
|
.It
|
||||||
They may be traversed backwards, from tail to head.
|
They may be traversed backwards, from tail to head.
|
||||||
|
.It
|
||||||
|
They may be concatenated.
|
||||||
.El
|
.El
|
||||||
However:
|
However:
|
||||||
.Bl -enum -compact -offset indent
|
.Bl -enum -compact -offset indent
|
||||||
@@ -429,6 +437,14 @@ evaluates to an initializer for the tail queue
|
|||||||
.Fa head .
|
.Fa head .
|
||||||
.Pp
|
.Pp
|
||||||
The macro
|
The macro
|
||||||
|
.Nm STAILQ_CONCAT
|
||||||
|
concatenates the tail queue headed by
|
||||||
|
.Fa head2
|
||||||
|
onto the end of the one headed by
|
||||||
|
.Fa head1
|
||||||
|
removing all entries from the former.
|
||||||
|
.Pp
|
||||||
|
The macro
|
||||||
.Nm STAILQ_EMPTY
|
.Nm STAILQ_EMPTY
|
||||||
evaluates to true if there are no items on the tail queue.
|
evaluates to true if there are no items on the tail queue.
|
||||||
.Pp
|
.Pp
|
||||||
@@ -719,6 +735,14 @@ evaluates to an initializer for the tail queue
|
|||||||
.Fa head .
|
.Fa head .
|
||||||
.Pp
|
.Pp
|
||||||
The macro
|
The macro
|
||||||
|
.Nm TAILQ_CONCAT
|
||||||
|
concatenates the tail queue headed by
|
||||||
|
.Fa head2
|
||||||
|
onto the end of the one headed by
|
||||||
|
.Fa head1
|
||||||
|
removing all entries from the former.
|
||||||
|
.Pp
|
||||||
|
The macro
|
||||||
.Nm TAILQ_EMPTY
|
.Nm TAILQ_EMPTY
|
||||||
evaluates to true if there are no items on the tail queue.
|
evaluates to true if there are no items on the tail queue.
|
||||||
.Pp
|
.Pp
|
||||||
|
|||||||
Reference in New Issue
Block a user