All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] tailq.3: fork from queue.3
@ 2020-10-25  9:36 Alejandro Colomar
  2020-10-25  9:36 ` [PATCH 01/10] tailq.3: New page that will hold the (tailq) contents of queue.3 Alejandro Colomar
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Alejandro Colomar @ 2020-10-25  9:36 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Alejandro Colomar, linux-man, libc-alpha

Hi Michael,

The last page is here :)

Cheers,

Alex


Alejandro Colomar (10):
  tailq.3: New page that will hold the (tailq) contents of queue.3
  queue.3, tailq.3: NAME: Move code from queue.3 to tailq.3
  queue.3, tailq.3: SYNOPSIS: Move code from queue.3 to tailq.3
  queue.3, tailq.3: DESCRIPTION: Move code from queue.3 to tailq.3
  queue.3, tailq.3: EXAMPLES: Move code from queue.3 to tailq.3
  tailq.3: Copy and adapt code from queue.3
  tailq.3: ffix: Use man markup
  tailq.3: Add remaining details to complete the page
  TAILQ_CONCAT.3, TAILQ_EMPTY.3, TAILQ_ENTRY.3, TAILQ_FIRST.3,
    TAILQ_FOREACH.3, TAILQ_FOREACH_REVERSE.3, TAILQ_HEAD.3,
    TAILQ_HEAD_INITIALIZER.3, TAILQ_INIT.3, TAILQ_INSERT_AFTER.3,
    TAILQ_INSERT_BEFORE.3, TAILQ_INSERT_HEAD.3, TAILQ_INSERT_TAIL.3,
    TAILQ_LAST.3, TAILQ_NEXT.3, TAILQ_PREV.3, TAILQ_REMOVE.3,
    TAILQ_SWAP.3: Link to the new tailq(3) page instead of queue(3)
  queue.3: SEE ALSO: Add tailq(3)

 man3/TAILQ_CONCAT.3           |   2 +-
 man3/TAILQ_EMPTY.3            |   2 +-
 man3/TAILQ_ENTRY.3            |   2 +-
 man3/TAILQ_FIRST.3            |   2 +-
 man3/TAILQ_FOREACH.3          |   2 +-
 man3/TAILQ_FOREACH_REVERSE.3  |   2 +-
 man3/TAILQ_HEAD.3             |   2 +-
 man3/TAILQ_HEAD_INITIALIZER.3 |   2 +-
 man3/TAILQ_INIT.3             |   2 +-
 man3/TAILQ_INSERT_AFTER.3     |   2 +-
 man3/TAILQ_INSERT_BEFORE.3    |   2 +-
 man3/TAILQ_INSERT_HEAD.3      |   2 +-
 man3/TAILQ_INSERT_TAIL.3      |   2 +-
 man3/TAILQ_LAST.3             |   2 +-
 man3/TAILQ_NEXT.3             |   2 +-
 man3/TAILQ_PREV.3             |   2 +-
 man3/TAILQ_REMOVE.3           |   2 +-
 man3/TAILQ_SWAP.3             |   2 +-
 man3/queue.3                  | 343 +-------------------------
 man3/tailq.3                  | 437 ++++++++++++++++++++++++++++++++++
 20 files changed, 456 insertions(+), 360 deletions(-)
 create mode 100644 man3/tailq.3

-- 
2.28.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 01/10] tailq.3: New page that will hold the (tailq) contents of queue.3
  2020-10-25  9:36 [PATCH 00/10] tailq.3: fork from queue.3 Alejandro Colomar
@ 2020-10-25  9:36 ` Alejandro Colomar
  2020-10-25  9:36 ` [PATCH 02/10] queue.3, tailq.3: NAME: Move code from queue.3 to tailq.3 Alejandro Colomar
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Alejandro Colomar @ 2020-10-25  9:36 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Alejandro Colomar, linux-man, libc-alpha

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---
 man3/tailq.3 | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 man3/tailq.3

diff --git a/man3/tailq.3 b/man3/tailq.3
new file mode 100644
index 000000000..c53b3ca4c
--- /dev/null
+++ b/man3/tailq.3
@@ -0,0 +1,40 @@
+.\" Copyright (c) 1993
+.\"    The Regents of the University of California.  All rights reserved.
+.\" and Copyright (c) 2020 by Alejandro Colomar <colomar.6.4.3@gmail.com>
+.\"
+.\" %%%LICENSE_START(BSD_3_CLAUSE_UCB)
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\" %%%LICENSE_END
+.\"
+.\"
+.TH TAILQ 3 2020-10-21 "GNU" "Linux Programmer's Manual"
+.SH NAME
+.SH SYNOPSIS
+.SH DESCRIPTION
+.SH RETURN VALUE
+.SH CONFORMING TO
+.SH BUGS
+.SH EXAMPLES
+.SH SEE ALSO
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 02/10] queue.3, tailq.3: NAME: Move code from queue.3 to tailq.3
  2020-10-25  9:36 [PATCH 00/10] tailq.3: fork from queue.3 Alejandro Colomar
  2020-10-25  9:36 ` [PATCH 01/10] tailq.3: New page that will hold the (tailq) contents of queue.3 Alejandro Colomar
@ 2020-10-25  9:36 ` Alejandro Colomar
  2020-10-25  9:36 ` [PATCH 03/10] queue.3, tailq.3: SYNOPSIS: " Alejandro Colomar
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Alejandro Colomar @ 2020-10-25  9:36 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Alejandro Colomar, linux-man, libc-alpha

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---
 man3/queue.3 | 24 ------------------------
 man3/tailq.3 | 24 ++++++++++++++++++++++++
 2 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/man3/queue.3 b/man3/queue.3
index e4fb5ae79..9b3938226 100644
--- a/man3/queue.3
+++ b/man3/queue.3
@@ -34,30 +34,6 @@
 .Dt QUEUE 3
 .Os
 .Sh NAME
-.Nm TAILQ_CONCAT ,
-.Nm TAILQ_EMPTY ,
-.Nm TAILQ_ENTRY ,
-.Nm TAILQ_FIRST ,
-.Nm TAILQ_FOREACH ,
-.\" .Nm TAILQ_FOREACH_FROM ,
-.\" .Nm TAILQ_FOREACH_FROM_SAFE ,
-.Nm TAILQ_FOREACH_REVERSE ,
-.\" .Nm TAILQ_FOREACH_REVERSE_FROM ,
-.\" .Nm TAILQ_FOREACH_REVERSE_FROM_SAFE ,
-.\" .Nm TAILQ_FOREACH_REVERSE_SAFE ,
-.\" .Nm TAILQ_FOREACH_SAFE ,
-.Nm TAILQ_HEAD ,
-.Nm TAILQ_HEAD_INITIALIZER ,
-.Nm TAILQ_INIT ,
-.Nm TAILQ_INSERT_AFTER ,
-.Nm TAILQ_INSERT_BEFORE ,
-.Nm TAILQ_INSERT_HEAD ,
-.Nm TAILQ_INSERT_TAIL ,
-.Nm TAILQ_LAST ,
-.Nm TAILQ_NEXT ,
-.Nm TAILQ_PREV ,
-.Nm TAILQ_REMOVE
-.\" .Nm TAILQ_SWAP
 .Nd implementations of singly-linked lists, singly-linked tail queues,
 lists, tail queues, and circular queues
 .Sh SYNOPSIS
diff --git a/man3/tailq.3 b/man3/tailq.3
index c53b3ca4c..eb7cec356 100644
--- a/man3/tailq.3
+++ b/man3/tailq.3
@@ -31,6 +31,30 @@
 .\"
 .TH TAILQ 3 2020-10-21 "GNU" "Linux Programmer's Manual"
 .SH NAME
+.Nm TAILQ_CONCAT ,
+.Nm TAILQ_EMPTY ,
+.Nm TAILQ_ENTRY ,
+.Nm TAILQ_FIRST ,
+.Nm TAILQ_FOREACH ,
+.\" .Nm TAILQ_FOREACH_FROM ,
+.\" .Nm TAILQ_FOREACH_FROM_SAFE ,
+.Nm TAILQ_FOREACH_REVERSE ,
+.\" .Nm TAILQ_FOREACH_REVERSE_FROM ,
+.\" .Nm TAILQ_FOREACH_REVERSE_FROM_SAFE ,
+.\" .Nm TAILQ_FOREACH_REVERSE_SAFE ,
+.\" .Nm TAILQ_FOREACH_SAFE ,
+.Nm TAILQ_HEAD ,
+.Nm TAILQ_HEAD_INITIALIZER ,
+.Nm TAILQ_INIT ,
+.Nm TAILQ_INSERT_AFTER ,
+.Nm TAILQ_INSERT_BEFORE ,
+.Nm TAILQ_INSERT_HEAD ,
+.Nm TAILQ_INSERT_TAIL ,
+.Nm TAILQ_LAST ,
+.Nm TAILQ_NEXT ,
+.Nm TAILQ_PREV ,
+.Nm TAILQ_REMOVE
+.\" .Nm TAILQ_SWAP
 .SH SYNOPSIS
 .SH DESCRIPTION
 .SH RETURN VALUE
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 03/10] queue.3, tailq.3: SYNOPSIS: Move code from queue.3 to tailq.3
  2020-10-25  9:36 [PATCH 00/10] tailq.3: fork from queue.3 Alejandro Colomar
  2020-10-25  9:36 ` [PATCH 01/10] tailq.3: New page that will hold the (tailq) contents of queue.3 Alejandro Colomar
  2020-10-25  9:36 ` [PATCH 02/10] queue.3, tailq.3: NAME: Move code from queue.3 to tailq.3 Alejandro Colomar
@ 2020-10-25  9:36 ` Alejandro Colomar
  2020-10-25  9:36 ` [PATCH 04/10] queue.3, tailq.3: DESCRIPTION: " Alejandro Colomar
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Alejandro Colomar @ 2020-10-25  9:36 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Alejandro Colomar, linux-man, libc-alpha

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---
 man3/queue.3 | 27 ---------------------------
 man3/tailq.3 | 27 +++++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/man3/queue.3 b/man3/queue.3
