diff options
Diffstat (limited to '')
| -rw-r--r-- | libabort_stracpy.3 | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/libabort_stracpy.3 b/libabort_stracpy.3 new file mode 100644 index 0000000..414fab1 --- /dev/null +++ b/libabort_stracpy.3 @@ -0,0 +1,56 @@ +.TH LIBABORT_STRACPY 3 LIBABORT +.SH NAME +libabort_stracpy \- Copy a string with bounds checking + +.SH SYNOPSIS +.nf +#include <libabort.h> + +char *\fBlibabort_stracpy\fP(char *\fIdst\fP, const char *\fIsrc\fP, size_t \fIsize\fP); + +#if !defined(LIBABORT_NO_SHORTHANDS) && !defined(stracpy) +# define \fBstracpy\fP libabort_stracpy +#endif +.fi +.PP +Link with +.IR -labort . + +.SH DESCRIPTION +The +.BR libabort_stracpy () +function copies the NUL terminated string +.I src +into the buffer +.IR dst , +which is assumed to be +.I size +bytes long. +.PP +If the string does not fit in the destination buffer +(including the terminating NUL byte), the +.BR libabort_stracpy () +function calls +.BR abort (3). + +.SH RETURN VALUE +The +.BR libabort_stracpy () +function returns +.IR dst . + +.SH ERRORS +The +.BR libabort_stracpy () +function cannot fail. + +.SH HISTORY +The +.BR libabort_stracpy () +function added in version 1.0 of +.BR libabort . + +.SH SEE ALSO +.BR libabort (7), +.BR libabort_stpacpy (3), +.BR libabort_stracat (3) |
