linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alejandro Colomar <colomar.6.4.3@gmail.com>
To: mtk.manpages@gmail.com
Cc: Alejandro Colomar <colomar.6.4.3@gmail.com>,
	linux-man@vger.kernel.org, libc-alpha@sourceware.org
Subject: [PATCH 13/22] list.3: DESCRIPTION: ffix: Use man markup
Date: Tue, 20 Oct 2020 16:21:38 +0200	[thread overview]
Message-ID: <20201020142146.61837-14-colomar.6.4.3@gmail.com> (raw)
In-Reply-To: <20201020142146.61837-1-colomar.6.4.3@gmail.com>

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---
 man3/list.3 | 154 +++++++++++++++++++++++++++-------------------------
 1 file changed, 80 insertions(+), 74 deletions(-)

diff --git a/man3/list.3 b/man3/list.3
index 3c25b3e55..5b2a72fdb 100644
--- a/man3/list.3
+++ b/man3/list.3
@@ -102,9 +102,9 @@ The argument
 is the name of a user defined structure that must be declared
 using the macro
 .BR LIST_HEAD ().
-.Ss Lists
+.PP
 A list is headed by a structure defined by the
-.Nm LIST_HEAD
+.BR LIST_HEAD ()
 macro.
 This structure contains a single pointer to the first element
 on the list.
@@ -113,143 +113,149 @@ removed without traversing the list.
 New elements can be added to the list after an existing element,
 before an existing element, or at the head of the list.
 A
-.Fa LIST_HEAD
+.I LIST_HEAD
 structure is declared as follows:
-.Bd -literal -offset indent
+.PP
+.in +4
+.EX
 LIST_HEAD(HEADNAME, TYPE) head;
-.Ed
-.Pp
+.EE
+.in
+.PP
 where
-.Fa HEADNAME
+.I HEADNAME
 is the name of the structure to be defined, and
-.Fa TYPE
+.I 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:
-.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 LIST_HEAD_INITIALIZER
+.BR LIST_HEAD_INITIALIZER ()
 evaluates to an initializer for the list
-.Fa head .
-.Pp
+.IR head .
+.PP
 The macro
-.Nm LIST_EMPTY
+.BR LIST_EMPTY ()
 evaluates to true if there are no elements in the list.
-.Pp
+.PP
 The macro
-.Nm LIST_ENTRY
+.BR LIST_ENTRY ()
 declares a structure that connects the elements in
 the list.
-.Pp
+.PP
 The macro
-.Nm LIST_FIRST
+.BR LIST_FIRST ()
 returns the first element in the list or NULL if the list
 is empty.
-.Pp
+.PP
 The macro
-.Nm LIST_FOREACH
+.BR LIST_FOREACH ()
 traverses the list referenced by
-.Fa head
+.I head
 in the forward direction, assigning each element in turn to
-.Fa var .
-.\" .Pp
+.IR var .
+.\" .PP
 .\" The macro
-.\" .Nm LIST_FOREACH_FROM
+.\" .BR LIST_FOREACH_FROM ()
 .\" behaves identically to
-.\" .Nm LIST_FOREACH
+.\" .BR LIST_FOREACH ()
 .\" when
-.\" .Fa var
+.\" .I var
 .\" is NULL, else it treats
-.\" .Fa var
+.\" .I var
 .\" as a previously found LIST element and begins the loop at
-.\" .Fa var
+.\" .I var
 .\" instead of the first element in the LIST referenced by
-.\" .Fa head .
-.\" .Pp
+.\" .IR head .
+.\" .PP
 .\" The macro
-.\" .Nm LIST_FOREACH_SAFE
+.\" .BR LIST_FOREACH_SAFE ()
 .\" traverses the list referenced by
-.\" .Fa head
+.\" .I head
 .\" in the forward direction, assigning each element in turn to
-.\" .Fa var .
+.\" .IR var .
 .\" However, unlike
-.\" .Fn LIST_FOREACH
+.\" .BR LIST_FOREACH ()
 .\" here it is permitted 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 LIST_FOREACH_FROM_SAFE
