Pendantic change of null to NUL. Also warn that this function does not

NUL terminate in the case of buffer overflow.
This commit is contained in:
Warner Losh 1997-03-02 20:07:37 +00:00
parent ee2bf73496
commit 8f58838644

View File

@ -66,13 +66,19 @@ and one other character.
.Pp
No more than
.Fa maxsize
characters will be placed into the array.
characters will be placed into the array. If more characters than
.Fa maxsize
could have been written into
.Fa buf
then
.Fa bug
will not be NUL terminated.
If the total number of resulting characters, including the terminating
null character, is not more than
NUL character, is not more than
.Fa maxsize ,
.Fn strftime
returns the number of characters in the array, not counting the
terminating null.
terminating NUL.
Otherwise, zero is returned.
.Pp
Each conversion specification is replaced by the characters as