index 9b3938226..cf9770a20 100644
--- a/man3/queue.3
+++ b/man3/queue.3
@@ -37,33 +37,6 @@
 .Nd implementations of singly-linked lists, singly-linked tail queues,
 lists, tail queues, and circular queues
 .Sh SYNOPSIS
-.In sys/queue.h
-.\"
-.Fn TAILQ_CONCAT "TAILQ_HEAD *head1" "TAILQ_HEAD *head2" "TAILQ_ENTRY NAME"
-.Fn TAILQ_EMPTY "TAILQ_HEAD *head"
-.Fn TAILQ_ENTRY "TYPE"
-.Fn TAILQ_FIRST "TAILQ_HEAD *head"
-.Fn TAILQ_FOREACH "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME"
-.\" .Fn TAILQ_FOREACH_FROM "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME"
-.\" .Fn TAILQ_FOREACH_FROM_SAFE "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" "TYPE *temp_var"
-.Fn TAILQ_FOREACH_REVERSE "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME"
-.\" .Fn TAILQ_FOREACH_REVERSE_FROM "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME"
-.\" .Fn TAILQ_FOREACH_REVERSE_FROM_SAFE "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" "TYPE *temp_var"
-.\" .Fn TAILQ_FOREACH_REVERSE_SAFE "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" "TYPE *temp_var"
-.\" .Fn TAILQ_FOREACH_SAFE "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" "TYPE *temp_var"
-.Fn TAILQ_HEAD "HEADNAME" "TYPE"
-.Fn TAILQ_HEAD_INITIALIZER "TAILQ_HEAD head"
-.Fn TAILQ_INIT "TAILQ_HEAD *head"
-.Fn TAILQ_INSERT_AFTER "TAILQ_HEAD *head" "TYPE *listelm" "TYPE *elm" "TAILQ_ENTRY NAME"
-.Fn TAILQ_INSERT_BEFORE "TYPE *listelm" "TYPE *elm" "TAILQ_ENTRY NAME"
-.Fn TAILQ_INSERT_HEAD "TAILQ_HEAD *head" "TYPE *elm" "TAILQ_ENTRY NAME"
-.Fn TAILQ_INSERT_TAIL "TAILQ_HEAD *head" "TYPE *elm" "TAILQ_ENTRY NAME"
-.Fn TAILQ_LAST "TAILQ_HEAD *head" "HEADNAME"
-.Fn TAILQ_NEXT "TYPE *elm" "TAILQ_ENTRY NAME"
-.Fn TAILQ_PREV "TYPE *elm" "HEADNAME" "TAILQ_ENTRY NAME"
-.Fn TAILQ_REMOVE "TAILQ_HEAD *head" "TYPE *elm" "TAILQ_ENTRY NAME"
-.\" .Fn TAILQ_SWAP "TAILQ_HEAD *head1" "TAILQ_HEAD *head2" "TYPE" "TAILQ_ENTRY NAME"
-.\"
 .Sh DESCRIPTION
 These macros define and operate on five types of data structures:
 singly-linked lists, singly-linked tail queues, lists, tail queues, and
diff --git a/man3/tailq.3 b/man3/tailq.3
index eb7cec356..2d8280ca8 100644
--- a/man3/tailq.3
+++ b/man3/tailq.3
@@ -56,6 +56,33 @@
 .Nm TAILQ_REMOVE
 .\" .Nm TAILQ_SWAP
 .SH SYNOPSIS
+.In sys/queue.h
+.\"
+.Fn TAILQ_CONCAT "TAILQ_HEAD *head1" "TAILQ_HEAD *head2" "TAILQ_ENTRY NAME"
+.Fn TAILQ_EMPTY "TAILQ_HEAD *head"
+.Fn TAILQ_ENTRY "TYPE"
+.Fn TAILQ_FIRST "TAILQ_HEAD *head"
+.Fn TAILQ_FOREACH "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME"
+.\" .Fn TAILQ_FOREACH_FROM "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME"
+.\" .Fn TAILQ_FOREACH_FROM_SAFE "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" "TYPE *temp_var"
+.Fn TAILQ_FOREACH_REVERSE "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME"
+.\" .Fn TAILQ_FOREACH_REVERSE_FROM "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME"
+.\" .Fn TAILQ_FOREACH_REVERSE_FROM_SAFE "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" "TYPE *temp_var"
+.\" .Fn TAILQ_FOREACH_REVERSE_SAFE "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" "TYPE *temp_var"
+.\" .Fn TAILQ_FOREACH_SAFE "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" "TYPE *temp_var"
+.Fn TAILQ_HEAD "HEADNAME" "TYPE"
+.Fn TAILQ_HEAD_INITIALIZER "TAILQ_HEAD head"
+.Fn TAILQ_INIT "TAILQ_HEAD *head"
+.Fn TAILQ_INSERT_AFTER "TAILQ_HEAD *head" "TYPE *listelm" "TYPE *elm" "TAILQ_ENTRY NAME"
+.Fn TAILQ_INSERT_BEFORE "TYPE *listelm" "TYPE *elm" "TAILQ_ENTRY NAME"
+.Fn TAILQ_INSERT_HEAD "TAILQ_HEAD *head" "TYPE *elm" "TAILQ_ENTRY NAME"
+.Fn TAILQ_INSERT_TAIL "TAILQ_HEAD *head" "TYPE *elm" "TAILQ_ENTRY NAME"
+.Fn TAILQ_LAST "TAILQ_HEAD *head" "HEADNAME"
+.Fn TAILQ_NEXT "TYPE *elm" "TAILQ_ENTRY NAME"
+.Fn TAILQ_PREV "TYPE *elm" "HEADNAME" "TAILQ_ENTRY NAME"
+.Fn TAILQ_REMOVE "TAILQ_HEAD *head" "TYPE *elm" "TAILQ_ENTRY NAME"
+.\" .Fn TAILQ_SWAP "TAILQ_HEAD *head1" "TAILQ_HEAD *head2" "TYPE" "TAILQ_ENTRY NAME"
+.\"
 .SH DESCRIPTION
 .SH RETURN VALUE
 .SH CONFORMING TO
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 04/10] queue.3, tailq.3: DESCRIPTION: Move code from queue.3 to tailq.3
  2020-10-25  9:36 [PATCH 00/10] tailq.3: fork from queue.3 Alejandro Colomar
                   ` (2 preceding siblings ...)
  2020-10-25  9:36 ` [PATCH 03/10] queue.3, tailq.3: SYNOPSIS: " Alejandro Colomar
@ 2020-10-25  9:36 ` Alejandro Colomar
  2020-10-25  9:36 ` [PATCH 05/10] queue.3, tailq.3: EXAMPLES: " Alejandro Colomar
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Alejandro Colomar @ 2020-10-25  9:36 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Alejandro Colomar, linux-man, libc-alpha

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---
 man3/queue.3 | 235 ---------------------------------------------------
 man3/tailq.3 | 235 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 235 insertions(+), 235 deletions(-)

diff --git a/man3/queue.3 b/man3/queue.3
index cf9770a20..f6e3b9369 100644
--- a/man3/queue.3
+++ b/man3/queue.3
@@ -169,241 +169,6 @@ The termination condition for traversal is more complex.
 .It
 Code size is about 40% greater and operations run about 45% slower than lists.
 .El
