freebsd-src icon indicating copy to clipboard operation
freebsd-src copied to clipboard

cdefs(9): Start to document what sys/cdefs.h does

Open bsdimp opened this issue 1 year ago • 7 comments

Start to trudge through documenting cdefs.h.

Creating a github pull request as an experiment. I'll land this when it's ready.

Also, I know there's all kinds of things in cdefs.h not yet documented. I'm struggling to find good orgnaization.

Also, this is mostly a developer facing doc, not a user-facing document, as such.

bsdimp avatar Jul 02 '24 22:07 bsdimp

Tagging @concussious

bsdimp avatar Jul 02 '24 22:07 bsdimp

OK. I'm down to the ISOC / POSIX namespace selector portion of cdefs.h. Not al the functions are filled in. It's clear we have duplicated functionality, we need to reorg this file, update comments, etc. But at least everything is listed and some have descriptions. And at least 2 more things can be deleted from cdefs.h, I think, after some careful analysis (though maybe these need an exp run? Unlikely, but close to maybe).

bsdimp avatar Jul 03 '24 16:07 bsdimp

Thank you for inviting me.

I've began to learn about "gh pr checkout 1313", but now I want to "git push" or similar?

concussious avatar Jul 03 '24 23:07 concussious

Thank you for inviting me.

I've began to learn about "gh pr checkout 1313", but now I want to "git push" or similar?

I'm looking more for comments in general. If there's a lot you want to do, then I'm not sure how to proceed... maybe I'll get the outline and most things in and you could revise if that's what you want or think is fastest.

bsdimp avatar Jul 04 '24 01:07 bsdimp

Add Macro in ND Nocaps beginning ND Pp after tables within same subsection No dot macros in width/offset args

Thanks again, this is awesome.

concussious avatar Jul 04 '24 03:07 concussious

Add Macro in ND Nocaps beginning ND Pp after tables within same subsection No dot macros in width/offset args

OK... I think I'm going to need this shorthand explained a smidge more. i'm not sure what ND is, and I'm not sure about width/offset args thing. The .Pp I think I can handle...

Thanks for the feedback... I've wanted to do this for a long time, and I've wanted to reorg cdefs.h to match the organization in the man page. Right now it's a free-for-all that's hard to read, edit or understand.

bsdimp avatar Jul 04 '24 03:07 bsdimp

and you could revise if that's what you want or think is fastest.

I was thinking/hoping for a command similar to git push that applies the diff as suggestions.

concussious avatar Jul 04 '24 07:07 concussious

and you could revise if that's what you want or think is fastest.

I was thinking/hoping for a command similar to git push that applies the diff as suggestions.

Don't I wish. Please tell me if you find one.

For now, I'll make the suggested changes, but may push it in incomplete to allow others to try their hand at a pull request :)

bsdimp avatar Jul 04 '24 16:07 bsdimp

Pushed a new version. Please comment. Just revisions from here

bsdimp avatar Jul 04 '24 17:07 bsdimp

I was thinking/hoping for a command similar to git push that applies the diff as suggestions.

Don't I wish. Please tell me if you find one.

I found this issue request. I want to say "The FreeBSD Project also wants to do this", which is true and meaningful but I don't think it's appropriate for me.

https://github.com/cli/cli/issues/5905

concussious avatar Jul 05 '24 18:07 concussious

OK. 100% through cdefs.h adding at least sub entries for everything... Now to document the approximately 50 that I've left empty...

bsdimp avatar Jul 07 '24 20:07 bsdimp

I'm debating committing in the unfinished state... But I'd like at least what's done to be good...

bsdimp avatar Jul 07 '24 20:07 bsdimp

I've applied everything (or commented that I was doing things a different way) and force pushed a new version due to rebase (though that doesn't affect the diff). Thanks for the comments so far.

bsdimp avatar Jul 08 '24 15:07 bsdimp

We should consider the 'discoverability' of this document, i.e. which existing pages should link to it. A top-level comment in the header itself pointing here would be warranted; future changes to the file should be reflected here.

I'm open to how to do this. It's targeted mostly at the developer community.....

bsdimp avatar Jul 08 '24 20:07 bsdimp

OK. Looked at @mhorne changes and @concussious I think I've got it all in. GH's interface is getting a bit overloaded at this point...

bsdimp avatar Jul 08 '24 20:07 bsdimp

I think that I may commit what I have, and fill in the blanks later.

bsdimp avatar Jul 08 '24 20:07 bsdimp

Thanks again for inviting me! I'll keep working on it... but I like traditional bsd collaborative culture where this is your project, you do one commit, take all principal credit before all mankind, no commit log clutter, whole world benefits, but individual retains their power and agency.

concussious avatar Jul 08 '24 20:07 concussious

OK. I've pushed this. The time for comment has drawn to a close. Though improvements through pull requests, etc are now fair game.

bsdimp avatar Jul 08 '24 22:07 bsdimp

Thanks again for inviting me! I'll keep working on it... but I like traditional bsd collaborative culture where this is your project, you do one commit, take all principal credit before all mankind, no commit log clutter, whole world benefits, but individual retains their power and agency.

huh?

bsdimp avatar Jul 08 '24 23:07 bsdimp

I'll keep working on it... but

huh?

Fixing it in review feels like I'm purely helping, but fixing it in another PR later feels like I'm cluttering the commit log and stealing credit.

concussious avatar Jul 10 '24 16:07 concussious