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
Unknown Object (File)
Wed, Jun 4, 8:02 AM
Unknown Object (File)
Tue, Jun 3, 10:56 AM
Unknown Object (File)
Thu, May 29, 3:11 PM
Unknown Object (File)
Tue, May 27, 4:42 AM
Unknown Object (File)
May 17 2025, 8:11 AM
Unknown Object (File)
May 15 2025, 12:12 PM
Unknown Object (File)
Apr 18 2025, 3:08 AM
Unknown Object (File)
Mar 6 2025, 8:20 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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