-.Pp
-In the macro definitions,
-.Fa TYPE
-is the name of a user defined structure,
-that must contain a field of type
-.Li SLIST_ENTRY ,
-.Li STAILQ_ENTRY ,
-.Li LIST_ENTRY ,
-.Li TAILQ_ENTRY ,
-or
-.Li CIRCLEQ_ENTRY ,
-named
-.Fa NAME .
-The argument
-.Fa HEADNAME
-is the name of a user defined structure that must be declared
-using the macros
-.Li SLIST_HEAD ,
-.Li STAILQ_HEAD ,
-.Li LIST_HEAD ,
-.Li TAILQ_HEAD ,
-or
-.Li CIRCLEQ_HEAD .
-See the examples below for further explanation of how these
-macros are used.
-.Ss Tail queues
-A tail queue is headed by a structure defined by the
-.Nm TAILQ_HEAD
-macro.
-This structure contains a pair of pointers,
-one to the first element in the tail queue and the other to
-the last element in the tail queue.
-The elements are doubly linked so that an arbitrary element can be
-removed without traversing the tail queue.
-New elements can be added to the tail queue after an existing element,
-before an existing element, at the head of the tail queue,
-or at the end of the tail queue.
-A
-.Fa TAILQ_HEAD
-structure is declared as follows:
-.Bd -literal -offset indent
-TAILQ_HEAD(HEADNAME, TYPE) head;
-.Ed
-.Pp
-where
-.Li HEADNAME
-is the name of the structure to be defined, and
-.Li TYPE
-is the type of the elements to be linked into the tail queue.
-A pointer to the head of the tail queue can later be declared as:
-.Bd -literal -offset indent
-struct HEADNAME *headp;
-.Ed
-.Pp
-(The names
-.Li head
-and
-.Li headp
-are user selectable.)
-.Pp
-The macro
-.Nm TAILQ_HEAD_INITIALIZER
-evaluates to an initializer for the tail queue
-.Fa head .
-.Pp
-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
-evaluates to true if there are no items on the tail queue.
-.Pp
-The macro
-.Nm TAILQ_ENTRY
-declares a structure that connects the elements in
-the tail queue.
-.Pp
-The macro
-.Nm TAILQ_FIRST
-returns the first item on the tail queue or NULL if the tail queue
-is empty.
-.Pp
-The macro
-.Nm TAILQ_FOREACH
-traverses the tail queue referenced by
-.Fa head
-in the forward direction, assigning each element in turn to
-.Fa var .
-.Fa var
-is set to
-.Dv NULL
-if the loop completes normally, or if there were no elements.
-.\" .Pp
-.\" The macro
-.\" .Nm TAILQ_FOREACH_FROM
-.\" behaves identically to
-.\" .Nm TAILQ_FOREACH
-.\" when
-.\" .Fa var
-.\" is NULL, else it treats
-.\" .Fa var
-.\" as a previously found TAILQ element and begins the loop at
-.\" .Fa var
-.\" instead of the first element in the TAILQ referenced by
-.\" .Fa head .
-.Pp
-The macro
-.Nm TAILQ_FOREACH_REVERSE
-traverses the tail queue referenced by
-.Fa head
-in the reverse direction, assigning each element in turn to
-.Fa var .
-.\" .Pp
-.\" The macro
-.\" .Nm TAILQ_FOREACH_REVERSE_FROM
-.\" behaves identically to
-.\" .Nm TAILQ_FOREACH_REVERSE
-.\" when
-.\" .Fa var
-.\" is NULL, else it treats
-.\" .Fa var
-.\" as a previously found TAILQ element and begins the reverse loop at
-.\" .Fa var
-.\" instead of the last element in the TAILQ referenced by
-.\" .Fa head .
-.\" .Pp
-.\" The macros
-.\" .Nm TAILQ_FOREACH_SAFE
-.\" and
-.\" .Nm TAILQ_FOREACH_REVERSE_SAFE
-.\" traverse the list referenced by
-.\" .Fa head
-.\" in the forward or reverse direction respectively,
-.\" assigning each element in turn to
-.\" .Fa var .
-.\" However, unlike their unsafe counterparts,
-.\" .Nm TAILQ_FOREACH
-.\" and
-.\" .Nm TAILQ_FOREACH_REVERSE
-.\" permit to both remove
-.\" .Fa var
-.\" as well as free it from within the loop safely without interfering with the
-.\" traversal.
-.\" .Pp
-.\" The macro
-.\" .Nm TAILQ_FOREACH_FROM_SAFE
-.\" behaves identically to
-.\" .Nm TAILQ_FOREACH_SAFE
-.\" when
-.\" .Fa var
-.\" is NULL, else it treats
-.\" .Fa var
-.\" as a previously found TAILQ element and begins the loop at
-.\" .Fa var
-.\" instead of the first element in the TAILQ referenced by
-.\" .Fa head .
-.\" .Pp
-.\" The macro
-.\" .Nm TAILQ_FOREACH_REVERSE_FROM_SAFE
-.\" behaves identically to
-.\" .Nm TAILQ_FOREACH_REVERSE_SAFE
-.\" when
-.\" .Fa var
-.\" is NULL, else it treats
-.\" .Fa var
-.\" as a previously found TAILQ element and begins the reverse loop at
-.\" .Fa var
-.\" instead of the last element in the TAILQ referenced by
-.\" .Fa head .
-.Pp
-The macro
-.Nm TAILQ_INIT
-initializes the tail queue referenced by
-.Fa head .
-.Pp
-The macro
-.Nm TAILQ_INSERT_HEAD
-inserts the new element
-.Fa elm
-at the head of the tail queue.
-.Pp
-The macro
-.Nm TAILQ_INSERT_TAIL
-inserts the new element
-.Fa elm
-at the end of the tail queue.
-.Pp
-The macro
-.Nm TAILQ_INSERT_AFTER
-inserts the new element
-.Fa elm
-after the element
-.Fa listelm .
-.Pp
-The macro
-.Nm TAILQ_INSERT_BEFORE
-inserts the new element
-.Fa elm
-before the element
-.Fa listelm .
-.Pp
-The macro
-.Nm TAILQ_LAST
-returns the last item on the tail queue.
-If the tail queue is empty the return value is
-.Dv NULL .
-.Pp
-The macro
-.Nm TAILQ_NEXT
-returns the next item on the tail queue, or NULL if this item is the last.
-.Pp
-The macro
-.Nm TAILQ_PREV
-returns the previous item on the tail queue, or NULL if this item
-is the first.
-.Pp
-The macro
-.Nm TAILQ_REMOVE
-removes the element
-.Fa elm
-from the tail queue.
-.\" .Pp
-.\" The macro
-.\" .Nm TAILQ_SWAP
-.\" swaps the contents of
-.\" .Fa head1
-.\" and
-.\" .Fa head2 .
-.Pp
-See the EXAMPLES section below for an example program using a tail queue.
 .Sh EXAMPLES
 .Ss Tail queue example
 .Bd -literal
diff --git a/man3/tailq.3 b/man3/tailq.3
index 2d8280ca8..144a86f3f 100644
--- a/man3/tailq.3
+++ b/man3/tailq.3
@@ -84,6 +84,241 @@
 .\" .Fn TAILQ_SWAP "TAILQ_HEAD *head1" "TAILQ_HEAD *head2" "TYPE" "TAILQ_ENTRY NAME"
 .\"
 .SH DESCRIPTION
+.Pp
+In the macro definitions,
+.Fa TYPE
+is the name of a user defined structure,
+that must contain a field of type
+.Li SLIST_ENTRY ,
+.Li STAILQ_ENTRY ,
+.Li LIST_ENTRY ,
+.Li TAILQ_ENTRY ,
+or
+.Li CIRCLEQ_ENTRY ,
+named
+.Fa NAME .
+The argument
+.Fa HEADNAME
+is the name of a user defined structure that must be declared
+using the macros
+.Li SLIST_HEAD ,
+.Li STAILQ_HEAD ,
+.Li LIST_HEAD ,
+.Li TAILQ_HEAD ,
+or
+.Li CIRCLEQ_HEAD .
+See the examples below for further explanation of how these
+macros are used.
+.Ss Tail queues
+A tail queue is headed by a structure defined by the
+.Nm TAILQ_HEAD
+macro.
+This structure contains a pair of pointers,
+one to the first element in the tail queue and the other to
+the last element in the tail queue.
+The elements are doubly linked so that an arbitrary element can be
+removed without traversing the tail queue.
+New elements can be added to the tail queue after an existing element,
+before an existing element, at the head of the tail queue,
+or at the end of the tail queue.
+A
+.Fa TAILQ_HEAD
+structure is declared as follows:
+.Bd -literal -offset indent
+TAILQ_HEAD(HEADNAME, TYPE) head;
+.Ed
+.Pp
+where
+.Li HEADNAME
+is the name of the structure to be defined, and
+.Li TYPE
+is the type of the elements to be linked into the tail queue.
+A pointer to the head of the tail queue can later be declared as:
+.Bd -literal -offset indent
+struct HEADNAME *headp;
+.Ed
+.Pp
+(The names
+.Li head
+and
+.Li headp
+are user selectable.)
+.Pp
+The macro
+.Nm TAILQ_HEAD_INITIALIZER
+evaluates to an initializer for the tail queue
+.Fa head .
+.Pp
+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
+evaluates to true if there are no items on the tail queue.
+.Pp
+The macro
+.Nm TAILQ_ENTRY
+declares a structure that connects the elements in
+the tail queue.
+.Pp
+The macro
+.Nm TAILQ_FIRST
+returns the first item on the tail queue or NULL if the tail queue
+is empty.
+.Pp
+The macro
+.Nm TAILQ_FOREACH
+traverses the tail queue referenced by
+.Fa head
+in the forward direction, assigning each element in turn to
+.Fa var .
+.Fa var
+is set to
+.Dv NULL
+if the loop completes normally, or if there were no elements.
+.\" .Pp
+.\" The macro
+.\" .Nm TAILQ_FOREACH_FROM
+.\" behaves identically to
+.\" .Nm TAILQ_FOREACH
+.\" when
+.\" .Fa var
+.\" is NULL, else it treats
+.\" .Fa var
+.\" as a previously found TAILQ element and begins the loop at
+.\" .Fa var
+.\" instead of the first element in the TAILQ referenced by
+.\" .Fa head .
+.Pp
+The macro
+.Nm TAILQ_FOREACH_REVERSE
+traverses the tail queue referenced by
+.Fa head
+in the reverse direction, assigning each element in turn to
+.Fa var .
+.\" .Pp
+.\" The macro
+.\" .Nm TAILQ_FOREACH_REVERSE_FROM
+.\" behaves identically to
+.\" .Nm TAILQ_FOREACH_REVERSE
+.\" when
+.\" .Fa var
+.\" is NULL, else it treats
+.\" .Fa var
+.\" as a previously found TAILQ element and begins the reverse loop at
+.\" .Fa var
+.\" instead of the last element in the TAILQ referenced by
+.\" .Fa head .
+.\" .Pp
+.\" The macros
+.\" .Nm TAILQ_FOREACH_SAFE
+.\" and
+.\" .Nm TAILQ_FOREACH_REVERSE_SAFE
+.\" traverse the list referenced by
+.\" .Fa head
+.\" in the forward or reverse direction respectively,
+.\" assigning each element in turn to
+.\" .Fa var .
+.\" However, unlike their unsafe counterparts,
+.\" .Nm TAILQ_FOREACH
+.\" and
+.\" .Nm TAILQ_FOREACH_REVERSE
+.\" permit to both remove
+.\" .Fa var
+.\" as well as free it from within the loop safely without interfering with the
+.\" traversal.
+.\" .Pp
+.\" The macro
+.\" .Nm TAILQ_FOREACH_FROM_SAFE
+.\" behaves identically to
+.\" .Nm TAILQ_FOREACH_SAFE
+.\" when
+.\" .Fa var
+.\" is NULL, else it treats
+.\" .Fa var
+.\" as a previously found TAILQ element and begins the loop at
+.\" .Fa var
+.\" instead of the first element in the TAILQ referenced by
+.\" .Fa head .
+.\" .Pp
+.\" The macro
+.\" .Nm TAILQ_FOREACH_REVERSE_FROM_SAFE
+.\" behaves identically to
+.\" .Nm TAILQ_FOREACH_REVERSE_SAFE
+.\" when
+.\" .Fa var
+.\" is NULL, else it treats
+.\" .Fa var
+.\" as a previously found TAILQ element and begins the reverse loop at
+.\" .Fa var
+.\" instead of the last element in the TAILQ referenced by
+.\" .Fa head .
+.Pp
+The macro
+.Nm TAILQ_INIT
+initializes the tail queue referenced by
+.Fa head .
+.Pp
+The macro
+.Nm TAILQ_INSERT_HEAD
+inserts the new element
+.Fa elm
+at the head of the tail queue.
+.Pp
+The macro
+.Nm TAILQ_INSERT_TAIL
+inserts the new element
+.Fa elm
+at the end of the tail queue.
+.Pp
+The macro
+.Nm TAILQ_INSERT_AFTER
+inserts the new element
+.Fa elm
+after the element
+.Fa listelm .
+.Pp
+The macro
+.Nm TAILQ_INSERT_BEFORE
+inserts the new element
+.Fa elm
+before the element
+.Fa listelm .
+.Pp
+The macro
+.Nm TAILQ_LAST
+returns the last item on the tail queue.
+If the tail queue is empty the return value is
+.Dv NULL .
+.Pp
+The macro
+.Nm TAILQ_NEXT
+returns the next item on the tail queue, or NULL if this item is the last.
+.Pp
+The macro
+.Nm TAILQ_PREV
+returns the previous item on the tail queue, or NULL if this item
+is the first.
+.Pp
+The macro
+.Nm TAILQ_REMOVE
+removes the element
+.Fa elm
+from the tail queue.
+.\" .Pp
+.\" The macro
+.\" .Nm TAILQ_SWAP
+.\" swaps the contents of
+.\" .Fa head1
+.\" and
+.\" .Fa head2 .
+.Pp
+See the EXAMPLES section below for an example program using a tail queue.
 .SH RETURN VALUE
 .SH CONFORMING TO
 .SH BUGS
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 05/10] queue.3, tailq.3: EXAMPLES: Move code from queue.3 to tailq.3
  2020-10-25  9:36 [PATCH 00/10] tailq.3: fork from queue.3 Alejandro Colomar
                   ` (3 preceding siblings ...)
  2020-10-25  9:36 ` [PATCH 04/10] queue.3, tailq.3: DESCRIPTION: " Alejandro Colomar
