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)
Fri, Sep 27, 7:00 PM
Unknown Object (File)
Fri, Sep 27, 6:07 AM
Unknown Object (File)
Tue, Sep 24, 4:42 PM
Unknown Object (File)
Mon, Sep 23, 8:15 AM
Unknown Object (File)
Fri, Sep 20, 12:40 PM
Unknown Object (File)
Thu, Sep 19, 8:59 AM
Unknown Object (File)
Thu, Sep 19, 1:55 AM
Unknown Object (File)
Wed, Sep 18, 9:47 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