Hello Alex: On 10/10/20 9:02 PM, Alejandro Colomar wrote: > I added the EXAMPLES section. > The examples in this page are incomplete > (you can't copy&paste&compile&run). > I fixed the one about TAILQ first, > and the rest should follow. > > Signed-off-by: Alejandro Colomar <colomar.6.4.3@xxxxxxxxx> I have not (yet) applied this patch, because... > --- > > Hi Michael, > > I think this page needs a big overhaul. ... you are probably right. (And thank you for thinking about the big picture.) As you are probably aware, the page was essentially lifted from BSD, and lightly edited, and this accounts for many oddities by comparison with other pages. > First of all, it's a very big page, > where it's a bit difficult to go to the subsection you want. Agreed. > Then, the examples are incomplete. > And also, the language of the page is weird. Yes, there are some rather strange pieces in the page. Just now, I noticed statements about % code size increase, etc, which I'm sure were not measured on Linux (and in any case, such numbers are prone to change, and don't belong in a manual page). > I thought about having queue.h with an overview of all the different > data structures, and the differences about them. > > And then separate pages for each data structure: > slist.3, list.3, > stailq.3, tailq.3, > simpleq.3 (which right now isn't documented), > and circleq.3 > with details about each macro and a complete example program. > > Your thoughts? The above sounds about right to me. I'd happily accept patches to do that, if you want to work on this. One thing I'd ask though. Unlike almost every page in man-pages, this page uses mandoc mark-up (rather than "man"). This was a matter of the history, where at some point I refreshed the page from BSD, and decided to retain the mandoc markup,so that if a refresh was ever again done, the diff would be easy to comprehend. If you do decide to do this work, I think it would be desirable to switch to "man" markup. Sound okay? Replying to your other mail: On 10/10/20 9:08 PM, Alejandro Colomar wrote: > > > On 2020-10-10 21:02, Alejandro Colomar wrote: >> I thought about having queue.h with an overview of all the different > I meant queue.3 (instead of queue.h). Okay. > However, thinking about it, > if we strip if from the details about all of the macros, > it might be better as queue.7. Let's leave it as queue.3 for the moment. If it makes sense, we can easily switch it later, as the final step. Thanks, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/