@ 2020-10-25  9:36 ` Alejandro Colomar
  2020-10-25  9:36 ` [PATCH 06/10] tailq.3: Copy and adapt code from queue.3 Alejandro Colomar
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Alejandro Colomar @ 2020-10-25  9:36 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Alejandro Colomar, linux-man, libc-alpha

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---
 man3/queue.3 | 56 ----------------------------------------------------
 man3/tailq.3 | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 56 insertions(+), 56 deletions(-)

diff --git a/man3/queue.3 b/man3/queue.3
index f6e3b9369..4c597e123 100644
--- a/man3/queue.3
+++ b/man3/queue.3
@@ -170,62 +170,6 @@ The termination condition for traversal is more complex.
 Code size is about 40% greater and operations run about 45% slower than lists.
 .El
 .Sh EXAMPLES
-.Ss Tail queue example
-.Bd -literal
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/queue.h>
-
-struct entry {
-    int data;
-    TAILQ_ENTRY(entry) entries;             /* Tail queue. */
-};
-
-TAILQ_HEAD(tailhead, entry);
-
-int
-main(void)
-{
-    struct entry    *n1, *n2, *n3, *np;
-    struct tailhead head;                   /* Tail queue head. */
-    int     i;
-
-    TAILQ_INIT(&head);                      /* Initialize the queue. */
-
-    n1 = malloc(sizeof(struct entry));      /* Insert at the head. */
-    TAILQ_INSERT_HEAD(&head, n1, entries);
-
-    n1 = malloc(sizeof(struct entry));      /* Insert at the tail. */
-    TAILQ_INSERT_TAIL(&head, n1, entries);
-
-    n2 = malloc(sizeof(struct entry));      /* Insert after. */
-    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
-
-    n3 = malloc(sizeof(struct entry));      /* Insert before. */
-    TAILQ_INSERT_BEFORE(n2, n3, entries);
-
-    TAILQ_REMOVE(&head, n2, entries);       /* Deletion. */
-    free(n2);
-                                            /* Forward traversal. */
-    i = 0;
-    TAILQ_FOREACH(np, &head, entries)
-        np->data = i++;
-                                            /* Reverse traversal. */
-    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
-        printf("%i\en", np->data);
-                                            /* TailQ Deletion. */
-    n1 = TAILQ_FIRST(&head);
-    while (n1 != NULL) {
-        n2 = TAILQ_NEXT(n1, entries);
-        free(n1);
-        n1 = n2;
-    }
-    TAILQ_INIT(&head);
-
-    exit(EXIT_SUCCESS);
-}
-.Ed
 .Sh CONFORMING TO
 Not in POSIX.1, POSIX.1-2001 or POSIX.1-2008.
 Present on the BSDs.
diff --git a/man3/tailq.3 b/man3/tailq.3
index 144a86f3f..28a7ac509 100644
--- a/man3/tailq.3
+++ b/man3/tailq.3
@@ -323,4 +323,60 @@ See the EXAMPLES section below for an example program using a tail queue.
 .SH CONFORMING TO
 .SH BUGS
 .SH EXAMPLES
+.Ss Tail queue example
+.Bd -literal
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/queue.h>
+
+struct entry {
+    int data;
+    TAILQ_ENTRY(entry) entries;             /* Tail queue. */
+};
+
+TAILQ_HEAD(tailhead, entry);
+
+int
+main(void)
+{
+    struct entry    *n1, *n2, *n3, *np;
+    struct tailhead head;                   /* Tail queue head. */
+    int     i;
+
+    TAILQ_INIT(&head);                      /* Initialize the queue. */
+
+    n1 = malloc(sizeof(struct entry));      /* Insert at the head. */
+    TAILQ_INSERT_HEAD(&head, n1, entries);
+
+    n1 = malloc(sizeof(struct entry));      /* Insert at the tail. */
+    TAILQ_INSERT_TAIL(&head, n1, entries);
+
+    n2 = malloc(sizeof(struct entry));      /* Insert after. */
+    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
+
+    n3 = malloc(sizeof(struct entry));      /* Insert before. */
+    TAILQ_INSERT_BEFORE(n2, n3, entries);
+
+    TAILQ_REMOVE(&head, n2, entries);       /* Deletion. */
+    free(n2);
+                                            /* Forward traversal. */
+    i = 0;
+    TAILQ_FOREACH(np, &head, entries)
+        np->data = i++;
+                                            /* Reverse traversal. */
+    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
+        printf("%i\en", np->data);
+                                            /* TailQ Deletion. */
+    n1 = TAILQ_FIRST(&head);
+    while (n1 != NULL) {
+        n2 = TAILQ_NEXT(n1, entries);
+        free(n1);
+        n1 = n2;
+    }
+    TAILQ_INIT(&head);
+
+    exit(EXIT_SUCCESS);
+}
+.Ed
 .SH SEE ALSO
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 06/10] tailq.3: Copy and adapt code from queue.3
  2020-10-25  9:36 [PATCH 00/10] tailq.3: fork from queue.3 Alejandro Colomar
                   ` (4 preceding siblings ...)
  2020-10-25  9:36 ` [PATCH 05/10] queue.3, tailq.3: EXAMPLES: " Alejandro Colomar
@ 2020-10-25  9:36 ` Alejandro Colomar
  2020-10-25  9:36 ` [PATCH 07/10] tailq.3: ffix: Use man markup Alejandro Colomar
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Alejandro Colomar @ 2020-10-25  9:36 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Alejandro Colomar, linux-man, libc-alpha

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---
 man3/tailq.3 | 26 ++++++++------------------
 1 file changed, 8 insertions(+), 18 deletions(-)

diff --git a/man3/tailq.3 b/man3/tailq.3
index 28a7ac509..6f2466cbf 100644
--- a/man3/tailq.3
+++ b/man3/tailq.3
@@ -89,26 +89,14 @@ In the macro definitions,
 .Fa TYPE
 is the name of a user defined structure,
 that must contain a field of type
-.Li SLIST_ENTRY ,
-.Li STAILQ_ENTRY ,
-.Li LIST_ENTRY ,
 .Li TAILQ_ENTRY ,
-or
-.Li CIRCLEQ_ENTRY ,
 named
 .Fa NAME .
 The argument
 .Fa HEADNAME
 is the name of a user defined structure that must be declared
-using the macros
-.Li SLIST_HEAD ,
-.Li STAILQ_HEAD ,
-.Li LIST_HEAD ,
-.Li TAILQ_HEAD ,
-or
-.Li CIRCLEQ_HEAD .
-See the examples below for further explanation of how these
-macros are used.
+using the macro
+.Li TAILQ_HEAD .
 .Ss Tail queues
 A tail queue is headed by a structure defined by the
 .Nm TAILQ_HEAD
@@ -317,10 +305,12 @@ from the tail queue.
 .\" .Fa head1
 .\" and
 .\" .Fa head2 .
-.Pp
-See the EXAMPLES section below for an example program using a tail queue.
 .SH RETURN VALUE
 .SH CONFORMING TO
+Not in POSIX.1, POSIX.1-2001 or POSIX.1-2008.
+Present on the BSDs.
+(TAILQ functions first appeared in
+.Bx 4.4 ).
 .SH BUGS
 .SH EXAMPLES
 .Ss Tail queue example
@@ -340,9 +330,9 @@ TAILQ_HEAD(tailhead, entry);
 int
 main(void)
 {
-    struct entry    *n1, *n2, *n3, *np;
+    struct entry *n1, *n2, *n3, *np;
     struct tailhead head;                   /* Tail queue head. */
-    int     i;
+    int i;
 
     TAILQ_INIT(&head);                      /* Initialize the queue. */
 
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 07/10] tailq.3: ffix: Use man markup
  2020-10-25  9:36 [PATCH 00/10] tailq.3: fork from queue.3 Alejandro Colomar
                   ` (5 preceding siblings ...)
  2020-10-25  9:36 ` [PATCH 06/10] tailq.3: Copy and adapt code from queue.3 Alejandro Colomar
@ 2020-10-25  9:36 ` Alejandro Colomar
  2020-10-25  9:36 ` [PATCH 08/10] tailq.3: Add remaining details to complete the page Alejandro Colomar
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Alejandro Colomar @ 2020-10-25  9:36 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Alejandro Colomar, linux-man, libc-alpha

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---
 man3/tailq.3 | 362 +++++++++++++++++++++++++++------------------------
 1 file changed, 195 insertions(+), 167 deletions(-)

