mirror of
https://github.com/cryb-to/cryb-to.git
synced 2024-12-23 13:01:08 +00:00
Improve man pages for strlcat() and strlcpy().
This commit is contained in:
parent
e99877752f
commit
7d22bec7bc
2 changed files with 23 additions and 12 deletions
|
@ -1,6 +1,6 @@
|
|||
.\"-
|
||||
.\" Copyright (c) 2015 The University of Oslo
|
||||
.\" Copyright (c) 2016 Dag-Erling Smørgrav
|
||||
.\" Copyright (c) 2016-2017 Dag-Erling Smørgrav
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
|
@ -27,7 +27,7 @@
|
|||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd Septmber 17, 2016
|
||||
.Dd May 2, 2017
|
||||
.Dt cryb_strlcat 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
|
@ -54,14 +54,25 @@ occupied by the existing string and space for the terminating NUL
|
|||
character.
|
||||
If the sum of the lengths of both strings exceeds the available space,
|
||||
the result is truncated.
|
||||
In all cases, the destination buffer is properly NUL-terminated.
|
||||
In either case, the destination buffer is properly NUL-terminated.
|
||||
.Pp
|
||||
If the buffer pointed to by
|
||||
.Va dst
|
||||
does not contain a NUL character within the first
|
||||
.Va size
|
||||
bytes,
|
||||
.Nm
|
||||
behaves as if the length of
|
||||
.Va dst
|
||||
is
|
||||
.Va size .
|
||||
.Sh RETURN VALUES
|
||||
The
|
||||
.Fn cryb_strlcat
|
||||
function returns the sum of the lengths of the original strings.
|
||||
If this number is equal to or greater than the value of the
|
||||
.Va size
|
||||
argument, the string was too long to fit in the buffer.
|
||||
If this number is equal to or greater than the value of
|
||||
.Va size ,
|
||||
the string was too long to fit in the buffer.
|
||||
.Sh IMPLEMENTATION NOTES
|
||||
If the
|
||||
.Dv HAVE_STRLCAT
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\"-
|
||||
.\" Copyright (c) 2015 The University of Oslo
|
||||
.\" Copyright (c) 2016 Dag-Erling Smørgrav
|
||||
.\" Copyright (c) 2016-2017 Dag-Erling Smørgrav
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
|
@ -27,7 +27,7 @@
|
|||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd September 17, 2016
|
||||
.Dd May 2, 2017
|
||||
.Dt cryb_strlcpy 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
|
@ -53,14 +53,14 @@ argument specifies the total size of the buffer, including the space
|
|||
required for the terminating NUL character.
|
||||
If the length of the string exceeds the available space, the result is
|
||||
truncated.
|
||||
In all cases, the destination buffer is properly NUL-terminated.
|
||||
In either case, the destination buffer is properly NUL-terminated.
|
||||
.Sh RETURN VALUES
|
||||
The
|
||||
.Fn cryb_strlcpy
|
||||
function returns the length of the original string.
|
||||
If this number is equal to or greater than the value of the
|
||||
.Va size
|
||||
argument, the string was too long to fit in the buffer.
|
||||
If this number is equal to or greater than the value of
|
||||
.Va size ,
|
||||
the string was too long to fit in the buffer.
|
||||
.Sh IMPLEMENTATION NOTES
|
||||
If the
|
||||
.Dv HAVE_STRLCPY
|
||||
|
|
Loading…
Reference in a new issue