Page MenuHomeFreeBSD

KTR: Add CTR() and TR() macros which accept a variable number of arguments.
ClosedPublic

Authored by jhb on Apr 8 2022, 10:54 PM.
Tags
None
Referenced Files
F86557168: D34852.diff
Sat, Jun 22, 3:49 AM
Unknown Object (File)
May 16 2024, 4:20 AM
Unknown Object (File)
Mar 7 2024, 2:38 PM
Unknown Object (File)
Feb 23 2024, 5:31 PM
Unknown Object (File)
Jan 30 2024, 5:07 AM
Unknown Object (File)
Jan 14 2024, 8:32 AM
Unknown Object (File)
Dec 29 2023, 12:12 PM
Unknown Object (File)
Dec 20 2023, 5:55 AM

Details

Summary

These can be used in place of the CTRn() macros which require n to match
the number of optional arguments.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 45129
Build 42017: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Apr 8 2022, 10:54 PM

I wonder if we should note in the man page that the CTR macro is newer, which could explain why existing cases in the tree are CTRn.

This revision is now accepted and ready to land.Apr 9 2022, 1:14 AM

I wonder if we should note in the man page that the CTR macro is newer, which could explain why existing cases in the tree are CTRn.

Hmmm, perhaps.

I wonder if we should note in the man page that the CTR macro is newer, which could explain why existing cases in the tree are CTRn.

Yeah, I'd like that added to HISTORY.

Manual page syntax looks good, but it'd be nice to have a mention of the timing in the HISTORY section.

share/man/man9/ktr.9
88

Am I reading this right as saying that CTR itself can only handle 5 items to be output using the format argument, vararg or no vararg?

share/man/man9/ktr.9
88

Yes, though it's been six for several years. (The original macros from BSD/OS only allowed up to 5).

  • Add a note about CTR() in HISTORY.
This revision now requires review to proceed.Apr 12 2022, 5:28 PM
This revision is now accepted and ready to land.Apr 12 2022, 5:31 PM