diff --git a/man3/tailq.3 b/man3/tailq.3
index 6f2466cbf..e38cc7e86 100644
--- a/man3/tailq.3
+++ b/man3/tailq.3
@@ -31,75 +31,101 @@
 .\"
 .TH TAILQ 3 2020-10-21 "GNU" "Linux Programmer's Manual"
 .SH NAME
-.Nm TAILQ_CONCAT ,
-.Nm TAILQ_EMPTY ,
-.Nm TAILQ_ENTRY ,
-.Nm TAILQ_FIRST ,
-.Nm TAILQ_FOREACH ,
-.\" .Nm TAILQ_FOREACH_FROM ,
-.\" .Nm TAILQ_FOREACH_FROM_SAFE ,
-.Nm TAILQ_FOREACH_REVERSE ,
-.\" .Nm TAILQ_FOREACH_REVERSE_FROM ,
-.\" .Nm TAILQ_FOREACH_REVERSE_FROM_SAFE ,
-.\" .Nm TAILQ_FOREACH_REVERSE_SAFE ,
-.\" .Nm TAILQ_FOREACH_SAFE ,
-.Nm TAILQ_HEAD ,
-.Nm TAILQ_HEAD_INITIALIZER ,
-.Nm TAILQ_INIT ,
-.Nm TAILQ_INSERT_AFTER ,
-.Nm TAILQ_INSERT_BEFORE ,
-.Nm TAILQ_INSERT_HEAD ,
-.Nm TAILQ_INSERT_TAIL ,
-.Nm TAILQ_LAST ,
-.Nm TAILQ_NEXT ,
-.Nm TAILQ_PREV ,
-.Nm TAILQ_REMOVE
-.\" .Nm TAILQ_SWAP
+TAILQ_CONCAT,
+TAILQ_EMPTY,
+TAILQ_ENTRY,
+TAILQ_FIRST,
+TAILQ_FOREACH,
+.\"TAILQ_FOREACH_FROM,
+.\"TAILQ_FOREACH_FROM_SAFE,
+TAILQ_FOREACH_REVERSE,
+.\"TAILQ_FOREACH_REVERSE_FROM,
+.\"TAILQ_FOREACH_REVERSE_FROM_SAFE,
+.\"TAILQ_FOREACH_REVERSE_SAFE,
+.\"TAILQ_FOREACH_SAFE,
+TAILQ_HEAD,
+TAILQ_HEAD_INITIALIZER,
+TAILQ_INIT,
+TAILQ_INSERT_AFTER,
+TAILQ_INSERT_BEFORE,
+TAILQ_INSERT_HEAD,
+TAILQ_INSERT_TAIL,
+TAILQ_LAST,
+TAILQ_NEXT,
+TAILQ_PREV,
+TAILQ_REMOVE
+.\"TAILQ_SWAP
 .SH SYNOPSIS
-.In sys/queue.h
-.\"
-.Fn TAILQ_CONCAT "TAILQ_HEAD *head1" "TAILQ_HEAD *head2" "TAILQ_ENTRY NAME"
-.Fn TAILQ_EMPTY "TAILQ_HEAD *head"
-.Fn TAILQ_ENTRY "TYPE"
-.Fn TAILQ_FIRST "TAILQ_HEAD *head"
-.Fn TAILQ_FOREACH "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME"
-.\" .Fn TAILQ_FOREACH_FROM "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME"
-.\" .Fn TAILQ_FOREACH_FROM_SAFE "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" "TYPE *temp_var"
-.Fn TAILQ_FOREACH_REVERSE "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME"
-.\" .Fn TAILQ_FOREACH_REVERSE_FROM "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME"
-.\" .Fn TAILQ_FOREACH_REVERSE_FROM_SAFE "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" "TYPE *temp_var"
-.\" .Fn TAILQ_FOREACH_REVERSE_SAFE "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" "TYPE *temp_var"
-.\" .Fn TAILQ_FOREACH_SAFE "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" "TYPE *temp_var"
-.Fn TAILQ_HEAD "HEADNAME" "TYPE"
-.Fn TAILQ_HEAD_INITIALIZER "TAILQ_HEAD head"
-.Fn TAILQ_INIT "TAILQ_HEAD *head"
-.Fn TAILQ_INSERT_AFTER "TAILQ_HEAD *head" "TYPE *listelm" "TYPE *elm" "TAILQ_ENTRY NAME"
-.Fn TAILQ_INSERT_BEFORE "TYPE *listelm" "TYPE *elm" "TAILQ_ENTRY NAME"
-.Fn TAILQ_INSERT_HEAD "TAILQ_HEAD *head" "TYPE *elm" "TAILQ_ENTRY NAME"
-.Fn TAILQ_INSERT_TAIL "TAILQ_HEAD *head" "TYPE *elm" "TAILQ_ENTRY NAME"
-.Fn TAILQ_LAST "TAILQ_HEAD *head" "HEADNAME"
-.Fn TAILQ_NEXT "TYPE *elm" "TAILQ_ENTRY NAME"
-.Fn TAILQ_PREV "TYPE *elm" "HEADNAME" "TAILQ_ENTRY NAME"
-.Fn TAILQ_REMOVE "TAILQ_HEAD *head" "TYPE *elm" "TAILQ_ENTRY NAME"
-.\" .Fn TAILQ_SWAP "TAILQ_HEAD *head1" "TAILQ_HEAD *head2" "TYPE" "TAILQ_ENTRY NAME"
-.\"
+.nf
+.B #include sys/queue.h
+.PP
+.BI "void TAILQ_CONCAT(TAILQ_HEAD *" head1 ", TAILQ_HEAD *" head2 ","
+.BI "                TAILQ_ENTRY " NAME ");"
+.PP
+.BI "int TAILQ_EMPTY(TAILQ_HEAD *" head ");"
+.PP
+.B TAILQ_ENTRY(TYPE);
+.PP
+.BI "TYPE *TAILQ_FIRST(TAILQ_HEAD *" head ");"
+.PP
+.BI "TAILQ_FOREACH(TYPE *" var ", TAILQ_HEAD *" head ", TAILQ_ENTRY " NAME ");"
+.\" .PP
+.\" .BI "TAILQ_FOREACH_FROM(TYPE *" var ", TAILQ_HEAD *" head ", TAILQ_ENTRY " NAME ");"
+.\" .PP
+.\" .BI "TAILQ_FOREACH_FROM_SAFE(TYPE *" var ", TAILQ_HEAD *" head ", TAILQ_ENTRY " NAME ", TYPE *" temp_var ");"
+.PP
+.BI "TAILQ_FOREACH_REVERSE(TYPE *" var ", TAILQ_HEAD *" head ", HEADNAME,"
+.BI "                TAILQ_ENTRY " NAME ");"
+.\" .PP
+.\" .BI "TAILQ_FOREACH_REVERSE_FROM(TYPE *" var ", TAILQ_HEAD *" head ", HEADNAME, TAILQ_ENTRY " NAME ");"
+.\" .PP
+.\" .BI "TAILQ_FOREACH_REVERSE_FROM_SAFE(TYPE *" var ", TAILQ_HEAD *" head ", HEADNAME, TAILQ_ENTRY " NAME ", TYPE *" temp_var ");"
+.\" .PP
+.\" .BI "TAILQ_FOREACH_REVERSE_SAFE(TYPE *" var ", TAILQ_HEAD *" head ", HEADNAME, TAILQ_ENTRY " NAME ", TYPE *" temp_var ");"
+.\" .PP
+.\" .BI "TAILQ_FOREACH_SAFE(TYPE *" var ", TAILQ_HEAD *" head ", TAILQ_ENTRY " NAME ", TYPE *" temp_var ");"
+.PP
+.B TAILQ_HEAD(HEADNAME, TYPE);
+.PP
+.BI "TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD " head ");"
+.PP
+.BI "void TAILQ_INIT(TAILQ_HEAD *" head ");"
+.PP
+.BI "void TAILQ_INSERT_AFTER(TAILQ_HEAD *" head ", TYPE *" listelm ", TYPE *" elm ","
+.BI "                TAILQ_ENTRY " NAME ");"
+.PP
+.BI "void TAILQ_INSERT_BEFORE(TYPE *" listelm ", TYPE *" elm ", TAILQ_ENTRY " NAME ");"
+.PP
+.BI "void TAILQ_INSERT_HEAD(TAILQ_HEAD *" head ", TYPE *" elm ", TAILQ_ENTRY " NAME ");"
+.PP
+.BI "void TAILQ_INSERT_TAIL(TAILQ_HEAD *" head ", TYPE *" elm ", TAILQ_ENTRY " NAME ");"
+.PP
+.BI "TYPE *TAILQ_LAST(TAILQ_HEAD *" head ", HEADNAME);"
+.PP
+.BI "TYPE *TAILQ_NEXT(TYPE *" elm ", TAILQ_ENTRY " NAME ");"
+.PP
+.BI "TYPE *TAILQ_PREV(TYPE *" elm ", HEADNAME, TAILQ_ENTRY " NAME ");"
+.PP
+.BI "void TAILQ_REMOVE(TAILQ_HEAD *" head ", TYPE *" elm ", TAILQ_ENTRY " NAME ");"
+.\" .PP
+.\" .BI "void TAILQ_SWAP(TAILQ_HEAD *" head1 ", TAILQ_HEAD *" head2 ", TYPE, TAILQ_ENTRY " NAME ");"
 .SH DESCRIPTION
-.Pp
+.PP
 In the macro definitions,
-.Fa TYPE
+.I TYPE
 is the name of a user defined structure,
 that must contain a field of type
-.Li TAILQ_ENTRY ,
+.IR TAILQ_ENTRY ,
 named
-.Fa NAME .
+.IR NAME .
 The argument
-.Fa HEADNAME
+.I HEADNAME
 is the name of a user defined structure that must be declared
 using the macro
-.Li TAILQ_HEAD .
+.BR TAILQ_HEAD ().
 .Ss Tail queues
 A tail queue is headed by a structure defined by the
-.Nm TAILQ_HEAD
+.BR TAILQ_HEAD ()
 macro.
 This structure contains a pair of pointers,
 one to the first element in the tail queue and the other to
