Clean up the cryb_strl*(3) man pages.

This commit is contained in:
Dag-Erling Smørgrav 2016-09-17 16:50:37 +02:00
parent 615c273ae2
commit 0471eb2d33
2 changed files with 28 additions and 30 deletions

View file

@ -1,5 +1,6 @@
.\"- .\"-
.\" Copyright (c) 2015 Universitetet i Oslo .\" Copyright (c) 2015 Universitetet i Oslo
.\" Copyright (c) 2016 Dag-Erling Smørgrav
.\" All rights reserved. .\" All rights reserved.
.\" .\"
.\" Redistribution and use in source and binary forms, with or without .\" Redistribution and use in source and binary forms, with or without
@ -26,22 +27,22 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" SUCH DAMAGE.
.\" .\"
.Dd February 5, 2015 .Dd Septmber 17, 2016
.Dt tsd_strlcat 3 .Dt cryb_strlcat 3
.Os .Os
.Sh NAME .Sh NAME
.Nm tsd_strlcat .Nm cryb_strlcat
.Nd safely append a string to a buffer .Nd safely append a string to a buffer
.Sh LIBRARY .Sh LIBRARY
.Lb libtsd .Lb libcryb
.Sh SYNOPSIS .Sh SYNOPSIS
.In stdint.h .In stddef.h
.In tsd/strutil.h .In cryb/strlcat.h
.Ft size_t .Ft size_t
.Fn tsd_strlcat "char *dst" "const char *src" "size_t size" .Fn cryb_strlcat "char *dst" "const char *src" "size_t size"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Nm tsd_strlcat .Nm cryb_strlcat
function appends the NUL-terminated string pointed to by function appends the NUL-terminated string pointed to by
.Va src .Va src
to the NUL-terminated string stored in the buffer pointed to by to the NUL-terminated string stored in the buffer pointed to by
@ -56,7 +57,7 @@ the result is truncated.
In all cases, the destination buffer is properly NUL-terminated. In all cases, the destination buffer is properly NUL-terminated.
.Sh RETURN VALUES .Sh RETURN VALUES
The The
.Fn tsd_strlcat .Fn cryb_strlcat
function returns the sum of the lengths of the original strings. function returns the sum of the lengths of the original strings.
If this number is equal to or greater than the value of the If this number is equal to or greater than the value of the
.Va size .Va size
@ -65,18 +66,16 @@ argument, the string was too long to fit in the buffer.
If the If the
.Dv HAVE_STRLCAT .Dv HAVE_STRLCAT
preprocessor macro is defined to 0 or undefined, the preprocessor macro is defined to 0 or undefined, the
.In tsd/sha1.h .In cryb/strlcat.h
header provides a header provides a
.Fn strlcat .Fn strlcat
macro as an alias to macro as an alias to
.Fn tsd_strlcat . .Fn cryb_strlcat .
.Sh SEE ALSO .Sh SEE ALSO
.Xr strlcat 3 , .Xr cryb_strlcpy 3
.Xr strlcpy 3 ,
.Xr tsd_strlcpy 3
.Sh AUTHORS .Sh AUTHORS
The The
.Fn tsd_strlcat .Fn cryb_strlcat
function and this manual page were written for the University of Oslo function and this manual page were written for the University of Oslo
by by
.An Dag-Erling Sm\(/orgrav Aq Mt d.e.smorgrav@usit.uio.no . .An Dag-Erling Sm\(/orgrav Aq Mt d.e.smorgrav@usit.uio.no .

View file

@ -1,5 +1,6 @@
.\"- .\"-
.\" Copyright (c) 2015 Universitetet i Oslo .\" Copyright (c) 2015 Universitetet i Oslo
.\" Copyright (c) 2016 Dag-Erling Smørgrav
.\" All rights reserved. .\" All rights reserved.
.\" .\"
.\" Redistribution and use in source and binary forms, with or without .\" Redistribution and use in source and binary forms, with or without
@ -26,22 +27,22 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" SUCH DAMAGE.
.\" .\"
.Dd February 5, 2015 .Dd September 17, 2016
.Dt tsd_strlcpy 3 .Dt cryb_strlcpy 3
.Os .Os
.Sh NAME .Sh NAME
.Nm tsd_strlcpy .Nm cryb_strlcpy
.Nd safely copy a string into a buffer .Nd safely copy a string into a buffer
.Sh LIBRARY .Sh LIBRARY
.Lb libtsd .Lb libcryb
.Sh SYNOPSIS .Sh SYNOPSIS
.In stdint.h .In stddef.h
.In tsd/strutil.h .In cryb/strlcpy.h
.Ft size_t .Ft size_t
.Fn tsd_strlcpy "char *dst" "const char *src" "size_t size" .Fn cryb_strlcpy "char *dst" "const char *src" "size_t size"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Nm tsd_strlcpy .Nm cryb_strlcpy
function copies the NUL-terminated string pointed to by function copies the NUL-terminated string pointed to by
.Va src .Va src
into the buffer pointed to by into the buffer pointed to by
@ -55,7 +56,7 @@ truncated.
In all cases, the destination buffer is properly NUL-terminated. In all cases, the destination buffer is properly NUL-terminated.
.Sh RETURN VALUES .Sh RETURN VALUES
The The
.Fn tsd_strlcpy .Fn cryb_strlcpy
function returns the length of the original string. function returns the length of the original string.
If this number is equal to or greater than the value of the If this number is equal to or greater than the value of the
.Va size .Va size
@ -64,18 +65,16 @@ argument, the string was too long to fit in the buffer.
If the If the
.Dv HAVE_STRLCPY .Dv HAVE_STRLCPY
preprocessor macro is defined to 0 or undefined, the preprocessor macro is defined to 0 or undefined, the
.In tsd/sha1.h .In cryb/strlcpy.h
header provides a header provides a
.Fn strlcpy .Fn strlcpy
macro as an alias to macro as an alias to
.Fn tsd_strlcpy . .Fn cryb_strlcpy .
.Sh SEE ALSO .Sh SEE ALSO
.Xr strlcat 3 , .Xr cryb_strlcat 3
.Xr strlcpy 3 ,
.Xr tsd_strlcat 3
.Sh AUTHORS .Sh AUTHORS
The The
.Fn tsd_strlcpy .Fn cryb_strlcpy
function and this manual page were written for the University of Oslo function and this manual page were written for the University of Oslo
by by
.An Dag-Erling Sm\(/orgrav Aq Mt d.e.smorgrav@usit.uio.no . .An Dag-Erling Sm\(/orgrav Aq Mt d.e.smorgrav@usit.uio.no .