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