@@ -110,211 +136,213 @@ New elements can be added to the tail queue after an existing element,
 before an existing element, at the head of the tail queue,
 or at the end of the tail queue.
 A
-.Fa TAILQ_HEAD
+.I TAILQ_HEAD
 structure is declared as follows:
-.Bd -literal -offset indent
+.PP
+.in +4
+.EX
 TAILQ_HEAD(HEADNAME, TYPE) head;
-.Ed
-.Pp
+.EE
+.in
+.PP
 where
-.Li HEADNAME
+.I HEADNAME
 is the name of the structure to be defined, and
-.Li TYPE
+.I TYPE
 is the type of the elements to be linked into the tail queue.
 A pointer to the head of the tail queue can later be declared as:
-.Bd -literal -offset indent
+.PP
+.in +4
+.EX
 struct HEADNAME *headp;
-.Ed
-.Pp
+.EE
+.in
+.PP
 (The names
-.Li head
+.I head
 and
-.Li headp
+.I headp
 are user selectable.)
-.Pp
+.PP
 The macro
-.Nm TAILQ_HEAD_INITIALIZER
+.BR TAILQ_HEAD_INITIALIZER ()
 evaluates to an initializer for the tail queue
-.Fa head .
-.Pp
+.IR head .
+.PP
 The macro
-.Nm TAILQ_CONCAT
+.BR TAILQ_CONCAT ()
 concatenates the tail queue headed by
-.Fa head2
+.I head2
 onto the end of the one headed by
-.Fa head1
+.I head1
 removing all entries from the former.
-.Pp
+.PP
 The macro
-.Nm TAILQ_EMPTY
+.BR TAILQ_EMPTY ()
 evaluates to true if there are no items on the tail queue.
-.Pp
+.PP
 The macro
-.Nm TAILQ_ENTRY
+.BR TAILQ_ENTRY ()
 declares a structure that connects the elements in
 the tail queue.
-.Pp
+.PP
 The macro
-.Nm TAILQ_FIRST
+.BR TAILQ_FIRST ()
 returns the first item on the tail queue or NULL if the tail queue
 is empty.
-.Pp
+.PP
 The macro
-.Nm TAILQ_FOREACH
+.BR TAILQ_FOREACH ()
 traverses the tail queue referenced by
-.Fa head
+.I head
 in the forward direction, assigning each element in turn to
-.Fa var .
-.Fa var
-is set to
-.Dv NULL
-if the loop completes normally, or if there were no elements.
-.\" .Pp
+.IR var .
+.I var
+is set to NULL if the loop completes normally,
+or if there were no elements.
+.\" .PP
 .\" The macro
-.\" .Nm TAILQ_FOREACH_FROM
+.\" .BR TAILQ_FOREACH_FROM ()
 .\" behaves identically to
-.\" .Nm TAILQ_FOREACH
+.\" .BR TAILQ_FOREACH ()
 .\" when
-.\" .Fa var
+.\" .I var
 .\" is NULL, else it treats
-.\" .Fa var
+.\" .I var
 .\" as a previously found TAILQ element and begins the loop at
-.\" .Fa var
+.\" .I var
 .\" instead of the first element in the TAILQ referenced by
-.\" .Fa head .
-.Pp
+.\" .IR head .
+.PP
 The macro
-.Nm TAILQ_FOREACH_REVERSE
+.BR TAILQ_FOREACH_REVERSE ()
 traverses the tail queue referenced by
-.Fa head
+.I head
 in the reverse direction, assigning each element in turn to
-.Fa var .
-.\" .Pp
+.IR var .
+.\" .PP
 .\" The macro
-.\" .Nm TAILQ_FOREACH_REVERSE_FROM
+.\" .BR TAILQ_FOREACH_REVERSE_FROM ()
 .\" behaves identically to
-.\" .Nm TAILQ_FOREACH_REVERSE
+.\" .BR TAILQ_FOREACH_REVERSE ()
 .\" when
-.\" .Fa var
+.\" .I var
 .\" is NULL, else it treats
-.\" .Fa var
+.\" .I var
 .\" as a previously found TAILQ element and begins the reverse loop at
-.\" .Fa var
+.\" .I var
 .\" instead of the last element in the TAILQ referenced by
-.\" .Fa head .
-.\" .Pp
+.\" .IR head .
+.\" .PP
 .\" The macros
-.\" .Nm TAILQ_FOREACH_SAFE
+.\" .BR TAILQ_FOREACH_SAFE ()
 .\" and
-.\" .Nm TAILQ_FOREACH_REVERSE_SAFE
+.\" .BR TAILQ_FOREACH_REVERSE_SAFE ()
 .\" traverse the list referenced by
-.\" .Fa head
+.\" .I head
 .\" in the forward or reverse direction respectively,
 .\" assigning each element in turn to
-.\" .Fa var .
+.\" .IR var .
 .\" However, unlike their unsafe counterparts,
-.\" .Nm TAILQ_FOREACH
+.\" .BR TAILQ_FOREACH ()
 .\" and
-.\" .Nm TAILQ_FOREACH_REVERSE
+.\" .BR TAILQ_FOREACH_REVERSE ()
 .\" permit to both remove
-.\" .Fa var
+.\" .I var
 .\" as well as free it from within the loop safely without interfering with the
 .\" traversal.
-.\" .Pp
+.\" .PP
 .\" The macro
-.\" .Nm TAILQ_FOREACH_FROM_SAFE
+.\" .BR TAILQ_FOREACH_FROM_SAFE ()
 .\" behaves identically to
-.\" .Nm TAILQ_FOREACH_SAFE
+.\" .BR TAILQ_FOREACH_SAFE ()
 .\" when
-.\" .Fa var
+.\" .I var
 .\" is NULL, else it treats
-.\" .Fa var
+.\" .I var
 .\" as a previously found TAILQ element and begins the loop at
-.\" .Fa var
+.\" .I var
 .\" instead of the first element in the TAILQ referenced by
-.\" .Fa head .
-.\" .Pp
+.\" .IR head .
+.\" .PP
 .\" The macro
-.\" .Nm TAILQ_FOREACH_REVERSE_FROM_SAFE
+.\" .BR TAILQ_FOREACH_REVERSE_FROM_SAFE ()
 .\" behaves identically to
-.\" .Nm TAILQ_FOREACH_REVERSE_SAFE
+.\" .BR TAILQ_FOREACH_REVERSE_SAFE ()
 .\" when
-.\" .Fa var
+.\" .I var
 .\" is NULL, else it treats
-.\" .Fa var
+.\" .I var
 .\" as a previously found TAILQ element and begins the reverse loop at
-.\" .Fa var
+.\" .I var
 .\" instead of the last element in the TAILQ referenced by
-.\" .Fa head .
-.Pp
+.\" .IR head .
+.PP
 The macro
-.Nm TAILQ_INIT
+.BR TAILQ_INIT ()
 initializes the tail queue referenced by
-.Fa head .
-.Pp
+.IR head .
+.PP
 The macro
-.Nm TAILQ_INSERT_HEAD
+.BR TAILQ_INSERT_HEAD ()
 inserts the new element
-.Fa elm
+.I elm
 at the head of the tail queue.
-.Pp
+.PP
 The macro
-.Nm TAILQ_INSERT_TAIL
+.BR TAILQ_INSERT_TAIL ()
 inserts the new element
-.Fa elm
+.I elm
 at the end of the tail queue.
-.Pp
+.PP
 The macro
-.Nm TAILQ_INSERT_AFTER
+.BR TAILQ_INSERT_AFTER ()
 inserts the new element
-.Fa elm
+.I elm
 after the element
-.Fa listelm .
-.Pp
+.IR listelm .
+.PP
 The macro
-.Nm TAILQ_INSERT_BEFORE
+.BR TAILQ_INSERT_BEFORE ()
 inserts the new element
-.Fa elm
+.I elm
 before the element
-.Fa listelm .
-.Pp
+.IR listelm .
+.PP
 The macro
-.Nm TAILQ_LAST
+.BR TAILQ_LAST ()
 returns the last item on the tail queue.
-If the tail queue is empty the return value is
-.Dv NULL .
-.Pp
+If the tail queue is empty the return value is NULL.
+.PP
 The macro
-.Nm TAILQ_NEXT
+.BR TAILQ_NEXT ()
 returns the next item on the tail queue, or NULL if this item is the last.
-.Pp
+.PP
 The macro
-.Nm TAILQ_PREV
+.BR TAILQ_PREV ()
 returns the previous item on the tail queue, or NULL if this item
 is the first.
-.Pp
+.PP
 The macro
-.Nm TAILQ_REMOVE
+.BR TAILQ_REMOVE ()
 removes the element
-.Fa elm
+.I elm
 from the tail queue.
-.\" .Pp
+.\" .PP
 .\" The macro
-.\" .Nm TAILQ_SWAP
+.\" .BR TAILQ_SWAP ()
 .\" swaps the contents of
-.\" .Fa head1
+.\" .I head1
 .\" and
-.\" .Fa head2 .
+.\" .IR head2 .
 .SH RETURN VALUE
 .SH CONFORMING TO
 Not in POSIX.1, POSIX.1-2001 or POSIX.1-2008.
 Present on the BSDs.
-(TAILQ functions first appeared in
-.Bx 4.4 ).
+(TAILQ functions first appeared in 4.4BSD).
 .SH BUGS
 .SH EXAMPLES
-.Ss Tail queue example
-.Bd -literal
+.EX
 #include <stddef.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -368,5 +396,5 @@ main(void)
 
     exit(EXIT_SUCCESS);
 }
-.Ed
+.EE
 .SH SEE ALSO
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 08/10] tailq.3: Add remaining details to complete the page
  2020-10-25  9:36 [PATCH 00/10] tailq.3: fork from queue.3 Alejandro Colomar
                   ` (6 preceding siblings ...)
  2020-10-25  9:36 ` [PATCH 07/10] tailq.3: ffix: Use man markup Alejandro Colomar
