From: Alejandro Colomar <colomar.6.4.3@gmail.com>
To: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
Cc: linux-man <linux-man@vger.kernel.org>,
"libc-alpha@sourceware.org" <libc-alpha@sourceware.org>
Subject: queue.3 overhaul
Date: Mon, 19 Oct 2020 17:29:32 +0200 [thread overview]
Message-ID: <33af3ca2-d6ea-5f75-6ad2-e2f43eefe4fa@gmail.com> (raw)
Hi Michael,
I'm working on moving and fixing code from queue.3 to different pages.
I'd like to send you patches against a separate branch,
if you would create one, to ask you some questions from time to time,
and maybe get suggestions.
Or maybe you could look at my branch on github
(https://github.com/alejandro-colomar/man-pages/commits/queue
(I may force push changes there sometimes))
(BTW, if you have a look there,
you can see how I'm moving&fixing the code from queue.3
to the other pages and maybe suggest a different way).
Or maybe I can just show you small pieces of code (no patches),
like in this email.
Whatever works best for you.
What do you think about this SYNOPSIS for list.3?:
[[
.SH SYNOPSIS
.nf
.B #include <sys/queue.h>
.PP
.BI "int LIST_EMPTY(LIST_HEAD *" head ");"
.B " LIST_ENTRY(TYPE);"
.BI "LIST_ENTRY LIST_FIRST(LIST_HEAD *" head ");"
.BI " LIST_FOREACH(TYPE *" var ", LIST_HEAD *" head ",
LIST_ENTRY " NAME ");"
.\".BI " LIST_FOREACH_FROM(TYPE *" var ", LIST_HEAD *" head ",
LIST_ENTRY " NAME ");"
.\".BI " LIST_FOREACH_SAFE(TYPE *" var ", LIST_HEAD *" head ",
LIST_ENTRY " NAME ", TYPE *" temp_var ");"
.\".BI " LIST_FOREACH_FROM_SAFE(TYPE *" var ", LIST_HEAD *"
head ", LIST_ENTRY " NAME ", TYPE *" temp_var ");"
.B " LIST_HEAD(HEADNAME, TYPE);"
.BI "LIST_HEAD LIST_HEAD_INITIALIZER(LIST_HEAD " head ");"
.BI "void LIST_INIT(LIST_HEAD *" head ");"
.BI "void LIST_INSERT_AFTER(TYPE *" listelm ", TYPE *" elm ",
LIST_ENTRY " NAME ");"
.BI "void LIST_INSERT_BEFORE(TYPE *" listelm ", TYPE *" elm ",
LIST_ENTRY " NAME ");"
.BI "void LIST_INSERT_HEAD(LIST_HEAD *" head ", TYPE *" elm ",
LIST_ENTRY " NAME ");"
.BI "LIST_ENTRY LIST_NEXT(TYPE *" elm ", LIST_ENTRY " NAME ");"
.\".BI "LIST_ENTRY LIST_PREV(TYPE *" elm ", LIST_HEAD *" head ", TYPE,
LIST_ENTRY " NAME ");"
.BI "void LIST_REMOVE(TYPE *" elm ", LIST_ENTRY " NAME ");"
.\".BI "void IST_SWAP(LIST_HEAD *" head1 ", LIST_HEAD *" head2 ",
TYPE, LIST_ENTRY " NAME ");"
.fi
]]
Things to note:
- The (many) spaces are there because otherwise it's unreadable (at
least for me).
Also, I kept the copyright from the University of California and added
myself: I consider this to be a modified redistribution but not a
derived product; maybe I'm wrong in that (I'm not a lawyer :)).
Please tell me your thoughts about all of this :)
Kind regards,
Alex
next reply other threads:[~2020-10-19 15:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-19 15:29 Alejandro Colomar [this message]
2020-10-20 4:08 ` queue.3 overhaul Michael Kerrisk (man-pages)
2020-10-20 10:36 ` Alejandro Colomar
2020-10-20 11:22 ` Hans Petter Selasky
2020-10-20 11:42 ` Alejandro Colomar
2020-10-21 4:53 ` Michael Kerrisk (man-pages)
2020-10-23 9:50 ` sys/queue.h: Add macros present on BSDs Alejandro Colomar
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=33af3ca2-d6ea-5f75-6ad2-e2f43eefe4fa@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