+.\" .BR LIST_FOREACH_FROM_SAFE ()
 .\" behaves identically to
-.\" .Nm LIST_FOREACH_SAFE
+.\" .BR LIST_FOREACH_SAFE ()
 .\" when
-.\" .Fa var
+.\" .I var
 .\" is NULL, else it treats
-.\" .Fa var
+.\" .I var
 .\" as a previously found LIST element and begins the loop at
-.\" .Fa var
+.\" .I var
 .\" instead of the first element in the LIST referenced by
-.\" .Fa head .
-.Pp
+.\" .IR head .
+.PP
 The macro
-.Nm LIST_INIT
+.BR LIST_INIT ()
 initializes the list referenced by
-.Fa head .
-.Pp
+.IR head .
+.PP
 The macro
-.Nm LIST_INSERT_HEAD
+.BR LIST_INSERT_HEAD ()
 inserts the new element
-.Fa elm
+.I elm
 at the head of the list.
-.Pp
+.PP
 The macro
-.Nm LIST_INSERT_AFTER
+.BR LIST_INSERT_AFTER ()
 inserts the new element
-.Fa elm
+.I elm
 after the element
-.Fa listelm .
-.Pp
+.IR listelm .
+.PP
 The macro
-.Nm LIST_INSERT_BEFORE
+.BR LIST_INSERT_BEFORE ()
 inserts the new element
-.Fa elm
+.I elm
 before the element
-.Fa listelm .
-.Pp
+.IR listelm .
+.PP
 The macro
-.Nm LIST_NEXT
+.BR LIST_NEXT ()
 returns the next element in the list, or NULL if this is the last.
-.\" .Pp
+.\" .PP
 .\" The macro
-.\" .Nm LIST_PREV
+.\" .BR LIST_PREV ()
 .\" returns the previous element in the list, or NULL if this is the first.
 .\" List
-.\" .Fa head
+.\" .I head
 .\" must contain element
-.\" .Fa elm .
-.Pp
+.\" .IR elm .
+.PP
 The macro
-.Nm LIST_REMOVE
+.BR LIST_REMOVE ()
 removes the element
-.Fa elm
+.I elm
 from the list.
-.\" .Pp
+.\" .PP
 .\" The macro
-.\" .Nm LIST_SWAP
+.\" .BR LIST_SWAP ()
 .\" swaps the contents of
-.\" .Fa head1
+.\" .I head1
 .\" and
-.\" .Fa head2 .
-.Pp
+.\" .IR head2 .
+.PP
 See the EXAMPLES section below for an example program using a linked list.
 .SH RETURN VALUE
 .SH CONFORMING TO
