aboutsummaryrefslogtreecommitdiffstats
path: root/libabort.7
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-02-28 19:17:45 +0100
committerMattias Andrée <m@maandree.se>2026-02-28 19:17:45 +0100
commit7c545b4b9c31dbfb2e8430aded030654a92e967a (patch)
treecd79fb055bfcca79dee8b1b35c0ed59ea3a0c85a /libabort.7
downloadlibabort-master.tar.gz
libabort-master.tar.bz2
libabort-master.tar.xz
First commitHEAD1.0master
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'libabort.7')
-rw-r--r--libabort.759
1 files changed, 59 insertions, 0 deletions
diff --git a/libabort.7 b/libabort.7
new file mode 100644
index 0000000..4686be3
--- /dev/null
+++ b/libabort.7
@@ -0,0 +1,59 @@
+.TH LIBABORT 7 LIBABORT
+.SH NAME
+libabort \- String functions that abort when getting out of bounds
+
+.SH SYNOPSIS
+.nf
+#include <libabort.h>
+.fi
+.PP
+Link with
+.IR -labort .
+
+.SH DESCRIPTION
+The
+.BR libabort
+library provides string functions that call
+.BR abort (3)
+rather than silently truncating or read or write out of bounds.
+.PP
+Each function is namespaced with the prefix
+.BR libabort_ ,
+and shorthand names are available without this prefix,
+however defining
+.BR LIBABORT_NO_SHORTHANDS
+before including
+.I <libabort.h>
+will cause these shorthands not to be defined.
+.PP
+The following functions are provided:
+.TP
+.BR libabort_stracpy (3)
+Copy a NUL terminated string into a fixed-size buffer.
+Returns the written string.
+.TP
+.BR libabort_stpacpy (3)
+Copy a NUL terminated string into a fixed-size buffer.
+Returns the end of the written string.
+.TP
+.BR libabort_stracat (3)
+Append a NUL terminated string to a NUL terminated string within a
+fixed-size buffer. Returns the augmented string.
+.TP
+.BR libabort_stpacat (3)
+Append a NUL terminated string to a NUL terminated string within a
+fixed-size buffer. Returns the end of the augmented string.
+.TP
+.BR libabort_stralen (3)
+Compute the length of string that is expected to be NUL terminated.
+.TP
+.BR libabort_saprintf (3)
+Format a string into a fixed-size buffer.
+.TP
+.BR libabort_vsaprintf (3)
+Format a string into a fixed-size buffer using a
+.I va_list
+argument list.
+
+.SH SEE ALSO
+None.