@ 2020-10-25  9:36 ` Alejandro Colomar
  2020-10-25  9:36 ` [PATCH 09/10] TAILQ_CONCAT.3, TAILQ_EMPTY.3, TAILQ_ENTRY.3, TAILQ_FIRST.3, TAILQ_FOREACH.3, TAILQ_FOREACH_REVERSE.3, TAILQ_HEAD.3, TAILQ_HEAD_INITIALIZER.3, TAILQ_INIT.3, TAILQ_INSERT_AFTER.3, TAILQ_INSERT_BEFORE.3, TAILQ_INSERT_HEAD.3, TAILQ_INSERT_TAIL.3, TAILQ_LAST.3, TAILQ_NEXT.3, TAILQ_PREV.3, TAILQ_REMOVE.3, TAILQ_SWAP.3: Link to the new tailq(3) page instead of queue(3) Alejandro Colomar
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Alejandro Colomar @ 2020-10-25  9:36 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Alejandro Colomar, linux-man, libc-alpha

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---
 man3/tailq.3 | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/man3/tailq.3 b/man3/tailq.3
index e38cc7e86..cac4a9c3f 100644
--- a/man3/tailq.3
+++ b/man3/tailq.3
@@ -55,6 +55,7 @@ TAILQ_NEXT,
 TAILQ_PREV,
 TAILQ_REMOVE
 .\"TAILQ_SWAP
+\- implementation of a doubly-linked tail queue
 .SH SYNOPSIS
 .nf
 .B #include sys/queue.h
@@ -110,6 +111,7 @@ TAILQ_REMOVE
 .\" .PP
 .\" .BI "void TAILQ_SWAP(TAILQ_HEAD *" head1 ", TAILQ_HEAD *" head2 ", TYPE, TAILQ_ENTRY " NAME ");"
 .SH DESCRIPTION
+These macros define and operate on doubly-linked tail queues.
 .PP
 In the macro definitions,
 .I TYPE
@@ -336,11 +338,44 @@ from the tail queue.
 .\" and
 .\" .IR head2 .
 .SH RETURN VALUE
+.BR TAILQ_EMPTY ()
+returns nonzero if the queue is empty,
+and zero if the queue contains at least one entry.
+.PP
+.BR TAILQ_FIRST (),
+.BR TAILQ_LAST (),
+.BR TAILQ_NEXT (),
+and
+.BR TAILQ_PREV ()
+return a pointer to the first, last, next or previous
+.I TYPE
+structure, respectively.
+.PP
+.BR TAILQ_HEAD_INITIALIZER ()
+returns an initializer that can be assigned to the queue
+.IR head .
 .SH CONFORMING TO
 Not in POSIX.1, POSIX.1-2001 or POSIX.1-2008.
 Present on the BSDs.
 (TAILQ functions first appeared in 4.4BSD).
 .SH BUGS
+The macros
+.BR TAILQ_FOREACH ()
+and
+.BR TAILQ_FOREACH_REVERSE ()
+don't allow
+.I var
+to be removed or freed within the loop,
+as it would interfere with the traversal.
+The macros
+.BR TAILQ_FOREACH_SAFE ()
+and
+.BR TAILQ_FOREACH_REVERSE_SAFE (),
+which are present on the BSDs but are not present in glibc,
+fix this limitation by allowing
+.I var
+to safely be removed from the list and freed from within the loop
+without interfering with the traversal.
 .SH EXAMPLES
 .EX
 #include <stddef.h>
@@ -398,3 +433,5 @@ main(void)
 }
 .EE
 .SH SEE ALSO
+.BR insque (3),
+.BR queue (3)
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 09/10] TAILQ_CONCAT.3, TAILQ_EMPTY.3, TAILQ_ENTRY.3, TAILQ_FIRST.3, TAILQ_FOREACH.3, TAILQ_FOREACH_REVERSE.3, TAILQ_HEAD.3, TAILQ_HEAD_INITIALIZER.3, TAILQ_INIT.3, TAILQ_INSERT_AFTER.3, TAILQ_INSERT_BEFORE.3, TAILQ_INSERT_HEAD.3, TAILQ_INSERT_TAIL.3, TAILQ_LAST.3, TAILQ_NEXT.3, TAILQ_PREV.3, TAILQ_REMOVE.3, TAILQ_SWAP.3: Link to the new tailq(3) page instead of queue(3)
  2020-10-25  9:36 [PATCH 00/10] tailq.3: fork from queue.3 Alejandro Colomar
                   ` (7 preceding siblings ...)
  2020-10-25  9:36 ` [PATCH 08/10] tailq.3: Add remaining details to complete the page Alejandro Colomar
@ 2020-10-25  9:36 ` Alejandro Colomar
  2020-10-25  9:36 ` [PATCH 10/10] queue.3: SEE ALSO: Add tailq(3) Alejandro Colomar
  2020-10-25  9:46 ` [PATCH 00/10] tailq.3: fork from queue.3 Michael Kerrisk (man-pages)
  10 siblings, 0 replies; 12+ messages in thread
From: Alejandro Colomar @ 2020-10-25  9:36 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Alejandro Colomar, linux-man, libc-alpha

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---
 man3/TAILQ_CONCAT.3           | 2 +-
 man3/TAILQ_EMPTY.3            | 2 +-
 man3/TAILQ_ENTRY.3            | 2 +-
 man3/TAILQ_FIRST.3            | 2 +-
 man3/TAILQ_FOREACH.3          | 2 +-
 man3/TAILQ_FOREACH_REVERSE.3  | 2 +-
 man3/TAILQ_HEAD.3             | 2 +-
 man3/TAILQ_HEAD_INITIALIZER.3 | 2 +-
 man3/TAILQ_INIT.3             | 2 +-
 man3/TAILQ_INSERT_AFTER.3     | 2 +-
 man3/TAILQ_INSERT_BEFORE.3    | 2 +-
 man3/TAILQ_INSERT_HEAD.3      | 2 +-
 man3/TAILQ_INSERT_TAIL.3      | 2 +-
 man3/TAILQ_LAST.3             | 2 +-
 man3/TAILQ_NEXT.3             | 2 +-
 man3/TAILQ_PREV.3             | 2 +-
 man3/TAILQ_REMOVE.3           | 2 +-
 man3/TAILQ_SWAP.3             | 2 +-
 18 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/man3/TAILQ_CONCAT.3 b/man3/TAILQ_CONCAT.3
index c2956c9fc..c766ff4e7 100644
--- a/man3/TAILQ_CONCAT.3
+++ b/man3/TAILQ_CONCAT.3
@@ -1 +1 @@
-.so man3/queue.3
+.so man3/tailq.3
diff --git a/man3/TAILQ_EMPTY.3 b/man3/TAILQ_EMPTY.3
index c2956c9fc..c766ff4e7 100644
--- a/man3/TAILQ_EMPTY.3
+++ b/man3/TAILQ_EMPTY.3
@@ -1 +1 @@
-.so man3/queue.3
+.so man3/tailq.3
diff --git a/man3/TAILQ_ENTRY.3 b/man3/TAILQ_ENTRY.3
index c2956c9fc..c766ff4e7 100644
--- a/man3/TAILQ_ENTRY.3
+++ b/man3/TAILQ_ENTRY.3
@@ -1 +1 @@
-.so man3/queue.3
+.so man3/tailq.3
diff --git a/man3/TAILQ_FIRST.3 b/man3/TAILQ_FIRST.3
index c2956c9fc..c766ff4e7 100644
--- a/man3/TAILQ_FIRST.3
+++ b/man3/TAILQ_FIRST.3
@@ -1 +1 @@
-.so man3/queue.3
+.so man3/tailq.3
diff --git a/man3/TAILQ_FOREACH.3 b/man3/TAILQ_FOREACH.3
index c2956c9fc..c766ff4e7 100644
--- a/man3/TAILQ_FOREACH.3
+++ b/man3/TAILQ_FOREACH.3
@@ -1 +1 @@
-.so man3/queue.3
+.so man3/tailq.3
diff --git a/man3/TAILQ_FOREACH_REVERSE.3 b/man3/TAILQ_FOREACH_REVERSE.3
index c2956c9fc..c766ff4e7 100644
--- a/man3/TAILQ_FOREACH_REVERSE.3
+++ b/man3/TAILQ_FOREACH_REVERSE.3
@@ -1 +1 @@
-.so man3/queue.3
+.so man3/tailq.3
diff --git a/man3/TAILQ_HEAD.3 b/man3/TAILQ_HEAD.3
index c2956c9fc..c766ff4e7 100644
--- a/man3/TAILQ_HEAD.3
+++ b/man3/TAILQ_HEAD.3
@@ -1 +1 @@
-.so man3/queue.3
+.so man3/tailq.3
diff --git a/man3/TAILQ_HEAD_INITIALIZER.3 b/man3/TAILQ_HEAD_INITIALIZER.3
index c2956c9fc..c766ff4e7 100644
--- a/man3/TAILQ_HEAD_INITIALIZER.3
+++ b/man3/TAILQ_HEAD_INITIALIZER.3
@@ -1 +1 @@
-.so man3/queue.3
+.so man3/tailq.3
diff --git a/man3/TAILQ_INIT.3 b/man3/TAILQ_INIT.3
index c2956c9fc..c766ff4e7 100644
--- a/man3/TAILQ_INIT.3
+++ b/man3/TAILQ_INIT.3
@@ -1 +1 @@
-.so man3/queue.3
+.so man3/tailq.3
diff --git a/man3/TAILQ_INSERT_AFTER.3 b/man3/TAILQ_INSERT_AFTER.3
index c2956c9fc..c766ff4e7 100644
--- a/man3/TAILQ_INSERT_AFTER.3
+++ b/man3/TAILQ_INSERT_AFTER.3
@@ -1 +1 @@
-.so man3/queue.3
+.so man3/tailq.3
diff --git a/man3/TAILQ_INSERT_BEFORE.3 b/man3/TAILQ_INSERT_BEFORE.3
index c2956c9fc..c766ff4e7 100644
--- a/man3/TAILQ_INSERT_BEFORE.3
+++ b/man3/TAILQ_INSERT_BEFORE.3
@@ -1 +1 @@
-.so man3/queue.3
+.so man3/tailq.3
diff --git a/man3/TAILQ_INSERT_HEAD.3 b/man3/TAILQ_INSERT_HEAD.3
index c2956c9fc..c766ff4e7 100644
--- a/man3/TAILQ_INSERT_HEAD.3
+++ b/man3/TAILQ_INSERT_HEAD.3
@@ -1 +1 @@
-.so man3/queue.3
+.so man3/tailq.3
diff --git a/man3/TAILQ_INSERT_TAIL.3 b/man3/TAILQ_INSERT_TAIL.3
index c2956c9fc..c766ff4e7 100644
--- a/man3/TAILQ_INSERT_TAIL.3
+++ b/man3/TAILQ_INSERT_TAIL.3
@@ -1 +1 @@
-.so man3/queue.3
+.so man3/tailq.3
diff --git a/man3/TAILQ_LAST.3 b/man3/TAILQ_LAST.3
index c2956c9fc..c766ff4e7 100644
--- a/man3/TAILQ_LAST.3
+++ b/man3/TAILQ_LAST.3
@@ -1 +1 @@
-.so man3/queue.3
+.so man3/tailq.3
diff --git a/man3/TAILQ_NEXT.3 b/man3/TAILQ_NEXT.3
index c2956c9fc..c766ff4e7 100644
--- a/man3/TAILQ_NEXT.3
+++ b/man3/TAILQ_NEXT.3
@@ -1 +1 @@
-.so man3/queue.3
+.so man3/tailq.3
diff --git a/man3/TAILQ_PREV.3 b/man3/TAILQ_PREV.3
index c2956c9fc..c766ff4e7 100644
--- a/man3/TAILQ_PREV.3
+++ b/man3/TAILQ_PREV.3
@@ -1 +1 @@
-.so man3/queue.3
+.so man3/tailq.3
diff --git a/man3/TAILQ_REMOVE.3 b/man3/TAILQ_REMOVE.3
index c2956c9fc..c766ff4e7 100644
--- a/man3/TAILQ_REMOVE.3
+++ b/man3/TAILQ_REMOVE.3
@@ -1 +1 @@
-.so man3/queue.3
+.so man3/tailq.3
diff --git a/man3/TAILQ_SWAP.3 b/man3/TAILQ_SWAP.3
index c2956c9fc..c766ff4e7 100644
--- a/man3/TAILQ_SWAP.3
+++ b/man3/TAILQ_SWAP.3
@@ -1 +1 @@
-.so man3/queue.3
+.so man3/tailq.3
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 10/10] queue.3: SEE ALSO: Add tailq(3)
  2020-10-25  9:36 [PATCH 00/10] tailq.3: fork from queue.3 Alejandro Colomar
                   ` (8 preceding siblings ...)
  2020-10-25  9:36 ` [PATCH 09/10] TAILQ_CONCAT.3, TAILQ_EMPTY.3, TAILQ_ENTRY.3, TAILQ_FIRST.3, TAILQ_FOREACH.3, TAILQ_FOREACH_REVERSE.3, TAILQ_HEAD.3, TAILQ_HEAD_INITIALIZER.3, TAILQ_INIT.3, TAILQ_INSERT_AFTER.3, TAILQ_INSERT_BEFORE.3, TAILQ_INSERT_HEAD.3, TAILQ_INSERT_TAIL.3, TAILQ_LAST.3, TAILQ_NEXT.3, TAILQ_PREV.3, TAILQ_REMOVE.3, TAILQ_SWAP.3: Link to the new tailq(3) page instead of queue(3) Alejandro Colomar
@ 2020-10-25  9:36 ` Alejandro Colomar
  2020-10-25  9:46 ` [PATCH 00/10] tailq.3: fork from queue.3 Michael Kerrisk (man-pages)
  10 siblings, 0 replies; 12+ messages in thread
From: Alejandro Colomar @ 2020-10-25  9:36 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Alejandro Colomar, linux-man, libc-alpha

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---
 man3/queue.3 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/man3/queue.3 b/man3/queue.3
index 4c597e123..1c9a6f573 100644
--- a/man3/queue.3
+++ b/man3/queue.3
@@ -182,4 +182,5 @@ functions first appeared in
 .Xr list 3
 .Xr slist 3
 .Xr stailq 3
+.Xr tailq 3
 .\" .Xr tree 3
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 00/10] tailq.3: fork from queue.3
  2020-10-25  9:36 [PATCH 00/10] tailq.3: fork from queue.3 Alejandro Colomar
                   ` (9 preceding siblings ...)
  2020-10-25  9:36 ` [PATCH 10/10] queue.3: SEE ALSO: Add tailq(3) Alejandro Colomar
@ 2020-10-25  9:46 ` Michael Kerrisk (man-pages)
  10 siblings, 0 replies; 12+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-10-25  9:46 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: mtk.manpages, linux-man, libc-alpha

