From: Alejandro Colomar <colomar.6.4.3@gmail.com>
To: linux-man@vger.kernel.org
Cc: libc-alpha@sourceware.org
Subject: [patch] queue.3: Comment out text for functions not in glibc (related: 6559169cac)
Date: Tue, 4 Aug 2020 11:40:41 +0200 [thread overview]
Message-ID: <c076cbde-0ef5-9e92-8c82-4b6e5d765fea@gmail.com> (raw)
===========
DESCRIPTION
===========
I'm documenting ``CIRCLEQ_*`` macros in queue.3. While writing this, I
noticed that the documentation for some types of queues/lists talked
about swapping contents of two lists, but only for some of them. I then
found that those macros (``*_SWAP``) don't exist in my system (Debian),
but exist in BSD, and I also found that a previous commit (6559169cac)
commented out a lot of the *_SWAP macros documentation, but not all, and
the reason was that they were not present on glibc.
I checked that I didn't have any of the *_SWAP macros on my glibc, so I
think this is probably that the commit simply forgot to comment some of
them.
=======
TESTING
=======
I tun ``sudo make`` and then visualized the man page with
``man 3 queue``, and the changes looked good.
I also noticed that the subsection ``Tail queue example`` contents were
wrong, as they contained calls to CIRCLEQ_* macros. I will address that
in a future patch, before I submit the patch documenting CIRCLEQ_*.
________________________________________________________________________
P.S.: I'd like to know, as my previous patch was oddly reformatted by
my mailer, if you can see it correctly this time. I changed some,
configuration, so I hope it is fine.
=====
PATCH
=====
From 2282ba2397e6ac7dca4cc09dfcb92ac524718f27 Mon Sep 17 00:00:00 2001
From: Alejandro Colomar <colomar.6.4.3@gmail.com>
Date: Sun, 26 Jul 2020 23:36:42 +0200
Subject: [PATCH] queue.3: Comment out text for functions not in glibc
(related: 6559169cac)
---
man3/queue.3 | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/man3/queue.3 b/man3/queue.3
index 00e4b1958..ff1f42f3a 100644
--- a/man3/queue.3
+++ b/man3/queue.3
@@ -110,8 +110,8 @@
.Nm TAILQ_LAST ,
.Nm TAILQ_NEXT ,
.Nm TAILQ_PREV ,
-.Nm TAILQ_REMOVE ,
-.Nm TAILQ_SWAP
+.Nm TAILQ_REMOVE
+.\" .Nm TAILQ_SWAP
.Nd implementations of singly-linked lists, singly-linked tail queues,
lists and tail queues
.Sh SYNOPSIS
@@ -172,7 +172,7 @@ lists and tail queues
.Fn LIST_NEXT "TYPE *elm" "LIST_ENTRY NAME"
.\" .Fn LIST_PREV "TYPE *elm" "LIST_HEAD *head" "TYPE" "LIST_ENTRY NAME"
.Fn LIST_REMOVE "TYPE *elm" "LIST_ENTRY NAME"
-.Fn LIST_SWAP "LIST_HEAD *head1" "LIST_HEAD *head2" "TYPE" "LIST_ENTRY
NAME"
+.\" .Fn LIST_SWAP "LIST_HEAD *head1" "LIST_HEAD *head2" "TYPE"
"LIST_ENTRY NAME"
.\"
.Fn TAILQ_CONCAT "TAILQ_HEAD *head1" "TAILQ_HEAD *head2" "TAILQ_ENTRY
NAME"
.Fn TAILQ_EMPTY "TAILQ_HEAD *head"
@@ -197,7 +197,7 @@ lists and tail queues
.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"
+.\" .Fn TAILQ_SWAP "TAILQ_HEAD *head1" "TAILQ_HEAD *head2" "TYPE"
"TAILQ_ENTRY NAME"
.\"
.Sh DESCRIPTION
These macros define and operate on four types of data structures:
@@ -213,8 +213,8 @@ Insertion of a new entry after any element in the list.
O(1) removal of an entry from the head of the list.
.It
Forward traversal through the list.
-.It
-Swapping the contents of two lists.
+.\" .It
+.\" Swapping the contents of two lists.
.El
.Pp
Singly-linked lists are the simplest of the four data structures
@@ -1157,13 +1157,13 @@ The macro
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
+.\" The macro
+.\" .Nm TAILQ_SWAP
+.\" swaps the contents of
+.\" .Fa head1
+.\" and
+.\" .Fa head2 .
.Ss Tail queue example
.Bd -literal
TAILQ_HEAD(tailhead, entry) head =
--
2.27.0
next reply other threads:[~2020-08-04 9:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-04 9:40 Alejandro Colomar [this message]
2020-08-04 12:48 ` [patch] queue.3: Comment out text for functions not in glibc (related: 6559169cac) Michael Kerrisk (man-pages)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c076cbde-0ef5-9e92-8c82-4b6e5d765fea@gmail.com \
--to=colomar.6.4.3@gmail.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-man@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).