-- 
2.28.0


  parent reply	other threads:[~2020-10-20 14:23 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20 14:21 [PATCH 00/22] list.3: New page forked from queue.3 Alejandro Colomar
2020-10-20 14:21 ` [PATCH 01/22] list.3: New page that will hold the (list) contents of queue.3 Alejandro Colomar
2020-10-20 14:21 ` [PATCH 02/22] list.3, queue.3: NAME: Move code from queue.3 to list.3 Alejandro Colomar
2020-10-20 14:21 ` [PATCH 03/22] list.3: NAME: ffix: Use man markup Alejandro Colomar
2020-10-20 14:21 ` [PATCH 04/22] list.3: NAME: Add description Alejandro Colomar
2020-10-20 14:21 ` [PATCH 05/22] list.3, queue.3: SYNOPSIS: Move code from queue.3 to list.3 Alejandro Colomar
2020-10-20 14:21 ` [PATCH 06/22] list.3: SYNOPSIS: Copy include from queue.3 Alejandro Colomar
2020-10-20 14:21 ` [PATCH 07/22] list.3: SYNOPSIS: ffix: Use man markup Alejandro Colomar
2020-10-20 14:21 ` [PATCH 08/22] list.3: DESCRIPTION: Add short description Alejandro Colomar
2020-10-20 14:21 ` [PATCH 09/22] list.3: DESCRIPTION: Copy description about naming of macros from queue.3 Alejandro Colomar
2020-10-20 14:21 ` [PATCH 10/22] list.3: DESCRIPTION: Remove unrelated code to adapt to this page Alejandro Colomar
2020-10-20 14:21 ` [PATCH 11/22] list.3: DESCRIPTION: ffix: Use man markup Alejandro Colomar
2020-10-20 14:21 ` [PATCH 12/22] list.3, queue.3: DESCRIPTION: Move list specific code from queue.3 to list.3 Alejandro Colomar
2020-10-20 14:21 ` Alejandro Colomar [this message]
2020-10-20 14:21 ` [PATCH 14/22] list.3: DESCRIPTION: Remove line pointing to the EXAMPLES Alejandro Colomar
2020-10-20 14:21 ` [PATCH 15/22] list.3: CONFORMING TO: Copy from queue.3 Alejandro Colomar
2020-10-20 14:21 ` [PATCH 16/22] list.3: CONFORMING TO: Adapt to this page Alejandro Colomar
2020-10-20 14:21 ` [PATCH 17/22] list.3: CONFORMING TO: ffix: Use man markup Alejandro Colomar
2020-10-20 14:21 ` [PATCH 18/22] list.3: SEE ALSO: Add insque(3) and queue(3) Alejandro Colomar
2020-10-20 14:21 ` [PATCH 19/22] list.3, queue.3: EXAMPLES: Move example program from queue.3 to list.3 Alejandro Colomar
2020-10-20 14:21 ` [PATCH 20/22] list.3: EXAMPLES: ffix: Use man markup Alejandro Colomar
2020-10-20 14:21 ` [PATCH 21/22] list.3: BUGS: Note LIST_FOREACH() limitations Alejandro Colomar
2020-10-20 14:21 ` [PATCH 22/22] list.3: RETURN VALUE: Add details about the return value of those macros that "return" a value Alejandro Colomar
2020-10-20 21:30   ` [PATCH v2 00/10] list.3: New page forked from queue.3 Alejandro Colomar
2020-10-21  4:52     ` Michael Kerrisk (man-pages)
2020-10-20 21:30   ` [PATCH v2 01/10] list.3: New page that will hold the (list) contents of queue.3 Alejandro Colomar
2020-10-20 21:31   ` [PATCH v2 02/10] list.3, queue.3: NAME: Move code from queue.3 to list.3 Alejandro Colomar
2020-10-20 21:31   ` [PATCH v2 03/10] list.3, queue.3: SYNOPSIS: " Alejandro Colomar
2020-10-20 21:31   ` [PATCH v2 04/10] list.3, queue.3: DESCRIPTION: Move list specific " Alejandro Colomar
2020-10-20 21:31   ` [PATCH v2 05/10] list.3, queue.3: EXAMPLES: Move example program " Alejandro Colomar
2020-10-20 21:31   ` [PATCH v2 06/10] list.3: Copy and adapt code from queue.3 Alejandro Colomar
2020-10-20 21:31   ` [PATCH v2 07/10] list.3: ffix: Use man markup Alejandro Colomar
2020-10-20 21:31   ` [PATCH v2 08/10] list.3: Add details Alejandro Colomar
2020-10-20 21:31   ` [PATCH v2 09/10] LIST_EMPTY.3, LIST_ENTRY.3, LIST_FIRST.3, LIST_FOREACH.3, LIST_HEAD.3, LIST_HEAD_INITIALIZER.3, LIST_INIT.3, LIST_INSERT_AFTER.3, LIST_INSERT_BEFORE.3, LIST_INSERT_HEAD.3, LIST_NEXT.3, LIST_REMOVE.3: Link to the new list.3 page instead of queue.3 Alejandro Colomar
2020-10-20 21:31   ` [PATCH v2 10/10] queue.3: SEE ALSO: Add list(3) Alejandro Colomar
2020-10-20 18:57 ` [PATCH 00/22] list.3: New page forked from queue.3 Michael Kerrisk (man-pages)
2020-10-20 19:21   ` Alejandro Colomar
2020-10-20 19:33     ` 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=20201020142146.61837-14-colomar.6.4.3@gmail.com \
    --to=colomar.6.4.3@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /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).