public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* queue.3 overhaul
@ 2020-10-19 15:29 Alejandro Colomar
  2020-10-20  4:08 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 7+ messages in thread
From: Alejandro Colomar @ 2020-10-19 15:29 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages); +Cc: linux-man, libc-alpha@sourceware.org

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

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

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-19 15:29 queue.3 overhaul Alejandro Colomar
2020-10-20  4:08 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox