Re: [PATCH] queue.3: Replace incomplete example by a complete example

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2020-10-11 08:00, Michael Kerrisk (man-pages) wrote:
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 thought that we could do it in the following steps:

1) Fix the current page:
	- Complete examples
	- Use standard sections (such as EXAMPLES)
2) Move the code from this page to new separate pages
3) Fix the code in all of those pages to use "man" macros

This way, the history can be easily followed in git,
instead of having a few commits breaking everything.

Also, I think this way it might be easier,
and the improvements (such as better examples)
can be seen from the beginning.
Part 1 could be applied directly,
while parts 2 & 3 should be applied at once.

If the change was done abruptly, you couldn't apply any commits
until all of the work is finished
(otherwise, you would have broken pages).

So I think this patch can be applied as part of this change.

Cheers,

Alex


---

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).


Agreed.


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?


Yes.


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.


Agree.


Thanks,

Michael




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux