Page MenuHomeFreeBSD

cdefs(9): document __nonstring
ClosedPublic

Authored by mhorne on Wed, Aug 12, 6:51 PM.
Tags
None
Referenced Files
F166417030: D58804.id183927.diff
Thu, Aug 13, 12:18 PM
F166416920: D58804.id183928.diff
Thu, Aug 13, 12:18 PM
F166416572: D58804.diff
Thu, Aug 13, 12:17 PM
Subscribers

Details

Summary

Fixes: 802c6d5d61d1 ("cdefs.h: Introduce __nonstring attribute")
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

share/man/man9/cdefs.9
210

Do we use null for the 0 character or NUL? I'm more used to the latter.

Prefer .Dv NUL and bump .Dd.

mhorne added inline comments.
share/man/man9/cdefs.9
210

Absolutely! This seems to be the precedent. Updating.

emaste added inline comments.
share/man/man9/cdefs.9
210

I believe "null terminator" or "null-terminated string" are conventional, and NUL if we specifically want to refer to an ASCII control character.

We have a mix of "null terminator", "nul terminator", and "NUL terminator" in the tree today. The middle one seems completely wrong.

This revision is now accepted and ready to land.Wed, Aug 12, 7:07 PM

C11 uses "null terminator" or "null terminated" and has this text

A byte with all bits set to 0, called the null character, shall exist in the basic execution character set; it is used to terminate a character string.

Oops, clicking accept crossed paths with the update.

I'm fine with the current version (.Dv NUL terminator) if that's what you want to go with, but I think that "does not require a null terminator" or "is not a null-terminated string" is preferable.

I asked as a question to learn the latest. I'm cool with what's there or c11 usage

Oops, clicking accept crossed paths with the update.

I'm fine with the current version (.Dv NUL terminator) if that's what you want to go with, but I think that "does not require a null terminator" or "is not a null-terminated string" is preferable.

Thanks for looking further. I will revert to the previous version, then.

This revision was automatically updated to reflect the committed changes.