Hi Alex,

On 10/25/20 10:36 AM, Alejandro Colomar wrote:
> Hi Michael,
> 
> The last page is here :)

Yay!! Patch applied.

I have now 238 commits from you for the next release!

Thanks,

Michael

> Alejandro Colomar (10):
>   tailq.3: New page that will hold the (tailq) contents of queue.3
>   queue.3, tailq.3: NAME: Move code from queue.3 to tailq.3
>   queue.3, tailq.3: SYNOPSIS: Move code from queue.3 to tailq.3
>   queue.3, tailq.3: DESCRIPTION: Move code from queue.3 to tailq.3
>   queue.3, tailq.3: EXAMPLES: Move code from queue.3 to tailq.3
>   tailq.3: Copy and adapt code from queue.3
>   tailq.3: ffix: Use man markup
>   tailq.3: Add remaining details to complete the page
>   TAILQ_CONCAT.3, TAILQ_EMPTY.3, TAILQ_ENTRY.3, TAILQ_FIRST.3,
>     TAILQ_FOREACH.3, TAILQ_FOREACH_REVERSE.3, TAILQ_HEAD.3,
>     TAILQ_HEAD_INITIALIZER.3, TAILQ_INIT.3, TAILQ_INSERT_AFTER.3,
>     TAILQ_INSERT_BEFORE.3, TAILQ_INSERT_HEAD.3, TAILQ_INSERT_TAIL.3,
>     TAILQ_LAST.3, TAILQ_NEXT.3, TAILQ_PREV.3, TAILQ_REMOVE.3,
>     TAILQ_SWAP.3: Link to the new tailq(3) page instead of queue(3)
>   queue.3: SEE ALSO: Add tailq(3)
> 
>  man3/TAILQ_CONCAT.3           |   2 +-
>  man3/TAILQ_EMPTY.3            |   2 +-
>  man3/TAILQ_ENTRY.3            |   2 +-
>  man3/TAILQ_FIRST.3            |   2 +-
>  man3/TAILQ_FOREACH.3          |   2 +-
>  man3/TAILQ_FOREACH_REVERSE.3  |   2 +-
>  man3/TAILQ_HEAD.3             |   2 +-
>  man3/TAILQ_HEAD_INITIALIZER.3 |   2 +-
>  man3/TAILQ_INIT.3             |   2 +-
>  man3/TAILQ_INSERT_AFTER.3     |   2 +-
>  man3/TAILQ_INSERT_BEFORE.3    |   2 +-
>  man3/TAILQ_INSERT_HEAD.3      |   2 +-
>  man3/TAILQ_INSERT_TAIL.3      |   2 +-
>  man3/TAILQ_LAST.3             |   2 +-
>  man3/TAILQ_NEXT.3             |   2 +-
>  man3/TAILQ_PREV.3             |   2 +-
>  man3/TAILQ_REMOVE.3           |   2 +-
>  man3/TAILQ_SWAP.3             |   2 +-
>  man3/queue.3                  | 343 +-------------------------
>  man3/tailq.3                  | 437 ++++++++++++++++++++++++++++++++++
>  20 files changed, 456 insertions(+), 360 deletions(-)
>  create mode 100644 man3/tailq.3
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-10-25  9:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-25  9:36 [PATCH 00/10] tailq.3: fork from queue.3 Alejandro Colomar
2020-10-25  9:36 ` [PATCH 01/10] tailq.3: New page that will hold the (tailq) contents of queue.3 Alejandro Colomar
2020-10-25  9:36 ` [PATCH 02/10] queue.3, tailq.3: NAME: Move code from queue.3 to tailq.3 Alejandro Colomar
2020-10-25  9:36 ` [PATCH 03/10] queue.3, tailq.3: SYNOPSIS: " Alejandro Colomar
2020-10-25  9:36 ` [PATCH 04/10] queue.3, tailq.3: DESCRIPTION: " Alejandro Colomar
2020-10-25  9:36 ` [PATCH 05/10] queue.3, tailq.3: EXAMPLES: " Alejandro Colomar
2020-10-25  9:36 ` [PATCH 06/10] tailq.3: Copy and adapt code from queue.3 Alejandro Colomar
2020-10-25  9:36 ` [PATCH 07/10] tailq.3: ffix: Use man markup Alejandro Colomar
2020-10-25  9:36 ` [PATCH 08/10] tailq.3: Add remaining details to complete the page Alejandro Colomar
2020-10-25  9:36 ` [PATCH 09/10] TAILQ_CONCAT.3, TAILQ_EMPTY.3, TAILQ_ENTRY.3, TAILQ_FIRST.3, TAILQ_FOREACH.3, TAILQ_FOREACH_REVERSE.3, TAILQ_HEAD.3, TAILQ_HEAD_INITIALIZER.3, TAILQ_INIT.3, TAILQ_INSERT_AFTER.3, TAILQ_INSERT_BEFORE.3, TAILQ_INSERT_HEAD.3, TAILQ_INSERT_TAIL.3, TAILQ_LAST.3, TAILQ_NEXT.3, TAILQ_PREV.3, TAILQ_REMOVE.3, TAILQ_SWAP.3: Link to the new tailq(3) page instead of queue(3) Alejandro Colomar
2020-10-25  9:36 ` [PATCH 10/10] queue.3: SEE ALSO: Add tailq(3) Alejandro Colomar
2020-10-25  9:46 ` [PATCH 00/10] tailq.3: fork from queue.3 Michael Kerrisk (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.