public inbox for libc-alpha@sourceware.org
 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 07/11] circleq.3: Copy and adapt code from queue.3
Date: Fri, 23 Oct 2020 16:57:33 +0200	[thread overview]
Message-ID: <20201023145736.102750-8-colomar.6.4.3@gmail.com> (raw)
In-Reply-To: <20201023145736.102750-1-colomar.6.4.3@gmail.com>

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---
 man3/circleq.3 | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/man3/circleq.3 b/man3/circleq.3
index 2d683b441..491e1ec91 100644
--- a/man3/circleq.3
+++ b/man3/circleq.3
@@ -50,6 +50,8 @@
 .Nm CIRCLEQ_PREV ,
 .Nm CIRCLEQ_REMOVE
 .SH SYNOPSIS
+.In sys/queue.h
+.\"
 .Fn CIRCLEQ_EMPTY "CIRCLEQ_HEAD *head"
 .Fn CIRCLEQ_ENTRY "TYPE"
 .Fn CIRCLEQ_FIRST "CIRCLEQ_HEAD *head"
@@ -69,6 +71,18 @@
 .Fn CIRCLEQ_PREV "TYPE *elm" "CIRCLEQ_ENTRY NAME"
 .Fn CIRCLEQ_REMOVE "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME"
 .SH DESCRIPTION
+In the macro definitions,
+.Fa TYPE
+is the name of a user-defined structure,
+that must contain a field of type
+.Li CIRCLEQ_ENTRY ,
+named
+.Fa NAME .
+The argument
+.Fa HEADNAME
+is the name of a user-defined structure that must be declared
+using the macro
+.Li CIRCLEQ_HEAD .
 .Ss Circular queues
 A circular queue is headed by a structure defined by the
 .Nm CIRCLEQ_HEAD
@@ -208,6 +222,10 @@ removes the element
 from the circular queue.
 .SH RETURN VALUE
 .SH CONFORMING TO
+Not in POSIX.1, POSIX.1-2001 or POSIX.1-2008.
+Present on the BSDs
+(CIRCLEQ macros first appeared in
+.Bx 4.4 ).
 .SH BUGS
 .SH EXAMPLES
 .Ss Circular queue example
@@ -227,9 +245,9 @@ CIRCLEQ_HEAD(circlehead, entry);
 int
 main(void)
 {
-    struct entry    *n1, *n2, *n3, *np;
+    struct entry *n1, *n2, *n3, *np;
     struct circlehead head;                 /* Queue head. */
-    int     i;
+    int i;
 
     CIRCLEQ_INIT(&head);                    /* Initialize the queue. */
 
-- 
2.28.0


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

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-23 14:57 [PATCH 00/11] circleq.3: Fork " Alejandro Colomar
2020-10-23 14:57 ` [PATCH 01/11] circleq.3: New page that will hold the (circleq) content of queue.3 Alejandro Colomar
2020-10-23 14:57 ` [PATCH 02/11] circleq.3, queue.3: NAME: Move code from queue-3 to circleq.3 Alejandro Colomar
2020-10-23 14:57 ` [PATCH 03/11] circleq.3, queue.3: SYNOPSIS: Move code from queue.3 " Alejandro Colomar
2020-10-23 14:57 ` [PATCH 04/11] circleq.3, queue.3: DESCRIPTION: Move circleq specific " Alejandro Colomar
2020-10-23 14:57 ` [PATCH 05/11] circleq.3, queue.3: EXAMPLES: Move circleq example program " Alejandro Colomar
2020-10-23 14:57 ` [PATCH 06/11] queue.3: ffix Alejandro Colomar
2020-10-23 14:57 ` Alejandro Colomar [this message]
2020-10-23 14:57 ` [PATCH 08/11] circleq.3: ffix: Use man markup Alejandro Colomar
2020-10-23 14:57 ` [PATCH 09/11] circleq.3: Add remaining details to complete the page Alejandro Colomar
2020-10-23 14:57 ` [PATCH 10/11] CIRCLEQ_ENTRY.3, CIRCLEQ_HEAD.3, CIRCLEQ_INIT.3, CIRCLEQ_INSERT_AFTER.3, CIRCLEQ_INSERT_BEFORE.3, CIRCLEQ_INSERT_HEAD.3, CIRCLEQ_INSERT_TAIL.3, CIRCLEQ_REMOVE.3: Link to the new circleq(3) page instead of queue(3) Alejandro Colomar
2020-10-23 14:57 ` [PATCH 11/11] queue.3: SEE ALSO: Add circleq(3) Alejandro Colomar
2020-10-23 16:19 ` [PATCH 00/11] circleq.3: Fork from queue.3 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=20201023145736.102750-8-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 read-only IMAP folder(s) and NNTP newsgroup(s).