diff options
Diffstat (limited to 'man3')
306 files changed, 6375 insertions, 207 deletions
diff --git a/man3/ELEMSOF.3libsimple b/man3/ELEMSOF.3libsimple index b40d563..9391607 100644 --- a/man3/ELEMSOF.3libsimple +++ b/man3/ELEMSOF.3libsimple @@ -1,6 +1,7 @@ -.TH ELEMSOF 3 2018-11-05 libsimple +.TH ELEMSOF 3 libsimple .SH NAME ELEMSOF \- get the size of an array + .SH SYNOPSIS .nf #include <libsimple.h> @@ -9,6 +10,7 @@ ELEMSOF \- get the size of an array # define ELEMSOF(arr) /* implementation omitted */ #endif .fi + .SH DESCRIPTION The .BR ELEMSOF () @@ -18,17 +20,24 @@ is an array (not a pointer) and expands, as a constant expression. The type of the expression the macro expands to is .BR size_t . + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR STRLEN (3libsimple) diff --git a/man3/INTSTRLEN.3libsimple b/man3/INTSTRLEN.3libsimple index 63c1485..9477eb6 100644 --- a/man3/INTSTRLEN.3libsimple +++ b/man3/INTSTRLEN.3libsimple @@ -1,6 +1,7 @@ -.TH INTSTRLEN 3 2018-11-05 libsimple +.TH INTSTRLEN 3 libsimple .SH NAME INTSTRLEN \- get the maximum length of an integer string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -9,6 +10,7 @@ INTSTRLEN \- get the maximum length of an integer string # define INTSTRLEN(type) /* implementation omitted */ #endif .fi + .SH DESCRIPTION The .BR INTSTRLEN () @@ -29,18 +31,25 @@ signed or unsigned, and can be slightly larger than necessary, it can however not be smaller. (For integers up to 64 bits, the result is only off by one for signed 64-bit integer types.) + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR TYPE_MIN (3libsimple) .BR TYPE_MAX (3libsimple) diff --git a/man3/MAX.3libsimple b/man3/MAX.3libsimple index e4a4d62..ac374d0 100644 --- a/man3/MAX.3libsimple +++ b/man3/MAX.3libsimple @@ -1,6 +1,7 @@ -.TH MAX 3 2018-11-05 libsimple +.TH MAX 3 libsimple .SH NAME MAX \- get the greater of two values + .SH SYNOPSIS .nf #include <libsimple.h> @@ -9,6 +10,7 @@ MAX \- get the greater of two values # define MAX(a, b) /* implementation omitted */ #endif .fi + .SH DESCRIPTION The .BR MAX () @@ -30,28 +32,37 @@ and .I b parameters are constants expressions, the return value is also a constant expression. + .SH RETURN VALUE The .BR MAX () macro returns to the greater value. + .SH ERRORS The .BR libsimple_close () function fail for the reasons specified for the .BR close (3) function. + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR MIN (3libsimple), .BR MIN3 (3libsimple), diff --git a/man3/MAX3.3libsimple b/man3/MAX3.3libsimple index 103169a..d0171f8 100644 --- a/man3/MAX3.3libsimple +++ b/man3/MAX3.3libsimple @@ -1,6 +1,7 @@ -.TH MAX3 3 2018-11-05 libsimple +.TH MAX3 3 libsimple .SH NAME MAX3 \- get the greatest of three values + .SH SYNOPSIS .nf #include <libsimple.h> @@ -9,6 +10,7 @@ MAX3 \- get the greatest of three values # define MAX3(a, b, c) /* implementation omitted */ #endif .fi + .SH DESCRIPTION The .BR MAX3 () @@ -33,28 +35,37 @@ and .I c parameters are constants expressions, the return value is also a constant expression. + .SH RETURN VALUE The .BR MAX3 () macro returns to the greatest of value. + .SH ERRORS The .BR libsimple_close () function fail for the reasons specified for the .BR close (3) function. + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR MIN (3libsimple), .BR MAX (3libsimple), diff --git a/man3/MIN.3libsimple b/man3/MIN.3libsimple index d88216e..552b334 100644 --- a/man3/MIN.3libsimple +++ b/man3/MIN.3libsimple @@ -1,6 +1,7 @@ -.TH MIN 3 2018-11-05 libsimple +.TH MIN 3 libsimple .SH NAME MIN \- get the lesser of two values + .SH SYNOPSIS .nf #include <libsimple.h> @@ -9,6 +10,7 @@ MIN \- get the lesser of two values # define MIN(a, b) /* implementation omitted */ #endif .fi + .SH DESCRIPTION The .BR MIN () @@ -30,28 +32,37 @@ and .I b parameters are constants expressions, the return value is also a constant expression. + .SH RETURN VALUE The .BR MIN () macro returns to the lesser value. + .SH ERRORS The .BR libsimple_close () function fail for the reasons specified for the .BR close (3) function. + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR MAX (3libsimple), .BR MIN3 (3libsimple), diff --git a/man3/MIN3.3libsimple b/man3/MIN3.3libsimple index c915781..19eeae9 100644 --- a/man3/MIN3.3libsimple +++ b/man3/MIN3.3libsimple @@ -1,6 +1,7 @@ -.TH MIN3 3 2018-11-05 libsimple +.TH MIN3 3 libsimple .SH NAME MIN3 \- get the smallest of three values + .SH SYNOPSIS .nf #include <libsimple.h> @@ -9,6 +10,7 @@ MIN3 \- get the smallest of three values # define MIN3(a, b, c) /* implementation omitted */ #endif .fi + .SH DESCRIPTION The .BR MIN3 () @@ -33,28 +35,37 @@ and .I c parameters are constants expressions, the return value is also a constant expression. + .SH RETURN VALUE The .BR MIN3 () macro returns to the smallest of value. + .SH ERRORS The .BR libsimple_close () function fail for the reasons specified for the .BR close (3) function. + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR MIN (3libsimple), .BR MAX (3libsimple), diff --git a/man3/STRLEN.3libsimple b/man3/STRLEN.3libsimple index 06ccecf..4d48e66 100644 --- a/man3/STRLEN.3libsimple +++ b/man3/STRLEN.3libsimple @@ -1,6 +1,7 @@ -.TH STRLEN 3 2018-11-05 libsimple +.TH STRLEN 3 libsimple .SH NAME STRLEN \- get the length of a string literal + .SH SYNOPSIS .nf #include <libsimple.h> @@ -9,6 +10,7 @@ STRLEN \- get the length of a string literal # define STRLEN(str) /* implementation omitted */ #endif .fi + .SH DESCRIPTION The .BR STRLEN () @@ -25,17 +27,24 @@ however it is not suitable for .BR #if . The type of the expression the macro expands to is .BR size_t . + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR ELEMSOF (3libsimple) diff --git a/man3/TYPE_MAX.3libsimple b/man3/TYPE_MAX.3libsimple index c132ec9..158f189 100644 --- a/man3/TYPE_MAX.3libsimple +++ b/man3/TYPE_MAX.3libsimple @@ -1,6 +1,7 @@ -.TH TYPE_MAX 3 2018-11-05 libsimple +.TH TYPE_MAX 3 libsimple .SH NAME TYPE_MAX \- get largest value for an integer type + .SH SYNOPSIS .nf #include <libsimple.h> @@ -9,6 +10,7 @@ TYPE_MAX \- get largest value for an integer type # define TYPE_MAX(type) /* implementation omitted */ #endif .fi + .SH DESCRIPTION The .BR TYPE_MAX () @@ -60,18 +62,25 @@ macro, for the maximum value for multiple integer types: .BR USECONDS_MAX , and .BR U_QUAD_MAX . + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR TYPE_MIN (3libsimple) .BR INTSTRLEN (3libsimple) diff --git a/man3/TYPE_MIN.3libsimple b/man3/TYPE_MIN.3libsimple index 6720465..0ec8fac 100644 --- a/man3/TYPE_MIN.3libsimple +++ b/man3/TYPE_MIN.3libsimple @@ -1,6 +1,7 @@ -.TH TYPE_MIN 3 2018-11-05 libsimple +.TH TYPE_MIN 3 libsimple .SH NAME TYPE_MIN \- get smallest value for an integer type + .SH SYNOPSIS .nf #include <libsimple.h> @@ -9,6 +10,7 @@ TYPE_MIN \- get smallest value for an integer type # define TYPE_MIN(type) /* implementation omitted */ #endif .fi + .SH DESCRIPTION The .BR TYPE_MIN () @@ -60,18 +62,25 @@ macro, for the minimum value for multiple integer types: .BR USECONDS_MIN , and .BR U_QUAD_MIN . + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR TYPE_MAX (3libsimple) .BR INTSTRLEN (3libsimple) diff --git a/man3/aligned_realloc.3libsimple b/man3/aligned_realloc.3libsimple new file mode 120000 index 0000000..45a72de --- /dev/null +++ b/man3/aligned_realloc.3libsimple @@ -0,0 +1 @@ +libsimple_aligned_realloc.3
\ No newline at end of file diff --git a/man3/aligned_reallocarray.3libsimple b/man3/aligned_reallocarray.3libsimple new file mode 120000 index 0000000..fb3f8b9 --- /dev/null +++ b/man3/aligned_reallocarray.3libsimple @@ -0,0 +1 @@ +libsimple_aligned_reallocarray.3
\ No newline at end of file diff --git a/man3/aligned_reallocarrayf.3libsimple b/man3/aligned_reallocarrayf.3libsimple new file mode 120000 index 0000000..8670b37 --- /dev/null +++ b/man3/aligned_reallocarrayf.3libsimple @@ -0,0 +1 @@ +libsimple_aligned_reallocarrayf.3
\ No newline at end of file diff --git a/man3/aligned_reallocf.3libsimple b/man3/aligned_reallocf.3libsimple new file mode 120000 index 0000000..656041f --- /dev/null +++ b/man3/aligned_reallocf.3libsimple @@ -0,0 +1 @@ +libsimple_aligned_reallocf.3
\ No newline at end of file diff --git a/man3/aligned_reallocfn.3libsimple b/man3/aligned_reallocfn.3libsimple new file mode 120000 index 0000000..73c5a60 --- /dev/null +++ b/man3/aligned_reallocfn.3libsimple @@ -0,0 +1 @@ +libsimple_aligned_reallocfn.3
\ No newline at end of file diff --git a/man3/aligned_reallocn.3libsimple b/man3/aligned_reallocn.3libsimple new file mode 120000 index 0000000..3a6b8aa --- /dev/null +++ b/man3/aligned_reallocn.3libsimple @@ -0,0 +1 @@ +libsimple_aligned_reallocn.3
\ No newline at end of file diff --git a/man3/aligned_strdup.3libsimple b/man3/aligned_strdup.3libsimple new file mode 120000 index 0000000..005dc6f --- /dev/null +++ b/man3/aligned_strdup.3libsimple @@ -0,0 +1 @@ +libsimple_aligned_strdup.3
\ No newline at end of file diff --git a/man3/aligned_strdupa.3libsimple b/man3/aligned_strdupa.3libsimple new file mode 120000 index 0000000..1cc07db --- /dev/null +++ b/man3/aligned_strdupa.3libsimple @@ -0,0 +1 @@ +libsimple_aligned_strdupa.3
\ No newline at end of file diff --git a/man3/aligned_strndup.3libsimple b/man3/aligned_strndup.3libsimple new file mode 120000 index 0000000..4be204c --- /dev/null +++ b/man3/aligned_strndup.3libsimple @@ -0,0 +1 @@ +libsimple_aligned_strndup.3
\ No newline at end of file diff --git a/man3/aligned_strndupa.3libsimple b/man3/aligned_strndupa.3libsimple new file mode 120000 index 0000000..40eec87 --- /dev/null +++ b/man3/aligned_strndupa.3libsimple @@ -0,0 +1 @@ +libsimple_aligned_strndupa.3
\ No newline at end of file diff --git a/man3/aligned_wcsdup.3libsimple b/man3/aligned_wcsdup.3libsimple new file mode 120000 index 0000000..cb194a0 --- /dev/null +++ b/man3/aligned_wcsdup.3libsimple @@ -0,0 +1 @@ +libsimple_aligned_wcsdup.3
\ No newline at end of file diff --git a/man3/aligned_wcsdupa.3libsimple b/man3/aligned_wcsdupa.3libsimple new file mode 120000 index 0000000..1e2225d --- /dev/null +++ b/man3/aligned_wcsdupa.3libsimple @@ -0,0 +1 @@ +libsimple_aligned_wcsdupa.3
\ No newline at end of file diff --git a/man3/aligned_wcsndup.3libsimple b/man3/aligned_wcsndup.3libsimple new file mode 120000 index 0000000..043dad0 --- /dev/null +++ b/man3/aligned_wcsndup.3libsimple @@ -0,0 +1 @@ +libsimple_aligned_wcsndup.3
\ No newline at end of file diff --git a/man3/aligned_wcsndupa.3libsimple b/man3/aligned_wcsndupa.3libsimple new file mode 120000 index 0000000..d24f553 --- /dev/null +++ b/man3/aligned_wcsndupa.3libsimple @@ -0,0 +1 @@ +libsimple_aligned_wcsndupa.3
\ No newline at end of file diff --git a/man3/aligned_wmemdup.3libsimple b/man3/aligned_wmemdup.3libsimple new file mode 120000 index 0000000..264a7e1 --- /dev/null +++ b/man3/aligned_wmemdup.3libsimple @@ -0,0 +1 @@ +libsimple_aligned_wmemdup.3
\ No newline at end of file diff --git a/man3/aligned_wmemdupa.3libsimple b/man3/aligned_wmemdupa.3libsimple new file mode 120000 index 0000000..567563a --- /dev/null +++ b/man3/aligned_wmemdupa.3libsimple @@ -0,0 +1 @@ +libsimple_aligned_wmemdupa.3
\ No newline at end of file diff --git a/man3/ealigned_realloc.3libsimple b/man3/ealigned_realloc.3libsimple new file mode 120000 index 0000000..dbb92ec --- /dev/null +++ b/man3/ealigned_realloc.3libsimple @@ -0,0 +1 @@ +libsimple_ealigned_realloc.3
\ No newline at end of file diff --git a/man3/ealigned_reallocarray.3libsimple b/man3/ealigned_reallocarray.3libsimple new file mode 120000 index 0000000..2d830d6 --- /dev/null +++ b/man3/ealigned_reallocarray.3libsimple @@ -0,0 +1 @@ +libsimple_ealigned_reallocarray.3
\ No newline at end of file diff --git a/man3/ealigned_reallocn.3libsimple b/man3/ealigned_reallocn.3libsimple new file mode 120000 index 0000000..d61ddf8 --- /dev/null +++ b/man3/ealigned_reallocn.3libsimple @@ -0,0 +1 @@ +libsimple_ealigned_reallocn.3
\ No newline at end of file diff --git a/man3/ealigned_strdup.3libsimple b/man3/ealigned_strdup.3libsimple new file mode 120000 index 0000000..eb5cf8d --- /dev/null +++ b/man3/ealigned_strdup.3libsimple @@ -0,0 +1 @@ +libsimple_ealigned_strdup.3
\ No newline at end of file diff --git a/man3/ealigned_strndup.3libsimple b/man3/ealigned_strndup.3libsimple new file mode 120000 index 0000000..50b1c4a --- /dev/null +++ b/man3/ealigned_strndup.3libsimple @@ -0,0 +1 @@ +libsimple_ealigned_strndup.3
\ No newline at end of file diff --git a/man3/ealigned_wcsdup.3libsimple b/man3/ealigned_wcsdup.3libsimple new file mode 120000 index 0000000..01ef193 --- /dev/null +++ b/man3/ealigned_wcsdup.3libsimple @@ -0,0 +1 @@ +libsimple_ealigned_wcsdup.3
\ No newline at end of file diff --git a/man3/ealigned_wcsndup.3libsimple b/man3/ealigned_wcsndup.3libsimple new file mode 120000 index 0000000..87cfe1b --- /dev/null +++ b/man3/ealigned_wcsndup.3libsimple @@ -0,0 +1 @@ +libsimple_ealigned_wcsndup.3
\ No newline at end of file diff --git a/man3/ealigned_wmemdup.3libsimple b/man3/ealigned_wmemdup.3libsimple new file mode 120000 index 0000000..0029c68 --- /dev/null +++ b/man3/ealigned_wmemdup.3libsimple @@ -0,0 +1 @@ +libsimple_ealigned_wmemdup.3
\ No newline at end of file diff --git a/man3/enaligned_realloc.3libsimple b/man3/enaligned_realloc.3libsimple new file mode 120000 index 0000000..2d95e24 --- /dev/null +++ b/man3/enaligned_realloc.3libsimple @@ -0,0 +1 @@ +libsimple_enaligned_realloc.3
\ No newline at end of file diff --git a/man3/enaligned_reallocarray.3libsimple b/man3/enaligned_reallocarray.3libsimple new file mode 120000 index 0000000..1b2e0f8 --- /dev/null +++ b/man3/enaligned_reallocarray.3libsimple @@ -0,0 +1 @@ +libsimple_enaligned_reallocarray.3
\ No newline at end of file diff --git a/man3/enaligned_reallocn.3libsimple b/man3/enaligned_reallocn.3libsimple new file mode 120000 index 0000000..ce4ea5d --- /dev/null +++ b/man3/enaligned_reallocn.3libsimple @@ -0,0 +1 @@ +libsimple_enaligned_reallocn.3
\ No newline at end of file diff --git a/man3/enaligned_strdup.3libsimple b/man3/enaligned_strdup.3libsimple new file mode 120000 index 0000000..83e40a2 --- /dev/null +++ b/man3/enaligned_strdup.3libsimple @@ -0,0 +1 @@ +libsimple_enaligned_strdup.3
\ No newline at end of file diff --git a/man3/enaligned_strndup.3libsimple b/man3/enaligned_strndup.3libsimple new file mode 120000 index 0000000..2b79c93 --- /dev/null +++ b/man3/enaligned_strndup.3libsimple @@ -0,0 +1 @@ +libsimple_enaligned_strndup.3
\ No newline at end of file diff --git a/man3/enaligned_wcsdup.3libsimple b/man3/enaligned_wcsdup.3libsimple new file mode 120000 index 0000000..c52f2c8 --- /dev/null +++ b/man3/enaligned_wcsdup.3libsimple @@ -0,0 +1 @@ +libsimple_enaligned_wcsdup.3
\ No newline at end of file diff --git a/man3/enaligned_wcsndup.3libsimple b/man3/enaligned_wcsndup.3libsimple new file mode 120000 index 0000000..f5772b1 --- /dev/null +++ b/man3/enaligned_wcsndup.3libsimple @@ -0,0 +1 @@ +libsimple_enaligned_wcsndup.3
\ No newline at end of file diff --git a/man3/enaligned_wmemdup.3libsimple b/man3/enaligned_wmemdup.3libsimple new file mode 120000 index 0000000..07321e1 --- /dev/null +++ b/man3/enaligned_wmemdup.3libsimple @@ -0,0 +1 @@ +libsimple_enaligned_wmemdup.3
\ No newline at end of file diff --git a/man3/enreallocarray.3libsimple b/man3/enreallocarray.3libsimple new file mode 120000 index 0000000..5f83973 --- /dev/null +++ b/man3/enreallocarray.3libsimple @@ -0,0 +1 @@ +libsimple_enreallocarray.3
\ No newline at end of file diff --git a/man3/envaligned_reallocn.3libsimple b/man3/envaligned_reallocn.3libsimple new file mode 120000 index 0000000..36205a3 --- /dev/null +++ b/man3/envaligned_reallocn.3libsimple @@ -0,0 +1 @@ +libsimple_envaligned_reallocn.3
\ No newline at end of file diff --git a/man3/enwcsdup.3libsimple b/man3/enwcsdup.3libsimple new file mode 120000 index 0000000..85a85a6 --- /dev/null +++ b/man3/enwcsdup.3libsimple @@ -0,0 +1 @@ +libsimple_enwcsdup.3
\ No newline at end of file diff --git a/man3/enwcsndup.3libsimple b/man3/enwcsndup.3libsimple new file mode 120000 index 0000000..801d72f --- /dev/null +++ b/man3/enwcsndup.3libsimple @@ -0,0 +1 @@ +libsimple_enwcsndup.3
\ No newline at end of file diff --git a/man3/enwmemdup.3libsimple b/man3/enwmemdup.3libsimple new file mode 120000 index 0000000..b2983f6 --- /dev/null +++ b/man3/enwmemdup.3libsimple @@ -0,0 +1 @@ +libsimple_enwmemdup.3
\ No newline at end of file diff --git a/man3/ereallocarray.3libsimple b/man3/ereallocarray.3libsimple new file mode 120000 index 0000000..3e43375 --- /dev/null +++ b/man3/ereallocarray.3libsimple @@ -0,0 +1 @@ +libsimple_ereallocarray.3
\ No newline at end of file diff --git a/man3/evaligned_reallocn.3libsimple b/man3/evaligned_reallocn.3libsimple new file mode 120000 index 0000000..b7dde1d --- /dev/null +++ b/man3/evaligned_reallocn.3libsimple @@ -0,0 +1 @@ +libsimple_evaligned_reallocn.3
\ No newline at end of file diff --git a/man3/ewcsdup.3libsimple b/man3/ewcsdup.3libsimple new file mode 120000 index 0000000..5c84dbe --- /dev/null +++ b/man3/ewcsdup.3libsimple @@ -0,0 +1 @@ +libsimple_ewcsdup.3
\ No newline at end of file diff --git a/man3/ewcsndup.3libsimple b/man3/ewcsndup.3libsimple new file mode 120000 index 0000000..09026d6 --- /dev/null +++ b/man3/ewcsndup.3libsimple @@ -0,0 +1 @@ +libsimple_ewcsndup.3
\ No newline at end of file diff --git a/man3/ewmemdup.3libsimple b/man3/ewmemdup.3libsimple new file mode 120000 index 0000000..3cbe8cf --- /dev/null +++ b/man3/ewmemdup.3libsimple @@ -0,0 +1 @@ +libsimple_ewmemdup.3
\ No newline at end of file diff --git a/man3/libsimple_aligned_allocz.3 b/man3/libsimple_aligned_allocz.3 index 751cf4f..0bee4d9 100644 --- a/man3/libsimple_aligned_allocz.3 +++ b/man3/libsimple_aligned_allocz.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_ALIGNED_ALLOCZ 3 2018-11-03 libsimple +.TH LIBSIMPLE_ALIGNED_ALLOCZ 3 libsimple .SH NAME libsimple_aligned_allocz \- allocate optionally initialised memory with custom alignment + .SH SYNOPSIS .nf #include <libsimple.h> @@ -22,6 +23,7 @@ static inline void *libsimple_ealigned_allocz(int \fIclear\fP, size_t \fIalignme .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_aligned_allocz (), @@ -69,6 +71,7 @@ and functions behaviour is unspecified if .I n is 0. + .SH RETURN VALUE The .BR libsimple_aligned_allocz (), @@ -87,6 +90,7 @@ it indicate the error, and the and .BR libsimple_ealigned_allocz () functions terminated the process. + .SH ERRORS The .BR libsimple_aligned_allocz () @@ -113,6 +117,7 @@ The and .BR libsimple_ealigned_allocz () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -143,18 +148,25 @@ T{ .BR libsimple_ealigned_allocz () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -163,7 +175,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_aligned_memdup.3 b/man3/libsimple_aligned_memdup.3 index 6cd287a..cff094d 100644 --- a/man3/libsimple_aligned_memdup.3 +++ b/man3/libsimple_aligned_memdup.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_ALIGNED_MEMDUP 3 2018-10-27 libsimple +.TH LIBSIMPLE_ALIGNED_MEMDUP 3 libsimple .SH NAME libsimple_aligned_memdup, libsimple_aligned_memdupa \- duplicate bytes in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -26,10 +27,11 @@ static inline void *libsimple_ealigned_memdup(const void *\fIs\fP, size_t \fIali .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_aligned_memdup () -function constructs allocates memory with the alignment +function allocates memory with the alignment specified in the .I alignment parameter and copies @@ -60,6 +62,7 @@ function that uses allocates the memory on the stack rather than on the heap, causing the return pointer to become invalid when the calling function returns. It is only available when compling with GCC or Clang. + .SH RETURN VALUE Upon successful completion, the .BR libsimple_aligned_memdupa (), @@ -90,12 +93,14 @@ by the .BR libsimple_aligned_memdupa () function, it is automatically deallocated when the calling function returns. + .SH ERRORS The .BR libsimple_aligned_memdup () function may fail for any reason specified for the .BR aligned_alloc (3) function. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -132,21 +137,29 @@ T{ .BR libsimple_ealigned_memdup (), T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memdup (3), -.BR libsimple_enstrndup (3), -.BR libsimple_enstrdup (3), -.BR strndup (3), -.BR strdup (3) +.BR libsimple_aligned_strndup (3), +.BR libsimple_aligned_strdup (3), +.BR libsimple_aligned_wcsdup (3), +.BR libsimple_aligned_wcsndup (3), +.BR libsimple_aligned_wmemdup (3) diff --git a/man3/libsimple_aligned_realloc.3 b/man3/libsimple_aligned_realloc.3 new file mode 100644 index 0000000..1845408 --- /dev/null +++ b/man3/libsimple_aligned_realloc.3 @@ -0,0 +1,212 @@ +.TH LIBSIMPLE_ALIGNED_REALLOC 3 libsimple +.SH NAME +libsimple_aligned_realloc \- reallocate memory and customise alignment + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +static inline void *libsimple_aligned_realloc(void *\fIptr\fP, size_t \fIalignment\fP, size_t \fIn\fP); +void *libsimple_enaligned_realloc(int \fIstatus\fP, void *\fIptr\fP, size_t \fIalignment\fP, size_t \fIn\fP); +static inline void *libsimple_ealigned_realloc(void *\fIptr\fP, size_t \fIalignment\fP, size_t \fIn\fP); + +#ifndef aligned_realloc +# define aligned_realloc libsimple_aligned_realloc +#endif +#ifndef enaligned_realloc +# define enaligned_realloc libsimple_enaligned_realloc +#endif +#ifndef ealigned_realloc +# define ealigned_realloc libsimple_ealigned_realloc +#endif +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_aligned_realloc (), +.BR libsimple_enaligned_realloc (), +and +.BR libsimple_ealigned_realloc () +functions reallocate memory allocated on +the heap and return the older pointer or a new +pointer with the alignment of +.I alignment +to the allocated memory of +.I n +bytes. The behaviour is unspecified if +.I n +is 0. The returned pointer will contain the +same content as +.IR ptr , +but truncated to +.I n +bytes if it is smaller or with the new bytes +unitialised if it is larger. If a new pointer +is returned, rather than +.IR ptr , +.I ptr +is deallocated; +.I ptr +is not deallocated on failure. The function +.BR free (3) +shall be called with the returned pointer as +input when the allocated memory is no longer needed. +.PP +The +.BR libsimple_enaligned_realloc () +and +.BR libsimple_ealigned_realloc () +functions will terminate the process if the memory +cannot be allocated, by calling the +.BR libsimple_enprintf () +and +.BR libsimple_eprintf () +functions, respectively. +On failure, the process's exit value will be +.I status +if the +.BR libsimple_enaligned_realloc () +function is used or +.IR libsimple_default_failure_exit (3) +if the +.BR libsimple_ealigned_realloc () +function is used. + +.SH RETURN VALUE +The +.BR libsimple_aligned_realloc (), +.BR libsimple_enaligned_realloc (), +and +.BR libsimple_ealigned_realloc () +functions return a pointer to the allocated memory +upon success completion; otherwise the +.BR libsimple_aligned_realloc () +function returns +.B NULL +and set +.I errno +it indicate the error, and the +.BR libsimple_enaligned_realloc () +and +.BR libsimple_ealigned_realloc () +functions terminated the process. + +.SH ERRORS +The +.BR libsimple_aligned_realloc () +function will fail for the reasons specified for the +.BR realloc (3) +function, and if: +.TP +.B EINVAL +.I alignment +is an invalid alignment (usually it needs to be an power of 2). +.TP +.B ENOSYS +The function is not implemented. The function requires +non-standard libc functions, and is therefore not supported +for all libc implementations. + +The function is implemented if and only if the macro +.B LIBSIMPLE_HAVE_ALIGNED_REALLOC +is defined by the library. +.PP +The +.BR libsimple_enaligned_realloc () +and +.BR libsimple_ealigned_realloc () +functions will terminate the process on failure. + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_aligned_realloc (), +.br +.BR libsimple_enaligned_realloc (), +.br +.BR libsimple_ealigned_realloc () +T} Thread safety MT-Safe +T{ +.BR libsimple_aligned_realloc (), +.br +.BR libsimple_enaligned_realloc (), +.br +.BR libsimple_ealigned_realloc () +T} Async-signal safety AS-Safe +T{ +.BR libsimple_aligned_realloc (), +.br +.BR libsimple_enaligned_realloc (), +.br +.BR libsimple_ealigned_realloc () +T} Async-cancel safety AC-Safe +.TE + +.SH EXAMPLES +None. + +.SH APPLICATION USAGE +None. + +.SH RATIONALE +None. + +.SH FUTURE DIRECTIONS +None. + +.SH NOTES +None. + +.SH BUGS +None. + +.SH SEE ALSO +.BR libsimple_enmalloc (3), +.BR libsimple_mallocz (3), +.BR libsimple_vmallocn (3), +.BR libsimple_vmalloczn (3), +.BR libsimple_encalloc (3), +.BR libsimple_vcallocn (3), +.BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), +.BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), +.BR libsimple_memalign (3), +.BR libsimple_memalignz (3), +.BR libsimple_vmemalignn (3), +.BR libsimple_vmemalignzn (3), +.BR libsimple_enposix_memalign (3), +.BR libsimple_posix_memalignz (3), +.BR libsimple_vposix_memalignn (3), +.BR libsimple_vposix_memalignzn (3), +.BR libsimple_enaligned_alloc (3), +.BR libsimple_aligned_allocz (3), +.BR libsimple_valigned_allocn (3), +.BR libsimple_valigned_alloczn (3), +.BR libsimple_pvalloc (3), +.BR libsimple_pvallocz (3), +.BR libsimple_vpvallocn (3), +.BR libsimple_vpvalloczn (3), +.BR libsimple_valloc (3), +.BR libsimple_vallocz (3), +.BR libsimple_vvallocn (3), +.BR libsimple_vvalloczn (3), +.BR libsimple_vmemalloc (3), +.BR libsimple_varrayalloc (3), +.BR malloc (3) diff --git a/man3/libsimple_aligned_reallocarray.3 b/man3/libsimple_aligned_reallocarray.3 new file mode 100644 index 0000000..e056c72 --- /dev/null +++ b/man3/libsimple_aligned_reallocarray.3 @@ -0,0 +1,214 @@ +.TH LIBSIMPLE_ALIGNED_REALLOCARRAY 3 libsimple +.SH NAME +libsimple_aligned_reallocarray \- reallocate memory and customise alignment + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +static inline void *libsimple_aligned_reallocarray(void *\fIptr\fP, size_t \fIalignment\fP, size_t \fIn\fP, size_t \fIm\fP); +void *libsimple_enaligned_reallocarray(int \fIstatus\fP, void *\fIptr\fP, size_t \fIalignment\fP, size_t \fIn\fP, size_t \fIm\fP); +static inline void *libsimple_ealigned_reallocarray(void *\fIptr\fP, size_t \fIalignment\fP, size_t \fIn\fP, size_t \fIm\fP); + +#ifndef aligned_reallocarray +# define aligned_reallocarray libsimple_aligned_reallocarray +#endif +#ifndef enaligned_reallocarray +# define enaligned_reallocarray libsimple_enaligned_reallocarray +#endif +#ifndef ealigned_reallocarray +# define ealigned_reallocarray libsimple_ealigned_reallocarray +#endif +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_aligned_reallocarray (), +.BR libsimple_enaligned_reallocarray (), +and +.BR libsimple_ealigned_reallocarray () +functions reallocate memory allocated on +the heap and return the older pointer or a new +pointer with the alignment of +.I alignment +to the allocated memory of +.I n*m +bytes. The behaviour is unspecified if +.I n +or +.I m +is 0. The returned pointer will contain the +same content as +.IR ptr , +but truncated to +.I n*m +bytes if it is smaller or with the new bytes +unitialised if it is larger. If a new pointer +is returned, rather than +.IR ptr , +.I ptr +is deallocated; +.I ptr +is not deallocated on failure. The function +.BR free (3) +shall be called with the returned pointer as +input when the allocated memory is no longer needed. +.PP +The +.BR libsimple_enaligned_reallocarray () +and +.BR libsimple_ealigned_reallocarray () +functions will terminate the process if the memory +cannot be allocated, by calling the +.BR libsimple_enprintf () +and +.BR libsimple_eprintf () +functions, respectively. +On failure, the process's exit value will be +.I status +if the +.BR libsimple_enaligned_reallocarray () +function is used or +.IR libsimple_default_failure_exit (3) +if the +.BR libsimple_ealigned_reallocarray () +function is used. + +.SH RETURN VALUE +The +.BR libsimple_aligned_reallocarray (), +.BR libsimple_enaligned_reallocarray (), +and +.BR libsimple_ealigned_reallocarray () +functions return a pointer to the allocated memory +upon success completion; otherwise the +.BR libsimple_aligned_reallocarray () +function returns +.B NULL +and set +.I errno +it indicate the error, and the +.BR libsimple_enaligned_reallocarray () +and +.BR libsimple_ealigned_reallocarray () +functions terminated the process. + +.SH ERRORS +The +.BR libsimple_aligned_reallocarray () +function will fail for the reasons specified for the +.BR realloc (3) +function, and if: +.TP +.B EINVAL +.I alignment +is an invalid alignment (usually it needs to be an power of 2). +.TP +.B ENOSYS +The function is not implemented. The function requires +non-standard libc functions, and is therefore not supported +for all libc implementations. + +The function is implemented if and only if the macro +.B LIBSIMPLE_HAVE_ALIGNED_REALLOC +is defined by the library. +.PP +The +.BR libsimple_enaligned_reallocarray () +and +.BR libsimple_ealigned_reallocarray () +functions will terminate the process on failure. + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_aligned_reallocarray (), +.br +.BR libsimple_enaligned_reallocarray (), +.br +.BR libsimple_ealigned_reallocarray () +T} Thread safety MT-Safe +T{ +.BR libsimple_aligned_reallocarray (), +.br +.BR libsimple_enaligned_reallocarray (), +.br +.BR libsimple_ealigned_reallocarray () +T} Async-signal safety AS-Safe +T{ +.BR libsimple_aligned_reallocarray (), +.br +.BR libsimple_enaligned_reallocarray (), +.br +.BR libsimple_ealigned_reallocarray () +T} Async-cancel safety AC-Safe +.TE + +.SH EXAMPLES +None. + +.SH APPLICATION USAGE +None. + +.SH RATIONALE +None. + +.SH FUTURE DIRECTIONS +None. + +.SH NOTES +None. + +.SH BUGS +None. + +.SH SEE ALSO +.BR libsimple_enmalloc (3), +.BR libsimple_mallocz (3), +.BR libsimple_vmallocn (3), +.BR libsimple_vmalloczn (3), +.BR libsimple_encalloc (3), +.BR libsimple_vcallocn (3), +.BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), +.BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), +.BR libsimple_memalign (3), +.BR libsimple_memalignz (3), +.BR libsimple_vmemalignn (3), +.BR libsimple_vmemalignzn (3), +.BR libsimple_enposix_memalign (3), +.BR libsimple_posix_memalignz (3), +.BR libsimple_vposix_memalignn (3), +.BR libsimple_vposix_memalignzn (3), +.BR libsimple_enaligned_alloc (3), +.BR libsimple_aligned_allocz (3), +.BR libsimple_valigned_allocn (3), +.BR libsimple_valigned_alloczn (3), +.BR libsimple_pvalloc (3), +.BR libsimple_pvallocz (3), +.BR libsimple_vpvallocn (3), +.BR libsimple_vpvalloczn (3), +.BR libsimple_valloc (3), +.BR libsimple_vallocz (3), +.BR libsimple_vvallocn (3), +.BR libsimple_vvalloczn (3), +.BR libsimple_vmemalloc (3), +.BR libsimple_varrayalloc (3), +.BR malloc (3) diff --git a/man3/libsimple_aligned_reallocarrayf.3 b/man3/libsimple_aligned_reallocarrayf.3 new file mode 100644 index 0000000..998d49a --- /dev/null +++ b/man3/libsimple_aligned_reallocarrayf.3 @@ -0,0 +1,166 @@ +.TH LIBSIMPLE_ALIGNED_REALLOCARRAYF 3 libsimple +.SH NAME +libsimple_aligned_reallocarrayf \- reallocate memory and customise alignment + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +static inline void *libsimple_aligned_reallocarrayf(void *\fIptr\fP, size_t \fIalignment\fP, size_t \fIn\fP, size_t \fIm\fP); + +#ifndef aligned_reallocarrayf +# define aligned_reallocarrayf libsimple_aligned_reallocarrayf +#endif +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_aligned_reallocarrayf () +function reallocates memory allocated on +the heap and return the older pointer or a new +pointer with the alignment of +.I alignment +to the allocated memory of +.I n*m +bytes. The returned pointer will contain the +same content as +.IR ptr , +but truncated to +.I n*m +bytes if it is smaller or with the new bytes +unitialised if it is larger. If a new pointer +is returned, rather than +.IR ptr , +.I ptr +is deallocated; +.I ptr +is deallocated on failure. The function +.BR free (3) +shall be called with the returned pointer as +input when the allocated memory is no longer needed. +.PP +If +.I n +or +.I m +is 0, +.I ptr +is deallocaed and +.B NULL +is returned, however portable applications should, +unless the namespaced alias is used, assume the +behaviour is unspecifed in this case. + +.SH RETURN VALUE +The +.BR libsimple_aligned_reallocarrayf (), +function returns a pointer to the allocated memory +upon success completion; otherwise the +.BR libsimple_aligned_reallocarrayf () +function returns +.B NULL +and set +.I errno +it indicate the error. + +.SH ERRORS +The +.BR libsimple_aligned_reallocarrayf () +function will fail for the reasons specified for the +.BR realloc (3) +function, and if: +.TP +.B EINVAL +.I alignment +is an invalid alignment (usually it needs to be an power of 2). +.TP +.B ENOSYS +The function is not implemented. The function requires +non-standard libc functions, and is therefore not supported +for all libc implementations. + +The function is implemented if and only if the macro +.B LIBSIMPLE_HAVE_ALIGNED_REALLOC +is defined by the library. + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_aligned_reallocarrayf () +T} Thread safety MT-Safe +T{ +.BR libsimple_aligned_reallocarrayf () +T} Async-signal safety AS-Safe +T{ +.BR libsimple_aligned_reallocarrayf () +T} Async-cancel safety AC-Safe +.TE + +.SH EXAMPLES +None. + +.SH APPLICATION USAGE +None. + +.SH RATIONALE +None. + +.SH FUTURE DIRECTIONS +None. + +.SH NOTES +None. + +.SH BUGS +None. + +.SH SEE ALSO +.BR libsimple_enmalloc (3), +.BR libsimple_mallocz (3), +.BR libsimple_vmallocn (3), +.BR libsimple_vmalloczn (3), +.BR libsimple_encalloc (3), +.BR libsimple_vcallocn (3), +.BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), +.BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_vreallocfn (3), +.BR libsimple_memalign (3), +.BR libsimple_memalignz (3), +.BR libsimple_vmemalignn (3), +.BR libsimple_vmemalignzn (3), +.BR libsimple_enposix_memalign (3), +.BR libsimple_posix_memalignz (3), +.BR libsimple_vposix_memalignn (3), +.BR libsimple_vposix_memalignzn (3), +.BR libsimple_enaligned_alloc (3), +.BR libsimple_aligned_allocz (3), +.BR libsimple_valigned_allocn (3), +.BR libsimple_valigned_alloczn (3), +.BR libsimple_pvalloc (3), +.BR libsimple_pvallocz (3), +.BR libsimple_vpvallocn (3), +.BR libsimple_vpvalloczn (3), +.BR libsimple_valloc (3), +.BR libsimple_vallocz (3), +.BR libsimple_vvallocn (3), +.BR libsimple_vvalloczn (3), +.BR libsimple_vmemalloc (3), +.BR libsimple_varrayalloc (3), +.BR malloc (3) diff --git a/man3/libsimple_aligned_reallocf.3 b/man3/libsimple_aligned_reallocf.3 new file mode 100644 index 0000000..97d6dff --- /dev/null +++ b/man3/libsimple_aligned_reallocf.3 @@ -0,0 +1,164 @@ +.TH LIBSIMPLE_ALIGNED_REALLOCF 3 libsimple +.SH NAME +libsimple_aligned_reallocf \- reallocate memory and customise alignment + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +static inline void *libsimple_aligned_reallocf(void *\fIptr\fP, size_t \fIalignment\fP, size_t \fIn\fP); + +#ifndef aligned_reallocf +# define aligned_reallocf libsimple_aligned_reallocf +#endif +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_aligned_reallocf () +function reallocates memory allocated on +the heap and return the older pointer or a new +pointer with the alignment of +.I alignment +to the allocated memory of +.I n +bytes. The returned pointer will contain the +same content as +.IR ptr , +but truncated to +.I n +bytes if it is smaller or with the new bytes +unitialised if it is larger. If a new pointer +is returned, rather than +.IR ptr , +.I ptr +is deallocated; +.I ptr +is deallocated on failure. The function +.BR free (3) +shall be called with the returned pointer as +input when the allocated memory is no longer needed. +.PP +If +.I n +is 0, +.I ptr +is deallocaed and +.B NULL +is returned, however portable applications should, +unless the namespaced alias is used, assume the +behaviour is unspecifed in this case. + +.SH RETURN VALUE +The +.BR libsimple_aligned_reallocf (), +function returns a pointer to the allocated memory +upon success completion; otherwise the +.BR libsimple_aligned_reallocf () +function returns +.B NULL +and set +.I errno +it indicate the error. + +.SH ERRORS +The +.BR libsimple_aligned_reallocf () +function will fail for the reasons specified for the +.BR realloc (3) +function, and if: +.TP +.B EINVAL +.I alignment +is an invalid alignment (usually it needs to be an power of 2). +.TP +.B ENOSYS +The function is not implemented. The function requires +non-standard libc functions, and is therefore not supported +for all libc implementations. + +The function is implemented if and only if the macro +.B LIBSIMPLE_HAVE_ALIGNED_REALLOC +is defined by the library. + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_aligned_reallocf () +T} Thread safety MT-Safe +T{ +.BR libsimple_aligned_reallocf () +T} Async-signal safety AS-Safe +T{ +.BR libsimple_aligned_reallocf () +T} Async-cancel safety AC-Safe +.TE + +.SH EXAMPLES +None. + +.SH APPLICATION USAGE +None. + +.SH RATIONALE +None. + +.SH FUTURE DIRECTIONS +None. + +.SH NOTES +None. + +.SH BUGS +None. + +.SH SEE ALSO +.BR libsimple_enmalloc (3), +.BR libsimple_mallocz (3), +.BR libsimple_vmallocn (3), +.BR libsimple_vmalloczn (3), +.BR libsimple_encalloc (3), +.BR libsimple_vcallocn (3), +.BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), +.BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), +.BR libsimple_memalign (3), +.BR libsimple_memalignz (3), +.BR libsimple_vmemalignn (3), +.BR libsimple_vmemalignzn (3), +.BR libsimple_enposix_memalign (3), +.BR libsimple_posix_memalignz (3), +.BR libsimple_vposix_memalignn (3), +.BR libsimple_vposix_memalignzn (3), +.BR libsimple_enaligned_alloc (3), +.BR libsimple_aligned_allocz (3), +.BR libsimple_valigned_allocn (3), +.BR libsimple_valigned_alloczn (3), +.BR libsimple_pvalloc (3), +.BR libsimple_pvallocz (3), +.BR libsimple_vpvallocn (3), +.BR libsimple_vpvalloczn (3), +.BR libsimple_valloc (3), +.BR libsimple_vallocz (3), +.BR libsimple_vvallocn (3), +.BR libsimple_vvalloczn (3), +.BR libsimple_vmemalloc (3), +.BR libsimple_varrayalloc (3), +.BR malloc (3) diff --git a/man3/libsimple_aligned_reallocfn.3 b/man3/libsimple_aligned_reallocfn.3 new file mode 120000 index 0000000..1ba44a5 --- /dev/null +++ b/man3/libsimple_aligned_reallocfn.3 @@ -0,0 +1 @@ +libsimple_valigned_reallocfn.3
\ No newline at end of file diff --git a/man3/libsimple_aligned_reallocn.3 b/man3/libsimple_aligned_reallocn.3 new file mode 120000 index 0000000..7c3a84f --- /dev/null +++ b/man3/libsimple_aligned_reallocn.3 @@ -0,0 +1 @@ +libsimple_valigned_reallocn.3
\ No newline at end of file diff --git a/man3/libsimple_aligned_strdup.3 b/man3/libsimple_aligned_strdup.3 new file mode 100644 index 0000000..1570e68 --- /dev/null +++ b/man3/libsimple_aligned_strdup.3 @@ -0,0 +1,163 @@ +.TH LIBSIMPLE_ALIGNED_STRDUP 3 libsimple +.SH NAME +libsimple_aligned_strdup, libsimple_aligned_strdupa \- duplicate a string + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +char *libsimple_aligned_strdupa(const char *\fIs\fP, size_t \fIn\fP); +char *libsimple_aligned_strdup(const char *\fIs\fP, size_t \fIn\fP); +char *libsimple_enaligned_strdup(int \fIstatus\fP, const char *\fIs\fP, size_t \fIn\fP); +static inline char *libsimple_ealigned_strdup(const char *\fIs\fP, size_t \fIn\fP); + +#ifndef aligned_strdupa +# define aligned_strdupa libsimple_aligned_strdupa +#endif +#ifndef aligned_strdup +# define aligned_strdup libsimple_aligned_strdup +#endif +#ifndef enaligned_strdup +# define enaligned_strdup libsimple_enaligned_strdup +#endif +#ifndef ealigned_strdup +# define ealigned_strdup libsimple_ealigned_strdup +#endif +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_aligned_strdup () +function allocates memory with the alignment +specified in the +.I alignment +parameter and copies the string +.I s +into the new allocation. +.PP +The +.BR libsimple_enaligned_strdup () +and +.BR libsimple_ealigned_strdup () +functions are versions of the +.BR libsimple_aligned_strdup () +function that call the +.BR libsimple_enprintf (3) +function on failure, causing the process to print +an error message and exit. See +.BR libsimple_enprintf (3) +for more information. +.PP +The +.BR libsimple_strdupa () +function is implemented as a macro and is a version +of the +.BR libsimple_strdup () +function that uses allocates the memory on the stack +rather than on the heap, causing the return pointer +to become invalid when the calling function returns. +It is only available when compling with GCC or Clang. + +.SH RETURN VALUE +Upon successful completion, the +.BR libsimple_aligned_strdupa (), +.BR libsimple_aligned_strdup (), +.BR libsimple_enaligned_strdup (), +and +.BR libsimple_ealigned_strdup () +functions return a non-null pointer, on failure the +.BR libsimple_aligned_strdup () +function returns +.B NULL +and set +.I errno +to indicate the error, and the +.BR libsimple_enaligned_strdup (), +and +.BR libsimple_ealigned_strdup () +functions exit the process. The +.BR libsimple_aligned_strdupa () +function cannot fail, however the kernel +can kill the thread, and possibly the process, with a +.B SIGSEGV +signal if the memory cannot be allocated. +.PP +The returned pointer should be deallocated when it +is no longer needed, except for the pointer returned +by the +.BR libsimple_aligned_strdupa () +function, it is automatically deallocated when the +calling function returns. + +.SH ERRORS +The +.BR libsimple_aligned_strdup () +function may fail for any reason specified for the +.BR aligned_alloc (3) +function. + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_aligned_strdupa (), +.br +.BR libsimple_aligned_strdup (), +.br +.BR libsimple_enaligned_strdup (), +.br +.BR libsimple_ealigned_strdup (), +T} Thread safety MT-Safe +T{ +.BR libsimple_aligned_strdupa (), +.br +.BR libsimple_aligned_strdup (), +.br +.BR libsimple_enaligned_strdup (), +.br +.BR libsimple_ealigned_strdup (), +T} Async-signal safety AS-Safe +T{ +.BR libsimple_aligned_strdupa (), +.br +.BR libsimple_aligned_strdup (), +.br +.BR libsimple_enaligned_strdup (), +.br +.BR libsimple_ealigned_strdup (), +T} Async-cancel safety AC-Safe +.TE + +.SH EXAMPLES +None. + +.SH APPLICATION USAGE +None. + +.SH RATIONALE +None. + +.SH FUTURE DIRECTIONS +None. + +.SH NOTES +None. + +.SH BUGS +None. + +.SH SEE ALSO +.BR libsimple_aligned_strndup (3), +.BR libsimple_aligned_memdup (3), +.BR libsimple_aligned_wcsdup (3), +.BR libsimple_aligned_wcsndup (3), +.BR libsimple_aligned_wmemdup (3), +.BR strdup (3) diff --git a/man3/libsimple_aligned_strdupa.3 b/man3/libsimple_aligned_strdupa.3 new file mode 120000 index 0000000..005dc6f --- /dev/null +++ b/man3/libsimple_aligned_strdupa.3 @@ -0,0 +1 @@ +libsimple_aligned_strdup.3
\ No newline at end of file diff --git a/man3/libsimple_aligned_strndup.3 b/man3/libsimple_aligned_strndup.3 new file mode 100644 index 0000000..05c6d3a --- /dev/null +++ b/man3/libsimple_aligned_strndup.3 @@ -0,0 +1,166 @@ +.TH LIBSIMPLE_ALIGNED_STRNDUP 3 libsimple +.SH NAME +libsimple_aligned_strndup, libsimple_aligned_strndupa \- duplicate a string + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +char *libsimple_aligned_strndupa(const char *\fIs\fP, size_t \fIalignment\fP, size_t \fIn\fP); +char *libsimple_aligned_strndup(const char *\fIs\fP, size_t \fIalignment\fP, size_t \fIn\fP); +char *libsimple_enaligned_strndup(int \fIstatus\fP, const char *\fIs\fP, size_t \fIalignment\fP, size_t \fIn\fP); +static inline char *libsimple_ealigned_strndup(const char *\fIs\fP, size_t \fIalignment\fP, size_t \fIn\fP); + +#ifndef aligned_strndupa +# define aligned_strndupa libsimple_aligned_strndupa +#endif +#ifndef aligned_strndup +# define aligned_strndup libsimple_aligned_strndup +#endif +#ifndef enaligned_strndup +# define enaligned_strndup libsimple_enaligned_strndup +#endif +#ifndef ealigned_strndup +# define ealigned_strndup libsimple_ealigned_strndup +#endif +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_aligned_strndup () +function allocates memory with the alignment +specified in the +.I alignment +parameter and copies the string +.I s +into the new allocation, up to the +.IR n th +byte. A NUL byte will always be written +to the end of the new string. +.PP +The +.BR libsimple_enaligned_strndup () +and +.BR libsimple_ealigned_strndup () +functions are versions of the +.BR libsimple_aligned_strndup () +function that call the +.BR libsimple_enprintf (3) +function on failure, causing the process to print +an error message and exit. See +.BR libsimple_enprintf (3) +for more information. +.PP +The +.BR libsimple_strndupa () +function is implemented as a macro and is a version +of the +.BR libsimple_strndup () +function that uses allocates the memory on the stack +rather than on the heap, causing the return pointer +to become invalid when the calling function returns. +It is only available when compling with GCC or Clang. + +.SH RETURN VALUE +Upon successful completion, the +.BR libsimple_aligned_strndupa (), +.BR libsimple_aligned_strndup (), +.BR libsimple_enaligned_strndup (), +and +.BR libsimple_ealigned_strndup () +functions return a non-null pointer, on failure the +.BR libsimple_aligned_strndup () +function returns +.B NULL +and set +.I errno +to indicate the error, and the +.BR libsimple_enaligned_strndup (), +and +.BR libsimple_ealigned_strndup () +functions exit the process. The +.BR libsimple_aligned_strndupa () +function cannot fail, however the kernel +can kill the thread, and possibly the process, with a +.B SIGSEGV +signal if the memory cannot be allocated. +.PP +The returned pointer should be deallocated when it +is no longer needed, except for the pointer returned +by the +.BR libsimple_aligned_strndupa () +function, it is automatically deallocated when the +calling function returns. + +.SH ERRORS +The +.BR libsimple_aligned_strndup () +function may fail for any reason specified for the +.BR aligned_alloc (3) +function. + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_aligned_strndupa (), +.br +.BR libsimple_aligned_strndup (), +.br +.BR libsimple_enaligned_strndup (), +.br +.BR libsimple_ealigned_strndup (), +T} Thread safety MT-Safe +T{ +.BR libsimple_aligned_strndupa (), +.br +.BR libsimple_aligned_strndup (), +.br +.BR libsimple_enaligned_strndup (), +.br +.BR libsimple_ealigned_strndup (), +T} Async-signal safety AS-Safe +T{ +.BR libsimple_aligned_strndupa (), +.br +.BR libsimple_aligned_strndup (), +.br +.BR libsimple_enaligned_strndup (), +.br +.BR libsimple_ealigned_strndup (), +T} Async-cancel safety AC-Safe +.TE + +.SH EXAMPLES +None. + +.SH APPLICATION USAGE +None. + +.SH RATIONALE +None. + +.SH FUTURE DIRECTIONS +None. + +.SH NOTES +None. + +.SH BUGS +None. + +.SH SEE ALSO +.BR libsimple_aligned_strdup (3), +.BR libsimple_aligned_memdup (3), +.BR libsimple_aligned_wcsdup (3), +.BR libsimple_aligned_wcsndup (3), +.BR libsimple_aligned_wmemdup (3), +.BR strndup (3) diff --git a/man3/libsimple_aligned_strndupa.3 b/man3/libsimple_aligned_strndupa.3 new file mode 120000 index 0000000..4be204c --- /dev/null +++ b/man3/libsimple_aligned_strndupa.3 @@ -0,0 +1 @@ +libsimple_aligned_strndup.3
\ No newline at end of file diff --git a/man3/libsimple_aligned_wcsdup.3 b/man3/libsimple_aligned_wcsdup.3 new file mode 100644 index 0000000..42f9cd9 --- /dev/null +++ b/man3/libsimple_aligned_wcsdup.3 @@ -0,0 +1,163 @@ +.TH LIBSIMPLE_ALIGNED_WCSDUP 3 libsimple +.SH NAME +libsimple_aligned_wcsdup, libsimple_aligned_wcsdupa \- duplicate a wide-character string + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +wchar_t *libsimple_aligned_wcsdupa(const wchar_t *\fIs\fP, size_t \fIalignment\fP); +wchar_t *libsimple_aligned_wcsdup(const wchar_t *\fIs\fP, size_t \fIalignment\fP); +wchar_t *libsimple_enaligned_wcsdup(int \fIstatus\fP, const wchar_t *\fIs\fP, size_t \fIalignment\fP); +static inline wchar_t *libsimple_ealigned_wcsdup(const wchar_t *\fIs\fP, size_t \fIalignment\fP); + +#ifndef aligned_wcsdupa +# define aligned_wcsdupa libsimple_aligned_wcsdupa +#endif +#ifndef aligned_wcsdup +# define aligned_wcsdup libsimple_aligned_wcsdup +#endif +#ifndef enaligned_wcsdup +# define enaligned_wcsdup libsimple_enaligned_wcsdup +#endif +#ifndef ealigned_wcsdup +# define ealigned_wcsdup libsimple_ealigned_wcsdup +#endif +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_aligned_wcsdup () +function allocates memory with the alignment +specified in the +.I alignment +parameter and copies the wide-character string +.I s +into the new allocation. +.PP +The +.BR libsimple_enaligned_wcsdup () +and +.BR libsimple_ealigned_wcsdup () +functions are versions of the +.BR libsimple_aligned_wcsdup () +function that call the +.BR libsimple_enprintf (3) +function on failure, causing the process to print +an error message and exit. See +.BR libsimple_enprintf (3) +for more information. +.PP +The +.BR libsimple_wcsdupa () +function is implemented as a macro and is a version +of the +.BR libsimple_wcsdup () +function that uses allocates the memory on the stack +rather than on the heap, causing the return pointer +to become invalid when the calling function returns. +It is only available when compling with GCC or Clang. + +.SH RETURN VALUE +Upon successful completion, the +.BR libsimple_aligned_wcsdupa (), +.BR libsimple_aligned_wcsdup (), +.BR libsimple_enaligned_wcsdup (), +and +.BR libsimple_ealigned_wcsdup () +functions return a non-null pointer, on failure the +.BR libsimple_aligned_wcsdup () +function returns +.B NULL +and set +.I errno +to indicate the error, and the +.BR libsimple_enaligned_wcsdup (), +and +.BR libsimple_ealigned_wcsdup () +functions exit the process. The +.BR libsimple_aligned_wcsdupa () +function cannot fail, however the kernel +can kill the thread, and possibly the process, with a +.B SIGSEGV +signal if the memory cannot be allocated. +.PP +The returned pointer should be deallocated when it +is no longer needed, except for the pointer returned +by the +.BR libsimple_aligned_wcsdupa () +function, it is automatically deallocated when the +calling function returns. + +.SH ERRORS +The +.BR libsimple_aligned_wcsdup () +function may fail for any reason specified for the +.BR aligned_alloc (3) +function. + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_aligned_wcsdupa (), +.br +.BR libsimple_aligned_wcsdup (), +.br +.BR libsimple_enaligned_wcsdup (), +.br +.BR libsimple_ealigned_wcsdup (), +T} Thread safety MT-Safe +T{ +.BR libsimple_aligned_wcsdupa (), +.br +.BR libsimple_aligned_wcsdup (), +.br +.BR libsimple_enaligned_wcsdup (), +.br +.BR libsimple_ealigned_wcsdup (), +T} Async-signal safety AS-Safe +T{ +.BR libsimple_aligned_wcsdupa (), +.br +.BR libsimple_aligned_wcsdup (), +.br +.BR libsimple_enaligned_wcsdup (), +.br +.BR libsimple_ealigned_wcsdup (), +T} Async-cancel safety AC-Safe +.TE + +.SH EXAMPLES +None. + +.SH APPLICATION USAGE +None. + +.SH RATIONALE +None. + +.SH FUTURE DIRECTIONS +None. + +.SH NOTES +None. + +.SH BUGS +None. + +.SH SEE ALSO +.BR libsimple_aligned_strndup (3), +.BR libsimple_aligned_strdup (3), +.BR libsimple_aligned_memdup (3), +.BR libsimple_aligned_wcsndup (3), +.BR libsimple_aligned_wmemdup (3), +.BR wcsdup (3) diff --git a/man3/libsimple_aligned_wcsdupa.3 b/man3/libsimple_aligned_wcsdupa.3 new file mode 120000 index 0000000..cb194a0 --- /dev/null +++ b/man3/libsimple_aligned_wcsdupa.3 @@ -0,0 +1 @@ +libsimple_aligned_wcsdup.3
\ No newline at end of file diff --git a/man3/libsimple_aligned_wcsndup.3 b/man3/libsimple_aligned_wcsndup.3 new file mode 100644 index 0000000..669b790 --- /dev/null +++ b/man3/libsimple_aligned_wcsndup.3 @@ -0,0 +1,168 @@ +.TH LIBSIMPLE_ALIGNED_WCSNDUP 3 libsimple +.SH NAME +libsimple_aligned_wcsndup, libsimple_aligned_wcsndupa \- duplicate a wide-character string + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +wchar_t *libsimple_aligned_wcsndupa(const wchar_t *\fIs\fP, size_t \fIalignment\fP, size_t \fIn\fP); +wchar_t *libsimple_aligned_wcsndup(const wchar_t *\fIs\fP, size_t \fIalignment\fP, size_t \fIn\fP); +wchar_t *libsimple_enaligned_wcsndup(int \fIstatus\fP, const wchar_t *\fIs\fP, size_t \fIalignment\fP, size_t \fIn\fP); +static inline wchar_t *libsimple_ealigned_wcsndup(const wchar_t *\fIs\fP, size_t \fIalignment\fP, size_t \fIn\fP); + +#ifndef aligned_wcsndupa +# define aligned_wcsndupa libsimple_aligned_wcsndupa +#endif +#ifndef aligned_wcsndup +# define aligned_wcsndup libsimple_aligned_wcsndup +#endif +#ifndef enaligned_wcsndup +# define enaligned_wcsndup libsimple_enaligned_wcsndup +#endif +#ifndef ealigned_wcsndup +# define ealigned_wcsndup libsimple_ealigned_wcsndup +#endif +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_aligned_wcsndup () +function allocates memory with the alignment +specified in the +.I alignment +parameter and copies the wide-character string +.I s +into the new allocation, up to the +.IR n th +wide character +.RB ( wchar_t ). +A NUL wide-character will always be written +to the end of the new string. +.PP +The +.BR libsimple_enaligned_wcsndup () +and +.BR libsimple_ealigned_wcsndup () +functions are versions of the +.BR libsimple_aligned_wcsndup () +function that call the +.BR libsimple_enprintf (3) +function on failure, causing the process to print +an error message and exit. See +.BR libsimple_enprintf (3) +for more information. +.PP +The +.BR libsimple_wcsndupa () +function is implemented as a macro and is a version +of the +.BR libsimple_wcsndup () +function that uses allocates the memory on the stack +rather than on the heap, causing the return pointer +to become invalid when the calling function returns. +It is only available when compling with GCC or Clang. + +.SH RETURN VALUE +Upon successful completion, the +.BR libsimple_aligned_wcsndupa (), +.BR libsimple_aligned_wcsndup (), +.BR libsimple_enaligned_wcsndup (), +and +.BR libsimple_ealigned_wcsndup () +functions return a non-null pointer, on failure the +.BR libsimple_aligned_wcsndup () +function returns +.B NULL +and set +.I errno +to indicate the error, and the +.BR libsimple_enaligned_wcsndup (), +and +.BR libsimple_ealigned_wcsndup () +functions exit the process. The +.BR libsimple_aligned_wcsndupa () +function cannot fail, however the kernel +can kill the thread, and possibly the process, with a +.B SIGSEGV +signal if the memory cannot be allocated. +.PP +The returned pointer should be deallocated when it +is no longer needed, except for the pointer returned +by the +.BR libsimple_aligned_wcsndupa () +function, it is automatically deallocated when the +calling function returns. + +.SH ERRORS +The +.BR libsimple_aligned_wcsndup () +function may fail for any reason specified for the +.BR aligned_alloc (3) +function. + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_aligned_wcsndupa (), +.br +.BR libsimple_aligned_wcsndup (), +.br +.BR libsimple_enaligned_wcsndup (), +.br +.BR libsimple_ealigned_wcsndup (), +T} Thread safety MT-Safe +T{ +.BR libsimple_aligned_wcsndupa (), +.br +.BR libsimple_aligned_wcsndup (), +.br +.BR libsimple_enaligned_wcsndup (), +.br +.BR libsimple_ealigned_wcsndup (), +T} Async-signal safety AS-Safe +T{ +.BR libsimple_aligned_wcsndupa (), +.br +.BR libsimple_aligned_wcsndup (), +.br +.BR libsimple_enaligned_wcsndup (), +.br +.BR libsimple_ealigned_wcsndup (), +T} Async-cancel safety AC-Safe +.TE + +.SH EXAMPLES +None. + +.SH APPLICATION USAGE +None. + +.SH RATIONALE +None. + +.SH FUTURE DIRECTIONS +None. + +.SH NOTES +None. + +.SH BUGS +None. + +.SH SEE ALSO +.BR libsimple_wcsndup (3), +.BR libsimple_aligned_strndup (3), +.BR libsimple_aligned_strdup (3), +.BR libsimple_aligned_memdup (3), +.BR libsimple_aligned_wcsdup (3), +.BR libsimple_aligned_wmemdup (3) diff --git a/man3/libsimple_aligned_wcsndupa.3 b/man3/libsimple_aligned_wcsndupa.3 new file mode 120000 index 0000000..043dad0 --- /dev/null +++ b/man3/libsimple_aligned_wcsndupa.3 @@ -0,0 +1 @@ +libsimple_aligned_wcsndup.3
\ No newline at end of file diff --git a/man3/libsimple_aligned_wmemdup.3 b/man3/libsimple_aligned_wmemdup.3 new file mode 100644 index 0000000..a269082 --- /dev/null +++ b/man3/libsimple_aligned_wmemdup.3 @@ -0,0 +1,167 @@ +.TH LIBSIMPLE_ALIGNED_WMEMDUP 3 libsimple +.SH NAME +libsimple_aligned_wmemdup, libsimple_aligned_wmemdupa \- duplicate a wide-character array + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +wchar_t *libsimple_aligned_wmemdupa(const wchar_t *\fIs\fP, size_t \fIalignment\fP, size_t \fIn\fP); +wchar_t *libsimple_aligned_wmemdup(const wchar_t *\fIs\fP, size_t \fIalignment\fP, size_t \fIn\fP); +wchar_t *libsimple_enaligned_wmemdup(int \fIstatus\fP, const wchar_t *\fIs\fP, size_t \fIalignment\fP, size_t \fIn\fP); +static inline wchar_t *libsimple_ealigned_wmemdup(const wchar_t *\fIs\fP, size_t \fIalignment\fP, size_t \fIn\fP); + +#ifndef aligned_wmemdupa +# define aligned_wmemdupa libsimple_aligned_wmemdupa +#endif +#ifndef aligned_wmemdup +# define aligned_wmemdup libsimple_aligned_wmemdup +#endif +#ifndef enaligned_wmemdup +# define enaligned_wmemdup libsimple_enaligned_wmemdup +#endif +#ifndef ealigned_wmemdup +# define ealigned_wmemdup libsimple_ealigned_wmemdup +#endif +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_aligned_wmemdup () +function allocates memory with the alignment +specified in the +.I alignment +parameter and copies +.I n +first wide characters +.RB ( wchar_t ) +from +.I s +into the new allocation. +.PP +The +.BR libsimple_enaligned_wmemdup () +and +.BR libsimple_ealigned_wmemdup () +functions are versions of the +.BR libsimple_aligned_wmemdup () +function that call the +.BR libsimple_enprintf (3) +function on failure, causing the process to print +an error message and exit. See +.BR libsimple_enprintf (3) +for more information. +.PP +The +.BR libsimple_wmemdupa () +function is implemented as a macro and is a version +of the +.BR libsimple_wmemdup () +function that uses allocates the memory on the stack +rather than on the heap, causing the return pointer +to become invalid when the calling function returns. +It is only available when compling with GCC or Clang. + +.SH RETURN VALUE +Upon successful completion, the +.BR libsimple_aligned_wmemdupa (), +.BR libsimple_aligned_wmemdup (), +.BR libsimple_enaligned_wmemdup (), +and +.BR libsimple_ealigned_wmemdup () +functions return a non-null pointer, on failure the +.BR libsimple_aligned_wmemdup () +function returns +.B NULL +and set +.I errno +to indicate the error, and the +.BR libsimple_enaligned_wmemdup (), +and +.BR libsimple_ealigned_wmemdup () +functions exit the process. The +.BR libsimple_aligned_wmemdupa () +function cannot fail, however the kernel +can kill the thread, and possibly the process, with a +.B SIGSEGV +signal if the memory cannot be allocated. +.PP +The returned pointer should be deallocated when it +is no longer needed, except for the pointer returned +by the +.BR libsimple_aligned_wmemdupa () +function, it is automatically deallocated when the +calling function returns. + +.SH ERRORS +The +.BR libsimple_aligned_wmemdup () +function may fail for any reason specified for the +.BR aligned_alloc (3) +function. + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_aligned_wmemdupa (), +.br +.BR libsimple_aligned_wmemdup (), +.br +.BR libsimple_enaligned_wmemdup (), +.br +.BR libsimple_ealigned_wmemdup (), +T} Thread safety MT-Safe +T{ +.BR libsimple_aligned_wmemdupa (), +.br +.BR libsimple_aligned_wmemdup (), +.br +.BR libsimple_enaligned_wmemdup (), +.br +.BR libsimple_ealigned_wmemdup (), +T} Async-signal safety AS-Safe +T{ +.BR libsimple_aligned_wmemdupa (), +.br +.BR libsimple_aligned_wmemdup (), +.br +.BR libsimple_enaligned_wmemdup (), +.br +.BR libsimple_ealigned_wmemdup (), +T} Async-cancel safety AC-Safe +.TE + +.SH EXAMPLES +None. + +.SH APPLICATION USAGE +None. + +.SH RATIONALE +None. + +.SH FUTURE DIRECTIONS +None. + +.SH NOTES +None. + +.SH BUGS +None. + +.SH SEE ALSO +.BR libsimple_wmemdup (3), +.BR libsimple_aligned_strndup (3), +.BR libsimple_aligned_strdup (3), +.BR libsimple_aligned_memdup (3), +.BR libsimple_aligned_wcsdup (3), +.BR libsimple_aligned_wcsndup (3) diff --git a/man3/libsimple_aligned_wmemdupa.3 b/man3/libsimple_aligned_wmemdupa.3 new file mode 120000 index 0000000..264a7e1 --- /dev/null +++ b/man3/libsimple_aligned_wmemdupa.3 @@ -0,0 +1 @@ +libsimple_aligned_wmemdup.3
\ No newline at end of file diff --git a/man3/libsimple_close.3 b/man3/libsimple_close.3 index d5e18c6..d9fb852 100644 --- a/man3/libsimple_close.3 +++ b/man3/libsimple_close.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_CLOSE 3 2018-11-05 libsimple +.TH LIBSIMPLE_CLOSE 3 libsimple .SH NAME libsimple_close \- close file descriptor and mark it as closed + .SH SYNOPSIS .nf #include <libsimple.h> @@ -10,6 +11,7 @@ static inline int libsimple_close(int *\fIfdp\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_close () @@ -22,28 +24,37 @@ to However if .IR *fdp<0 , does not except return 0. + .SH RETURN VALUE The .BR libsimple_close () function returns 0 upon successful completion; otherwise \-1 is returned. + .SH ERRORS The .BR libsimple_close () function fail for the reasons specified for the .BR close (3) function. + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR close (3) diff --git a/man3/libsimple_cmptimespec.3 b/man3/libsimple_cmptimespec.3 index 14873ea..9d6869a 100644 --- a/man3/libsimple_cmptimespec.3 +++ b/man3/libsimple_cmptimespec.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_CMPTIMESPEC 3 2018-10-29 libsimple +.TH LIBSIMPLE_CMPTIMESPEC 3 libsimple .SH NAME libsimple_cmptimespec, libsimple_cmptimeval \- calculate the sum of two durations + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ static inline int libsimple_cmptimeval(const struct timeval *\fIa\fP, const stru .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_cmptimespec () @@ -28,6 +30,7 @@ functions compares the values of and .IR b , returning a value indicating which is larger, if any. + .SH RETURN VALUE The .BR libsimple_cmptimespec () @@ -42,12 +45,14 @@ is less than is greater than .IR b , and 0 otherwise. + .SH ERRORS The .BR libsimple_cmptimespec () and .BR libsimple_cmptimeval () functions cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -72,18 +77,25 @@ T{ .BR libsimple_cmptimeval () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_sumtimespec (3), .BR libsimple_difftimespec (3), diff --git a/man3/libsimple_difftimespec.3 b/man3/libsimple_difftimespec.3 index bf26446..91df8e9 100644 --- a/man3/libsimple_difftimespec.3 +++ b/man3/libsimple_difftimespec.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_DIFFTIMESPEC 3 2018-10-29 libsimple +.TH LIBSIMPLE_DIFFTIMESPEC 3 libsimple .SH NAME libsimple_difftimespec, libsimple_difftimeval \- calculate the difference of two durations + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ int libsimple_difftimeval(struct timeval *\fIdiff\fP, const struct timeval *\fIm .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_difftimespec () @@ -41,6 +43,7 @@ are in thier valid range ([0, 1000000000) for .BR libsimple_sumtimespec () and [0, 1000000) for .BR libsimple_sumtimeval ()) + .SH RETURN VALUE The .BR libsimple_difftimespec () @@ -50,6 +53,7 @@ functions return 0 on successful completion; otherwise, \-1 is returned and .I errno is set to indicate the error. + .SH ERRORS The .BR libsimple_difftimespec () @@ -80,6 +84,7 @@ function and to for the .BR libsimple_difftimeval () function. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -104,18 +109,25 @@ T{ .BR libsimple_difftimeval () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_sumtimespec (3), .BR libsimple_multimespec (3), diff --git a/man3/libsimple_doubletotimespec.3 b/man3/libsimple_doubletotimespec.3 index 1d8790c..1fddc74 100644 --- a/man3/libsimple_doubletotimespec.3 +++ b/man3/libsimple_doubletotimespec.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_DOUBLETOTIMESPEC 3 2018-10-30 libsimple +.TH LIBSIMPLE_DOUBLETOTIMESPEC 3 libsimple .SH NAME libsimple_doubletotimespec, libsimple_doubletotimeval \- convert a double to a duration data structure + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ void libsimple_doubletotimeval(struct timeval *\fItv\fP, double \fId\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_doubletotimespec () @@ -37,10 +39,13 @@ and stores the result in .IR tv . .PP Neither of these functions perform an overflow check. + .SH RETURN VALUE None. + .SH ERRORS No error checks are made. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -65,18 +70,25 @@ T{ .BR libsimple_doubletotimeval () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_sumtimespec (3), .BR libsimple_difftimespec (3), diff --git a/man3/libsimple_ealigned_realloc.3 b/man3/libsimple_ealigned_realloc.3 new file mode 120000 index 0000000..2d95e24 --- /dev/null +++ b/man3/libsimple_ealigned_realloc.3 @@ -0,0 +1 @@ +libsimple_enaligned_realloc.3
\ No newline at end of file diff --git a/man3/libsimple_ealigned_reallocarray.3 b/man3/libsimple_ealigned_reallocarray.3 new file mode 120000 index 0000000..1b2e0f8 --- /dev/null +++ b/man3/libsimple_ealigned_reallocarray.3 @@ -0,0 +1 @@ +libsimple_enaligned_reallocarray.3
\ No newline at end of file diff --git a/man3/libsimple_ealigned_reallocn.3 b/man3/libsimple_ealigned_reallocn.3 new file mode 120000 index 0000000..b7dde1d --- /dev/null +++ b/man3/libsimple_ealigned_reallocn.3 @@ -0,0 +1 @@ +libsimple_evaligned_reallocn.3
\ No newline at end of file diff --git a/man3/libsimple_ealigned_strdup.3 b/man3/libsimple_ealigned_strdup.3 new file mode 120000 index 0000000..83e40a2 --- /dev/null +++ b/man3/libsimple_ealigned_strdup.3 @@ -0,0 +1 @@ +libsimple_enaligned_strdup.3
\ No newline at end of file diff --git a/man3/libsimple_ealigned_strndup.3 b/man3/libsimple_ealigned_strndup.3 new file mode 120000 index 0000000..2b79c93 --- /dev/null +++ b/man3/libsimple_ealigned_strndup.3 @@ -0,0 +1 @@ +libsimple_enaligned_strndup.3
\ No newline at end of file diff --git a/man3/libsimple_ealigned_wcsdup.3 b/man3/libsimple_ealigned_wcsdup.3 new file mode 120000 index 0000000..c52f2c8 --- /dev/null +++ b/man3/libsimple_ealigned_wcsdup.3 @@ -0,0 +1 @@ +libsimple_enaligned_wcsdup.3
\ No newline at end of file diff --git a/man3/libsimple_ealigned_wcsndup.3 b/man3/libsimple_ealigned_wcsndup.3 new file mode 120000 index 0000000..f5772b1 --- /dev/null +++ b/man3/libsimple_ealigned_wcsndup.3 @@ -0,0 +1 @@ +libsimple_enaligned_wcsndup.3
\ No newline at end of file diff --git a/man3/libsimple_ealigned_wmemdup.3 b/man3/libsimple_ealigned_wmemdup.3 new file mode 120000 index 0000000..07321e1 --- /dev/null +++ b/man3/libsimple_ealigned_wmemdup.3 @@ -0,0 +1 @@ +libsimple_enaligned_wmemdup.3
\ No newline at end of file diff --git a/man3/libsimple_egmtime.3 b/man3/libsimple_egmtime.3 new file mode 120000 index 0000000..b670cdd --- /dev/null +++ b/man3/libsimple_egmtime.3 @@ -0,0 +1 @@ +libsimple_gmtime.3
\ No newline at end of file diff --git a/man3/libsimple_elocaltime.3 b/man3/libsimple_elocaltime.3 new file mode 120000 index 0000000..0b426b9 --- /dev/null +++ b/man3/libsimple_elocaltime.3 @@ -0,0 +1 @@ +libsimple_localtime.3
\ No newline at end of file diff --git a/man3/libsimple_enaligned_alloc.3 b/man3/libsimple_enaligned_alloc.3 index 1ea36cb..27abe3d 100644 --- a/man3/libsimple_enaligned_alloc.3 +++ b/man3/libsimple_enaligned_alloc.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_ENALIGNED_ALLOC 3 2018-11-03 libsimple +.TH LIBSIMPLE_ENALIGNED_ALLOC 3 libsimple .SH NAME libsimple_enaligned_alloc \- allocate memory with custom alignment or die + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ static inline void *libsimple_ealigned_alloc(size_t \fIalignment\fP, size_t \fIn .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_enaligned_alloc () @@ -66,6 +68,7 @@ and functions behaviour is unspecified if .I n is 0. + .SH RETURN VALUE The .BR libsimple_enaligned_alloc () @@ -74,12 +77,14 @@ and functions return a pointer to the allocated memory upon success completion; otherwise the process is terminated. + .SH ERRORS The .BR libsimple_enaligned_alloc () and .BR libsimple_ealigned_alloc () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -104,18 +109,25 @@ T{ .BR libsimple_ealigned_alloc () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -124,7 +136,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_enaligned_realloc.3 b/man3/libsimple_enaligned_realloc.3 new file mode 120000 index 0000000..45a72de --- /dev/null +++ b/man3/libsimple_enaligned_realloc.3 @@ -0,0 +1 @@ +libsimple_aligned_realloc.3
\ No newline at end of file diff --git a/man3/libsimple_enaligned_reallocarray.3 b/man3/libsimple_enaligned_reallocarray.3 new file mode 120000 index 0000000..fb3f8b9 --- /dev/null +++ b/man3/libsimple_enaligned_reallocarray.3 @@ -0,0 +1 @@ +libsimple_aligned_reallocarray.3
\ No newline at end of file diff --git a/man3/libsimple_enaligned_reallocn.3 b/man3/libsimple_enaligned_reallocn.3 new file mode 120000 index 0000000..36205a3 --- /dev/null +++ b/man3/libsimple_enaligned_reallocn.3 @@ -0,0 +1 @@ +libsimple_envaligned_reallocn.3
\ No newline at end of file diff --git a/man3/libsimple_enaligned_strdup.3 b/man3/libsimple_enaligned_strdup.3 new file mode 120000 index 0000000..005dc6f --- /dev/null +++ b/man3/libsimple_enaligned_strdup.3 @@ -0,0 +1 @@ +libsimple_aligned_strdup.3
\ No newline at end of file diff --git a/man3/libsimple_enaligned_strndup.3 b/man3/libsimple_enaligned_strndup.3 new file mode 120000 index 0000000..4be204c --- /dev/null +++ b/man3/libsimple_enaligned_strndup.3 @@ -0,0 +1 @@ +libsimple_aligned_strndup.3
\ No newline at end of file diff --git a/man3/libsimple_enaligned_wcsdup.3 b/man3/libsimple_enaligned_wcsdup.3 new file mode 120000 index 0000000..cb194a0 --- /dev/null +++ b/man3/libsimple_enaligned_wcsdup.3 @@ -0,0 +1 @@ +libsimple_aligned_wcsdup.3
\ No newline at end of file diff --git a/man3/libsimple_enaligned_wcsndup.3 b/man3/libsimple_enaligned_wcsndup.3 new file mode 120000 index 0000000..043dad0 --- /dev/null +++ b/man3/libsimple_enaligned_wcsndup.3 @@ -0,0 +1 @@ +libsimple_aligned_wcsndup.3
\ No newline at end of file diff --git a/man3/libsimple_enaligned_wmemdup.3 b/man3/libsimple_enaligned_wmemdup.3 new file mode 120000 index 0000000..264a7e1 --- /dev/null +++ b/man3/libsimple_enaligned_wmemdup.3 @@ -0,0 +1 @@ +libsimple_aligned_wmemdup.3
\ No newline at end of file diff --git a/man3/libsimple_encalloc.3 b/man3/libsimple_encalloc.3 index a8696e6..905bdd2 100644 --- a/man3/libsimple_encalloc.3 +++ b/man3/libsimple_encalloc.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_ENCALLOC 3 2018-11-03 libsimple +.TH LIBSIMPLE_ENCALLOC 3 libsimple .SH NAME libsimple_encalloc \- allocate initialised memory or die + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ static inline void *libsimple_ecalloc(size_t \fIn\fP, size_t \fIm\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_encalloc () @@ -72,6 +74,7 @@ functions behaviour is unspecified if or .I m is 0. + .SH RETURN VALUE The .BR libsimple_encalloc () @@ -79,12 +82,14 @@ and .BR libsimple_ecalloc () functions return a pointer to the allocated memory upon success completion; otherwise the process is terminated. + .SH ERRORS The .BR libsimple_encalloc () and .BR libsimple_ecalloc () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -109,18 +114,25 @@ T{ .BR libsimple_ecalloc () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -128,7 +140,17 @@ None. .BR libsimple_vmalloczn (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_engmtime.3 b/man3/libsimple_engmtime.3 new file mode 120000 index 0000000..b670cdd --- /dev/null +++ b/man3/libsimple_engmtime.3 @@ -0,0 +1 @@ +libsimple_gmtime.3
\ No newline at end of file diff --git a/man3/libsimple_enlocaltime.3 b/man3/libsimple_enlocaltime.3 new file mode 120000 index 0000000..0b426b9 --- /dev/null +++ b/man3/libsimple_enlocaltime.3 @@ -0,0 +1 @@ +libsimple_localtime.3
\ No newline at end of file diff --git a/man3/libsimple_enmalloc.3 b/man3/libsimple_enmalloc.3 index 796eafd..975f44c 100644 --- a/man3/libsimple_enmalloc.3 +++ b/man3/libsimple_enmalloc.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_ENMALLOC 3 2018-11-03 libsimple +.TH LIBSIMPLE_ENMALLOC 3 libsimple .SH NAME libsimple_enmalloc \- allocate memory or die + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ static inline void *libsimple_emalloc(size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_enmalloc () @@ -68,6 +70,7 @@ and functions behaviour is unspecified if .I n is 0. + .SH RETURN VALUE The .BR libsimple_enmalloc () @@ -75,12 +78,14 @@ and .BR libsimple_emalloc () functions return a pointer to the allocated memory upon success completion; otherwise the process is terminated. + .SH ERRORS The .BR libsimple_enmalloc () and .BR libsimple_emalloc () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -105,18 +110,25 @@ T{ .BR libsimple_emalloc () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_mallocz (3), .BR libsimple_vmallocn (3), @@ -124,7 +136,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_enposix_memalign.3 b/man3/libsimple_enposix_memalign.3 index c1157f3..1d8ec20 100644 --- a/man3/libsimple_enposix_memalign.3 +++ b/man3/libsimple_enposix_memalign.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_ENPOSIX_MEMALIGN 3 2018-11-03 libsimple +.TH LIBSIMPLE_ENPOSIX_MEMALIGN 3 libsimple .SH NAME libsimple_enposix_memalign \- allocate memory with custom alignment or die + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ static inline void libsimple_eposix_memalign(void **\fImemptr\fP, size_t \fIalig .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_enposix_memalign () @@ -71,6 +73,7 @@ and functions behaviour is unspecified if .I n is 0. + .SH RETURN VALUE The .BR libsimple_enposix_memalign () @@ -78,12 +81,14 @@ and .BR libsimple_eposix_memalign () functions do not return a value, but terminated the process on failure. + .SH ERRORS The .BR libsimple_enposix_memalign () and .BR libsimple_eposix_memalign () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -108,18 +113,25 @@ T{ .BR libsimple_eposix_memalign () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -128,7 +140,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_enrealloc.3 b/man3/libsimple_enrealloc.3 index 5262193..829a0f5 100644 --- a/man3/libsimple_enrealloc.3 +++ b/man3/libsimple_enrealloc.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_ENREALLOC 3 2018-11-03 libsimple +.TH LIBSIMPLE_ENREALLOC 3 libsimple .SH NAME libsimple_enrealloc \- reallocate memory or die + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ static inline void *libsimple_erealloc(void *\fIptr\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_enrealloc () @@ -79,6 +81,7 @@ and functions behaviour is unspecified if .I n is 0. + .SH RETURN VALUE The .BR libsimple_enrealloc () @@ -86,12 +89,14 @@ and .BR libsimple_erealloc () functions return a pointer to the allocated memory upon success completion; otherwise the process is terminated. + .SH ERRORS The .BR libsimple_enrealloc () and .BR libsimple_erealloc () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -116,18 +121,25 @@ T{ .BR libsimple_erealloc () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -135,7 +147,17 @@ None. .BR libsimple_vmalloczn (3), .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_enreallocarray.3 b/man3/libsimple_enreallocarray.3 new file mode 120000 index 0000000..9cb5fe4 --- /dev/null +++ b/man3/libsimple_enreallocarray.3 @@ -0,0 +1 @@ +libsimple_reallocarray.3
\ No newline at end of file diff --git a/man3/libsimple_enstrdup.3 b/man3/libsimple_enstrdup.3 index 4a2aa4f..33cc6c7 100644 --- a/man3/libsimple_enstrdup.3 +++ b/man3/libsimple_enstrdup.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_ENSTRDUP 3 2018-10-27 libsimple +.TH LIBSIMPLE_ENSTRDUP 3 libsimple .SH NAME libsimple_enstrdup, libsimple_strdupa \- duplicate a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -22,6 +23,7 @@ static inline char *libsimple_estrdup(const char *\fIs\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_enstrdup () @@ -45,6 +47,7 @@ function that uses allocates the memory on the stack rather than on the heap, causing the return pointer to become invalid when the calling function returns. It is only available when compling with GCC or Clang. + .SH RETURN VALUE Upon successful completion, the .BR libsimple_strdupa (), @@ -68,8 +71,10 @@ by the .BR libsimple_strdupa () function, it is automatically deallocated when the calling function returns. + .SH ERRORS None. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -100,21 +105,32 @@ T{ .BR libsimple_estrdup (), T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO +.BR libsimple_aligned_strdup (3), .BR libsimple_enstrndup (3), .BR libsimple_memdup (3), -.BR libsimple_aligned_memdup (3), +.BR libsimple_enwcsdup (3), +.BR libsimple_wcsndup (3), +.BR libsimple_wmemdup (3), .BR strndup (3), -.BR strdup (3) +.BR strdup (3), +.BR wcsdup (3) diff --git a/man3/libsimple_enstrndup.3 b/man3/libsimple_enstrndup.3 index 66272b0..2c62600 100644 --- a/man3/libsimple_enstrndup.3 +++ b/man3/libsimple_enstrndup.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_ENSTRNDUP 3 2018-10-27 libsimple +.TH LIBSIMPLE_ENSTRNDUP 3 libsimple .SH NAME libsimple_enstrndup, libsimple_strndupa \- duplicate the beginning of a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -22,6 +23,7 @@ static inline char *libsimple_estrndup(const char *\fIs\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_enstrndup () @@ -45,6 +47,7 @@ function that uses allocates the memory on the stack rather than on the heap, causing the return pointer to become invalid when the calling function returns. It is only available when compling with GCC or Clang. + .SH RETURN VALUE Upon successful completion, the .BR libsimple_strndupa (), @@ -68,8 +71,10 @@ by the .BR libsimple_strndupa () function, it is automatically deallocated when the calling function returns. + .SH ERRORS None. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -100,21 +105,32 @@ T{ .BR libsimple_estrndup (), T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO +.BR libsimple_aligned_strndup (3), .BR libsimple_enstrdup (3), .BR libsimple_memdup (3), -.BR libsimple_aligned_memdup (3), +.BR libsimple_enwcsdup (3), +.BR libsimple_wcsndup (3), +.BR libsimple_wmemdup (3), .BR strndup (3), -.BR strdup (3) +.BR strdup (3), +.BR wcsdup (3) diff --git a/man3/libsimple_envaligned_reallocn.3 b/man3/libsimple_envaligned_reallocn.3 new file mode 120000 index 0000000..7c3a84f --- /dev/null +++ b/man3/libsimple_envaligned_reallocn.3 @@ -0,0 +1 @@ +libsimple_valigned_reallocn.3
\ No newline at end of file diff --git a/man3/libsimple_enwcsdup.3 b/man3/libsimple_enwcsdup.3 new file mode 100644 index 0000000..df013a8 --- /dev/null +++ b/man3/libsimple_enwcsdup.3 @@ -0,0 +1,136 @@ +.TH LIBSIMPLE_ENWCSDUP 3 libsimple +.SH NAME +libsimple_enwcsdup, libsimple_wcsdupa \- duplicate a wide-character string + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +wchar_t *libsimple_wcsdupa(const wchar_t *\fIs\fP); +wchar_t *libsimple_enwcsdup(int \fIstatus\fP, const wchar_t *\fIs\fP); +static inline char *libsimple_ewcsdup(const wchar_t *\fIs\fP); + +#ifndef wcsdupa +# define wcsdupa libsimple_wcsdupa +#endif +#ifndef enwcsdup +# define enwcsdup libsimple_enwcsdup +#endif +#ifndef ewcsdup +# define ewcsdup libsimple_ewcsdup +#endif +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_enwcsdup () +and +.BR libsimple_ewcsdup () +functions are versions of the +.BR wcsdup (3) +function that call the +.BR libsimple_enprintf (3) +function on failure, causing the process to print +an error message and exit. See +.BR libsimple_enprintf (3) +for more information. +.PP +The +.BR libsimple_wcsdupa () +function is implemented as a macro and is a version +of the +.BR wcsdup (3) +function that uses allocates the memory on the stack +rather than on the heap, causing the return pointer +to become invalid when the calling function returns. +It is only available when compling with GCC or Clang. + +.SH RETURN VALUE +Upon successful completion, the +.BR libsimple_wcsdupa (), +.BR libsimple_enwcsdup (), +and +.BR libsimple_ewcsdup () +functions return a non-null pointer, on failure the +.BR libsimple_enwcsdup (), +and +.BR libsimple_ewcsdup () +functions exit the process. The +.BR libsimple_wcsdupa () +function cannot fail, however the kernel +can kill the thread, and possibly the process, with a +.B SIGSEGV +signal if the memory cannot be allocated. +.PP +The returned pointer should be deallocated when it +is no longer needed, except for the pointer returned +by the +.BR libsimple_wcsdupa () +function, it is automatically deallocated when the +calling function returns. + +.SH ERRORS +None. + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_wcsdupa (), +.br +.BR libsimple_enwcsdup (), +.br +.BR libsimple_ewcsdup (), +T} Thread safety MT-Safe +T{ +.BR libsimple_wcsdupa (), +.br +.BR libsimple_enwcsdup (), +.br +.BR libsimple_ewcsdup (), +T} Async-signal safety AS-Safe +T{ +.BR libsimple_wcsdupa (), +.br +.BR libsimple_enwcsdup (), +.br +.BR libsimple_ewcsdup (), +T} Async-cancel safety AC-Safe +.TE + +.SH EXAMPLES +None. + +.SH APPLICATION USAGE +None. + +.SH RATIONALE +None. + +.SH FUTURE DIRECTIONS +None. + +.SH NOTES +None. + +.SH BUGS +None. + +.SH SEE ALSO +.BR libsimple_aligned_wcsdup (3), +.BR libsimple_enstrdup (3), +.BR libsimple_enstrndup (3), +.BR libsimple_memdup (3), +.BR libsimple_wcsndup (3), +.BR libsimple_wmemdup (3), +.BR strndup (3), +.BR strdup (3), +.BR wcsdup (3) diff --git a/man3/libsimple_enwcsndup.3 b/man3/libsimple_enwcsndup.3 new file mode 120000 index 0000000..57c8250 --- /dev/null +++ b/man3/libsimple_enwcsndup.3 @@ -0,0 +1 @@ +libsimple_wcsndup.3
\ No newline at end of file diff --git a/man3/libsimple_enwmemdup.3 b/man3/libsimple_enwmemdup.3 new file mode 120000 index 0000000..93381ef --- /dev/null +++ b/man3/libsimple_enwmemdup.3 @@ -0,0 +1 @@ +libsimple_wmemdup.3
\ No newline at end of file diff --git a/man3/libsimple_ereallocarray.3 b/man3/libsimple_ereallocarray.3 new file mode 120000 index 0000000..5f83973 --- /dev/null +++ b/man3/libsimple_ereallocarray.3 @@ -0,0 +1 @@ +libsimple_enreallocarray.3
\ No newline at end of file diff --git a/man3/libsimple_evaligned_reallocn.3 b/man3/libsimple_evaligned_reallocn.3 new file mode 120000 index 0000000..36205a3 --- /dev/null +++ b/man3/libsimple_evaligned_reallocn.3 @@ -0,0 +1 @@ +libsimple_envaligned_reallocn.3
\ No newline at end of file diff --git a/man3/libsimple_ewcsdup.3 b/man3/libsimple_ewcsdup.3 new file mode 120000 index 0000000..85a85a6 --- /dev/null +++ b/man3/libsimple_ewcsdup.3 @@ -0,0 +1 @@ +libsimple_enwcsdup.3
\ No newline at end of file diff --git a/man3/libsimple_ewcsndup.3 b/man3/libsimple_ewcsndup.3 new file mode 120000 index 0000000..801d72f --- /dev/null +++ b/man3/libsimple_ewcsndup.3 @@ -0,0 +1 @@ +libsimple_enwcsndup.3
\ No newline at end of file diff --git a/man3/libsimple_ewmemdup.3 b/man3/libsimple_ewmemdup.3 new file mode 120000 index 0000000..b2983f6 --- /dev/null +++ b/man3/libsimple_ewmemdup.3 @@ -0,0 +1 @@ +libsimple_enwmemdup.3
\ No newline at end of file diff --git a/man3/libsimple_getenv_e.3 b/man3/libsimple_getenv_e.3 index 7e3a3ca..0ed445b 100644 --- a/man3/libsimple_getenv_e.3 +++ b/man3/libsimple_getenv_e.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_GETENV_E 3 2018-10-20 libsimple +.TH LIBSIMPLE_GETENV_E 3 libsimple .SH NAME libsimple_getenv_e \- get value of an environment variable or the empty string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline const char *libsimple_getenv_e(const char *\fIname\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_getenv_e () @@ -29,15 +31,18 @@ that have not be come visible to other process via replacement of the process image, are visible to the .BR libsimple_getenv_e () function. + .SH RETURN VALUE If the environment variable .I name is defined, its value is returned, otherwise the empty string is returned. + .SH ERRORS The .BR libsimple_getenv_e () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -56,18 +61,25 @@ T{ .BR libsimple_getenv_e () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_getenv_ne (3), .BR getenv (3) diff --git a/man3/libsimple_getenv_ne.3 b/man3/libsimple_getenv_ne.3 index cd788d3..69c7de8 100644 --- a/man3/libsimple_getenv_ne.3 +++ b/man3/libsimple_getenv_ne.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_GETENV_NE 3 2018-10-20 libsimple +.TH LIBSIMPLE_GETENV_NE 3 libsimple .SH NAME libsimple_getenv_ne \- get non-empty value of an environment variable + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline char *libsimple_getenv_ne(const char *\fIname\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_getenv_ne () @@ -29,6 +31,7 @@ that have not be come visible to other process via replacement of the process image, are visible to the .BR libsimple_getenv_ne () function. + .SH RETURN VALUE If the environment variable .I name @@ -42,10 +45,12 @@ its content should not be modified. The returned pointer becomes invalid when the environment variable .I name is unset or modified. + .SH ERRORS The .BR libsimple_getenv_ne () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -64,18 +69,25 @@ T{ .BR libsimple_getenv_ne () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_getenv_e (3), .BR getenv (3) diff --git a/man3/libsimple_gmtime.3 b/man3/libsimple_gmtime.3 new file mode 100644 index 0000000..be050f2 --- /dev/null +++ b/man3/libsimple_gmtime.3 @@ -0,0 +1,133 @@ +.TH LIBSIMPLE_GMTIME 3 libsimple +.SH NAME +libsimple_gmtime \- get the current UTC time with leap second adjustment + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +int libsimple_gmtime(struct tm *\fItm\fP, struct timespec *\fIts\fP); +static inline void libsimple_engmtime(int \fIstatus\fPstruct tm *\fItm\fP, struct timespec *\fIts\fP); +static inline void libsimple_egmtime(struct tm *\fItm\fP, struct timespec *\fIts\fP); +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_gmtime (), +.BR libsimple_engmtime (), +and +.BR libsimple_egmtime () +functions get the current UTC time, with adjustments +for leap seconds insertions and deletions. +.PP +The +.BR libsimple_engmtime () +and +.BR libsimple_egmtime () +functions will terminate the process on failure. +On failure, the process's exit value will be +.I status +if the +.BR libsimple_engmtime () +function is used or +.IR libsimple_default_failure_exit (3) +if the +.BR libsimple_egmtime () +fucntion is used. +.PP +The local time is stored in +.IR *tm , +and the POSIX time (not timezone adjusted), +with leap second adjustments, is stored in +.I *ts +unless +.I ts +is +.IR NULL . +.I tm +may +.I not +be +.RI NULL . + +.SH RETURN VALUE +The +.BR libsimple_gmtime () +function return a 0 upon successful completion; +otherwise the they return -1 and set +.I errno +to indicate the error. The +.BR libsimple_engmtime () +and +.BR libsimple_egmtime () +functions terminate the processes on failure. + +.SH ERRORS +The +.BR libsimple_gmtime () +function will fail for the reasons specified for the +.BR gmtime_r (3) +function. +.PP +The +.BR libsimple_engmtime () +and +.BR libsimple_egmtime () +functions will terminate the process on failure. + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_gmtime (), +.br +.BR libsimple_engmtime (), +.br +.BR libsimple_egmtime () +T} Thread safety MT-Safe +T{ +.BR libsimple_gmtime (), +.br +.BR libsimple_engmtime (), +.br +.BR libsimple_egmtime () +T} Async-signal safety AS-Safe +T{ +.BR libsimple_gmtime (), +.br +.BR libsimple_engmtime (), +.br +.BR libsimple_egmtime () +T} Async-cancel safety AC-Safe +.TE + +.SH EXAMPLES +None. + +.SH APPLICATION USAGE +None. + +.SH RATIONALE +None. + +.SH FUTURE DIRECTIONS +None. + +.SH NOTES +None. + +.SH BUGS +None. + +.SH SEE ALSO +.BR libsimple_gmtime (3), +.BR ntp_adjtime (2), +.BR gmtime_r (3) diff --git a/man3/libsimple_inchrset.3 b/man3/libsimple_inchrset.3 index f07263c..44a3eb1 100644 --- a/man3/libsimple_inchrset.3 +++ b/man3/libsimple_inchrset.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_INCHRSET 3 2018-11-05 libsimple +.TH LIBSIMPLE_INCHRSET 3 libsimple .SH NAME libsimple_inchrset, libsimple_inchrcaseset \- the whether a character belongs to a set + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ static inline int libsimple_inchrcaseset(int \fIc\fP, const char *\fIs\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_inchrset () @@ -39,6 +41,7 @@ The comparison is case-sensitive for the function, and case-insensitive for the .BR libsimple_inchrcaseset () function. + .SH RETURN VALUE The .BR libsimple_inchrset () @@ -49,12 +52,14 @@ functions returns 1 if is not the NUL byte but can be found in .IR s ; otherwise 0 is returned. + .SH ERRORS The .BR libsimple_inchrset () and .BR libsimple_inchrcaseset () functions cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -79,18 +84,25 @@ T{ .BR libsimple_strchrnul () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strcasechr (3), .BR strchr (3) diff --git a/man3/libsimple_localtime.3 b/man3/libsimple_localtime.3 new file mode 100644 index 0000000..0f6aa19 --- /dev/null +++ b/man3/libsimple_localtime.3 @@ -0,0 +1,133 @@ +.TH LIBSIMPLE_LOCALTIME 3 libsimple +.SH NAME +libsimple_localtime \- get the current local time with leap second adjustment + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +int libsimple_localtime(struct tm *\fItm\fP, struct timespec *\fIts\fP); +static inline void libsimple_enlocaltime(int \fIstatus\fPstruct tm *\fItm\fP, struct timespec *\fIts\fP); +static inline void libsimple_elocaltime(struct tm *\fItm\fP, struct timespec *\fIts\fP); +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_localtime (), +.BR libsimple_enlocaltime (), +and +.BR libsimple_elocaltime () +functions get the current local time, with adjustments +for leap seconds insertions and deletions. +.PP +The +.BR libsimple_enlocaltime () +and +.BR libsimple_elocaltime () +functions will terminate the process on failure. +On failure, the process's exit value will be +.I status +if the +.BR libsimple_enlocaltime () +function is used or +.IR libsimple_default_failure_exit (3) +if the +.BR libsimple_elocaltime () +fucntion is used. +.PP +The local time is stored in +.IR *tm , +and the POSIX time (not timezone adjusted), +with leap second adjustments, is stored in +.I *ts +unless +.I ts +is +.IR NULL . +.I tm +may +.I not +be +.RI NULL . + +.SH RETURN VALUE +The +.BR libsimple_localtime () +function return a 0 upon successful completion; +otherwise the they return -1 and set +.I errno +to indicate the error. The +.BR libsimple_enlocaltime () +and +.BR libsimple_elocaltime () +functions terminate the processes on failure. + +.SH ERRORS +The +.BR libsimple_localtime () +function will fail for the reasons specified for the +.BR localtime_r (3) +function. +.PP +The +.BR libsimple_enlocaltime () +and +.BR libsimple_elocaltime () +functions will terminate the process on failure. + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_localtime (), +.br +.BR libsimple_enlocaltime (), +.br +.BR libsimple_elocaltime () +T} Thread safety MT-Safe +T{ +.BR libsimple_localtime (), +.br +.BR libsimple_enlocaltime (), +.br +.BR libsimple_elocaltime () +T} Async-signal safety AS-Safe +T{ +.BR libsimple_localtime (), +.br +.BR libsimple_enlocaltime (), +.br +.BR libsimple_elocaltime () +T} Async-cancel safety AC-Safe +.TE + +.SH EXAMPLES +None. + +.SH APPLICATION USAGE +None. + +.SH RATIONALE +None. + +.SH FUTURE DIRECTIONS +None. + +.SH NOTES +None. + +.SH BUGS +None. + +.SH SEE ALSO +.BR libsimple_gmtime (3), +.BR ntp_adjtime (2), +.BR localtime_r (3) diff --git a/man3/libsimple_mallocz.3 b/man3/libsimple_mallocz.3 index 86254ec..54ca3e7 100644 --- a/man3/libsimple_mallocz.3 +++ b/man3/libsimple_mallocz.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MALLOCZ 3 2018-11-03 libsimple +.TH LIBSIMPLE_MALLOCZ 3 libsimple .SH NAME libsimple_mallocz \- allocate optionally initialised memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -22,6 +23,7 @@ static inline void *libsimple_emallocz(int \fIclear\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_mallocz (), @@ -80,6 +82,7 @@ and functions behaviour is unspecified if .I n is 0. + .SH RETURN VALUE The .BR libsimple_mallocz (), @@ -98,6 +101,7 @@ it indicate the error, and the and .BR libsimple_emallocz () functions terminated the process. + .SH ERRORS The .BR libsimple_mallocz () @@ -112,6 +116,7 @@ The and .BR libsimple_emallocz () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -142,18 +147,25 @@ T{ .BR libsimple_emallocz () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_vmallocn (3), @@ -161,7 +173,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_memalign.3 b/man3/libsimple_memalign.3 index 8bf04a1..8bbf57e 100644 --- a/man3/libsimple_memalign.3 +++ b/man3/libsimple_memalign.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMALIGN 3 2018-11-03 libsimple +.TH LIBSIMPLE_MEMALIGN 3 libsimple .SH NAME libsimple_memalign \- allocate memory with custom alignment + .SH SYNOPSIS .nf #include <libsimple.h> @@ -22,6 +23,7 @@ static inline void *libsimple_ememalign(size_t \fIalignment\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memalign (), @@ -68,6 +70,7 @@ and functions behaviour is unspecified if .I n is 0. + .SH RETURN VALUE The .BR libsimple_memalign (), @@ -86,6 +89,7 @@ it indicate the error, and the and .BR libsimple_ememalign () functions terminated the process. + .SH ERRORS The .BR libsimple_memalign () @@ -107,6 +111,7 @@ The and .BR libsimple_ememalign () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -137,14 +142,19 @@ T{ .BR libsimple_ememalign () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES Portable applications shall assume that pointer returned by the @@ -154,8 +164,10 @@ function can be deallocated with the functon, unless the namespaced alias .BR libsimple_memalign () is used explicitly. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -164,7 +176,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), .BR libsimple_vmemalignzn (3), diff --git a/man3/libsimple_memalignz.3 b/man3/libsimple_memalignz.3 index 11a70d7..f756539 100644 --- a/man3/libsimple_memalignz.3 +++ b/man3/libsimple_memalignz.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMALIGNZ 3 2018-11-03 libsimple +.TH LIBSIMPLE_MEMALIGNZ 3 libsimple .SH NAME libsimple_memalignz \- allocate optionally initialised memory with custom alignment + .SH SYNOPSIS .nf #include <libsimple.h> @@ -22,6 +23,7 @@ static inline void *libsimple_ememalignz(int \fIclear\fP, size_t \fIalignment\fP .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memalignz (), @@ -69,6 +71,7 @@ and functions behaviour is unspecified if .I n is 0. + .SH RETURN VALUE The .BR libsimple_memalignz (), @@ -87,6 +90,7 @@ it indicate the error, and the and .BR libsimple_ememalignz () functions terminated the process. + .SH ERRORS The .BR libsimple_memalignz () @@ -108,6 +112,7 @@ The and .BR libsimple_ememalignz () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -138,18 +143,25 @@ T{ .BR libsimple_ememalignz () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -158,7 +170,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_vmemalignn (3), .BR libsimple_vmemalignzn (3), diff --git a/man3/libsimple_memcasechr.3 b/man3/libsimple_memcasechr.3 index d06a6d8..bfbea2f 100644 --- a/man3/libsimple_memcasechr.3 +++ b/man3/libsimple_memcasechr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMCASECHR 3 2018-10-23 libsimple +.TH LIBSIMPLE_MEMCASECHR 3 libsimple .SH NAME libsimple_memcasechr \- find byte in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memcasechr(const void *\fIs\fP, int \fIc\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memcasechr () @@ -27,6 +29,7 @@ for the first occurence of the byte .BR char ). .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_memcasechr () @@ -40,10 +43,12 @@ is the returned pointer. If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_memcasechr () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -62,18 +67,25 @@ T{ .BR libsimple_memcasechr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memcasechr_inv (3), .BR libsimple_memrcasechr (3), diff --git a/man3/libsimple_memcasechr_inv.3 b/man3/libsimple_memcasechr_inv.3 index e14d7d4..c547403 100644 --- a/man3/libsimple_memcasechr_inv.3 +++ b/man3/libsimple_memcasechr_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMCASECHR_INV 3 2018-11-24 libsimple +.TH LIBSIMPLE_MEMCASECHR_INV 3 libsimple .SH NAME libsimple_memcasechr_inv \- find different byte in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memcasechr_inv(const void *\fIs\fP, int \fIc\fP, size_t \fIn\fP) .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memcasechr_inv () @@ -28,6 +30,7 @@ other than .BR char ). .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_memcasechr_inv () @@ -41,10 +44,12 @@ is the returned pointer. If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_memcasechr_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -63,18 +68,25 @@ T{ .BR libsimple_memcasechr_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memcasechr (3), .BR libsimple_memchr_inv (3), diff --git a/man3/libsimple_memcasecmp.3 b/man3/libsimple_memcasecmp.3 index 63e0e27..a7ccf79 100644 --- a/man3/libsimple_memcasecmp.3 +++ b/man3/libsimple_memcasecmp.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMCASECMP 3 2018-10-21 libsimple +.TH LIBSIMPLE_MEMCASECMP 3 libsimple .SH NAME libsimple_memcasecmp \- compare two memory segments + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline int libsimple_memcasecmp(const void *\fIa\fP, const void *\fIb\fP, .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memcasecmp () @@ -27,6 +29,7 @@ and The comparison is case-insensitive and made as if the strings were converted to lowercase and as .BR "unsigned char *" s. + .SH RETURN VALUE The .BR libsimple_memcasecmp () @@ -39,10 +42,12 @@ a positive value if is greater than .IR b , and 0 otherwise. + .SH ERRORS The .BR libsimple_memcasecmp () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -61,18 +66,25 @@ T{ .BR libsimple_memcasecmp () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memcaseeq (3), .BR libsimple_memcaseeqlen (3), diff --git a/man3/libsimple_memcaseends.3 b/man3/libsimple_memcaseends.3 index 6605f79..1357f7b 100644 --- a/man3/libsimple_memcaseends.3 +++ b/man3/libsimple_memcaseends.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMCASEENDS 3 2018-10-23 libsimple +.TH LIBSIMPLE_MEMCASEENDS 3 libsimple .SH NAME libsimple_memcaseends \- checks end of memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ int libsimple_memcaseends(const void *\fIs\fP, size_t \fIn\fP, const void *\fIt\ .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memcaseends () @@ -33,6 +35,7 @@ first bytes of .IR t . .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_memcaseends () @@ -41,10 +44,12 @@ function returns 1 if ends with .IR t , otherwise it returns 0. + .SH ERRORS The .BR libsimple_memcaseends () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -63,18 +68,25 @@ T{ .BR libsimple_memcaseends () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memends (3), .BR libsimple_memcasestarts (3), diff --git a/man3/libsimple_memcaseeq.3 b/man3/libsimple_memcaseeq.3 index 6e30970..c48b7c5 100644 --- a/man3/libsimple_memcaseeq.3 +++ b/man3/libsimple_memcaseeq.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMCASEEQ 3 2018-10-23 libsimple +.TH LIBSIMPLE_MEMCASEEQ 3 libsimple .SH NAME libsimple_memcaseeq \- check two memory segments for equality + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline int libsimple_memcaseeq(const void *\fIa\fP, const void *\fIb\fP, .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memcaseeq () @@ -26,6 +28,7 @@ and are equal. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_memcaseeq () @@ -35,10 +38,12 @@ and .I b are equal, with the possible exception if their case, otherwise it returns 0. + .SH ERRORS The .BR libsimple_memcaseeq () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -57,18 +62,25 @@ T{ .BR libsimple_memcaseeq () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memeq (3), .BR libsimple_memcaseeqlen (3), diff --git a/man3/libsimple_memcaseeqlen.3 b/man3/libsimple_memcaseeqlen.3 index f8779c8..341725a 100644 --- a/man3/libsimple_memcaseeqlen.3 +++ b/man3/libsimple_memcaseeqlen.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMCASEEQLEN 3 2018-10-23 libsimple +.TH LIBSIMPLE_MEMCASEEQLEN 3 libsimple .SH NAME libsimple_memcaseeqlen \- check initial commonality + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ size_t libsimple_memcaseeqlen(const void *\fIa\fP, size_t \fIn\fP, const void *\ .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memcaseeqlen () @@ -28,6 +30,7 @@ with size at their beginnings. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_memcaseeqlen () @@ -36,10 +39,12 @@ function returns the number of bytes and .I b have in common at their beginnings. + .SH ERRORS The .BR libsimple_memcaseeqlen () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -58,18 +63,25 @@ T{ .BR libsimple_memcaseeqlen () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memcaseeq (3), .BR libsimple_memeqlen (3), diff --git a/man3/libsimple_memcasemem.3 b/man3/libsimple_memcasemem.3 index 37c6cda..ce4de17 100644 --- a/man3/libsimple_memcasemem.3 +++ b/man3/libsimple_memcasemem.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMCASEMEM 3 2018-10-23 libsimple +.TH LIBSIMPLE_MEMCASEMEM 3 libsimple .SH NAME libsimple_memcasemem \- find byte string in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memcasemem(const void *\fIhaystack\fP, size_t \fInhaystack\fP, c .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memcasemem () @@ -27,6 +29,7 @@ with the size .IR nneedle . .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_memcasemem () @@ -40,10 +43,12 @@ is the returned pointer. If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_memcasemem () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -62,18 +67,25 @@ T{ .BR libsimple_memcasemem () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memmem (3), .BR libsimple_memrcasemem (3), diff --git a/man3/libsimple_memcasescan.3 b/man3/libsimple_memcasescan.3 index 7479a05..ef2a6ec 100644 --- a/man3/libsimple_memcasescan.3 +++ b/man3/libsimple_memcasescan.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMCASESCAN 3 2018-11-17 libsimple +.TH LIBSIMPLE_MEMCASESCAN 3 libsimple .SH NAME libsimple_memcasescan \- find byte in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memcasescan(const void *\fIs\fP, int \fIc\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memcasescan () @@ -29,6 +31,7 @@ If no such character exist in the memory segment, the memory segment's end is returned. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_memcasescan () @@ -42,10 +45,12 @@ is the returned pointer. If no such offset exists, .I &s[n] is returned. + .SH ERRORS The .BR libsimple_memcasescan () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -64,18 +69,25 @@ T{ .BR libsimple_memcasescan () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memcasescan_inv (3), .BR libsimple_memscan (3), diff --git a/man3/libsimple_memcasescan_inv.3 b/man3/libsimple_memcasescan_inv.3 index f58c222..d43529f 100644 --- a/man3/libsimple_memcasescan_inv.3 +++ b/man3/libsimple_memcasescan_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMCASESCAN_INV 3 2018-11-24 libsimple +.TH LIBSIMPLE_MEMCASESCAN_INV 3 libsimple .SH NAME libsimple_memcasescan_inv \- skip byte in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memcasescan_inv(const void *\fIs\fP, int \fIc\fP, size_t \fIn\fP .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memcasescan_inv () @@ -30,6 +32,7 @@ If no such character exist in the memory segment, the memory segment's end is returned. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_memcasescan_inv () @@ -43,10 +46,12 @@ is the returned pointer. If no such offset exists, .I &s[n] is returned. + .SH ERRORS The .BR libsimple_memcasescan_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -65,18 +70,25 @@ T{ .BR libsimple_memcasescan_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memcasescan (3), .BR libsimple_memscan_inv (3), diff --git a/man3/libsimple_memcasestarts.3 b/man3/libsimple_memcasestarts.3 index d8a7259..9e93a5f 100644 --- a/man3/libsimple_memcasestarts.3 +++ b/man3/libsimple_memcasestarts.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMCASESTARTS 3 2018-10-23 libsimple +.TH LIBSIMPLE_MEMCASESTARTS 3 libsimple .SH NAME libsimple_memcasestarts \- checks beginning of memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ int libsimple_memcasestarts(const void *\fIs\fP, size_t \fIn\fP, const void *\fI .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memcasestarts () @@ -31,6 +33,7 @@ first bytes of .IR t . .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_memcasestarts () @@ -39,10 +42,12 @@ function returns 1 if begins with .IR t , otherwise it returns 0. + .SH ERRORS The .BR libsimple_memcasestarts () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -61,18 +66,25 @@ T{ .BR libsimple_memcasestarts () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memstarts (3), .BR libsimple_memcaseends (3), diff --git a/man3/libsimple_memchr_inv.3 b/man3/libsimple_memchr_inv.3 index 23c8271..8003aa9 100644 --- a/man3/libsimple_memchr_inv.3 +++ b/man3/libsimple_memchr_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMCHR_INV 3 2018-11-24 libsimple +.TH LIBSIMPLE_MEMCHR_INV 3 libsimple .SH NAME libsimple_memchr_inv \- find different byte in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memchr_inv(const void *\fIs\fP, int \fIc\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memchr_inv () @@ -28,6 +30,7 @@ other than .BR char ). .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_memchr_inv () @@ -41,10 +44,12 @@ is the returned pointer. If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_memchr_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -63,18 +68,25 @@ T{ .BR libsimple_memchr_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memcasechr_inv (3), .BR libsimple_memrchr_inv (3), diff --git a/man3/libsimple_memcmove.3 b/man3/libsimple_memcmove.3 index 0079e28..88d7e4f 100644 --- a/man3/libsimple_memcmove.3 +++ b/man3/libsimple_memcmove.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMCMOVE 3 2018-11-25 libsimple +.TH LIBSIMPLE_MEMCMOVE 3 libsimple .SH NAME libsimple_memcmove \- move bytes within an array of bytes + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memcmove(void *\fIdest\fP, const void *\fIsrc\fP, int \fIc\fP, s .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memcmove () @@ -30,6 +32,7 @@ However the move stops after the character is moved. The arrays may overlap in the. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_memcmove () @@ -43,10 +46,12 @@ after it was move, if the character was not moved .I NULL is returned. + .SH ERRORS The .BR libsimple_memcmove () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -65,18 +70,25 @@ T{ .BR libsimple_memcmove () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_rawmemcmove (3), .BR libsimple_mempmove (3), diff --git a/man3/libsimple_memdup.3 b/man3/libsimple_memdup.3 index e111574..8a6903d 100644 --- a/man3/libsimple_memdup.3 +++ b/man3/libsimple_memdup.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMDUP 3 2018-10-27 libsimple +.TH LIBSIMPLE_MEMDUP 3 libsimple .SH NAME libsimple_memdup \- duplicate bytes in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -26,10 +27,11 @@ static inline void *libsimple_ememdup(const void *\fIs\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memdup () -function constructs allocates memory and copies +function allocates memory and copies .I n first bytes from .I s @@ -57,6 +59,7 @@ function that uses allocates the memory on the stack rather than on the heap, causing the return pointer to become invalid when the calling function returns. It is only available when compling with GCC or Clang. + .SH RETURN VALUE Upon successful completion, the .BR libsimple_memdupa (), @@ -87,12 +90,14 @@ by the .BR libsimple_memdupa () function, it is automatically deallocated when the calling function returns. + .SH ERRORS The .BR libsimple_memdup () function may fail for any reason specified for the -.BR alloc (3) +.BR malloc (3) function. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -129,21 +134,32 @@ T{ .BR libsimple_ememdup (), T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_aligned_memdup (3), .BR libsimple_enstrndup (3), .BR libsimple_enstrdup (3), +.BR libsimple_enwcsdup (3), +.BR libsimple_wcsndup (3), +.BR libsimple_wmemdup (3), .BR strndup (3), -.BR strdup (3) +.BR strdup (3), +.BR wcsdup (3) diff --git a/man3/libsimple_memelem.3 b/man3/libsimple_memelem.3 index 4ccdb3a..cdab273 100644 --- a/man3/libsimple_memelem.3 +++ b/man3/libsimple_memelem.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMELEM 3 2018-11-25 libsimple +.TH LIBSIMPLE_MEMELEM 3 libsimple .SH NAME libsimple_memelem \- find aligned byte string in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memelem(const void *\fIhaystack\fP, const void *\fIneedle\fP, si .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memelem () @@ -29,6 +31,7 @@ and with an offset equivalent to zero modulo .IR width . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_memelem () @@ -44,10 +47,12 @@ the offset is equivalent to zero modulo If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_memelem () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -66,18 +71,25 @@ T{ .BR libsimple_memelem () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memelem_inv (3), .BR libsimple_memelemscan (3), diff --git a/man3/libsimple_memelem_inv.3 b/man3/libsimple_memelem_inv.3 index c3b3208..c87e590 100644 --- a/man3/libsimple_memelem_inv.3 +++ b/man3/libsimple_memelem_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMELEM_INV 3 2018-11-25 libsimple +.TH LIBSIMPLE_MEMELEM_INV 3 libsimple .SH NAME libsimple_memelem_inv \- find different aligned byte string in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memelem_inv(const void *\fIhaystack\fP, const void *\fIneedle\fP .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memelem_inv () @@ -30,6 +32,7 @@ and with an offset equivalent to zero modulo .IR width . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_memelem_inv () @@ -45,10 +48,12 @@ the offset is equivalent to zero modulo If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_memelem_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -67,18 +72,25 @@ T{ .BR libsimple_memelem_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memelem (3), .BR libsimple_memelemscan_inv (3), diff --git a/man3/libsimple_memelemmove.3 b/man3/libsimple_memelemmove.3 index d566b5d..194ff79 100644 --- a/man3/libsimple_memelemmove.3 +++ b/man3/libsimple_memelemmove.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMELEMMOVE 3 2018-11-25 libsimple +.TH LIBSIMPLE_MEMELEMMOVE 3 libsimple .SH NAME libsimple_memelemmove, libsimple_memelemcpy \- copy or move elements within an array + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ static inline void *libsimple_memelemcpy(void *\fIdest\fP, const void *\fIsrc\fP .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memelemmove () @@ -43,6 +45,7 @@ The arrays may overlap in the function but not in the .BR libsimple_memelemcpy () function. + .SH RETURN VALUE The .BR libsimple_memelemmove () @@ -58,12 +61,14 @@ after it was copied. If the element was not copied .I NULL is returned. + .SH ERRORS The .BR libsimple_memelemmove () and .BR libsimple_memelemcpy () functions cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -88,18 +93,25 @@ and .BR libsimple_memelemcpy () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_rawmemelemmove (3), .BR libsimple_mempmove (3), diff --git a/man3/libsimple_memelemscan.3 b/man3/libsimple_memelemscan.3 index 092508e..67b96cb 100644 --- a/man3/libsimple_memelemscan.3 +++ b/man3/libsimple_memelemscan.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMELEMSCAN 3 2018-11-25 libsimple +.TH LIBSIMPLE_MEMELEMSCAN 3 libsimple .SH NAME libsimple_memelemscan \- find aligned byte string in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memelemscan(const void *\fIhaystack\fP, const void *\fIneedle\fP .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memelemscan () @@ -31,6 +33,7 @@ If no such character exist in the memory segment, the memory segment's end is returned. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_memelemscan () @@ -46,10 +49,12 @@ the offset is equivalent to zero modulo If no such offset exists, .I (void *)&((char *)haystack)[n*width] is returned. + .SH ERRORS The .BR libsimple_memelemscan () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -68,18 +73,25 @@ T{ .BR libsimple_memelemscan () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memelemscan_inv (3), .BR libsimple_memelem (3), diff --git a/man3/libsimple_memelemscan_inv.3 b/man3/libsimple_memelemscan_inv.3 index 3fdd8f8..24eb8ac 100644 --- a/man3/libsimple_memelemscan_inv.3 +++ b/man3/libsimple_memelemscan_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMELEMSCAN_INV 3 2018-11-25 libsimple +.TH LIBSIMPLE_MEMELEMSCAN_INV 3 libsimple .SH NAME libsimple_memelemscan_inv \- skip aligned byte string in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memelemscan_inv(const void *\fIhaystack\fP, const void *\fIneedl .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memelemscan_inv () @@ -32,6 +34,7 @@ If no such character exist in the memory segment, the memory segment's end is returned. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_memelemscan_inv () @@ -47,10 +50,12 @@ the offset is equivalent to zero modulo If no such offset exists, .I (void *)&((char *)haystack)[n*width] is returned. + .SH ERRORS The .BR libsimple_memelemscan_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -69,18 +74,25 @@ T{ .BR libsimple_memelemscan_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memelemscan (3), .BR libsimple_memelem_inv (3), diff --git a/man3/libsimple_memends.3 b/man3/libsimple_memends.3 index 34db568..2529370 100644 --- a/man3/libsimple_memends.3 +++ b/man3/libsimple_memends.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMENDS 3 2018-10-23 libsimple +.TH LIBSIMPLE_MEMENDS 3 libsimple .SH NAME libsimple_memends \- checks end of memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ int libsimple_memends(const void *\fIs\fP, size_t \fIn\fP, const void *\fIt\fP, .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memends () @@ -33,6 +35,7 @@ first bytes of .IR t . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_memends () @@ -41,10 +44,12 @@ function returns 1 if ends with .IR t , otherwise it returns 0. + .SH ERRORS The .BR libsimple_memends () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -63,18 +68,25 @@ T{ .BR libsimple_memends () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memcaseends (3), .BR libsimple_memstarts (3), diff --git a/man3/libsimple_memeq.3 b/man3/libsimple_memeq.3 index 6631328..a5683e5 100644 --- a/man3/libsimple_memeq.3 +++ b/man3/libsimple_memeq.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMEQ 3 2018-10-23 libsimple +.TH LIBSIMPLE_MEMEQ 3 libsimple .SH NAME libsimple_memeq \- check two memory segments for equality + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline int libsimple_memeq(const void *\fIa\fP, const void *\fIb\fP, size .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memeq () @@ -26,6 +28,7 @@ and are equal. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_memeq () @@ -34,10 +37,12 @@ function returns 1 one if and .I b are equal, otherwise it returns 0. + .SH ERRORS The .BR libsimple_memeq () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -56,18 +61,25 @@ T{ .BR libsimple_memeq () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memcaseeq (3), .BR libsimple_memeqlen (3), diff --git a/man3/libsimple_memeqlen.3 b/man3/libsimple_memeqlen.3 index 6a03808..4344a39 100644 --- a/man3/libsimple_memeqlen.3 +++ b/man3/libsimple_memeqlen.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMEQLEN 3 2018-10-23 libsimple +.TH LIBSIMPLE_MEMEQLEN 3 libsimple .SH NAME libsimple_memeqlen \- check initial commonality + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ size_t libsimple_memeqlen(const void *\fIa\fP, size_t \fIn\fP, const void *\fIb\ .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memeqlen () @@ -28,6 +30,7 @@ with size at their beginnings. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_memeqlen () @@ -36,10 +39,12 @@ function returns the number of bytes and .I b have in common at their beginnings. + .SH ERRORS The .BR libsimple_memeqlen () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -58,18 +63,25 @@ T{ .BR libsimple_memeqlen () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memeq (3), .BR libsimple_memcaseeqlen (3), diff --git a/man3/libsimple_memmem.3 b/man3/libsimple_memmem.3 index 30dea44..cb24cc4 100644 --- a/man3/libsimple_memmem.3 +++ b/man3/libsimple_memmem.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMMEM 3 2018-10-23 libsimple +.TH LIBSIMPLE_MEMMEM 3 libsimple .SH NAME libsimple_memmem \- find byte string in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memmem(const void *\fIhaystack\fP, size_t \fInhaystack\fP, const .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memmem () @@ -27,6 +29,7 @@ with the size .IR nneedle . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_memmem () @@ -40,10 +43,12 @@ is the returned pointer. If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_memmem () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -62,18 +67,25 @@ T{ .BR libsimple_memmem () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memrcasemem (3), .BR libsimple_memrmem (3), diff --git a/man3/libsimple_mempcpy.3 b/man3/libsimple_mempcpy.3 index c23a041..a10bba0 100644 --- a/man3/libsimple_mempcpy.3 +++ b/man3/libsimple_mempcpy.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMPCPY 3 2018-11-16 libsimple +.TH LIBSIMPLE_MEMPCPY 3 libsimple .SH NAME libsimple_mempcpy \- copy an array of bytes into another + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline void *libsimple_mempcpy(void *restrict \fIdest\fP, const void *res .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_mempcpy () @@ -31,6 +33,7 @@ must not overlap with the first .I n bytes of .IR src . + .SH RETURN VALUE The .BR libsimple_mempcpy () @@ -39,10 +42,12 @@ function returns the pointer with the offset .I n (the byte where the copy stopped). + .SH ERRORS The .BR libsimple_mempcpy () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -61,18 +66,25 @@ T{ .BR libsimple_mempcpy () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_mempmove (3), .BR libsimple_mempset (3), diff --git a/man3/libsimple_mempmove.3 b/man3/libsimple_mempmove.3 index 3545412..29b7e4e 100644 --- a/man3/libsimple_mempmove.3 +++ b/man3/libsimple_mempmove.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMPMOVE 3 2018-11-16 libsimple +.TH LIBSIMPLE_MEMPMOVE 3 libsimple .SH NAME libsimple_mempmove \- move bytes within an array of bytes + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline void *libsimple_mempmove(void *\fIdest\fP, const void *\fIsrc\fP, .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_mempmove () @@ -24,6 +26,7 @@ bytes of into .IR dest . The arrays may overlap. + .SH RETURN VALUE The .BR libsimple_mempmove () @@ -32,10 +35,12 @@ function returns the pointer with the offset .I n (the byte where the copy stopped). + .SH ERRORS The .BR libsimple_mempmove () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -54,18 +59,25 @@ T{ .BR libsimple_mempmove () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_mempcpy (3), .BR libsimple_mempset (3), diff --git a/man3/libsimple_mempset.3 b/man3/libsimple_mempset.3 index e6ce289..31ebd06 100644 --- a/man3/libsimple_mempset.3 +++ b/man3/libsimple_mempset.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMPSET 3 2018-10-20 libsimple +.TH LIBSIMPLE_MEMPSET 3 libsimple .SH NAME libsimple_mempset \- fill an array of bytes + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline void *libsimple_mempset(void *\fIs\fP, int \fIc\fP, size_t \fIn\fP .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_mempset () @@ -25,6 +27,7 @@ with the value .I c coverted to a .BR char . + .SH RETURN VALUE The .BR libsimple_mempset () @@ -33,10 +36,12 @@ function returns the pointer with the offset .I n (the byte where the copy stopped). + .SH ERRORS The .BR libsimple_mempset () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -55,18 +60,25 @@ T{ .BR libsimple_mempset () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_mempsetelem (3), .BR libsimple_mempcpy (3), diff --git a/man3/libsimple_mempsetelem.3 b/man3/libsimple_mempsetelem.3 index e10a252..805b3cd 100644 --- a/man3/libsimple_mempsetelem.3 +++ b/man3/libsimple_mempsetelem.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMPSETELEM 3 2018-10-20 libsimple +.TH LIBSIMPLE_MEMPSETELEM 3 libsimple .SH NAME libsimple_mempsetelem \- fill an array with a value + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_mempsetelem(void *\fIbuf\fP, const void *\fIitem\fP, size_t \fIw .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_mempsetelem () @@ -25,6 +27,7 @@ copies of the element .I item with the size .IR width . + .SH RETURN VALUE The .BR libsimple_mempsetelem () @@ -33,10 +36,12 @@ function returns the pointer with the offset .I n*width (the byte where the copy stopped). + .SH ERRORS The .BR libsimple_mempsetelem () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -55,18 +60,25 @@ T{ .BR libsimple_mempsetelem () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memsetelem (3), .BR libsimple_mempset (3) diff --git a/man3/libsimple_memrcasechr.3 b/man3/libsimple_memrcasechr.3 index 5bb60b4..77322d5 100644 --- a/man3/libsimple_memrcasechr.3 +++ b/man3/libsimple_memrcasechr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMRCASECHR 3 2018-10-23 libsimple +.TH LIBSIMPLE_MEMRCASECHR 3 libsimple .SH NAME libsimple_memrcasechr \- find byte in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memrcasechr(const void *\fIs\fP, int \fIc\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memrcasechr () @@ -27,6 +29,7 @@ for the last occurence of the byte .BR char ). .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_memrcasechr () @@ -40,10 +43,12 @@ is the returned pointer. If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_memrcasechr () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -62,18 +67,25 @@ T{ .BR libsimple_memrcasechr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memrcasechr_inv (3), .BR libsimple_memcasechr (3), diff --git a/man3/libsimple_memrcasechr_inv.3 b/man3/libsimple_memrcasechr_inv.3 index c5936a7..c9e5068 100644 --- a/man3/libsimple_memrcasechr_inv.3 +++ b/man3/libsimple_memrcasechr_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMRCASECHR_INV 3 2018-11-24 libsimple +.TH LIBSIMPLE_MEMRCASECHR_INV 3 libsimple .SH NAME libsimple_memrcasechr_inv \- find byte in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memrcasechr_inv(const void *\fIs\fP, int \fIc\fP, size_t \fIn\fP .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memrcasechr_inv () @@ -28,6 +30,7 @@ other than .BR char ). .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_memrcasechr_inv () @@ -41,10 +44,12 @@ is the returned pointer. If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_memrcasechr_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -63,18 +68,25 @@ T{ .BR libsimple_memrcasechr_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memrcasechr (3), .BR libsimple_memcasechr_inv (3), diff --git a/man3/libsimple_memrcaseeqlen.3 b/man3/libsimple_memrcaseeqlen.3 index 9991e05..cf3734b 100644 --- a/man3/libsimple_memrcaseeqlen.3 +++ b/man3/libsimple_memrcaseeqlen.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMRCASEEQLEN 3 2018-10-23 libsimple +.TH LIBSIMPLE_MEMRCASEEQLEN 3 libsimple .SH NAME libsimple_memrcaseeqlen \- check terminal commonality + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ size_t libsimple_memrcaseeqlen(const void *\fIa\fP, size_t \fIn\fP, const void * .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memrcaseeqlen () @@ -28,6 +30,7 @@ with size at their ends. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_memrcaseeqlen () @@ -36,10 +39,12 @@ function returns the number of bytes and .I b have in common at their ends. + .SH ERRORS The .BR libsimple_memrcaseeqlen () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -58,18 +63,25 @@ T{ .BR libsimple_memrcaseeqlen () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memreqlen (3), .BR libsimple_memcaseeqlen (3), diff --git a/man3/libsimple_memrcasemem.3 b/man3/libsimple_memrcasemem.3 index 76b6ea5..e10fd9e 100644 --- a/man3/libsimple_memrcasemem.3 +++ b/man3/libsimple_memrcasemem.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMRCASEMEM 3 2018-10-23 libsimple +.TH LIBSIMPLE_MEMRCASEMEM 3 libsimple .SH NAME libsimple_memrcasemem \- find byte string in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memrcasemem(const void *\fIhaystack\fP, size_t \fInhaystack\fP, .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memrcasemem () @@ -27,6 +29,7 @@ with the size .IR nneedle . .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_memrcasemem () @@ -40,10 +43,12 @@ is the returned pointer. If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_memrcasemem () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -62,18 +67,25 @@ T{ .BR libsimple_memrcasemem () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memrmem (3), .BR libsimple_memcasemem (3), diff --git a/man3/libsimple_memrchr.3 b/man3/libsimple_memrchr.3 index 71d0c0a..b75e797 100644 --- a/man3/libsimple_memrchr.3 +++ b/man3/libsimple_memrchr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMRCHR 3 2018-10-23 libsimple +.TH LIBSIMPLE_MEMRCHR 3 libsimple .SH NAME libsimple_memrchr \- find byte in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memrchr(const void *\fIs\fP, int \fIc\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memrchr () @@ -27,6 +29,7 @@ for the last occurence of the byte .BR char ). .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_memrchr () @@ -40,10 +43,12 @@ is the returned pointer. If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_memrchr () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -62,18 +67,25 @@ T{ .BR libsimple_memrchr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memrchr_inv (3), .BR libsimple_memrcasechr (3), diff --git a/man3/libsimple_memrchr_inv.3 b/man3/libsimple_memrchr_inv.3 index d498245..80af59c 100644 --- a/man3/libsimple_memrchr_inv.3 +++ b/man3/libsimple_memrchr_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMRCHR_INV 3 2018-11-24 libsimple +.TH LIBSIMPLE_MEMRCHR_INV 3 libsimple .SH NAME libsimple_memrchr_inv \- find different byte in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memrchr_inv(const void *\fIs\fP, int \fIc\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memrchr_inv () @@ -28,6 +30,7 @@ other than .BR char ). .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_memrchr_inv () @@ -41,10 +44,12 @@ is the returned pointer. If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_memrchr_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -63,18 +68,25 @@ T{ .BR libsimple_memrchr_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memrchr (3), .BR libsimple_memchr_inv (3), diff --git a/man3/libsimple_memrelem.3 b/man3/libsimple_memrelem.3 index 26bcfb8..8cbfba2 100644 --- a/man3/libsimple_memrelem.3 +++ b/man3/libsimple_memrelem.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMRELEM 3 2018-11-25 libsimple +.TH LIBSIMPLE_MEMRELEM 3 libsimple .SH NAME libsimple_memrelem \- find aligned byte string in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memrelem(const void *\fIhaystack\fP, const void *\fIneedle\fP, s .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memrelem () @@ -29,6 +31,7 @@ and with an offset equivalent to zero modulo .IR width . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_memrelem () @@ -44,10 +47,12 @@ the offset is equivalent to zero modulo If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_memrelem () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -66,18 +71,25 @@ T{ .BR libsimple_memrelem () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memrelem_inv (3), .BR libsimple_rawmemrelem (3), diff --git a/man3/libsimple_memrelem_inv.3 b/man3/libsimple_memrelem_inv.3 index f3d5736..b2e7680 100644 --- a/man3/libsimple_memrelem_inv.3 +++ b/man3/libsimple_memrelem_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMRELEM_INV 3 2018-11-25 libsimple +.TH LIBSIMPLE_MEMRELEM_INV 3 libsimple .SH NAME libsimple_memrelem_inv \- find different aligned byte string in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memrelem_inv(const void *\fIhaystack\fP, const void *\fIneedle\f .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memrelem_inv () @@ -30,6 +32,7 @@ and with an offset equivalent to zero modulo .IR width . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_memrelem_inv () @@ -45,10 +48,12 @@ the offset is equivalent to zero modulo If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_memrelem_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -67,18 +72,25 @@ T{ .BR libsimple_memrelem_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memrelem (3), .BR libsimple_rawmemrelem_inv (3), diff --git a/man3/libsimple_memreplace.3 b/man3/libsimple_memreplace.3 index 25fd6d1..45800bb 100644 --- a/man3/libsimple_memreplace.3 +++ b/man3/libsimple_memreplace.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMREPLACE 3 2018-11-25 libsimple +.TH LIBSIMPLE_MEMREPLACE 3 libsimple .SH NAME libsimple_memreplace \- replace bytes in an array of bytes + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline void *libsimple_memreplace(void *\fIs\fP, int \fIold\fP, int \fIne .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memreplace () @@ -29,15 +31,18 @@ with the byte .IR new . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_memreplace () function returns .IR &s[n] . + .SH ERRORS The .BR libsimple_memreplace () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -56,18 +61,25 @@ T{ .BR libsimple_memreplace () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memtolower (3), .BR libsimple_memtoupper (3), diff --git a/man3/libsimple_memreplaceelem.3 b/man3/libsimple_memreplaceelem.3 index 6ad5c6c..63ffbef 100644 --- a/man3/libsimple_memreplaceelem.3 +++ b/man3/libsimple_memreplaceelem.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMREPLACEELEM 3 2018-11-25 libsimple +.TH LIBSIMPLE_MEMREPLACEELEM 3 libsimple .SH NAME libsimple_memreplaceelem \- replace elements in an array + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memreplaceelem(void *\fIs\fP, int \fIold\fP, int \fInew\fP, size .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memreplaceelem () @@ -37,15 +39,18 @@ are aligned by .I width bytes in .IR s . + .SH RETURN VALUE The .BR libsimple_memreplaceelem () function returns .IR &s[n*width] . + .SH ERRORS The .BR libsimple_memreplaceelem () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -64,18 +69,25 @@ T{ .BR libsimple_memreplaceelem () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memreplace (3), .BR libsimple_strreplace (3), diff --git a/man3/libsimple_memreqlen.3 b/man3/libsimple_memreqlen.3 index 93b49b4..d4ef7d0 100644 --- a/man3/libsimple_memreqlen.3 +++ b/man3/libsimple_memreqlen.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMREQLEN 3 2018-10-23 libsimple +.TH LIBSIMPLE_MEMREQLEN 3 libsimple .SH NAME libsimple_memreqlen \- check terminal commonality + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ size_t libsimple_memreqlen(const void *\fIa\fP, size_t \fIn\fP, const void *\fIb .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memreqlen () @@ -28,6 +30,7 @@ with size at their ends. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_memreqlen () @@ -36,10 +39,12 @@ function returns the number of bytes and .I b have in common at their ends. + .SH ERRORS The .BR libsimple_memreqlen () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -58,18 +63,25 @@ T{ .BR libsimple_memreqlen () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memrcaseeqlen (3), .BR libsimple_memeqlen (3), diff --git a/man3/libsimple_memrmem.3 b/man3/libsimple_memrmem.3 index 706fc03..95ebccd 100644 --- a/man3/libsimple_memrmem.3 +++ b/man3/libsimple_memrmem.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMRMEM 3 2018-10-23 libsimple +.TH LIBSIMPLE_MEMRMEM 3 libsimple .SH NAME libsimple_memrmem \- find byte string in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memrmem(const void *\fIhaystack\fP, size_t \fInhaystack\fP, cons .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memrmem () @@ -27,6 +29,7 @@ with the size .IR nneedle . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_memrmem () @@ -40,10 +43,12 @@ is the returned pointer. If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_memrmem () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -62,18 +67,25 @@ T{ .BR libsimple_memrmem () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memcasemem (3), .BR libsimple_memmem (3), diff --git a/man3/libsimple_memscan.3 b/man3/libsimple_memscan.3 index 1d85c6a..b79677a 100644 --- a/man3/libsimple_memscan.3 +++ b/man3/libsimple_memscan.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMSCAN 3 2018-11-17 libsimple +.TH LIBSIMPLE_MEMSCAN 3 libsimple .SH NAME libsimple_memscan \- find byte in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memscan(const void *\fIs\fP, int \fIc\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memscan () @@ -29,6 +31,7 @@ If no such character exist in the memory segment, the memory segment's end is returned. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_memscan () @@ -42,10 +45,12 @@ is the returned pointer. If no such offset exists, .I &r[n] is returned. + .SH ERRORS The .BR libsimple_memscan () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -64,18 +69,25 @@ T{ .BR libsimple_memscan () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memscan_inv (3), .BR libsimple_memcasescan (3), diff --git a/man3/libsimple_memscan_inv.3 b/man3/libsimple_memscan_inv.3 index 39a6071..805e42f 100644 --- a/man3/libsimple_memscan_inv.3 +++ b/man3/libsimple_memscan_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMSCAN_INV 3 2018-11-24 libsimple +.TH LIBSIMPLE_MEMSCAN_INV 3 libsimple .SH NAME libsimple_memscan_inv \- skip byte in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_memscan_inv(const void *\fIs\fP, int \fIc\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memscan_inv () @@ -30,6 +32,7 @@ If no such character exist in the memory segment, the memory segment's end is returned. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_memscan_inv () @@ -43,10 +46,12 @@ is the returned pointer. If no such offset exists, .I &r[n] is returned. + .SH ERRORS The .BR libsimple_memscan_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -65,18 +70,25 @@ T{ .BR libsimple_memscan_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memscan (3), .BR libsimple_memchr_inv (3), diff --git a/man3/libsimple_memsetelem.3 b/man3/libsimple_memsetelem.3 index 91e5b63..37e7022 100644 --- a/man3/libsimple_memsetelem.3 +++ b/man3/libsimple_memsetelem.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMSETELEM 3 2018-10-20 libsimple +.TH LIBSIMPLE_MEMSETELEM 3 libsimple .SH NAME libsimple_memsetelem \- fill an array with a value + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline void *libsimple_memsetelem(void *\fIbuf\fP, const void *\fIitem\fP .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memsetelem () @@ -25,15 +27,18 @@ copies of the element .I item with the size .IR width . + .SH RETURN VALUE The .BR libsimple_memsetelem () function returns the pointer .IR buf . + .SH ERRORS The .BR libsimple_memsetelem () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -52,18 +57,25 @@ T{ .BR libsimple_memsetelem () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_mempsetelem (3), .BR memset (3) diff --git a/man3/libsimple_memstarts.3 b/man3/libsimple_memstarts.3 index 527397b..9c6b0ef 100644 --- a/man3/libsimple_memstarts.3 +++ b/man3/libsimple_memstarts.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMSTARTS 3 2018-10-23 libsimple +.TH LIBSIMPLE_MEMSTARTS 3 libsimple .SH NAME libsimple_memstarts \- checks beginning of memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ int libsimple_memstarts(const void *\fIs\fP, size_t \fIn\fP, const void *\fIt\fP .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memstarts () @@ -31,6 +33,7 @@ first bytes of .IR t . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_memstarts () @@ -39,10 +42,12 @@ function returns 1 if begins with .IR t , otherwise it returns 0. + .SH ERRORS The .BR libsimple_memstarts () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -61,18 +66,25 @@ T{ .BR libsimple_memstarts () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memcasestarts (3), .BR libsimple_memends (3), diff --git a/man3/libsimple_memtolower.3 b/man3/libsimple_memtolower.3 index be09689..facb09d 100644 --- a/man3/libsimple_memtolower.3 +++ b/man3/libsimple_memtolower.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMTOLOWER 3 2018-11-25 libsimple +.TH LIBSIMPLE_MEMTOLOWER 3 libsimple .SH NAME libsimple_memtolower, libsimple_memptolower \- convert a character array to lower case + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ void *libsimple_memptolower(void *\fIdest\fP, const void *\fIsrc\fP, size_t \fIn .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memtolower () @@ -33,6 +35,7 @@ All upper case ASCII characters will be converted to lower case. The arrays may overlap, and there is an optimisation for the case where .IR dest==src . + .SH RETURN VALUE The .BR libsimple_memtolower () @@ -43,12 +46,14 @@ The .BR libsimple_memptolower () function returns .IR &dest[n] . + .SH ERRORS The .BR libsimple_memtolower () and .BR libsimple_memptolower () functions cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -73,18 +78,25 @@ T{ .BR libsimple_memptolower () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memtoupper (3), .BR libsimple_memreplace (3), diff --git a/man3/libsimple_memtoupper.3 b/man3/libsimple_memtoupper.3 index 6f45d54..17a747c 100644 --- a/man3/libsimple_memtoupper.3 +++ b/man3/libsimple_memtoupper.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MEMTOUPPER 3 2018-11-25 libsimple +.TH LIBSIMPLE_MEMTOUPPER 3 libsimple .SH NAME libsimple_memtoupper, libsimple_memptoupper \- convert a character array to upper case + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ void *libsimple_memptoupper(void *\fIdest\fP, const void *\fIsrc\fP, size_t \fIn .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memtoupper () @@ -33,6 +35,7 @@ All lower case ASCII characters will be converted to upper case. The arrays may overlap, and there is an optimisation for the case where .IR dest==src . + .SH RETURN VALUE The .BR libsimple_memtoupper () @@ -43,12 +46,14 @@ The .BR libsimple_memptoupper () function returns .IR &dest[n] . + .SH ERRORS The .BR libsimple_memtoupper () and .BR libsimple_memptoupper () functions cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -73,18 +78,25 @@ T{ .BR libsimple_memptoupper () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memtolower (3), .BR libsimple_memreplace (3), diff --git a/man3/libsimple_minimise_number_string.3 b/man3/libsimple_minimise_number_string.3 index 310b725..19533c6 100644 --- a/man3/libsimple_minimise_number_string.3 +++ b/man3/libsimple_minimise_number_string.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MINIMISE_NUMBER_STRING 3 2018-10-31 libsimple +.TH LIBSIMPLE_MINIMISE_NUMBER_STRING 3 libsimple .SH NAME libsimple_minimise_number_string \- ninimise a numerical string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_minimise_number_string(char *\fIs\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_minimise_number_string () @@ -21,15 +23,18 @@ function minimises a string representing a real value with the assumption that the string is on the format .B [+-]\e?[0-9]*\e(\e.[0-9]*\e)\e? (repeating decimals are not supported). + .SH RETURN VALUE The .BR libsimple_minimise_number_string () function returns the pointer .IR s . + .SH ERRORS The .BR libsimple_minimise_number_string () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -48,17 +53,24 @@ T{ .BR libsimple_minimise_number_string () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_timespectostr (3) diff --git a/man3/libsimple_multimespec.3 b/man3/libsimple_multimespec.3 index 34b352d..ad99b22 100644 --- a/man3/libsimple_multimespec.3 +++ b/man3/libsimple_multimespec.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_MULTIMESPEC 3 2018-10-29 libsimple +.TH LIBSIMPLE_MULTIMESPEC 3 libsimple .SH NAME libsimple_multimespec, libsimple_multimeval \- multiply a duration with an integer + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ int libsimple_multimeval(struct timeval *\fIprod\fP, const struct timeval *\fImu .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_multimespec () @@ -36,6 +38,7 @@ is in its valid range ([0, 1000000000) for .BR libsimple_multimespec () and [0, 1000000) for .BR libsimple_multimeval ()). + .SH RETURN VALUE The .BR libsimple_multimespec () @@ -45,6 +48,7 @@ functions return 0 on successful completion; otherwise, \-1 is returned and .I errno is set to indicate the error. + .SH ERRORS The .BR libsimple_multimespec () @@ -75,6 +79,7 @@ function and to for the .BR libsimple_multimeval () function. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -99,18 +104,25 @@ T{ .BR libsimple_multimeval () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_sumtimespec (3), .BR libsimple_difftimespec (3), diff --git a/man3/libsimple_posix_memalignz.3 b/man3/libsimple_posix_memalignz.3 index 3ea4655..a82605f 100644 --- a/man3/libsimple_posix_memalignz.3 +++ b/man3/libsimple_posix_memalignz.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_POSIX_MEMALIGNZ 3 2018-11-03 libsimple +.TH LIBSIMPLE_POSIX_MEMALIGNZ 3 libsimple .SH NAME libsimple_posix_memalignz \- allocate optionally initialised memory with custom alignment + .SH SYNOPSIS .nf #include <libsimple.h> @@ -22,6 +23,7 @@ static inline void libsimple_eposix_memalignz(void **\fImemptr\fP, int \fIclear\ .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_posix_memalignz (), @@ -73,6 +75,7 @@ and functions behaviour is unspecified if .I n is 0. + .SH RETURN VALUE The .BR libsimple_posix_memalignz () @@ -86,6 +89,7 @@ and .BR libsimple_eposix_memalignz () functions do not return a value, but terminated the process on failure. + .SH ERRORS The .BR libsimple_posix_memalignz () @@ -112,6 +116,7 @@ The and .BR libsimple_eposix_memalignz () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -142,18 +147,25 @@ T{ .BR libsimple_eposix_memalignz () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -162,7 +174,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_pvalloc.3 b/man3/libsimple_pvalloc.3 index b6cf4c6..9440712 100644 --- a/man3/libsimple_pvalloc.3 +++ b/man3/libsimple_pvalloc.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_PVALLOC 3 2018-11-03 libsimple +.TH LIBSIMPLE_PVALLOC 3 libsimple .SH NAME libsimple_pvalloc \- allocate memory with page size alignment + .SH SYNOPSIS .nf #include <libsimple.h> @@ -22,6 +23,7 @@ static inline void *libsimple_epvalloc(size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_pvalloc (), @@ -60,6 +62,7 @@ function is used or if the .BR libsimple_epvalloc () function is used. + .SH RETURN VALUE The .BR libsimple_pvalloc (), @@ -78,6 +81,7 @@ it indicate the error, and the and .BR libsimple_epvalloc () functions terminated the process. + .SH ERRORS The .BR libsimple_pvalloc () @@ -95,6 +99,7 @@ The and .BR libsimple_epvalloc () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -125,14 +130,19 @@ T{ .BR libsimple_epvalloc () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES Portable applications shall assume that pointer returned by the @@ -146,8 +156,10 @@ is used explicitly. The GNU implementation of .BR pvalloc (3) is \(dqMT-Unsafe init\(dq. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -156,7 +168,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_pvallocz.3 b/man3/libsimple_pvallocz.3 index c758fcd..1fcc898 100644 --- a/man3/libsimple_pvallocz.3 +++ b/man3/libsimple_pvallocz.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_PVALLOCZ 3 2018-11-03 libsimple +.TH LIBSIMPLE_PVALLOCZ 3 libsimple .SH NAME libsimple_pvallocz \- allocate optionally initialised memory with page size alignment + .SH SYNOPSIS .nf #include <libsimple.h> @@ -22,6 +23,7 @@ static inline void *libsimple_epvallocz(int \fIclear\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_pvallocz (), @@ -68,6 +70,7 @@ and functions behaviour is unspecified if .I n is 0. + .SH RETURN VALUE The .BR libsimple_pvallocz (), @@ -86,6 +89,7 @@ it indicate the error, and the and .BR libsimple_epvallocz () functions terminated the process. + .SH ERRORS The .BR libsimple_pvallocz () @@ -103,6 +107,7 @@ The and .BR libsimple_epvallocz () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -133,20 +138,27 @@ T{ .BR libsimple_epvallocz () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES The GNU implementation of .BR pvalloc (3) is \(dqMT-Unsafe init\(dq. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -155,7 +167,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_rawmemcasechr.3 b/man3/libsimple_rawmemcasechr.3 index 455a818..a6f3b31 100644 --- a/man3/libsimple_rawmemcasechr.3 +++ b/man3/libsimple_rawmemcasechr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_RAWMEMCASECHR 3 2018-10-21 libsimple +.TH LIBSIMPLE_RAWMEMCASECHR 3 libsimple .SH NAME libsimple_rawmemcasechr \- find byte in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_rawmemcasechr(const void *\fIs\fP, int \fIc\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_rawmemcasechr () @@ -31,6 +33,7 @@ occurence, its behaviour is undefined if this is not the case. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_rawmemcasechr () @@ -41,10 +44,12 @@ with a minimal offset such that where .I r is the returned pointer. + .SH ERRORS The .BR libsimple_rawmemcasechr () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -63,18 +68,25 @@ T{ .BR libsimple_rawmemcasechr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_rawmemcasechr_inv (3), .BR libsimple_memcasechr (3), diff --git a/man3/libsimple_rawmemcasechr_inv.3 b/man3/libsimple_rawmemcasechr_inv.3 index f5241a2..f282c7b 100644 --- a/man3/libsimple_rawmemcasechr_inv.3 +++ b/man3/libsimple_rawmemcasechr_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_RAWMEMCASECHR_INV 3 2018-11-24 libsimple +.TH LIBSIMPLE_RAWMEMCASECHR_INV 3 libsimple .SH NAME libsimple_rawmemcasechr_inv \- find different byte in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_rawmemcasechr_inv(const void *\fIs\fP, int \fIc\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_rawmemcasechr_inv () @@ -32,6 +34,7 @@ occurence, its behaviour is undefined if this is not the case. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_rawmemcasechr_inv () @@ -42,10 +45,12 @@ with a minimal offset such that where .I r is the returned pointer. + .SH ERRORS The .BR libsimple_rawmemcasechr_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -64,18 +69,25 @@ T{ .BR libsimple_rawmemcasechr_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_rawmemcasechr (3), .BR libsimple_memcasechr_inv (3), diff --git a/man3/libsimple_rawmemchr.3 b/man3/libsimple_rawmemchr.3 index 1df9b02..f2bf84c 100644 --- a/man3/libsimple_rawmemchr.3 +++ b/man3/libsimple_rawmemchr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_RAWMEMCHR 3 2018-10-21 libsimple +.TH LIBSIMPLE_RAWMEMCHR 3 libsimple .SH NAME libsimple_rawmemchr \- find byte in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_rawmemchr(const void *\fIs\fP, int \fIc\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_rawmemchr () @@ -31,6 +33,7 @@ occurence, its behaviour is undefined if this is not the case. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_rawmemchr () @@ -41,10 +44,12 @@ with a minimal offset such that where .I r is the returned pointer. + .SH ERRORS The .BR libsimple_rawmemchr () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -63,18 +68,25 @@ T{ .BR libsimple_rawmemchr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_rawmemchr_inv (3), .BR libsimple_rawmemcasechr (3), diff --git a/man3/libsimple_rawmemchr_inv.3 b/man3/libsimple_rawmemchr_inv.3 index 011e957..4fd5a48 100644 --- a/man3/libsimple_rawmemchr_inv.3 +++ b/man3/libsimple_rawmemchr_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_RAWMEMCHR_INV 3 2018-11-24 libsimple +.TH LIBSIMPLE_RAWMEMCHR_INV 3 libsimple .SH NAME libsimple_rawmemchr_inv \- find different byte in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_rawmemchr_inv(const void *\fIs\fP, int \fIc\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_rawmemchr_inv () @@ -32,6 +34,7 @@ occurence, its behaviour is undefined if this is not the case. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_rawmemchr_inv () @@ -42,10 +45,12 @@ with a minimal offset such that where .I r is the returned pointer. + .SH ERRORS The .BR libsimple_rawmemchr_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -64,18 +69,25 @@ T{ .BR libsimple_rawmemchr_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_rawmemchr (3), .BR libsimple_memchr_inv (3), diff --git a/man3/libsimple_rawmemcmove.3 b/man3/libsimple_rawmemcmove.3 index 51e9ef4..d4df247 100644 --- a/man3/libsimple_rawmemcmove.3 +++ b/man3/libsimple_rawmemcmove.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_RAWMEMCMOVE 3 2018-11-25 libsimple +.TH LIBSIMPLE_RAWMEMCMOVE 3 libsimple .SH NAME libsimple_rawmemcmove, libsimple_rawmemccpy \- copy or move bytes within an array of bytes + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ static inline void *libsimple_rawmemccpy(void *\fIdest\fP, const void *\fIsrc\fP .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_rawmemcmove () @@ -40,6 +42,7 @@ function but not in the function. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_rawmemcmove () @@ -55,12 +58,14 @@ after it was copied. If the character does not exist in .IR src , the behaviour is undefined. + .SH ERRORS The .BR libsimple_rawmemcmove () and .BR libsimple_rawmemccpy () functions cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -85,18 +90,25 @@ and .BR libsimple_rawmemccpy () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memcmove (3), .BR libsimple_mempmove (3), diff --git a/man3/libsimple_rawmemelem.3 b/man3/libsimple_rawmemelem.3 index 62c986c..348ce14 100644 --- a/man3/libsimple_rawmemelem.3 +++ b/man3/libsimple_rawmemelem.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_RAWMEMELEM 3 2018-11-25 libsimple +.TH LIBSIMPLE_RAWMEMELEM 3 libsimple .SH NAME libsimple_rawmemelem \- find aligned byte string in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_rawmemelem(const void *\fIhaystack\fP, const void *\fIneedle\fP, .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_rawmemelem () @@ -33,6 +35,7 @@ occurence, its behaviour is undefined if this is not the case. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_rawmemelem () @@ -46,10 +49,12 @@ is the returned pointer, and such that the offset is equivalent to zero modulo .IR width . If no such offset exists, the behaviour is undefined. + .SH ERRORS The .BR libsimple_rawmemelem () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -68,18 +73,25 @@ T{ .BR libsimple_rawmemelem () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_rawmemelem_inv (3), .BR libsimple_rawmemrelem (3), diff --git a/man3/libsimple_rawmemelem_inv.3 b/man3/libsimple_rawmemelem_inv.3 index 28e5bef..cd179c2 100644 --- a/man3/libsimple_rawmemelem_inv.3 +++ b/man3/libsimple_rawmemelem_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_RAWMEMELEM_INV 3 2018-11-25 libsimple +.TH LIBSIMPLE_RAWMEMELEM_INV 3 libsimple .SH NAME libsimple_rawmemelem_inv \- find different aligned byte string in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_rawmemelem_inv(const void *\fIhaystack\fP, const void *\fIneedle .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_rawmemelem_inv () @@ -34,6 +36,7 @@ occurence, its behaviour is undefined if this is not the case. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_rawmemelem_inv () @@ -47,10 +50,12 @@ is the returned pointer, and such that the offset is equivalent to zero modulo .IR width . If no such offset exists, the behaviour is undefined. + .SH ERRORS The .BR libsimple_rawmemelem_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -69,18 +74,25 @@ T{ .BR libsimple_rawmemelem_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_rawmemelem (3), .BR libsimple_rawmemrelem_inv (3), diff --git a/man3/libsimple_rawmemelemmove.3 b/man3/libsimple_rawmemelemmove.3 index cafd956..da7b242 100644 --- a/man3/libsimple_rawmemelemmove.3 +++ b/man3/libsimple_rawmemelemmove.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_RAWMEMELEMMOVE 3 2018-11-25 libsimple +.TH LIBSIMPLE_RAWMEMELEMMOVE 3 libsimple .SH NAME libsimple_rawmemelemmove, libsimple_rawmemelemcpy \- copy or move elements within an array + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ static inline void *libsimple_rawmemelemcpy(void *\fIdest\fP, const void *\fIsrc .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_rawmemelemmove () @@ -41,6 +43,7 @@ The arrays may overlap in the function but not in the .BR libsimple_rawmemelemcpy () function. + .SH RETURN VALUE The .BR libsimple_rawmemelemmove () @@ -56,12 +59,14 @@ after it was copied. If the element does not exist in .IR src , the behaviour is undefined. + .SH ERRORS The .BR libsimple_rawmemelemmove () and .BR libsimple_rawmemelemcpy () functions cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -86,18 +91,25 @@ and .BR libsimple_rawmemelemcpy () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_memelemmove (3), .BR libsimple_mempmove (3), diff --git a/man3/libsimple_rawmemrcasechr.3 b/man3/libsimple_rawmemrcasechr.3 index 2959691..4ae1adb 100644 --- a/man3/libsimple_rawmemrcasechr.3 +++ b/man3/libsimple_rawmemrcasechr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_RAWMEMRCASECHR 3 2018-10-21 libsimple +.TH LIBSIMPLE_RAWMEMRCASECHR 3 libsimple .SH NAME libsimple_rawmemrcasechr \- find byte in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_rawmemrcasechr(const void *s, int c, size_t n); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_rawmemrcasechr () @@ -33,6 +35,7 @@ occurence, its behaviour is undefined if this is not the case. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_rawmemrcasechr () @@ -43,10 +46,12 @@ with a maximal offset such that where .I r is the returned pointer. + .SH ERRORS The .BR libsimple_rawmemrcasechr () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -65,18 +70,25 @@ T{ .BR libsimple_rawmemrcasechr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_rawmemrcasechr_inv (3), .BR libsimple_rawmemrchr (3), diff --git a/man3/libsimple_rawmemrcasechr_inv.3 b/man3/libsimple_rawmemrcasechr_inv.3 index 060779d..7c82736 100644 --- a/man3/libsimple_rawmemrcasechr_inv.3 +++ b/man3/libsimple_rawmemrcasechr_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_RAWMEMRCASECHR_INV 3 2018-11-24 libsimple +.TH LIBSIMPLE_RAWMEMRCASECHR_INV 3 libsimple .SH NAME libsimple_rawmemrcasechr_inv \- find different byte in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_rawmemrcasechr_inv(const void *s, int c, size_t n); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_rawmemrcasechr_inv () @@ -34,6 +36,7 @@ occurence, its behaviour is undefined if this is not the case. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_rawmemrcasechr_inv () @@ -44,10 +47,12 @@ with a maximal offset such that where .I r is the returned pointer. + .SH ERRORS The .BR libsimple_rawmemrcasechr_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -66,18 +71,25 @@ T{ .BR libsimple_rawmemrcasechr_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_rawmemrcasechr (3), .BR libsimple_rawmemrchr_inv (3), diff --git a/man3/libsimple_rawmemrchr.3 b/man3/libsimple_rawmemrchr.3 index 5bf0fd6..5bd898c 100644 --- a/man3/libsimple_rawmemrchr.3 +++ b/man3/libsimple_rawmemrchr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_RAWMEMRCHR 3 2018-10-21 libsimple +.TH LIBSIMPLE_RAWMEMRCHR 3 libsimple .SH NAME libsimple_rawmemrchr \- find byte in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_rawmemrchr(const void *s, int c, size_t n); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_rawmemrchr () @@ -33,6 +35,7 @@ occurence, its behaviour is undefined if this is not the case. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_rawmemrchr () @@ -43,10 +46,12 @@ with a maximal offset such that where .I r is the returned pointer. + .SH ERRORS The .BR libsimple_rawmemrchr () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -65,18 +70,25 @@ T{ .BR libsimple_rawmemrchr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_rawmemrchr_inv (3), .BR libsimple_rawmemrcasechr (3), diff --git a/man3/libsimple_rawmemrchr_inv.3 b/man3/libsimple_rawmemrchr_inv.3 index 28bd733..4603026 100644 --- a/man3/libsimple_rawmemrchr_inv.3 +++ b/man3/libsimple_rawmemrchr_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_RAWMEMRCHR_INV 3 2018-11-24 libsimple +.TH LIBSIMPLE_RAWMEMRCHR_INV 3 libsimple .SH NAME libsimple_rawmemrchr_inv \- find different byte in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_rawmemrchr_inv(const void *s, int c, size_t n); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_rawmemrchr_inv () @@ -34,6 +36,7 @@ occurence, its behaviour is undefined if this is not the case. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_rawmemrchr_inv () @@ -44,10 +47,12 @@ with a maximal offset such that where .I r is the returned pointer. + .SH ERRORS The .BR libsimple_rawmemrchr_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -66,18 +71,25 @@ T{ .BR libsimple_rawmemrchr_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_rawmemrchr (3), .BR libsimple_rawmemrcasechr_inv (3), diff --git a/man3/libsimple_rawmemrelem.3 b/man3/libsimple_rawmemrelem.3 index 4ac85aa..1628f2f 100644 --- a/man3/libsimple_rawmemrelem.3 +++ b/man3/libsimple_rawmemrelem.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_RAWMEMRELEM 3 2018-11-25 libsimple +.TH LIBSIMPLE_RAWMEMRELEM 3 libsimple .SH NAME libsimple_rawmemrelem \- find aligned byte string in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_rawmemrelem(const void *\fIhaystack\fP, const void *\fIneedle\fP .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_rawmemrelem () @@ -34,6 +36,7 @@ occurence, its behaviour is undefined if this is not the case. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_rawmemrelem () @@ -47,10 +50,12 @@ is the returned pointer, and such that the offset is equivalent to zero modulo .IR width . If no such offset exists, the behaviour is undefined. + .SH ERRORS The .BR libsimple_rawmemrelem () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -69,18 +74,25 @@ T{ .BR libsimple_rawmemrelem () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_rawmemrelem_inv (3), .BR libsimple_memrelem (3), diff --git a/man3/libsimple_rawmemrelem_inv.3 b/man3/libsimple_rawmemrelem_inv.3 index ee16eb9..1bedba9 100644 --- a/man3/libsimple_rawmemrelem_inv.3 +++ b/man3/libsimple_rawmemrelem_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_RAWMEMRELEM_INV 3 2018-11-25 libsimple +.TH LIBSIMPLE_RAWMEMRELEM_INV 3 libsimple .SH NAME libsimple_rawmemrelem_inv \- find different aligned byte string in memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ void *libsimple_rawmemrelem_inv(const void *\fIhaystack\fP, const void *\fIneedl .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_rawmemrelem_inv () @@ -35,6 +37,7 @@ occurence, its behaviour is undefined if this is not the case. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_rawmemrelem_inv () @@ -48,10 +51,12 @@ is the returned pointer, and such that the offset is equivalent to zero modulo .IR width . If no such offset exists, the behaviour is undefined. + .SH ERRORS The .BR libsimple_rawmemrelem_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -70,18 +75,25 @@ T{ .BR libsimple_rawmemrelem_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_rawmemrelem (3), .BR libsimple_memrelem_inv (3), diff --git a/man3/libsimple_reallocarray.3 b/man3/libsimple_reallocarray.3 new file mode 100644 index 0000000..c6c6635 --- /dev/null +++ b/man3/libsimple_reallocarray.3 @@ -0,0 +1,203 @@ +.TH LIBSIMPLE_REALLOCARRAY 3 libsimple +.SH NAME +libsimple_reallocarray \- reallocate memory + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +static inline void *libsimple_reallocarray(void *\fIptr\fP, size_t \fIn\fP, size_t \fIm\fP); +static inline void *libsimple_enreallocarray(int \fIstatus\fP, void *\fIptr\fP, size_t \fIn\fP, size_t \fIm\fP); +static inline void *libsimple_ereallocarray(void *\fIptr\fP, size_t \fIn\fP, size_t \fIm\fP); + +#ifndef reallocarray +# define reallocarray libsimple_reallocarray +#endif +#ifndef enreallocarray +# define enreallocarray libsimple_enreallocarray +#endif +#ifndef ereallocarray +# define ereallocarray libsimple_ereallocarray +#endif +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_reallocarray (), +.BR libsimple_enreallocarray (), +and +.BR libsimple_ereallocarray () +functions are wrappers for the +.BR realloc (3) +function, they reallocate memory allocated on +the heap and return the older pointer or a new +pointer with the alignment of +.I alignof(max_align_t) +to the allocated memory of +.I n*m +bytes. The behaviour is unspecified if +.I n +or +.I m +is 0. The returned pointer will contain the +same content as +.IR ptr , +but truncated to +.I n*m +bytes if it is smaller or with the new bytes +unitialised if it is larger. If a new pointer +is returned, rather than +.IR ptr , +.I ptr +is deallocated; +.I ptr +is not deallocated on failure. The function +.BR free (3) +shall be called with the returned pointer as +input when the allocated memory is no longer needed. +.PP +The +.BR libsimple_enreallocarray () +and +.BR libsimple_ereallocarray () +functions will terminate the process if the memory +cannot be allocated, by calling the +.BR libsimple_enprintf () +and +.BR libsimple_eprintf () +functions, respectively. +On failure, the process's exit value will be +.I status +if the +.BR libsimple_enreallocarray () +function is used or +.IR libsimple_default_failure_exit (3) +if the +.BR libsimple_ereallocarray () +function is used. + +.SH RETURN VALUE +The +.BR libsimple_reallocarray (), +.BR libsimple_enreallocarray (), +and +.BR libsimple_ereallocarray () +functions return a pointer to the allocated memory +upon success completion; otherwise the +.BR libsimple_reallocarray () +function returns +.B NULL +and set +.I errno +it indicate the error, and the +.BR libsimple_enreallocarray () +and +.BR libsimple_ereallocarray () +functions terminated the process. + +.SH ERRORS +The +.BR libsimple_reallocarray () +function will fail for the reasons specified for the +.BR realloc (3) +function. +.PP +The +.BR libsimple_enreallocarray () +and +.BR libsimple_ereallocarray () +functions will terminate the process on failure. + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_reallocarray (), +.br +.BR libsimple_enreallocarray (), +.br +.BR libsimple_ereallocarray () +T} Thread safety MT-Safe +T{ +.BR libsimple_reallocarray (), +.br +.BR libsimple_enreallocarray (), +.br +.BR libsimple_ereallocarray () +T} Async-signal safety AS-Safe +T{ +.BR libsimple_reallocarray (), +.br +.BR libsimple_enreallocarray (), +.br +.BR libsimple_ereallocarray () +T} Async-cancel safety AC-Safe +.TE + +.SH EXAMPLES +None. + +.SH APPLICATION USAGE +None. + +.SH RATIONALE +None. + +.SH FUTURE DIRECTIONS +None. + +.SH NOTES +None. + +.SH BUGS +None. + +.SH SEE ALSO +.BR libsimple_enmalloc (3), +.BR libsimple_mallocz (3), +.BR libsimple_vmallocn (3), +.BR libsimple_vmalloczn (3), +.BR libsimple_encalloc (3), +.BR libsimple_vcallocn (3), +.BR libsimple_enrealloc (3), +.BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), +.BR libsimple_memalign (3), +.BR libsimple_memalignz (3), +.BR libsimple_vmemalignn (3), +.BR libsimple_vmemalignzn (3), +.BR libsimple_enposix_memalign (3), +.BR libsimple_posix_memalignz (3), +.BR libsimple_vposix_memalignn (3), +.BR libsimple_vposix_memalignzn (3), +.BR libsimple_enaligned_alloc (3), +.BR libsimple_aligned_allocz (3), +.BR libsimple_valigned_allocn (3), +.BR libsimple_valigned_alloczn (3), +.BR libsimple_pvalloc (3), +.BR libsimple_pvallocz (3), +.BR libsimple_vpvallocn (3), +.BR libsimple_vpvalloczn (3), +.BR libsimple_valloc (3), +.BR libsimple_vallocz (3), +.BR libsimple_vvallocn (3), +.BR libsimple_vvalloczn (3), +.BR libsimple_vmemalloc (3), +.BR libsimple_varrayalloc (3), +.BR malloc (3) diff --git a/man3/libsimple_reallocarrayf.3 b/man3/libsimple_reallocarrayf.3 new file mode 100644 index 0000000..b3c2504 --- /dev/null +++ b/man3/libsimple_reallocarrayf.3 @@ -0,0 +1,155 @@ +.TH LIBSIMPLE_REALLOCARRAYF 3 libsimple +.SH NAME +libsimple_reallocarrayf \- reallocate memory + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +static inline void *libsimple_reallocarrayf(void *\fIptr\fP, size_t \fIn\fP, size_t \fIm\fP); + +#ifndef reallocarrayf +# define reallocarrayf libsimple_reallocarrayf +#endif +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_reallocarrayf () +function is a wrapper for the +.BR realloc(3) +function that reallocates memory allocated on +the heap and return the older pointer or a new +pointer with the alignment of +.I alignof(max_align_t) +to the allocated memory of +.I n*m +bytes. The returned pointer will contain the +same content as +.IR ptr , +but truncated to +.I n*m +bytes if it is smaller or with the new bytes +unitialised if it is larger. If a new pointer +is returned, rather than +.IR ptr , +.I ptr +is deallocated; +.I ptr +is deallocated on failure. The function +.BR free (3) +shall be called with the returned pointer as +input when the allocated memory is no longer needed. +.PP +If +.I n +or +.I m +is 0, +.I ptr +is deallocaed and +.B NULL +is returned, however portable applications should, +unless the namespaced alias is used, assume the +behaviour is unspecifed in this case. + +.SH RETURN VALUE +The +.BR libsimple_reallocarrayf (), +function returns a pointer to the allocated memory +upon success completion; otherwise the +.BR libsimple_reallocarrayf () +function returns +.B NULL +and set +.I errno +it indicate the error. + +.SH ERRORS +The +.BR libsimple_reallocarrayf () +function will fail for the reasons specified for the +.BR realloc (3) +function. + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_reallocarrayf () +T} Thread safety MT-Safe +T{ +.BR libsimple_reallocarrayf () +T} Async-signal safety AS-Safe +T{ +.BR libsimple_reallocarrayf () +T} Async-cancel safety AC-Safe +.TE + +.SH EXAMPLES +None. + +.SH APPLICATION USAGE +None. + +.SH RATIONALE +None. + +.SH FUTURE DIRECTIONS +None. + +.SH NOTES +None. + +.SH BUGS +None. + +.SH SEE ALSO +.BR libsimple_enmalloc (3), +.BR libsimple_mallocz (3), +.BR libsimple_vmallocn (3), +.BR libsimple_vmalloczn (3), +.BR libsimple_encalloc (3), +.BR libsimple_vcallocn (3), +.BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), +.BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), +.BR libsimple_memalign (3), +.BR libsimple_memalignz (3), +.BR libsimple_vmemalignn (3), +.BR libsimple_vmemalignzn (3), +.BR libsimple_enposix_memalign (3), +.BR libsimple_posix_memalignz (3), +.BR libsimple_vposix_memalignn (3), +.BR libsimple_vposix_memalignzn (3), +.BR libsimple_enaligned_alloc (3), +.BR libsimple_aligned_allocz (3), +.BR libsimple_valigned_allocn (3), +.BR libsimple_valigned_alloczn (3), +.BR libsimple_pvalloc (3), +.BR libsimple_pvallocz (3), +.BR libsimple_vpvallocn (3), +.BR libsimple_vpvalloczn (3), +.BR libsimple_valloc (3), +.BR libsimple_vallocz (3), +.BR libsimple_vvallocn (3), +.BR libsimple_vvalloczn (3), +.BR libsimple_vmemalloc (3), +.BR libsimple_varrayalloc (3), +.BR malloc (3) diff --git a/man3/libsimple_reallocf.3 b/man3/libsimple_reallocf.3 new file mode 100644 index 0000000..b0c2d1b --- /dev/null +++ b/man3/libsimple_reallocf.3 @@ -0,0 +1,153 @@ +.TH LIBSIMPLE_REALLOCF 3 libsimple +.SH NAME +libsimple_reallocf \- reallocate memory + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +static inline void *libsimple_reallocf(void *\fIptr\fP, size_t \fIn\fP); + +#ifndef reallocf +# define reallocf libsimple_reallocf +#endif +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_reallocf () +function is a wrapper for the +.BR realloc(3) +function that reallocates memory allocated on +the heap and return the older pointer or a new +pointer with the alignment of +.I alignof(max_align_t) +to the allocated memory of +.I n +bytes. The returned pointer will contain the +same content as +.IR ptr , +but truncated to +.I n +bytes if it is smaller or with the new bytes +unitialised if it is larger. If a new pointer +is returned, rather than +.IR ptr , +.I ptr +is deallocated; +.I ptr +is deallocated on failure. The function +.BR free (3) +shall be called with the returned pointer as +input when the allocated memory is no longer needed. +.PP +If +.I n +is 0, +.I ptr +is deallocaed and +.B NULL +is returned, however portable applications should, +unless the namespaced alias is used, assume the +behaviour is unspecifed in this case. + +.SH RETURN VALUE +The +.BR libsimple_reallocf (), +function returns a pointer to the allocated memory +upon success completion; otherwise the +.BR libsimple_reallocf () +function returns +.B NULL +and set +.I errno +it indicate the error. + +.SH ERRORS +The +.BR libsimple_reallocf () +function will fail for the reasons specified for the +.BR realloc (3) +function. + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_reallocf () +T} Thread safety MT-Safe +T{ +.BR libsimple_reallocf () +T} Async-signal safety AS-Safe +T{ +.BR libsimple_reallocf () +T} Async-cancel safety AC-Safe +.TE + +.SH EXAMPLES +None. + +.SH APPLICATION USAGE +None. + +.SH RATIONALE +None. + +.SH FUTURE DIRECTIONS +None. + +.SH NOTES +None. + +.SH BUGS +None. + +.SH SEE ALSO +.BR libsimple_enmalloc (3), +.BR libsimple_mallocz (3), +.BR libsimple_vmallocn (3), +.BR libsimple_vmalloczn (3), +.BR libsimple_encalloc (3), +.BR libsimple_vcallocn (3), +.BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), +.BR libsimple_vreallocn (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), +.BR libsimple_memalign (3), +.BR libsimple_memalignz (3), +.BR libsimple_vmemalignn (3), +.BR libsimple_vmemalignzn (3), +.BR libsimple_enposix_memalign (3), +.BR libsimple_posix_memalignz (3), +.BR libsimple_vposix_memalignn (3), +.BR libsimple_vposix_memalignzn (3), +.BR libsimple_enaligned_alloc (3), +.BR libsimple_aligned_allocz (3), +.BR libsimple_valigned_allocn (3), +.BR libsimple_valigned_alloczn (3), +.BR libsimple_pvalloc (3), +.BR libsimple_pvallocz (3), +.BR libsimple_vpvallocn (3), +.BR libsimple_vpvalloczn (3), +.BR libsimple_valloc (3), +.BR libsimple_vallocz (3), +.BR libsimple_vvallocn (3), +.BR libsimple_vvalloczn (3), +.BR libsimple_vmemalloc (3), +.BR libsimple_varrayalloc (3), +.BR malloc (3) diff --git a/man3/libsimple_reallocfn.3 b/man3/libsimple_reallocfn.3 new file mode 120000 index 0000000..d06b871 --- /dev/null +++ b/man3/libsimple_reallocfn.3 @@ -0,0 +1 @@ +libsimple_vreallocfn.3
\ No newline at end of file diff --git a/man3/libsimple_stpmove.3 b/man3/libsimple_stpmove.3 index 62282d6..d9e8db1 100644 --- a/man3/libsimple_stpmove.3 +++ b/man3/libsimple_stpmove.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STPMOVE 3 2018-11-16 libsimple +.TH LIBSIMPLE_STPMOVE 3 libsimple .SH NAME libsimple_stpmove \- move a string within an array of bytes + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline void *libsimple_stpmove(void *\fIdest\fP, const void *\fIsrc\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_stpmove () @@ -23,6 +25,7 @@ NUL byte that terminates it, into .IR dest . The arrays may overlap. + .SH RETURN VALUE The .BR libsimple_stpmove () @@ -32,10 +35,12 @@ with the offset of the length of string .I str (the address of the copied NUL byte in .IR dest ). + .SH ERRORS The .BR libsimple_stpmove () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -54,18 +59,25 @@ T{ .BR libsimple_stpmove () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strmove (3), .BR libsimple_stpnmove (3), diff --git a/man3/libsimple_stpnmove.3 b/man3/libsimple_stpnmove.3 index eed841a..f2fd267 100644 --- a/man3/libsimple_stpnmove.3 +++ b/man3/libsimple_stpnmove.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STPNMOVE 3 2018-11-16 libsimple +.TH LIBSIMPLE_STPNMOVE 3 libsimple .SH NAME libsimple_stpnmove \- move a string within an array of bytes + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline void *libsimple_stpnmove(void *\fIdest\fP, const void *\fIsrc\fP, .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_stpnmove () @@ -25,6 +27,7 @@ NUL byte that terminates it (if any), into .IR dest . The arrays may overlap. + .SH RETURN VALUE The .BR libsimple_stpnmove () @@ -37,10 +40,12 @@ with the offset of the length of string or .I &dest[n] if no NUL byte was copied). + .SH ERRORS The .BR libsimple_stpnmove () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -59,18 +64,25 @@ T{ .BR libsimple_stpnmove () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strnmove (3), .BR libsimple_stpmove (3), diff --git a/man3/libsimple_strcasechr.3 b/man3/libsimple_strcasechr.3 index 0f1a7f3..7e6d897 100644 --- a/man3/libsimple_strcasechr.3 +++ b/man3/libsimple_strcasechr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRCASECHR 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRCASECHR 3 libsimple .SH NAME libsimple_strcasechr \- find a character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strcasechr(const char *\fIs\fP, int \fIc\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strcasechr () @@ -27,6 +29,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strcasechr () @@ -39,10 +42,12 @@ where is the returned pointer, if no such offset exists, it returns .BR NULL . + .SH ERRORS The .BR libsimple_strcasechr () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -61,18 +66,25 @@ T{ .BR libsimple_strcasechr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strcasechr_inv (3), .BR libsimple_strcasechrnul (3), diff --git a/man3/libsimple_strcasechr_inv.3 b/man3/libsimple_strcasechr_inv.3 index baf5574..cfd2862 100644 --- a/man3/libsimple_strcasechr_inv.3 +++ b/man3/libsimple_strcasechr_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRCASECHR_INV 3 2018-11-25 libsimple +.TH LIBSIMPLE_STRCASECHR_INV 3 libsimple .SH NAME libsimple_strcasechr_inv \- find a different character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strcasechr_inv(const char *\fIs\fP, int \fIc\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strcasechr_inv () @@ -28,6 +30,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strcasechr_inv () @@ -40,10 +43,12 @@ where is the returned pointer, if no such offset exists, it returns .BR NULL . + .SH ERRORS The .BR libsimple_strcasechr_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -62,18 +67,25 @@ T{ .BR libsimple_strcasechr_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strcasechr (3), .BR libsimple_strchr_inv (3), diff --git a/man3/libsimple_strcasechrnul.3 b/man3/libsimple_strcasechrnul.3 index 08dbce4..550893a 100644 --- a/man3/libsimple_strcasechrnul.3 +++ b/man3/libsimple_strcasechrnul.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRCASECHRNUL 3 2018-10-21 libsimple +.TH LIBSIMPLE_STRCASECHRNUL 3 libsimple .SH NAME libsimple_strcasechrnul \- find a character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strcasechrnul(const char *\fIs\fP, int \fIc\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strcasechrnul () @@ -27,6 +29,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strcasechrnul () @@ -37,10 +40,12 @@ with a minimal offset such that where .I r is the returned pointer. + .SH ERRORS The .BR libsimple_strcasechrnul () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -59,18 +64,25 @@ T{ .BR libsimple_strcasechrnul () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strcasechrnul_inv (3), .BR libsimple_strcasechr (3), diff --git a/man3/libsimple_strcasechrnul_inv.3 b/man3/libsimple_strcasechrnul_inv.3 index 61c8179..01c085c 100644 --- a/man3/libsimple_strcasechrnul_inv.3 +++ b/man3/libsimple_strcasechrnul_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRCASECHRNUL_INV 3 2018-11-24 libsimple +.TH LIBSIMPLE_STRCASECHRNUL_INV 3 libsimple .SH NAME libsimple_strcasechrnul_inv \- skip a character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strcasechrnul_inv(const char *\fIs\fP, int \fIc\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strcasechrnul_inv () @@ -28,6 +30,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strcasechrnul_inv () @@ -38,10 +41,12 @@ with a minimal offset such that where .I r is the returned pointer. + .SH ERRORS The .BR libsimple_strcasechrnul_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -60,18 +65,25 @@ T{ .BR libsimple_strcasechrnul_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strcasechrnul (3), .BR libsimple_strcasechr_inv (3), diff --git a/man3/libsimple_strcasecmpnul.3 b/man3/libsimple_strcasecmpnul.3 index 2b0afe6..1f4561e 100644 --- a/man3/libsimple_strcasecmpnul.3 +++ b/man3/libsimple_strcasecmpnul.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRCASECMPNUL 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRCASECMPNUL 3 libsimple .SH NAME libsimple_strcasecmpnul \- compare two strings + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline int libsimple_strcasecmpnul(const char *\fIa\fP, const char *\fIb\ .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strcasecmpnul () @@ -32,6 +34,7 @@ greater than the shorter string. The comparison is case-insensitive and made as if the strings were converted to lowercase and as .BR "unsigned char *" s. + .SH RETURN VALUE The .BR libsimple_strcasecmpnul () @@ -44,10 +47,12 @@ a positive value if is greater than .IR b , and 0 otherwise. + .SH ERRORS The .BR libsimple_strcasecmpnul () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -66,18 +71,25 @@ T{ .BR libsimple_strcasecmpnul () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strcmpnul (3), .BR libsimple_strcaseeqnul (3), diff --git a/man3/libsimple_strcaseends.3 b/man3/libsimple_strcaseends.3 index f658699..22e015f 100644 --- a/man3/libsimple_strcaseends.3 +++ b/man3/libsimple_strcaseends.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRCASEENDS 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRCASEENDS 3 libsimple .SH NAME libsimple_strcaseends \- check the beginning of a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ int libsimple_strcaseends(const char *\fIs\fP, const char *\fIt\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strcaseends () @@ -23,6 +25,7 @@ ends with the string .IR t . .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strcaseends () @@ -31,10 +34,12 @@ function returns 1 if the string ends with the string .IR t , otherwise it returns 0. + .SH ERRORS The .BR libsimple_strcaseends () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -53,18 +58,25 @@ T{ .BR libsimple_strcaseends () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strends (3), .BR libsimple_strcasestarts (3), diff --git a/man3/libsimple_strcaseeq.3 b/man3/libsimple_strcaseeq.3 index b1a25bd..e0dbf7f 100644 --- a/man3/libsimple_strcaseeq.3 +++ b/man3/libsimple_strcaseeq.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRCASEEQ 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRCASEEQ 3 libsimple .SH NAME libsimple_strcaseeq \- compare two strings + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline int libsimple_strcaseeq(const char *\fIa\fP, const char *\fIb\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strcaseeq () @@ -25,16 +27,19 @@ neither of which may be .BR NULL . .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strcaseeq () function returns 1 if the strings are equals, with the possible exception of the case, otherwise it returns 0. + .SH ERRORS The .BR libsimple_strcaseeq () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -53,18 +58,25 @@ T{ .BR libsimple_strcaseeq () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strcaseeqnul (3), .BR libsimple_streq (3), diff --git a/man3/libsimple_strcaseeqlen.3 b/man3/libsimple_strcaseeqlen.3 index 6adba9c..975300e 100644 --- a/man3/libsimple_strcaseeqlen.3 +++ b/man3/libsimple_strcaseeqlen.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRCASEEQLEN 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRCASEEQLEN 3 libsimple .SH NAME libsimple_strcaseeqlen \- check initial commonality + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ size_t libsimple_strcaseeqlen(const char *\fIa\fP, const char *\fIb\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strcaseeqlen () @@ -24,6 +26,7 @@ have in common the string at their beginnings. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strcaseeqlen () @@ -32,10 +35,12 @@ function returns the number of bytes and .I b have in common at their beginnings. + .SH ERRORS The .BR libsimple_strcaseeqlen () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -54,18 +59,25 @@ T{ .BR libsimple_strcaseeqlen () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strcaseeq (3), .BR libsimple_streqlen (3), diff --git a/man3/libsimple_strcaseeqnul.3 b/man3/libsimple_strcaseeqnul.3 index fa26a17..27595b0 100644 --- a/man3/libsimple_strcaseeqnul.3 +++ b/man3/libsimple_strcaseeqnul.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRCASEEQNUL 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRCASEEQNUL 3 libsimple .SH NAME libsimple_strcaseeqnul \- compare two strings + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline int libsimple_strcaseeqnul(const char *\fIa\fP, const char *\fIb\f .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strcaseeqnul () @@ -25,16 +27,19 @@ both of which may be .BR NULL . .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strcaseeqnul () function returns 1 if the strings are equals, with the possible exception of the case, otherwise it returns 0. + .SH ERRORS The .BR libsimple_strcaseeqnul () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -53,18 +58,25 @@ T{ .BR libsimple_strcaseeqnul () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strcaseeq (3), .BR libsimple_streqnul (3), diff --git a/man3/libsimple_strcasestarts.3 b/man3/libsimple_strcasestarts.3 index 0f9d689..bf6786c 100644 --- a/man3/libsimple_strcasestarts.3 +++ b/man3/libsimple_strcasestarts.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRCASESTARTS 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRCASESTARTS 3 libsimple .SH NAME libsimple_strcasestarts \- check the beginning of a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline int libsimple_strcasestarts(const char *\fIs\fP, const char *\fIt\ .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strcasestarts () @@ -23,6 +25,7 @@ starts with the string .IR t . .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strcasestarts () @@ -31,10 +34,12 @@ function returns 1 if the string begins with the string .IR t , otherwise it returns 0. + .SH ERRORS The .BR libsimple_strcasestarts () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -53,18 +58,25 @@ T{ .BR libsimple_strcasestarts () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strstarts (3), .BR libsimple_strcaseends (3), diff --git a/man3/libsimple_strcasestr.3 b/man3/libsimple_strcasestr.3 index 8ee2c45..47b396f 100644 --- a/man3/libsimple_strcasestr.3 +++ b/man3/libsimple_strcasestr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRCASESTR 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRCASESTR 3 libsimple .SH NAME libsimple_strcasestr \- find a substring in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strcasestr(const char *\fIhaystack\fP, const char *\fIneedle\fP) .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strcasestr () @@ -23,6 +25,7 @@ the first occurrence of the substring .IR needle . .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strcasestr () @@ -38,10 +41,12 @@ is the returned pointer. If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_strcasestr () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -60,18 +65,25 @@ T{ .BR libsimple_strcasestr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strrcasestr (3), .BR libsimple_strncasestr (3), diff --git a/man3/libsimple_strchr_inv.3 b/man3/libsimple_strchr_inv.3 index e1cdf53..df2fda5 100644 --- a/man3/libsimple_strchr_inv.3 +++ b/man3/libsimple_strchr_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRCHR_INV 3 2018-11-25 libsimple +.TH LIBSIMPLE_STRCHR_INV 3 libsimple .SH NAME libsimple_strchr_inv \- find a different character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strchr_inv(const char *\fIs\fP, int \fIc\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strchr_inv () @@ -28,6 +30,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strchr_inv () @@ -40,10 +43,12 @@ where is the returned pointer, if no such offset exists, it returns .BR NULL . + .SH ERRORS The .BR libsimple_strchr_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -62,18 +67,25 @@ T{ .BR libsimple_strchr_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strcasechr_inv (3), .BR libsimple_strchrnul_inv (3), diff --git a/man3/libsimple_strchrnul.3 b/man3/libsimple_strchrnul.3 index ed54f0b..13c577b 100644 --- a/man3/libsimple_strchrnul.3 +++ b/man3/libsimple_strchrnul.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRCHRNUL 3 2018-10-21 libsimple +.TH LIBSIMPLE_STRCHRNUL 3 libsimple .SH NAME libsimple_strchrnul \- find a character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strchrnul(const char *\fIs\fP, int \fIc\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strchrnul () @@ -27,6 +29,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strchrnul () @@ -37,10 +40,12 @@ with a minimal offset such that where .I r is the returned pointer. + .SH ERRORS The .BR libsimple_strchrnul () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -59,18 +64,25 @@ T{ .BR libsimple_strchrnul () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_charstrnul_inv (3), .BR libsimple_strcasechrnul (3), diff --git a/man3/libsimple_strchrnul_inv.3 b/man3/libsimple_strchrnul_inv.3 index 4664d1a..1ce6e42 100644 --- a/man3/libsimple_strchrnul_inv.3 +++ b/man3/libsimple_strchrnul_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRCHRNUL_INV 3 2018-11-24 libsimple +.TH LIBSIMPLE_STRCHRNUL_INV 3 libsimple .SH NAME libsimple_strchrnul_inv \- skip a character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strchrnul_inv(const char *\fIs\fP, int \fIc\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strchrnul_inv () @@ -28,6 +30,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strchrnul_inv () @@ -38,10 +41,12 @@ with a minimal offset such that where .I r is the returned pointer. + .SH ERRORS The .BR libsimple_strchrnul_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -60,18 +65,25 @@ T{ .BR libsimple_strchrnul_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_charstrnul (3), .BR libsimple_strchr_inv (3), diff --git a/man3/libsimple_strcmove.3 b/man3/libsimple_strcmove.3 index 328e696..4888832 100644 --- a/man3/libsimple_strcmove.3 +++ b/man3/libsimple_strcmove.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRCMOVE 3 2018-11-25 libsimple +.TH LIBSIMPLE_STRCMOVE 3 libsimple .SH NAME libsimple_strcmove, libsimple_strccpy \- copy or move a string within an array of bytes + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ static inline char *libsimple_strccpy(char *restrict \fIdest\fP, const char *res .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strcmove () @@ -41,6 +43,7 @@ function but not in the function. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strcmove () @@ -56,12 +59,14 @@ after it was copied, if the character was not copied .I NULL is returned. + .SH ERRORS The .BR libsimple_strcmove () and .BR libsimple_strccpy () functions cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -86,18 +91,25 @@ T{ .BR libsimple_strccpy () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strmove (3), .BR libsimple_stpmove (3), diff --git a/man3/libsimple_strcmpnul.3 b/man3/libsimple_strcmpnul.3 index 9f6ec47..01a512c 100644 --- a/man3/libsimple_strcmpnul.3 +++ b/man3/libsimple_strcmpnul.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRCMPNUL 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRCMPNUL 3 libsimple .SH NAME libsimple_strcmpnul \- compare two strings + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline int libsimple_strcmpnul(const char *\fIa\fP, const char *\fIb\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strcmpnul () @@ -32,6 +34,7 @@ greater than the shorter string. The comparison is case-sensitive and made as if the strings were .IR "unsigned char *" s. + .SH RETURN VALUE The .BR libsimple_strcmpnul () @@ -44,10 +47,12 @@ a positive value if is greater than .IR b , and 0 otherwise. + .SH ERRORS The .BR libsimple_strcmpnul () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -66,18 +71,25 @@ T{ .BR libsimple_strcmpnul () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strcasecmpnul (3), .BR libsimple_streqnul (3), diff --git a/man3/libsimple_strend.3 b/man3/libsimple_strend.3 index adfdf6f..a3a1bfe 100644 --- a/man3/libsimple_strend.3 +++ b/man3/libsimple_strend.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STREND 3 2018-10-23 libsimple +.TH LIBSIMPLE_STREND 3 libsimple .SH NAME libsimple_strend \- find a character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,12 +15,14 @@ static inline char *libsimple_strend(const char *\fIs\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strend () function scans the string .I s for its end. + .SH RETURN VALUE The .BR libsimple_strend () @@ -30,10 +33,12 @@ with an offset such that where .I r is the returned pointer. + .SH ERRORS The .BR libsimple_strend () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -52,18 +57,25 @@ T{ .BR libsimple_strend () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strchrnul (3), .BR libsimple_strnend (3), diff --git a/man3/libsimple_strends.3 b/man3/libsimple_strends.3 index 9ab8b45..c7d55c5 100644 --- a/man3/libsimple_strends.3 +++ b/man3/libsimple_strends.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRENDS 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRENDS 3 libsimple .SH NAME libsimple_strends \- check the beginning of a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ int libsimple_strends(const char *\fIs\fP, const char *\fIt\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strends () @@ -23,6 +25,7 @@ ends with the string .IR t . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strends () @@ -31,10 +34,12 @@ function returns 1 if the string ends with the string .IR t , otherwise it returns 0. + .SH ERRORS The .BR libsimple_strends () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -53,18 +58,25 @@ T{ .BR libsimple_strends () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strcaseends (3), .BR libsimple_strstarts (3), diff --git a/man3/libsimple_streq.3 b/man3/libsimple_streq.3 index 76c1779..2a1fada 100644 --- a/man3/libsimple_streq.3 +++ b/man3/libsimple_streq.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STREQ 3 2018-10-23 libsimple +.TH LIBSIMPLE_STREQ 3 libsimple .SH NAME libsimple_streq \- compare two strings + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline int libsimple_streq(const char *\fIa\fP, const char *\fIb\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_streq () @@ -25,15 +27,18 @@ neither of which may be .BR NULL . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_streq () function returns 1 if the strings are equals, otherwise it returns 0. + .SH ERRORS The .BR libsimple_streq () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -52,18 +57,25 @@ T{ .BR libsimple_streq () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_streqnul (3), .BR libsimple_strcaseeq (3), diff --git a/man3/libsimple_streqlen.3 b/man3/libsimple_streqlen.3 index cb92bc6..2ec78fe 100644 --- a/man3/libsimple_streqlen.3 +++ b/man3/libsimple_streqlen.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STREQLEN 3 2018-10-23 libsimple +.TH LIBSIMPLE_STREQLEN 3 libsimple .SH NAME libsimple_streqlen \- check initial commonality + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ size_t libsimple_streqlen(const char *\fIa\fP, const char *\fIb\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_streqlen () @@ -24,6 +26,7 @@ have in common the string at their beginnings. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_streqlen () @@ -32,10 +35,12 @@ function returns the number of bytes and .I b have in common at their beginnings. + .SH ERRORS The .BR libsimple_streqlen () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -54,18 +59,25 @@ T{ .BR libsimple_streqlen () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_streq (3), .BR libsimple_strreqlen (3), diff --git a/man3/libsimple_streqnul.3 b/man3/libsimple_streqnul.3 index 84ccf88..f2d7d07 100644 --- a/man3/libsimple_streqnul.3 +++ b/man3/libsimple_streqnul.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STREQNUL 3 2018-10-23 libsimple +.TH LIBSIMPLE_STREQNUL 3 libsimple .SH NAME libsimple_streqnul \- compare two strings + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline int libsimple_streqnul(const char *\fIa\fP, const char *\fIb\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_streqnul () @@ -25,15 +27,18 @@ both of which may be .BR NULL . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_streqnul () function returns 1 if the strings are equals, otherwise it returns 0. + .SH ERRORS The .BR libsimple_streqnul () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -52,18 +57,25 @@ T{ .BR libsimple_streqnul () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_streq (3), .BR libsimple_strcaseeqnul (3), diff --git a/man3/libsimple_strisutf8.3 b/man3/libsimple_strisutf8.3 index ff8f609..0a525f1 100644 --- a/man3/libsimple_strisutf8.3 +++ b/man3/libsimple_strisutf8.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRISUTF8 3 2018-11-16 libsimple +.TH LIBSIMPLE_STRISUTF8 3 libsimple .SH NAME libsimple_strisutf8, libsimple_strnisutf8, libsimple_memisutf8 \- check if a string is encoded in UTF-8 + .SH SYNOPSIS .nf #include <libsimple.h> @@ -22,6 +23,7 @@ int libsimple_memisutf8(const char *\fIstring\fP, size_t \fIn\fP, int \fIallow_m .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strisutf8 (), @@ -65,6 +67,7 @@ function is a .B const char * rather than a .BR "const void *" . + .SH RETURN VALUE The .BR libsimple_strisutf8 (), @@ -76,6 +79,7 @@ function returns 1 if the is in valid UTF-8 (Modified UTF-8 if .I allow_modified_nul is non-zero); otherwise 0 is returned. + .SH ERRORS The .BR libsimple_strisutf8 (), @@ -83,6 +87,7 @@ The and .BR libsimple_memisutf8 () functions cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -113,17 +118,24 @@ T{ .BR libsimple_memisutf8 () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO, None. diff --git a/man3/libsimple_strmove.3 b/man3/libsimple_strmove.3 index 90d5dfc..1b03800 100644 --- a/man3/libsimple_strmove.3 +++ b/man3/libsimple_strmove.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRMOVE 3 2018-11-16 libsimple +.TH LIBSIMPLE_STRMOVE 3 libsimple .SH NAME libsimple_strmove \- move a string within an array of bytes + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline char *libsimple_strmove(char *\fIdest\fP, const char *\fIsrc\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strmove () @@ -23,15 +25,18 @@ NUL byte that terminates it, into .IR dest . The arrays may overlap. + .SH RETURN VALUE The .BR libsimple_strmove () function returns the pointer .IR dest . + .SH ERRORS The .BR libsimple_strmove () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -50,18 +55,25 @@ T{ .BR libsimple_strmove () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_stpmove (3), .BR libsimple_strnmove (3), diff --git a/man3/libsimple_strncasechr.3 b/man3/libsimple_strncasechr.3 index b0a1c96..064a588 100644 --- a/man3/libsimple_strncasechr.3 +++ b/man3/libsimple_strncasechr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNCASECHR 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRNCASECHR 3 libsimple .SH NAME libsimple_strncasechr \- find a character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strncasechr(const char *\fIs\fP, int \fIc\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strncasechr () @@ -30,6 +32,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strncasechr () @@ -44,10 +47,12 @@ offset less than .I n exists, it returns .BR NULL . + .SH ERRORS The .BR libsimple_strncasechr () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -66,18 +71,25 @@ T{ .BR libsimple_strncasechr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strncasechr_inv (3), .BR libsimple_strncasechrnul (3), diff --git a/man3/libsimple_strncasechr_inv.3 b/man3/libsimple_strncasechr_inv.3 index c23fe84..11ba3f6 100644 --- a/man3/libsimple_strncasechr_inv.3 +++ b/man3/libsimple_strncasechr_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNCASECHR_INV 3 2018-11-25 libsimple +.TH LIBSIMPLE_STRNCASECHR_INV 3 libsimple .SH NAME libsimple_strncasechr_inv \- find a different character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strncasechr_inv(const char *\fIs\fP, int \fIc\fP, size_t \fIn\fP .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strncasechr_inv () @@ -31,6 +33,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strncasechr_inv () @@ -45,10 +48,12 @@ offset less than .I n exists, it returns .BR NULL . + .SH ERRORS The .BR libsimple_strncasechr_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -67,18 +72,25 @@ T{ .BR libsimple_strncasechr_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strncasechr (3), .BR libsimple_strncasechrnul_inv (3), diff --git a/man3/libsimple_strncasechrnul.3 b/man3/libsimple_strncasechrnul.3 index d73f186..fd757a8 100644 --- a/man3/libsimple_strncasechrnul.3 +++ b/man3/libsimple_strncasechrnul.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNCASECHRNUL 3 2018-10-21 libsimple +.TH LIBSIMPLE_STRNCASECHRNUL 3 libsimple .SH NAME libsimple_strncasechrnul \- find a character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strncasechrnul(const char *\fIs\fP, int \fIc\fP, size_t \fIn\fP) .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strncasechrnul () @@ -30,6 +32,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strncasechrnul () @@ -45,10 +48,12 @@ offset less than exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_strncasechrnul () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -67,18 +72,25 @@ T{ .BR libsimple_strncasechrnul () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strncasechrnul_inv (3), .BR libsimple_strncasechr (3), diff --git a/man3/libsimple_strncasechrnul_inv.3 b/man3/libsimple_strncasechrnul_inv.3 index 48cced8..ad409ab 100644 --- a/man3/libsimple_strncasechrnul_inv.3 +++ b/man3/libsimple_strncasechrnul_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNCASECHRNUL_INV 3 2018-11-24 libsimple +.TH LIBSIMPLE_STRNCASECHRNUL_INV 3 libsimple .SH NAME libsimple_strncasechrnul_inv \- skip a character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strncasechrnul_inv(const char *\fIs\fP, int \fIc\fP, size_t \fIn .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strncasechrnul_inv () @@ -31,6 +33,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strncasechrnul_inv () @@ -46,10 +49,12 @@ offset less than exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_strncasechrnul_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -68,18 +73,25 @@ T{ .BR libsimple_strncasechrnul_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strncasechrnul (3), .BR libsimple_strncasechr_inv (3), diff --git a/man3/libsimple_strncasecmpnul.3 b/man3/libsimple_strncasecmpnul.3 index 959ea78..25b7239 100644 --- a/man3/libsimple_strncasecmpnul.3 +++ b/man3/libsimple_strncasecmpnul.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNCASECMPNUL 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRNCASECMPNUL 3 libsimple .SH NAME libsimple_strncasecmpnul \- compare two strings + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline int libsimple_strncasecmpnul(const char *\fIa\fP, const char *\fIb .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strncasecmpnul () @@ -38,6 +40,7 @@ greater than the shorter string. The comparison is case-insensitive and made as if the strings were converted to lowercase and as .BR "unsigned char *" s. + .SH RETURN VALUE The .BR libsimple_strncasecmpnul () @@ -50,10 +53,12 @@ a positive value if is greater than .IR b , and 0 otherwise. + .SH ERRORS The .BR libsimple_strncasecmpnul () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -72,18 +77,25 @@ T{ .BR libsimple_strncasecmpnul () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strncmpnul (3), .BR libsimple_strncaseeqnul (3), diff --git a/man3/libsimple_strncaseends.3 b/man3/libsimple_strncaseends.3 index 5bdc0d9..c9911ef 100644 --- a/man3/libsimple_strncaseends.3 +++ b/man3/libsimple_strncaseends.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNCASEENDS 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRNCASEENDS 3 libsimple .SH NAME libsimple_strncaseends \- check the beginning of a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ int libsimple_strncaseends(const char *\fIs\fP, const char *\fIt\fP, size_t \fIn .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strncaseends () @@ -26,6 +28,7 @@ ends with the string .IR t . .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strncaseends () @@ -34,10 +37,12 @@ function returns 1 if the string ends with the string .IR t , otherwise it returns 0. + .SH ERRORS The .BR libsimple_strncaseends () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -56,18 +61,25 @@ T{ .BR libsimple_strncaseends () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strnends (3), .BR libsimple_strncasestarts (3), diff --git a/man3/libsimple_strncaseeq.3 b/man3/libsimple_strncaseeq.3 index 55c2f79..5b7a6a9 100644 --- a/man3/libsimple_strncaseeq.3 +++ b/man3/libsimple_strncaseeq.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNCASEEQ 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRNCASEEQ 3 libsimple .SH NAME libsimple_strncaseeq \- compare two strings + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline int libsimple_strncaseeq(const char *\fIa\fP, const char *\fIb\fP, .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strncaseeq () @@ -31,16 +33,19 @@ neither of which may be .BR NULL . .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strncaseeq () function returns 1 if the strings are equals, with the possible exception of the case, otherwise it returns 0. + .SH ERRORS The .BR libsimple_strncaseeq () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -59,18 +64,25 @@ T{ .BR libsimple_strncaseeq () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strncaseeqnul (3), .BR libsimple_strneq (3), diff --git a/man3/libsimple_strncaseeqlen.3 b/man3/libsimple_strncaseeqlen.3 index 8fbc236..72cc85e 100644 --- a/man3/libsimple_strncaseeqlen.3 +++ b/man3/libsimple_strncaseeqlen.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNCASEEQLEN 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRNCASEEQLEN 3 libsimple .SH NAME libsimple_strncaseeqlen \- check initial commonality + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ size_t libsimple_strncaseeqlen(const char *\fIa\fP, const char *\fIb\fP, size_t .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strncaseeqlen () @@ -30,6 +32,7 @@ bytes unless it is shorter, at their beginnings. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strncaseeqlen () @@ -40,10 +43,12 @@ and (both truncated to .I n bytes) have in common at their beginnings. + .SH ERRORS The .BR libsimple_strncaseeqlen () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -62,18 +67,25 @@ T{ .BR libsimple_strncaseeqlen () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strcaseeq (3), .BR libsimple_streqlen (3), diff --git a/man3/libsimple_strncaseeqnul.3 b/man3/libsimple_strncaseeqnul.3 index 743d4be..b713996 100644 --- a/man3/libsimple_strncaseeqnul.3 +++ b/man3/libsimple_strncaseeqnul.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNCASEEQNUL 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRNCASEEQNUL 3 libsimple .SH NAME libsimple_strncaseeqnul \- compare two strings + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline int libsimple_strncaseeqnul(const char *\fIa\fP, const char *\fIb\ .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strncaseeqnul () @@ -31,16 +33,19 @@ both of which may be .BR NULL . .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strncaseeqnul () function returns 1 if the strings are equals, with the possible exception of the case, otherwise it returns 0. + .SH ERRORS The .BR libsimple_strncaseeqnul () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -59,18 +64,25 @@ T{ .BR libsimple_strncaseeqnul () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strncaseeq (3), .BR libsimple_strneqnul (3), diff --git a/man3/libsimple_strncasestarts.3 b/man3/libsimple_strncasestarts.3 index b1efd80..9cd63dd 100644 --- a/man3/libsimple_strncasestarts.3 +++ b/man3/libsimple_strncasestarts.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNCASESTARTS 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRNCASESTARTS 3 libsimple .SH NAME libsimple_strncasestarts \- check the beginning of a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ int libsimple_strncasestarts(const char *\fIs\fP, const char *\fIt\fP, size_t \f .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strncasestarts () @@ -26,6 +28,7 @@ starts with the string .IR t . .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strncasestarts () @@ -34,10 +37,12 @@ function returns 1 if the string begins with the string .IR t , otherwise it returns 0. + .SH ERRORS The .BR libsimple_strncasestarts () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -56,18 +61,25 @@ T{ .BR libsimple_strncasestarts () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strnstarts (3), .BR libsimple_strncaseends (3), diff --git a/man3/libsimple_strncasestr.3 b/man3/libsimple_strncasestr.3 index 0235f7c..1a49c83 100644 --- a/man3/libsimple_strncasestr.3 +++ b/man3/libsimple_strncasestr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNCASESTR 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRNCASESTR 3 libsimple .SH NAME libsimple_strncasestr \- find a substring in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strncasestr(const char *\fIhaystack\fP, const char *\fIneedle\fP .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strncasestr () @@ -26,6 +28,7 @@ the first occurrence of the substring .IR needle . .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strncasestr () @@ -41,10 +44,12 @@ is the returned pointer. If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_strncasestr () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -63,18 +68,25 @@ T{ .BR libsimple_strncasestr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strrncasestr (3), .BR libsimple_strnstr (3), diff --git a/man3/libsimple_strnchr.3 b/man3/libsimple_strnchr.3 index bdb2787..533c417 100644 --- a/man3/libsimple_strnchr.3 +++ b/man3/libsimple_strnchr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNCHR 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRNCHR 3 libsimple .SH NAME libsimple_strnchr \- find a character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strnchr(const char *\fIs\fP, int \fIc\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strnchr () @@ -30,6 +32,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strnchr () @@ -44,10 +47,12 @@ offset less than .I n exists, it returns .BR NULL . + .SH ERRORS The .BR libsimple_strnchr () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -66,18 +71,25 @@ T{ .BR libsimple_strnchr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strnchr_inv (3), .BR libsimple_strnchrnul (3), diff --git a/man3/libsimple_strnchr_inv.3 b/man3/libsimple_strnchr_inv.3 index 594021f..8331f63 100644 --- a/man3/libsimple_strnchr_inv.3 +++ b/man3/libsimple_strnchr_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNCHR_INV 3 2018-11-25 libsimple +.TH LIBSIMPLE_STRNCHR_INV 3 libsimple .SH NAME libsimple_strnchr_inv \- find a different character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strnchr_inv(const char *\fIs\fP, int \fIc\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strnchr_inv () @@ -31,6 +33,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strnchr_inv () @@ -45,10 +48,12 @@ offset less than .I n exists, it returns .BR NULL . + .SH ERRORS The .BR libsimple_strnchr_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -67,18 +72,25 @@ T{ .BR libsimple_strnchr_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strnchr (3), .BR libsimple_strnchrnul_inv (3), diff --git a/man3/libsimple_strnchrnul.3 b/man3/libsimple_strnchrnul.3 index b0c328e..bc16d4b 100644 --- a/man3/libsimple_strnchrnul.3 +++ b/man3/libsimple_strnchrnul.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNCHRNUL 3 2018-10-21 libsimple +.TH LIBSIMPLE_STRNCHRNUL 3 libsimple .SH NAME libsimple_strnchrnul \- find a character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strnchrnul(const char *\fIs\fP, int \fIc\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strnchrnul () @@ -30,6 +32,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strnchrnul () @@ -45,10 +48,12 @@ offset less than exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_strnchrnul () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -67,18 +72,25 @@ T{ .BR libsimple_strnchrnul () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. I promise! + .SH SEE ALSO .BR libsimple_strnchrnul_inv (3), .BR libsimple_strncasechrnul (3), diff --git a/man3/libsimple_strnchrnul_inv.3 b/man3/libsimple_strnchrnul_inv.3 index d11a7df..fb7083a 100644 --- a/man3/libsimple_strnchrnul_inv.3 +++ b/man3/libsimple_strnchrnul_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNCHRNUL_INV 3 2018-11-24 libsimple +.TH LIBSIMPLE_STRNCHRNUL_INV 3 libsimple .SH NAME libsimple_strnchrnul_inv \- skip a character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strnchrnul_inv(const char *\fIs\fP, int \fIc\fP, size_t \fIn\fP) .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strnchrnul_inv () @@ -31,6 +33,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strnchrnul_inv () @@ -46,10 +49,12 @@ offset less than exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_strnchrnul_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -68,18 +73,25 @@ T{ .BR libsimple_strnchrnul_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. I promise! + .SH SEE ALSO .BR libsimple_strnchrnul (3), .BR libsimple_strncasechrnul_inv (3), diff --git a/man3/libsimple_strncmove.3 b/man3/libsimple_strncmove.3 index c944372..0f33ad9 100644 --- a/man3/libsimple_strncmove.3 +++ b/man3/libsimple_strncmove.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNCMOVE 3 2018-11-25 libsimple +.TH LIBSIMPLE_STRNCMOVE 3 libsimple .SH NAME libsimple_strncmove, libsimple_strnccpy \- copy or move a string within an array of bytes + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ static inline char *libsimple_strnccpy(char *restrict \fIdest\fP, const char *re .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strncmove () @@ -46,6 +48,7 @@ function but not in the function. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strncmove () @@ -61,12 +64,14 @@ after it was copied, if the character was not copied .I NULL is returned. + .SH ERRORS The .BR libsimple_strncmove () and .BR libsimple_strnccpy () functions cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -91,18 +96,25 @@ T{ .BR libsimple_strnccpy () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strnmove (3), .BR libsimple_stpnmove (3), diff --git a/man3/libsimple_strncmpnul.3 b/man3/libsimple_strncmpnul.3 index f53dc8c..d6a6cbe 100644 --- a/man3/libsimple_strncmpnul.3 +++ b/man3/libsimple_strncmpnul.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNCMPNUL 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRNCMPNUL 3 libsimple .SH NAME libsimple_strncmpnul \- compare two strings + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline int libsimple_strncmpnul(const char *\fIa\fP, const char *\fIb\fP, .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strncmpnul () @@ -38,6 +40,7 @@ greater than the shorter string. The comparison is case-sensitive and made as if the strings were .BR "unsigned char *" s. + .SH RETURN VALUE The .BR libsimple_strncmpnul () @@ -50,10 +53,12 @@ a positive value if is greater than .IR b , and 0 otherwise. + .SH ERRORS The .BR libsimple_strncmpnul () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -72,18 +77,25 @@ T{ .BR libsimple_strncmpnul () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strncasecmpnul (3), .BR libsimple_strneqnul (3), diff --git a/man3/libsimple_strnend.3 b/man3/libsimple_strnend.3 index 26ed564..c3d918d 100644 --- a/man3/libsimple_strnend.3 +++ b/man3/libsimple_strnend.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNEND 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRNEND 3 libsimple .SH NAME libsimple_strnend \- find a character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline char *libsimple_strnend(const char *\fIs\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strnend () @@ -23,6 +25,7 @@ truncated to .I n bytes unless it is shorter, for its end. + .SH RETURN VALUE The .BR libsimple_strnend () @@ -38,10 +41,12 @@ if no such offset less than exists, .I &s[n] is returned. + .SH ERRORS The .BR libsimple_strnend () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -60,18 +65,25 @@ T{ .BR libsimple_strnend () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strnchrnul (3), .BR libsimple_strnchr (3), diff --git a/man3/libsimple_strnends.3 b/man3/libsimple_strnends.3 index a733b6b..e7ce864 100644 --- a/man3/libsimple_strnends.3 +++ b/man3/libsimple_strnends.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNENDS 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRNENDS 3 libsimple .SH NAME libsimple_strnends \- check the beginning of a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ int libsimple_strnends(const char *\fIs\fP, const char *\fIt\fP, size_t \fIn\fP) .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strnends () @@ -26,6 +28,7 @@ ends with the string .IR t . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strnends () @@ -34,10 +37,12 @@ function returns 1 if the string ends with the string .IR t , otherwise it returns 0. + .SH ERRORS The .BR libsimple_strnends () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -56,18 +61,25 @@ T{ .BR libsimple_strnends () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strncaseends (3), .BR libsimple_strnstarts (3), diff --git a/man3/libsimple_strneq.3 b/man3/libsimple_strneq.3 index a315870..43f2442 100644 --- a/man3/libsimple_strneq.3 +++ b/man3/libsimple_strneq.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNEQ 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRNEQ 3 libsimple .SH NAME libsimple_strneq \- compare two strings + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline int libsimple_strneq(const char *\fIa\fP, const char *\fIb\fP, siz .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strneq () @@ -31,15 +33,18 @@ neither of which may be .BR NULL . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strneq () function returns 1 if the strings are equals, otherwise it returns 0. + .SH ERRORS The .BR libsimple_strneq () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -58,18 +63,25 @@ T{ .BR libsimple_strneq () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strneqnul (3), .BR libsimple_strncaseeq (3), diff --git a/man3/libsimple_strneqlen.3 b/man3/libsimple_strneqlen.3 index df01480..093d6fa 100644 --- a/man3/libsimple_strneqlen.3 +++ b/man3/libsimple_strneqlen.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNEQLEN 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRNEQLEN 3 libsimple .SH NAME libsimple_strneqlen \- check initial commonality + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ size_t libsimple_strneqlen(const char *\fIa\fP, const char *\fIb\fP, size_t \fIn .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strneqlen () @@ -30,6 +32,7 @@ bytes unless it is shorter, at their beginnings. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strneqlen () @@ -40,10 +43,12 @@ and (both truncated to .I n bytes) have in common at their beginnings. + .SH ERRORS The .BR libsimple_strneqlen () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -62,18 +67,25 @@ T{ .BR libsimple_strneqlen () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_streq (3), .BR libsimple_strreqlen (3), diff --git a/man3/libsimple_strneqnul.3 b/man3/libsimple_strneqnul.3 index 610844b..b3de167 100644 --- a/man3/libsimple_strneqnul.3 +++ b/man3/libsimple_strneqnul.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNEQNUL 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRNEQNUL 3 libsimple .SH NAME libsimple_strneqnul \- compare two strings + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline int libsimple_strneqnul(const char *\fIa\fP, const char *\fIb\fP, .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strneqnul () @@ -31,15 +33,18 @@ both of which may be .BR NULL . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strneqnul () function returns 1 if the strings are equals, otherwise it returns 0. + .SH ERRORS The .BR libsimple_strneqnul () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -58,18 +63,25 @@ T{ .BR libsimple_strneqnul () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strneq (3), .BR libsimple_strncaseeqnul (3), diff --git a/man3/libsimple_strnmove.3 b/man3/libsimple_strnmove.3 index 593a5cb..38c58f6 100644 --- a/man3/libsimple_strnmove.3 +++ b/man3/libsimple_strnmove.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNMOVE 3 2018-11-16 libsimple +.TH LIBSIMPLE_STRNMOVE 3 libsimple .SH NAME libsimple_strnmove \- move a string within an array of bytes + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline void *libsimple_strnmove(void *\fIdest\fP, const void *\fIsrc\fP, .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strnmove () @@ -25,15 +27,18 @@ NUL byte that terminates it (if any), into .IR dest . The arrays may overlap. + .SH RETURN VALUE The .BR libsimple_strnmove () function returns the pointer .IR dest . + .SH ERRORS The .BR libsimple_strnmove () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -52,18 +57,25 @@ T{ .BR libsimple_strnmove () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_stpnmove (3), .BR libsimple_strmove (3), diff --git a/man3/libsimple_strnreplace.3 b/man3/libsimple_strnreplace.3 index ef2a4fe..fc8718c 100644 --- a/man3/libsimple_strnreplace.3 +++ b/man3/libsimple_strnreplace.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNREPLACE 3 2018-11-25 libsimple +.TH LIBSIMPLE_STRNREPLACE 3 libsimple .SH NAME libsimple_strnreplace \- replace characters in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline char *libsimple_strnreplace(char *\fIs\fP, int \fIold\fP, int \fIn .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strnreplace () @@ -32,6 +34,7 @@ character (up the last character is shorter). .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strnreplace () @@ -40,10 +43,12 @@ function returns the end of that is .I &s[strnlen(s,n)] (as evaluated before the function call). + .SH ERRORS The .BR libsimple_strnreplace () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -62,18 +67,25 @@ T{ .BR libsimple_strnreplace () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strntolower (3), .BR libsimple_strntoupper (3), diff --git a/man3/libsimple_strnset.3 b/man3/libsimple_strnset.3 index 3807917..1a9ce21 100644 --- a/man3/libsimple_strnset.3 +++ b/man3/libsimple_strnset.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNSET 3 2018-11-25 libsimple +.TH LIBSIMPLE_STRNSET 3 libsimple .SH NAME libsimple_strnset, libsimple_stpnset \- fill a string with a character + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ static inline char *libsimple_stpnset(char *\fIs\fP, int \fIc\fP, size_t \fIn\fP .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strnset () @@ -31,6 +33,7 @@ characters in the string .I s is shorter) with the character .IR c . + .SH RETURN VALUE The .BR libsimple_strnset () @@ -43,12 +46,14 @@ function returns the end of (that is .IR &s[strnlen(s,n)] , as evaluated before the function call. + .SH ERRORS The .BR libsimple_strnset () and .BR libsimple_stpnset () functions cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -73,18 +78,25 @@ T{ .BR libsimple_stpnset () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strset (3), .BR libsimple_mempset (3), diff --git a/man3/libsimple_strnstarts.3 b/man3/libsimple_strnstarts.3 index 4f084ea..108afd1 100644 --- a/man3/libsimple_strnstarts.3 +++ b/man3/libsimple_strnstarts.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNSTARTS 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRNSTARTS 3 libsimple .SH NAME libsimple_strnstarts \- check the beginning of a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ int libsimple_strnstarts(const char *\fIs\fP, const char *\fIt\fP, size_t \fIn\f .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strnstarts () @@ -26,6 +28,7 @@ starts with the string .IR t . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strnstarts () @@ -34,10 +37,12 @@ function returns 1 if the string begins with the string .IR t , otherwise it returns 0. + .SH ERRORS The .BR libsimple_strnstarts () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -56,18 +61,25 @@ T{ .BR libsimple_strnstarts () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strncasestarts (3), .BR libsimple_strnends (3), diff --git a/man3/libsimple_strnstr.3 b/man3/libsimple_strnstr.3 index dca50bb..d2c9825 100644 --- a/man3/libsimple_strnstr.3 +++ b/man3/libsimple_strnstr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNSTR 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRNSTR 3 libsimple .SH NAME libsimple_strnstr \- find a substring in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strnstr(const char *\fIhaystack\fP, const char *\fIneedle\fP, si .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strnstr () @@ -26,6 +28,7 @@ the first occurrence of the substring .IR needle . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strnstr () @@ -41,10 +44,12 @@ is the returned pointer. If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_strnstr () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -63,18 +68,25 @@ T{ .BR libsimple_strnstr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strrnstr (3), .BR libsimple_strncasestr (3) diff --git a/man3/libsimple_strntolower.3 b/man3/libsimple_strntolower.3 index 805adf4..8c0f41c 100644 --- a/man3/libsimple_strntolower.3 +++ b/man3/libsimple_strntolower.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNTOLOWER 3 2018-11-25 libsimple +.TH LIBSIMPLE_STRNTOLOWER 3 libsimple .SH NAME libsimple_strntolower, libsimple_stpntolower \- convert a string to lower case + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ char *libsimple_stpntolower(char *\fIdest\fP, const char *\fIsrc\fP, size_t \fIn .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strntolower () @@ -35,6 +37,7 @@ lower case; however no more than bytes will be copied or coverted. The arrays may overlap, and there is an optimisation for the case where .IR dest==src . + .SH RETURN VALUE The .BR libsimple_strntolower () @@ -48,12 +51,14 @@ end of the string copied into .IR dest , that is .IR &dest[strnlen(src,n)] . + .SH ERRORS The .BR libsimple_strntolower () and .BR libsimple_stpntolower () functions cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -78,18 +83,25 @@ T{ .BR libsimple_stpntolower () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strntoupper (3), .BR libsimple_strnreplace (3), diff --git a/man3/libsimple_strntoupper.3 b/man3/libsimple_strntoupper.3 index f045291..abb3408 100644 --- a/man3/libsimple_strntoupper.3 +++ b/man3/libsimple_strntoupper.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRNTOUPPER 3 2018-11-25 libsimple +.TH LIBSIMPLE_STRNTOUPPER 3 libsimple .SH NAME libsimple_strntoupper, libsimple_stpntoupper \- convert a string to upper case + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ char *libsimple_stpntoupper(char *\fIdest\fP, const char *\fIsrc\fP, size_t \fIn .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strntoupper () @@ -35,6 +37,7 @@ upper case; however no more than bytes will be copied or coverted. The arrays may overlap, and there is an optimisation for the case where .IR dest==src . + .SH RETURN VALUE The .BR libsimple_strntoupper () @@ -48,12 +51,14 @@ end of the string copied into .IR dest , that is .IR &dest[strnlen(src,n)] . + .SH ERRORS The .BR libsimple_strntoupper () and .BR libsimple_stpntoupper () functions cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -78,18 +83,25 @@ T{ .BR libsimple_stpntoupper () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strntolower (3), .BR libsimple_strnreplace (3), diff --git a/man3/libsimple_strrcasechr.3 b/man3/libsimple_strrcasechr.3 index 62ff883..84e5f7e 100644 --- a/man3/libsimple_strrcasechr.3 +++ b/man3/libsimple_strrcasechr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRRCASECHR 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRRCASECHR 3 libsimple .SH NAME libsimple_strrcasechr \- find a character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strrcasechr(const char *\fIs\fP, int \fIc\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strrcasechr () @@ -27,6 +29,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strrcasechr () @@ -39,10 +42,12 @@ where is the returned pointer, if no such offset exists, it returns .BR NULL . + .SH ERRORS The .BR libsimple_strrcasechr () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -61,18 +66,25 @@ T{ .BR libsimple_strrcasechr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strrcasechr_inv (3), .BR libsimple_strcasechr (3), diff --git a/man3/libsimple_strrcasechr_inv.3 b/man3/libsimple_strrcasechr_inv.3 index 66f9df4..47581c7 100644 --- a/man3/libsimple_strrcasechr_inv.3 +++ b/man3/libsimple_strrcasechr_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRRCASECHR_INV 3 2018-11-25 libsimple +.TH LIBSIMPLE_STRRCASECHR_INV 3 libsimple .SH NAME libsimple_strrcasechr_inv \- find a different character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strrcasechr_inv(const char *\fIs\fP, int \fIc\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strrcasechr_inv () @@ -28,6 +30,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strrcasechr_inv () @@ -40,10 +43,12 @@ where is the returned pointer, if no such offset exists, it returns .BR NULL . + .SH ERRORS The .BR libsimple_strrcasechr_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -62,18 +67,25 @@ T{ .BR libsimple_strrcasechr_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strrcasechr (3), .BR libsimple_strrchr_inv (3), diff --git a/man3/libsimple_strrcaseeqlen.3 b/man3/libsimple_strrcaseeqlen.3 index 551debe..714c65a 100644 --- a/man3/libsimple_strrcaseeqlen.3 +++ b/man3/libsimple_strrcaseeqlen.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRRCASEEQLEN 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRRCASEEQLEN 3 libsimple .SH NAME libsimple_strrcaseeqlen \- check terminal commonality + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline size_t libsimple_strrcaseeqlen(const char *\fIa\fP, const char *\f .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strrcaseeqlen () @@ -24,6 +26,7 @@ have in common the string at their ends. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strrcaseeqlen () @@ -32,10 +35,12 @@ function returns the number of bytes and .I b have in common at their ends. + .SH ERRORS The .BR libsimple_strrcaseeqlen () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -54,18 +59,25 @@ T{ .BR libsimple_strrcaseeqlen () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strreqlen (3), .BR libsimple_strcaseeqlen (3), diff --git a/man3/libsimple_strrcasestr.3 b/man3/libsimple_strrcasestr.3 index a2844b5..44585b1 100644 --- a/man3/libsimple_strrcasestr.3 +++ b/man3/libsimple_strrcasestr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRRCASESTR 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRRCASESTR 3 libsimple .SH NAME libsimple_strrcasestr \- find a substring in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strrcasestr(const char *\fIhaystack\fP, const char *\fIneedle\fP .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strrcasestr () @@ -23,6 +25,7 @@ the last occurrence of the substring .IR needle . .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strrcasestr () @@ -38,10 +41,12 @@ is the returned pointer. If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_strrcasestr () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -60,18 +65,25 @@ T{ .BR libsimple_strrcasestr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strrstr (3), .BR libsimple_strcasestr (3), diff --git a/man3/libsimple_strrchr_inv.3 b/man3/libsimple_strrchr_inv.3 index 71059fa..8864e83 100644 --- a/man3/libsimple_strrchr_inv.3 +++ b/man3/libsimple_strrchr_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRRCHR_INV 3 2018-11-25 libsimple +.TH LIBSIMPLE_STRRCHR_INV 3 libsimple .SH NAME libsimple_strrchr_inv \- find a different character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strrchr_inv(const char *\fIs\fP, int \fIc\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strrchr_inv () @@ -28,6 +30,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strrchr_inv () @@ -40,10 +43,12 @@ where is the returned pointer, if no such offset exists, it returns .BR NULL . + .SH ERRORS The .BR libsimple_strrchr_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -62,18 +67,25 @@ T{ .BR libsimple_strrchr_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strrchr (3), .BR libsimple_strrcasechr_inv (3), diff --git a/man3/libsimple_strreplace.3 b/man3/libsimple_strreplace.3 index 96d20e0..0cdedd8 100644 --- a/man3/libsimple_strreplace.3 +++ b/man3/libsimple_strreplace.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRREPLACE 3 2018-11-25 libsimple +.TH LIBSIMPLE_STRREPLACE 3 libsimple .SH NAME libsimple_strreplace \- replace characters in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline char *libsimple_strreplace(char *\fIs\fP, int \fIold\fP, int \fIne .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strreplace () @@ -27,6 +29,7 @@ with the character .IR new . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strreplace () @@ -35,10 +38,12 @@ function returns the end of that is .I &s[strlen(s)] (as evaluated before the function call). + .SH ERRORS The .BR libsimple_strreplace () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -57,18 +62,25 @@ T{ .BR libsimple_strreplace () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strtolower (3), .BR libsimple_strtoupper (3), diff --git a/man3/libsimple_strreqlen.3 b/man3/libsimple_strreqlen.3 index 3fa4105..16c785e 100644 --- a/man3/libsimple_strreqlen.3 +++ b/man3/libsimple_strreqlen.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRREQLEN 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRREQLEN 3 libsimple .SH NAME libsimple_strreqlen \- check terminal commonality + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline size_t libsimple_strreqlen(const char *\fIa\fP, const char *\fIb\f .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strreqlen () @@ -24,6 +26,7 @@ have in common the string at their ends. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strreqlen () @@ -32,10 +35,12 @@ function returns the number of bytes and .I b have in common at their ends. + .SH ERRORS The .BR libsimple_strreqlen () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -54,18 +59,25 @@ T{ .BR libsimple_strreqlen () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strreqlen (3), .BR libsimple_streqlen (3), diff --git a/man3/libsimple_strrncasechr.3 b/man3/libsimple_strrncasechr.3 index 7e3ae4e..0a8450d 100644 --- a/man3/libsimple_strrncasechr.3 +++ b/man3/libsimple_strrncasechr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRRNCASECHR 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRRNCASECHR 3 libsimple .SH NAME libsimple_strrncasechr \- find a character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strrncasechr(const char *\fIs\fP, int \fIc\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strrncasechr () @@ -30,6 +32,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strrncasechr () @@ -44,10 +47,12 @@ offset less than .I n exists, it returns .BR NULL . + .SH ERRORS The .BR libsimple_strrncasechr () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -66,18 +71,25 @@ T{ .BR libsimple_strrncasechr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strrncasechr_inv (3), .BR libsimple_strncasechr (3), diff --git a/man3/libsimple_strrncasechr_inv.3 b/man3/libsimple_strrncasechr_inv.3 index 40426d6..7666cb3 100644 --- a/man3/libsimple_strrncasechr_inv.3 +++ b/man3/libsimple_strrncasechr_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRRNCASECHR_INV 3 2018-11-25 libsimple +.TH LIBSIMPLE_STRRNCASECHR_INV 3 libsimple .SH NAME libsimple_strrncasechr_inv \- find a different character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strrncasechr_inv(const char *\fIs\fP, int \fIc\fP, size_t \fIn\f .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strrncasechr_inv () @@ -31,6 +33,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strrncasechr_inv () @@ -45,10 +48,12 @@ offset less than .I n exists, it returns .BR NULL . + .SH ERRORS The .BR libsimple_strrncasechr_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -67,18 +72,25 @@ T{ .BR libsimple_strrncasechr_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strrncasechr (3), .BR libsimple_strncasechr_inv (3), diff --git a/man3/libsimple_strrncaseeqlen.3 b/man3/libsimple_strrncaseeqlen.3 index d938154..0d245f0 100644 --- a/man3/libsimple_strrncaseeqlen.3 +++ b/man3/libsimple_strrncaseeqlen.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRRNCASEEQLEN 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRRNCASEEQLEN 3 libsimple .SH NAME libsimple_strrncaseeqlen \- check terminal commonality + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline size_t libsimple_strrncaseeqlen(const char *\fIa\fP, const char *\ .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strrncaseeqlen () @@ -30,6 +32,7 @@ bytes unless it is shorter, at their ends. .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strrncaseeqlen () @@ -40,10 +43,12 @@ and (both truncated to .I n bytes) have in common at their ends. + .SH ERRORS The .BR libsimple_strrncaseeqlen () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -62,18 +67,25 @@ T{ .BR libsimple_strrncaseeqlen () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strrneqlen (3), .BR libsimple_strncaseeqlen (3), diff --git a/man3/libsimple_strrncasestr.3 b/man3/libsimple_strrncasestr.3 index dcf48b5..f06cb20 100644 --- a/man3/libsimple_strrncasestr.3 +++ b/man3/libsimple_strrncasestr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRRNCASESTR 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRRNCASESTR 3 libsimple .SH NAME libsimple_strrncasestr \- find a substring in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strrncasestr(const char *\fIhaystack\fP, const char *\fIneedle\f .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strrncasestr () @@ -26,6 +28,7 @@ the last occurrence of the substring .IR needle . .PP The comparison is case-insensitive. + .SH RETURN VALUE The .BR libsimple_strrncasestr () @@ -41,10 +44,12 @@ is the returned pointer. If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_strrncasestr () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -63,18 +68,25 @@ T{ .BR libsimple_strrncasestr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strrnstr (3), .BR libsimple_strncasestr (3), diff --git a/man3/libsimple_strrnchr.3 b/man3/libsimple_strrnchr.3 index a677bfe..fedb688 100644 --- a/man3/libsimple_strrnchr.3 +++ b/man3/libsimple_strrnchr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRRNCHR 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRRNCHR 3 libsimple .SH NAME libsimple_strrnchr \- find a character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strrnchr(const char *\fIs\fP, int \fIc\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strrnchr () @@ -30,6 +32,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strrnchr () @@ -44,10 +47,12 @@ offset less than .I n exists, it returns .BR NULL . + .SH ERRORS The .BR libsimple_strrnchr () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -66,18 +71,25 @@ T{ .BR libsimple_strrnchr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strrnchr_inv (3), .BR libsimple_strrncasechr (3), diff --git a/man3/libsimple_strrnchr_inv.3 b/man3/libsimple_strrnchr_inv.3 index 3cfdac9..1f47baa 100644 --- a/man3/libsimple_strrnchr_inv.3 +++ b/man3/libsimple_strrnchr_inv.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRRNCHR_INV 3 2018-11-25 libsimple +.TH LIBSIMPLE_STRRNCHR_INV 3 libsimple .SH NAME libsimple_strrnchr_inv \- find a different character in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strrnchr_inv(const char *\fIs\fP, int \fIc\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strrnchr_inv () @@ -31,6 +33,7 @@ If no such character exist in the string, the string's end is returned. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strrnchr_inv () @@ -45,10 +48,12 @@ offset less than .I n exists, it returns .BR NULL . + .SH ERRORS The .BR libsimple_strrnchr_inv () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -67,18 +72,25 @@ T{ .BR libsimple_strrnchr_inv () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strrnchr (3), .BR libsimple_strrncasechr_inv (3), diff --git a/man3/libsimple_strrneqlen.3 b/man3/libsimple_strrneqlen.3 index 6828fa0..eced333 100644 --- a/man3/libsimple_strrneqlen.3 +++ b/man3/libsimple_strrneqlen.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRRNEQLEN 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRRNEQLEN 3 libsimple .SH NAME libsimple_strrneqlen \- check terminal commonality + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ static inline size_t libsimple_strrneqlen(const char *\fIa\fP, const char *\fIb\ .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strrneqlen () @@ -30,6 +32,7 @@ bytes unless it is shorter, at their ends. .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strrneqlen () @@ -40,10 +43,12 @@ and (both truncated to .I n bytes) have in common at their ends. + .SH ERRORS The .BR libsimple_strrneqlen () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -62,18 +67,25 @@ T{ .BR libsimple_strrneqlen () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strrneqlen (3), .BR libsimple_strneqlen (3), diff --git a/man3/libsimple_strrnstr.3 b/man3/libsimple_strrnstr.3 index 9e95196..6bd1ae8 100644 --- a/man3/libsimple_strrnstr.3 +++ b/man3/libsimple_strrnstr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRRNSTR 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRRNSTR 3 libsimple .SH NAME libsimple_strrnstr \- find a substring in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strrnstr(const char *\fIhaystack\fP, const char *\fIneedle\fP, s .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strrnstr () @@ -26,6 +28,7 @@ the last occurrence of the substring .IR needle . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strrnstr () @@ -41,10 +44,12 @@ is the returned pointer. If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_strrnstr () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -63,18 +68,25 @@ T{ .BR libsimple_strrnstr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strrncasestr (3), .BR libsimple_strnstr (3), diff --git a/man3/libsimple_strrstr.3 b/man3/libsimple_strrstr.3 index c3c16b7..19d5d98 100644 --- a/man3/libsimple_strrstr.3 +++ b/man3/libsimple_strrstr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRRSTR 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRRSTR 3 libsimple .SH NAME libsimple_strrstr \- find a substring in a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ char *libsimple_strrstr(const char *\fIhaystack\fP, const char *\fIneedle\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strrstr () @@ -23,6 +25,7 @@ the last occurrence of the substring .IR needle . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strrstr () @@ -38,10 +41,12 @@ is the returned pointer. If no such offset exists, .B NULL is returned. + .SH ERRORS The .BR libsimple_strrstr () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -60,18 +65,25 @@ T{ .BR libsimple_strrstr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strrcasestr (3), .BR libsimple_strrnstr (3), diff --git a/man3/libsimple_strset.3 b/man3/libsimple_strset.3 index d504edf..6ed9ff4 100644 --- a/man3/libsimple_strset.3 +++ b/man3/libsimple_strset.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRSET 3 2018-11-25 libsimple +.TH LIBSIMPLE_STRSET 3 libsimple .SH NAME libsimple_strset, libsimple_stpset \- fill a string with a character + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ static inline char *libsimple_stpset(char *\fIs\fP, int \fIc\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strset () @@ -27,6 +29,7 @@ functions replace all characters in the string .I s with the character .IR c . + .SH RETURN VALUE The .BR libsimple_strset () @@ -39,12 +42,14 @@ function returns the end of (that is .IR &s[strlen(s)] , as evaluated before the function call. + .SH ERRORS The .BR libsimple_strset () and .BR libsimple_stpset () functions cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -69,18 +74,25 @@ T{ .BR libsimple_stpset () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strnset (3), .BR libsimple_mempset (3), diff --git a/man3/libsimple_strstarts.3 b/man3/libsimple_strstarts.3 index fbd3412..0daf04e 100644 --- a/man3/libsimple_strstarts.3 +++ b/man3/libsimple_strstarts.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRSTARTS 3 2018-10-23 libsimple +.TH LIBSIMPLE_STRSTARTS 3 libsimple .SH NAME libsimple_strstarts \- check the beginning of a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -14,6 +15,7 @@ int libsimple_strstarts(const char *\fIs\fP, const char *\fIt\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strstarts () @@ -23,6 +25,7 @@ starts with the string .IR t . .PP The comparison is case-sensitive. + .SH RETURN VALUE The .BR libsimple_strstarts () @@ -31,10 +34,12 @@ function returns 1 if the string begins with the string .IR t , otherwise it returns 0. + .SH ERRORS The .BR libsimple_strstarts () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -53,18 +58,25 @@ T{ .BR libsimple_strstarts () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strcasestarts (3), .BR libsimple_strends (3), diff --git a/man3/libsimple_strtolower.3 b/man3/libsimple_strtolower.3 index 385de39..8075dde 100644 --- a/man3/libsimple_strtolower.3 +++ b/man3/libsimple_strtolower.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRTOLOWER 3 2018-11-25 libsimple +.TH LIBSIMPLE_STRTOLOWER 3 libsimple .SH NAME libsimple_strtolower, libsimple_stptolower \- convert a string to lower case + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ char *libsimple_stptolower(char *\fIdest\fP, const char *\fIsrc\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strtolower () @@ -33,6 +35,7 @@ with all upper case ASCII characters converted to lower case. The arrays may overlap, and there is an optimisation for the case where .IR dest==src . + .SH RETURN VALUE The .BR libsimple_strtolower () @@ -46,12 +49,14 @@ end of the string copied into .IR dest , that is .IR &dest[strlen(src)] . + .SH ERRORS The .BR libsimple_strtolower () and .BR libsimple_stptolower () functions cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -76,18 +81,25 @@ T{ .BR libsimple_stptolower () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strtoupper (3), .BR libsimple_strreplace (3), diff --git a/man3/libsimple_strtotimespec.3 b/man3/libsimple_strtotimespec.3 index 85ff88b..b6d4a71 100644 --- a/man3/libsimple_strtotimespec.3 +++ b/man3/libsimple_strtotimespec.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRTOTIMESPEC 3 2018-10-31 libsimple +.TH LIBSIMPLE_STRTOTIMESPEC 3 libsimple .SH NAME libsimple_strtotimespec, libsimple_strtotimeval \- convert a string to a duration data structure + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ int libsimple_strtotimeval(struct timeval *restrict \fItv\fP, const char *\fIs\f .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strtotimespec () @@ -50,6 +52,7 @@ where the digits in .BR \e2 , if any, are repeating decimals and must contain atleast one digit if it is included. + .SH RETURN VALUE The .BR libsimple_strtotimespec () @@ -57,6 +60,7 @@ and .BR libsimple_strtotimeval () functions return 0 upon successful completion; otherwise \-1 is returned. + .SH ERRORS The .BR libsimple_strtotimespec () @@ -86,6 +90,7 @@ and (if the result is too small). .I *end will be set. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -110,18 +115,25 @@ T{ .BR libsimple_strtotimeval () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_sumtimespec (3), .BR libsimple_difftimespec (3), diff --git a/man3/libsimple_strtoupper.3 b/man3/libsimple_strtoupper.3 index cc1de4f..10333e5 100644 --- a/man3/libsimple_strtoupper.3 +++ b/man3/libsimple_strtoupper.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_STRTOUPPER 3 2018-11-25 libsimple +.TH LIBSIMPLE_STRTOUPPER 3 libsimple .SH NAME libsimple_strtoupper, libsimple_stptoupper \- convert a string to upper case + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ char *libsimple_stptoupper(char *\fIdest\fP, const char *\fIsrc\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_strtoupper () @@ -33,6 +35,7 @@ with all lower case ASCII characters converted to upper case. The arrays may overlap, and there is an optimisation for the case where .IR dest==src . + .SH RETURN VALUE The .BR libsimple_strtoupper () @@ -46,12 +49,14 @@ end of the string copied into .IR dest , that is .IR &dest[strlen(src)] . + .SH ERRORS The .BR libsimple_strtoupper () and .BR libsimple_stptoupper () functions cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -76,18 +81,25 @@ T{ .BR libsimple_stptoupper () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_strtolower (3), .BR libsimple_strreplace (3), diff --git a/man3/libsimple_sumtimespec.3 b/man3/libsimple_sumtimespec.3 index 7d587e0..f5b9af3 100644 --- a/man3/libsimple_sumtimespec.3 +++ b/man3/libsimple_sumtimespec.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_SUMTIMESPEC 3 2018-10-29 libsimple +.TH LIBSIMPLE_SUMTIMESPEC 3 libsimple .SH NAME libsimple_sumtimespec, libsimple_sumtimeval \- calculate the sum of two durations + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ int libsimple_sumtimeval(struct timeval *\fIsum\fP, const struct timeval *\fIaug .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_sumtimespec () @@ -29,6 +31,7 @@ and .I addend and stores the result in .IR sum . + .SH RETURN VALUE The .BR libsimple_sumtimespec () @@ -47,6 +50,7 @@ are in thier valid range ([0, 1000000000) for .BR libsimple_sumtimespec () and [0, 1000000) for .BR libsimple_sumtimeval ()). + .SH ERRORS The .BR libsimple_sumtimespec () @@ -77,6 +81,7 @@ function and to for the .BR libsimple_sumtimeval () function. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -101,18 +106,25 @@ T{ .BR libsimple_sumtimeval () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_difftimespec (3), .BR libsimple_multimespec (3), diff --git a/man3/libsimple_timespectodouble.3 b/man3/libsimple_timespectodouble.3 index fddc899..4413f8f 100644 --- a/man3/libsimple_timespectodouble.3 +++ b/man3/libsimple_timespectodouble.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_TIMESPECTODOUBLE 3 2018-10-30 libsimple +.TH LIBSIMPLE_TIMESPECTODOUBLE 3 libsimple .SH NAME libsimple_timespectodouble, libsimple_timevaltodouble \- convert a duration data structure to a double + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ static inline double libsimple_timevaltodouble(const struct timeval *\fItv\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_timespectodouble () @@ -30,6 +32,7 @@ and respectively, to a .B double and return the result. + .SH RETURN VALUE The .BR libsimple_timespectodouble () @@ -37,12 +40,14 @@ and .BR libsimple_timevaltodouble () functions return the input argument as a .BR double . + .SH ERRORS The .BR libsimple_timespectodouble () and .BR libsimple_timevaltodouble () functions cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -67,18 +72,25 @@ T{ .BR libsimple_timevaltodouble () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_sumtimespec (3), .BR libsimple_difftimespec (3), diff --git a/man3/libsimple_timespectostr.3 b/man3/libsimple_timespectostr.3 index d6e2b71..c1ce154 100644 --- a/man3/libsimple_timespectostr.3 +++ b/man3/libsimple_timespectostr.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_TIMESPECTOSTR 3 2018-10-30 libsimple +.TH LIBSIMPLE_TIMESPECTOSTR 3 libsimple .SH NAME libsimple_timespectostr, libsimple_timevaltostr \- convert a duration data structure to a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ char *libsimple_timevaltostr(char *restrict \fIbuf\fP, const struct timeval *res .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_timespectostr () @@ -59,6 +61,7 @@ and will always contain 9 (for the function) or 6 (for the .BR libsimple_timevaltostr () function) decimals. + .SH RETURN VALUE The .BR libsimple_timespectostr () @@ -77,6 +80,7 @@ pointer, otherwise the pointer is returned. On failure, .B NULL is returned. + .SH ERRORS The .BR libsimple_timespectostr () @@ -97,6 +101,7 @@ failed because it could not allocate enough memory. is negative or greater than 999\ 999\ 999, or .I tv->tv_usec is negative or greater than 999\ 999. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -121,18 +126,25 @@ T{ .BR libsimple_timevaltostr () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_minimise_number_string (3), .BR libsimple_sumtimespec (3), diff --git a/man3/libsimple_timeval2timespec.3 b/man3/libsimple_timeval2timespec.3 index d4381ce..f6dcf90 100644 --- a/man3/libsimple_timeval2timespec.3 +++ b/man3/libsimple_timeval2timespec.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_TIMEVAL2TIMESPEC 3 2018-10-30 libsimple +.TH LIBSIMPLE_TIMEVAL2TIMESPEC 3 libsimple .SH NAME libsimple_timeval2timespec, libsimple_timespec2timeval \- convert between timespec and timeval + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ int libsimple_timespec2timeval(struct timeval *restrict \fItv\fP, const struct t .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_timeval2timespec () @@ -37,6 +39,7 @@ to a rounding to nearest microsecond, and stores the result in .IR tv . + .SH RETURN VALUE The .BR libsimple_timespec2timeval () @@ -48,6 +51,7 @@ to indicate the error. The .BR libsimple_timeval2timespec () function does not return a value. + .SH ERRORS The .BR libsimple_timespec2timeval () @@ -65,6 +69,7 @@ will be stored in The .BR libsimple_timeval2timespec () function cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -89,18 +94,25 @@ T{ .BR libsimple_timespec2timeval () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_sumtimespec (3), .BR libsimple_difftimespec (3), diff --git a/man3/libsimple_unlist.3 b/man3/libsimple_unlist.3 index 5be3858..d3c2df1 100644 --- a/man3/libsimple_unlist.3 +++ b/man3/libsimple_unlist.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_UNLIST 3 2018-11-05 libsimple +.TH LIBSIMPLE_UNLIST 3 libsimple .SH NAME libsimple_unlist \- remove item for array and keep order + .SH SYNOPSIS .nf #include <libsimple.h> @@ -18,6 +19,7 @@ void LIBSIMPLE_UNLIST(\fItype\fP *\fIlist\fP, size_t \fIi\fP, size_t *\fInp\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_unlist () @@ -50,14 +52,17 @@ instead it is inferred from the type of as such, .I type must be a complete, non-void type. + .SH RETURN VALUE None. + .SH ERRORS The .BR libsimple_unlist () and .BR LIBSIMPLE_UNLIST () functions cannot fail. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -82,17 +87,24 @@ T{ .BR LIBSIMPLE_UNLIST () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR memmove (3) diff --git a/man3/libsimple_valigned_allocn.3 b/man3/libsimple_valigned_allocn.3 index 2600571..ab93f30 100644 --- a/man3/libsimple_valigned_allocn.3 +++ b/man3/libsimple_valigned_allocn.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VALIGNED_ALLOCN 3 2018-11-03 libsimple +.TH LIBSIMPLE_VALIGNED_ALLOCN 3 libsimple .SH NAME libsimple_valigned_allocn \- allocate memory with custom alignment + .SH SYNOPSIS .nf #include <libsimple.h> @@ -34,6 +35,7 @@ static inline void *libsimple_ealigned_allocn(size_t \fIalignment\fP, size_t \fI .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_aligned_allocn (), @@ -91,6 +93,7 @@ and respectively, that use .B va_list instead of variadic arguments. + .SH RETURN VALUE The .BR libsimple_valigned_allocn (), @@ -116,6 +119,7 @@ it indicate the error, and the and .BR libsimple_ealigned_allocn () functions terminated the process. + .SH ERRORS The .BR libsimple_valigned_allocn (), @@ -145,6 +149,7 @@ The and .BR libsimple_ealigned_allocn () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -193,18 +198,25 @@ T{ .BR libsimple_ealigned_allocn () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -213,7 +225,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_valigned_alloczn.3 b/man3/libsimple_valigned_alloczn.3 index 9f68adb..c40979e 100644 --- a/man3/libsimple_valigned_alloczn.3 +++ b/man3/libsimple_valigned_alloczn.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VALIGNED_ALLOCZN 3 2018-11-03 libsimple +.TH LIBSIMPLE_VALIGNED_ALLOCZN 3 libsimple .SH NAME libsimple_valigned_alloczn \- allocate optionally initialised memory with custom alignment + .SH SYNOPSIS .nf #include <libsimple.h> @@ -34,6 +35,7 @@ static inline void *libsimple_ealigned_alloczn(int \fIclear\fP, size_t \fIalignm .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_aligned_alloczn (), @@ -94,6 +96,7 @@ and respectively, that use .B va_list instead of variadic arguments. + .SH RETURN VALUE The .BR libsimple_valigned_alloczn (), @@ -119,6 +122,7 @@ it indicate the error, and the and .BR libsimple_ealigned_alloczn () functions terminated the process. + .SH ERRORS The .BR libsimple_valigned_alloczn (), @@ -148,6 +152,7 @@ The and .BR libsimple_ealigned_alloczn () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -196,18 +201,25 @@ T{ .BR libsimple_ealigned_alloczn () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -216,7 +228,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_valigned_reallocfn.3 b/man3/libsimple_valigned_reallocfn.3 new file mode 100644 index 0000000..0acf175 --- /dev/null +++ b/man3/libsimple_valigned_reallocfn.3 @@ -0,0 +1,189 @@ +.TH LIBSIMPLE_VALIGNED_REALLOCFN 3 libsimple +.SH NAME +libsimple_valigned_reallocfn \- reallocate memory and customise alignment + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +static inline void *libsimple_valigned_reallocfn(void *\fIptr\fP, size_t \fIalignment\fP, size_t \fIn\fP, va_list \fIap\fP); +static inline void *libsimple_aligned_reallocfn(void *\fIptr\fP, size_t \fIalignment\fP, size_t \fIn\fP, ..., /* (size_t)0 */); + +#ifndef valigned_reallocfn +# define valigned_reallocfn libsimple_valigned_reallocfn +#endif +#ifndef aligned_reallocfn +# define aligned_reallocfn libsimple_aligned_reallocfn +#endif +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_aligned_reallocfn () +function reallocates memory allocated on the +heap and return the older pointer or a new +pointer with the alignment of +.I alignment +to the allocated memory of +.I N +bytes, where +.I N +is the product of +.I n +and all following arguments (which should have the type +.BR size_t ) +up to the first 0; +.I n +must not be 0. The returned pointer will contain the +same content as +.IR ptr , +but truncated to +.I N +bytes if it is smaller or with the new bytes +unitialised if it is larger. If a new pointer +is returned, rather than +.IR ptr , +.I ptr +is deallocated; +.I ptr +is also deallocated on failure. The function +.BR free (3) +shall be called with the returned pointer as +input when the allocated memory is no longer needed. +.PP +The +.BR libsimple_valigned_reallocfn () +function is a version of the +.BR libsimple_aligned_reallocfn () +function that use +.B va_list +instead of variadic arguments. + +.SH RETURN VALUE +The +.BR libsimple_valigned_reallocfn () +and +.BR libsimple_aligned_reallocfn (), +functions return a pointer to the allocated memory +upon success completion; otherwise the +.BR libsimple_valigned_reallocfn () +and +.BR libsimple_aligned_reallocfn () +functions return +.B NULL +and set +.I errno +it indicate the error. + +.SH ERRORS +The +.BR libsimple_vreallocn (), +.BR libsimple_reallocn () +function will fail for the reasons specified for the +.BR realloc (3) +function, and if: +.TP +.B EINVAL +.I n +is 0. +.TP +.B EINVAL +.I alignment +is an invalid alignment (usually it needs to be an power of 2). +.TP +.B ENOSYS +The function is not implemented. The function requires +non-standard libc functions, and is therefore not supported +for all libc implementations. + +The function is implemented if and only if the macro +.B LIBSIMPLE_HAVE_ALIGNED_REALLOC +is defined by the library. + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_valigned_reallocfn (), +.br +.BR libsimple_aligned_reallocfn () +T} Thread safety MT-Safe +T{ +.BR libsimple_valigned_reallocfn (), +.br +.BR libsimple_aligned_reallocfn () +T} Async-signal safety AS-Safe +T{ +.BR libsimple_valigned_reallocfn (), +.br +.BR libsimple_aligned_reallocfn () +T} Async-cancel safety AC-Safe +.TE + +.SH EXAMPLES +None. + +.SH APPLICATION USAGE +None. + +.SH RATIONALE +None. + +.SH FUTURE DIRECTIONS +None. + +.SH NOTES +None. + +.SH BUGS +None. + +.SH SEE ALSO +.BR libsimple_enmalloc (3), +.BR libsimple_mallocz (3), +.BR libsimple_vmallocn (3), +.BR libsimple_vmalloczn (3), +.BR libsimple_encalloc (3), +.BR libsimple_vcallocn (3), +.BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), +.BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_memalign (3), +.BR libsimple_memalignz (3), +.BR libsimple_vmemalignn (3), +.BR libsimple_vmemalignzn (3), +.BR libsimple_enposix_memalign (3), +.BR libsimple_posix_memalignz (3), +.BR libsimple_vposix_memalignn (3), +.BR libsimple_vposix_memalignzn (3), +.BR libsimple_enaligned_alloc (3), +.BR libsimple_aligned_allocz (3), +.BR libsimple_valigned_allocn (3), +.BR libsimple_valigned_alloczn (3), +.BR libsimple_pvalloc (3), +.BR libsimple_pvallocz (3), +.BR libsimple_vpvallocn (3), +.BR libsimple_vpvalloczn (3), +.BR libsimple_valloc (3), +.BR libsimple_vallocz (3), +.BR libsimple_vvallocn (3), +.BR libsimple_vvalloczn (3), +.BR libsimple_vmemalloc (3), +.BR libsimple_varrayalloc (3), +.BR malloc (3) diff --git a/man3/libsimple_valigned_reallocn.3 b/man3/libsimple_valigned_reallocn.3 new file mode 100644 index 0000000..94baffb --- /dev/null +++ b/man3/libsimple_valigned_reallocn.3 @@ -0,0 +1,279 @@ +.TH LIBSIMPLE_VALIGNED_REALLOCN 3 libsimple +.SH NAME +libsimple_valigned_reallocn \- reallocate memory and customise alignment + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +void *libsimple_valigned_reallocn(void *\fIptr\fP, size_t \fIalignment\fP, size_t \fIn\fP, va_list \fIap\fP); +void *libsimple_envaligned_reallocn(int \fIstatus\fP, void *\fIptr\fP, size_t \fIalignment\fP, size_t \fIn\fP, va_list \fIap\fP); +static inline void *libsimple_evaligned_reallocn(void *\fIptr\fP, size_t \fIalignment\fP, size_t \fIn\fP, va_list \fIap\fP); +static inline void *libsimple_aligned_reallocn(void *\fIptr\fP, size_t \fIalignment\fP, size_t \fIn\fP, ..., /* (size_t)0 */); +static inline void *libsimple_enaligned_reallocn(int \fIstatus\fP, void *\fIptr\fP, size_t \fIalignment\fP, size_t \fIn\fP, ..., /* (size_t)0 */); +static inline void *libsimple_ealigned_reallocn(void *\fIptr\fP, size_t \fIalignment\fP, size_t \fIn\fP, ..., /* (size_t)0 */); + +#ifndef valigned_reallocn +# define valigned_reallocn libsimple_valigned_reallocn +#endif +#ifndef envaligned_reallocn +# define envaligned_reallocn libsimple_envaligned_reallocn +#endif +#ifndef evaligned_reallocn +# define evaligned_reallocn libsimple_evaligned_reallocn +#endif +#ifndef aligned_reallocn +# define aligned_reallocn libsimple_aligned_reallocn +#endif +#ifndef enaligned_reallocn +# define enaligned_reallocn libsimple_enaligned_reallocn +#endif +#ifndef ealigned_reallocn +# define ealigned_reallocn libsimple_ealigned_reallocn +#endif +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_aligned_reallocn (), +.BR libsimple_enaligned_reallocn (), +and +.BR libsimple_ealigned_reallocn () +functions are wrappers for the +.BR realloc (3) +function, they reallocate memory allocated on +the heap and return the older pointer or a new +pointer with the alignment of +.I alignment +to the allocated memory of +.I N +bytes, where +.I N +is the product of +.I n +and all following arguments (which should have the type +.BR size_t ) +up to the first 0; +.I n +must not be 0. The returned pointer will contain the +same content as +.IR ptr , +but truncated to +.I N +bytes if it is smaller or with the new bytes +unitialised if it is larger. If a new pointer +is returned, rather than +.IR ptr , +.I ptr +is deallocated; +.I ptr +is not deallocated on failure. The function +.BR free (3) +shall be called with the returned pointer as +input when the allocated memory is no longer needed. +.PP +The +.BR libsimple_enaligned_reallocn () +and +.BR libsimple_ealigned_reallocn () +functions will terminate the process if the memory +cannot be allocated, by calling the +.BR libsimple_enprintf () +and +.BR libsimple_eprintf () +functions, respectively. +On failure, the process's exit value will be +.I status +if the +.BR libsimple_enaligned_reallocn () +function is used or +.IR libsimple_default_failure_exit (3) +if the +.BR libsimple_ealigned_reallocn () +function is used. +.PP +The +.BR libsimple_valigned_reallocn (), +.BR libsimple_envaligned_reallocn (), +and +.BR libsimple_evaligned_reallocn () +functions are versions of the +.BR libsimple_aligned_reallocn (), +.BR libsimple_enaligned_reallocn (), +and +.BR libsimple_ealigned_reallocn (), +respectively, that use +.B va_list +instead of variadic arguments. + +.SH RETURN VALUE +The +.BR libsimple_valigned_reallocn (), +.BR libsimple_envaligned_reallocn (), +.BR libsimple_evaligned_reallocn (), +.BR libsimple_aligned_reallocn (), +.BR libsimple_enaligned_reallocn (), +and +.BR libsimple_ealigned_reallocn () +functions return a pointer to the allocated memory +upon success completion; otherwise the +.BR libsimple_valigned_reallocn () +and +.BR libsimple_aligned_reallocn () +functions return +.B NULL +and set +.I errno +it indicate the error, and the +.BR libsimple_envaligned_reallocn (), +.BR libsimple_evaligned_reallocn (), +.BR libsimple_enaligned_reallocn (), +and +.BR libsimple_ealigned_reallocn () +functions terminated the process. + +.SH ERRORS +The +.BR libsimple_valigned_reallocn () +and +.BR libsimple_aligned_reallocn () +functions will fail for the reasons specified for the +.BR realloc (3) +function, and if: +.TP +.B EINVAL +.I n +is 0. +.TP +.B EINVAL +.I alignment +is an invalid alignment (usually it needs to be an power of 2). +.TP +.B ENOSYS +The function is not implemented. The function requires +non-standard libc functions, and is therefore not supported +for all libc implementations. + +The function is implemented if and only if the macro +.B LIBSIMPLE_HAVE_ALIGNED_REALLOC +is defined by the library. +.PP +The +.BR libsimple_envaligned_reallocn (), +.BR libsimple_evaligned_reallocn (), +.BR libsimple_enaligned_reallocn (), +and +.BR libsimple_ealigned_reallocn () +functions will terminate the process on failure. + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_valigned_reallocn (), +.br +.BR libsimple_envaligned_reallocn (), +.br +.BR libsimple_evaligned_reallocn (), +.br +.BR libsimple_aligned_reallocn (), +.br +.BR libsimple_enaligned_reallocn (), +.br +.BR libsimple_ealigned_reallocn () +T} Thread safety MT-Safe +T{ +.BR libsimple_valigned_reallocn (), +.br +.BR libsimple_envaligned_reallocn (), +.br +.BR libsimple_evaligned_reallocn (), +.br +.BR libsimple_aligned_reallocn (), +.br +.BR libsimple_enaligned_reallocn (), +.br +.BR libsimple_ealigned_reallocn () +T} Async-signal safety AS-Safe +T{ +.BR libsimple_valigned_reallocn (), +.br +.BR libsimple_envaligned_reallocn (), +.br +.BR libsimple_evaligned_reallocn (), +.br +.BR libsimple_aligned_reallocn (), +.br +.BR libsimple_enaligned_reallocn (), +.br +.BR libsimple_ealigned_reallocn () +T} Async-cancel safety AC-Safe +.TE + +.SH EXAMPLES +None. + +.SH APPLICATION USAGE +None. + +.SH RATIONALE +None. + +.SH FUTURE DIRECTIONS +None. + +.SH NOTES +None. + +.SH BUGS +None. + +.SH SEE ALSO +.BR libsimple_enmalloc (3), +.BR libsimple_mallocz (3), +.BR libsimple_vmallocn (3), +.BR libsimple_vmalloczn (3), +.BR libsimple_encalloc (3), +.BR libsimple_vcallocn (3), +.BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), +.BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), +.BR libsimple_memalign (3), +.BR libsimple_memalignz (3), +.BR libsimple_vmemalignn (3), +.BR libsimple_vmemalignzn (3), +.BR libsimple_enposix_memalign (3), +.BR libsimple_posix_memalignz (3), +.BR libsimple_vposix_memalignn (3), +.BR libsimple_vposix_memalignzn (3), +.BR libsimple_enaligned_alloc (3), +.BR libsimple_aligned_allocz (3), +.BR libsimple_valigned_allocn (3), +.BR libsimple_valigned_alloczn (3), +.BR libsimple_pvalloc (3), +.BR libsimple_pvallocz (3), +.BR libsimple_vpvallocn (3), +.BR libsimple_vpvalloczn (3), +.BR libsimple_valloc (3), +.BR libsimple_vallocz (3), +.BR libsimple_vvallocn (3), +.BR libsimple_vvalloczn (3), +.BR libsimple_vmemalloc (3), +.BR libsimple_varrayalloc (3), +.BR malloc (3) diff --git a/man3/libsimple_valloc.3 b/man3/libsimple_valloc.3 index 84cce32..97e7b97 100644 --- a/man3/libsimple_valloc.3 +++ b/man3/libsimple_valloc.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VALLOC 3 2018-11-03 libsimple +.TH LIBSIMPLE_VALLOC 3 libsimple .SH NAME libsimple_valloc \- allocate memory with page size alignment + .SH SYNOPSIS .nf #include <libsimple.h> @@ -22,6 +23,7 @@ static inline void *libsimple_evalloc(size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_valloc (), @@ -59,6 +61,7 @@ function is used or if the .BR libsimple_evalloc () function is used. + .SH RETURN VALUE The .BR libsimple_valloc (), @@ -77,6 +80,7 @@ it indicate the error, and the and .BR libsimple_evalloc () functions terminated the process. + .SH ERRORS The .BR libsimple_valloc () @@ -94,6 +98,7 @@ The and .BR libsimple_evalloc () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -124,14 +129,19 @@ T{ .BR libsimple_evalloc () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES Portable applications shall assume that pointer returned by the @@ -145,8 +155,10 @@ is used explicitly. The GNU implementation of .BR valloc (3) is \(dqMT-Unsafe init\(dq. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -155,7 +167,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_vallocz.3 b/man3/libsimple_vallocz.3 index 3559a32..bc2f8b8 100644 --- a/man3/libsimple_vallocz.3 +++ b/man3/libsimple_vallocz.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VALLOCZ 3 2018-11-03 libsimple +.TH LIBSIMPLE_VALLOCZ 3 libsimple .SH NAME libsimple_vallocz \- allocate optionally initialised memory with page size alignment + .SH SYNOPSIS .nf #include <libsimple.h> @@ -22,6 +23,7 @@ static inline void *libsimple_evallocz(int \fIclear\fP, size_t \fIn\fP); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_vallocz (), @@ -68,6 +70,7 @@ and functions behaviour is unspecified if .I n is 0. + .SH RETURN VALUE The .BR libsimple_vallocz (), @@ -86,6 +89,7 @@ it indicate the error, and the and .BR libsimple_evallocz () functions terminated the process. + .SH ERRORS The .BR libsimple_vallocz () @@ -103,6 +107,7 @@ The and .BR libsimple_evallocz () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -133,20 +138,27 @@ T{ .BR libsimple_evallocz () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES The GNU implementation of .BR valloc (3) is \(dqMT-Unsafe init\(dq. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -155,7 +167,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_varrayalloc.3 b/man3/libsimple_varrayalloc.3 index ceea9f1..d009b92 100644 --- a/man3/libsimple_varrayalloc.3 +++ b/man3/libsimple_varrayalloc.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VARRAYALLOC 3 2018-11-03 libsimple +.TH LIBSIMPLE_VARRAYALLOC 3 libsimple .SH NAME libsimple_varrayalloc \- allocate memory in a flexible manner + .SH SYNOPSIS .nf #include <libsimple.h> @@ -19,6 +20,7 @@ void *libsimple_earrayalloc(\fItype\fP, size_t \fIn\fP, ..., /* LIBSIMPLE_ARRAYA .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_varrayalloc (), @@ -74,6 +76,7 @@ will be used as the alignment for the returned pointer. * The specified allocatio size will be multiplied by .IR sizeof(type) . + .SH RETURN VALUE The .BR libsimple_varrayalloc (), @@ -99,6 +102,7 @@ to indicate the error, whereas the and .BR libsimple_earrayalloc () functions terminate the process. + .SH ERRORS The .BR libsimple_varrayalloc () @@ -123,6 +127,7 @@ The and .BR libsimple_earrayalloc () functions terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -171,18 +176,25 @@ T{ .BR libsimple_earrayalloc () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_vmemalloc (3), .BR libsimple_enmalloc (3), @@ -192,7 +204,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_vasprintf.3 b/man3/libsimple_vasprintf.3 index e91c404..250e65f 100644 --- a/man3/libsimple_vasprintf.3 +++ b/man3/libsimple_vasprintf.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VASPRINTF 3 2018-11-04 libsimple +.TH LIBSIMPLE_VASPRINTF 3 libsimple .SH NAME libsimple_vasprintf \- allocate and format a string + .SH SYNOPSIS .nf #include <libsimple.h> @@ -26,6 +27,7 @@ char *libsimple_asprintfa(const char *\fIfmt\fP, ...); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_vasprintf () @@ -92,6 +94,7 @@ and .BR libsimple_asprintfa () functions are implemented as macros and are only available if compiling with GCC or Clang. + .SH RETURN VALUE The .BR libsimple_vasprintf () @@ -113,6 +116,7 @@ completion; otherwise is returned and .I errno set to indicate the error. + .SH ERRORS The .BR libsimple_vasprintf (), @@ -141,6 +145,7 @@ and functions, the kernel will kill the thread with a .B SIGSEGV signal. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -177,18 +182,25 @@ T{ .BR libsimple_asprintfa () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_vweprintf (3), .BR sprintf (3), diff --git a/man3/libsimple_vcallocn.3 b/man3/libsimple_vcallocn.3 index 0d1c71d..449cfd6 100644 --- a/man3/libsimple_vcallocn.3 +++ b/man3/libsimple_vcallocn.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VCALLOCN 3 2018-11-03 libsimple +.TH LIBSIMPLE_VCALLOCN 3 libsimple .SH NAME libsimple_vcallocn \- allocate memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -34,6 +35,7 @@ static inline void *libsimple_ecallocn(size_t \fIn\fP, ..., /* (size_t)0 */); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_callocn (), @@ -93,6 +95,7 @@ and respectively, that use .B va_list instead of variadic arguments. + .SH RETURN VALUE The .BR libsimple_vcallocn (), @@ -118,6 +121,7 @@ it indicate the error, and the and .BR libsimple_ecallocn () functions terminated the process. + .SH ERRORS The .BR libsimple_vcallocn (), @@ -137,6 +141,7 @@ The and .BR libsimple_ecallocn () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -185,18 +190,25 @@ T{ .BR libsimple_ecallocn () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -204,7 +216,17 @@ None. .BR libsimple_vmalloczn (3), .BR libsimple_encalloc (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_vmallocn.3 b/man3/libsimple_vmallocn.3 index 0aed464..9383069 100644 --- a/man3/libsimple_vmallocn.3 +++ b/man3/libsimple_vmallocn.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VMALLOCN 3 2018-11-03 libsimple +.TH LIBSIMPLE_VMALLOCN 3 libsimple .SH NAME libsimple_vmallocn \- allocate memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -34,6 +35,7 @@ static inline void *libsimple_emallocn(size_t \fIn\fP, ..., /* (size_t)0 */); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_mallocn (), @@ -93,6 +95,7 @@ and respectively, that use .B va_list instead of variadic arguments. + .SH RETURN VALUE The .BR libsimple_vmallocn (), @@ -118,6 +121,7 @@ it indicate the error, and the and .BR libsimple_emallocn () functions terminated the process. + .SH ERRORS The .BR libsimple_vmallocn (), @@ -137,6 +141,7 @@ The and .BR libsimple_emallocn () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -185,18 +190,25 @@ T{ .BR libsimple_emallocn () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -204,7 +216,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_vmalloczn.3 b/man3/libsimple_vmalloczn.3 index 8b12b4a..67354e6 100644 --- a/man3/libsimple_vmalloczn.3 +++ b/man3/libsimple_vmalloczn.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VMALLOCZN 3 2018-11-03 libsimple +.TH LIBSIMPLE_VMALLOCZN 3 libsimple .SH NAME libsimple_vmalloczn \- allocate optionally initialised memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -34,6 +35,7 @@ static inline void *libsimple_emalloczn(int \fIclear\fP, size_t \fIn\fP, ..., /* .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_malloczn (), @@ -98,6 +100,7 @@ and respectively, that use .B va_list instead of variadic arguments. + .SH RETURN VALUE The .BR libsimple_vmalloczn (), @@ -123,6 +126,7 @@ it indicate the error, and the and .BR libsimple_emalloczn () functions terminated the process. + .SH ERRORS The .BR libsimple_vmalloczn (), @@ -144,6 +148,7 @@ The and .BR libsimple_emalloczn () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -192,18 +197,25 @@ T{ .BR libsimple_emalloczn () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -211,7 +223,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_vmemalignn.3 b/man3/libsimple_vmemalignn.3 index 8a6c5c1..1f13cd7 100644 --- a/man3/libsimple_vmemalignn.3 +++ b/man3/libsimple_vmemalignn.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VMEMALIGNN 3 2018-11-03 libsimple +.TH LIBSIMPLE_VMEMALIGNN 3 libsimple .SH NAME libsimple_vmemalignn \- allocate memory with custom alignment + .SH SYNOPSIS .nf #include <libsimple.h> @@ -34,6 +35,7 @@ static inline void *libsimple_ememalignn(size_t \fIalignment\fP, size_t \fIn\fP, .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memalignn (), @@ -91,6 +93,7 @@ and respectively, that use .B va_list instead of variadic arguments. + .SH RETURN VALUE The .BR libsimple_vmemalignn (), @@ -116,6 +119,7 @@ it indicate the error, and the and .BR libsimple_ememalignn () functions terminated the process. + .SH ERRORS The .BR libsimple_vmemalignn (), @@ -140,6 +144,7 @@ The and .BR libsimple_ememalignn () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -188,18 +193,25 @@ T{ .BR libsimple_ememalignn () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -208,7 +220,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignzn (3), diff --git a/man3/libsimple_vmemalignzn.3 b/man3/libsimple_vmemalignzn.3 index f59b3a0..d9b0434 100644 --- a/man3/libsimple_vmemalignzn.3 +++ b/man3/libsimple_vmemalignzn.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VMEMALIGNZN 3 2018-11-03 libsimple +.TH LIBSIMPLE_VMEMALIGNZN 3 libsimple .SH NAME libsimple_vmemalignzn \- allocate optionally initialised memory with custom alignment + .SH SYNOPSIS .nf #include <libsimple.h> @@ -34,6 +35,7 @@ static inline void *libsimple_ememalignzn(int \fIclear\fP, size_t \fIalignment\f .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_memalignzn (), @@ -94,6 +96,7 @@ and respectively, that use .B va_list instead of variadic arguments. + .SH RETURN VALUE The .BR libsimple_vmemalignzn (), @@ -119,6 +122,7 @@ it indicate the error, and the and .BR libsimple_ememalignzn () functions terminated the process. + .SH ERRORS The .BR libsimple_vmemalignzn (), @@ -143,6 +147,7 @@ The and .BR libsimple_ememalignzn () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -191,18 +196,25 @@ T{ .BR libsimple_ememalignzn () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -211,7 +223,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_vmemalloc.3 b/man3/libsimple_vmemalloc.3 index e088af2..ab0b4c3 100644 --- a/man3/libsimple_vmemalloc.3 +++ b/man3/libsimple_vmemalloc.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VMEMALLOC 3 2018-11-03 libsimple +.TH LIBSIMPLE_VMEMALLOC 3 libsimple .SH NAME libsimple_vmemalloc \- allocate memory in a flexible manner + .SH SYNOPSIS .nf #include <libsimple.h> @@ -19,6 +20,7 @@ static inline void *libsimple_ememalloc(size_t \fIn\fP, ..., /* LIBSIMPLE_MEMALL .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_vmemalloc () @@ -178,6 +180,7 @@ and functions, respectively, that use variadic arguments instead of .BR va_list . + .SH RETURN VALUE The .BR libsimple_vmemalloc (), @@ -203,6 +206,7 @@ to indicate the error, whereas the and .BR libsimple_ememalloc () functions terminate the process. + .SH ERRORS The .BR libsimple_vmemalloc () @@ -227,6 +231,7 @@ The and .BR libsimple_ememalloc () functions terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -275,18 +280,25 @@ T{ .BR libsimple_ememalloc () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_varrayalloc (3), .BR libsimple_enmalloc (3), @@ -296,7 +308,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_vposix_memalignn.3 b/man3/libsimple_vposix_memalignn.3 index f05ab6b..b8da3e8 100644 --- a/man3/libsimple_vposix_memalignn.3 +++ b/man3/libsimple_vposix_memalignn.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VPOSIX_MEMALIGNN 3 2018-11-03 libsimple +.TH LIBSIMPLE_VPOSIX_MEMALIGNN 3 libsimple .SH NAME libsimple_vposix_memalignn \- allocate memory with custom alignment + .SH SYNOPSIS .nf #include <libsimple.h> @@ -34,6 +35,7 @@ static inline void libsimple_eposix_memalignn(void **\fImemptr\fP, size_t \fIali .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_posix_memalignn (), @@ -96,6 +98,7 @@ and respectively, that use .B va_list instead of variadic arguments. + .SH RETURN VALUE The .BR libsimple_vposix_memalignn () @@ -113,6 +116,7 @@ and .BR libsimple_eposix_memalignn () functions to not return a value, but terminated the process on failure. + .SH ERRORS The .BR libsimple_vposix_memalignn (), @@ -142,6 +146,7 @@ The and .BR libsimple_eposix_memalignn () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -190,18 +195,25 @@ T{ .BR libsimple_eposix_memalignn () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -210,7 +222,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_vposix_memalignzn.3 b/man3/libsimple_vposix_memalignzn.3 index 481a4b1..fd4c682 100644 --- a/man3/libsimple_vposix_memalignzn.3 +++ b/man3/libsimple_vposix_memalignzn.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VPOSIX_MEMALIGNZN 3 2018-11-03 libsimple +.TH LIBSIMPLE_VPOSIX_MEMALIGNZN 3 libsimple .SH NAME libsimple_vposix_memalignzn \- allocate optionally initialised memory with custom alignment + .SH SYNOPSIS .nf #include <libsimple.h> @@ -34,6 +35,7 @@ static inline int libsimple_eposix_memalignzn(void **\fImemptr\fP, int \fIclear\ .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_posix_memalignzn (), @@ -99,6 +101,7 @@ and respectively, that use .B va_list instead of variadic arguments. + .SH RETURN VALUE The .BR libsimple_vposix_memalignzn () @@ -116,6 +119,7 @@ and .BR libsimple_eposix_memalignzn () functions do not return a value, but terminated the process on failure. + .SH ERRORS The .BR libsimple_vposix_memalignzn (), @@ -145,6 +149,7 @@ The and .BR libsimple_eposix_memalignzn () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -193,18 +198,25 @@ T{ .BR libsimple_eposix_memalignzn () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -213,7 +225,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_vputenvf.3 b/man3/libsimple_vputenvf.3 index 33c5559..d772c81 100644 --- a/man3/libsimple_vputenvf.3 +++ b/man3/libsimple_vputenvf.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VPUTENVF 3 2018-10-20 libsimple +.TH LIBSIMPLE_VPUTENVF 3 libsimple .SH NAME libsimple_vputenvf \- change or add a string formatted value to the environment + .SH SYNOPSIS .nf #include <libsimple.h> @@ -34,6 +35,7 @@ static inline void libsimple_eputenvf(const char *\fIfmt\fP, ...); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_vputenvf () @@ -88,6 +90,7 @@ for more information. Modifications made to the environment do not become visible to other process until the process image is changed. + .SH RETURN VALUE Upon successful completion, the .BR libsimple_vputenvf () @@ -96,6 +99,7 @@ and functions return 0; otherwise, they return \-1 and set .I errno to indicate the error. + .SH ERRORS The .BR libsimple_vputenvf () @@ -114,6 +118,7 @@ Insufficient memory was available. They may also fail for any reason specified for the .BR vsnprintf (3) function. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -162,14 +167,19 @@ T{ .BR libsimple_eputenvf () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES If the construct does not contain the .B '=' @@ -182,12 +192,14 @@ the behaviour is unspecified when countered by the and .BR unsetenv (3) functions. + .SH BUGS There is no mechanism for detecting which entries in the environment are statically allocated and which are dynamically allocated, this can lead to memory leaks with are detected by .BR valgrind (1). + .SH SEE ALSO .BR putenv (3), .BR setenv (3), diff --git a/man3/libsimple_vpvallocn.3 b/man3/libsimple_vpvallocn.3 index 4c05134..1d4bbbb 100644 --- a/man3/libsimple_vpvallocn.3 +++ b/man3/libsimple_vpvallocn.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VPVALLOCN 3 2018-11-03 libsimple +.TH LIBSIMPLE_VPVALLOCN 3 libsimple .SH NAME libsimple_vpvallocn \- allocate memory with page size alignment + .SH SYNOPSIS .nf #include <libsimple.h> @@ -34,6 +35,7 @@ static inline void *libsimple_epvallocn(size_t \fIn\fP, ..., /* (size_t)0 */); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_pvallocn (), @@ -91,6 +93,7 @@ and respectively, that use .B va_list instead of variadic arguments. + .SH RETURN VALUE The .BR libsimple_vpvallocn (), @@ -116,6 +119,7 @@ it indicate the error, and the and .BR libsimple_epvallocn () functions terminated the process. + .SH ERRORS The .BR libsimple_vpvallocn (), @@ -136,6 +140,7 @@ The and .BR libsimple_epvallocn () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -184,20 +189,27 @@ T{ .BR libsimple_epvallocn () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES The GNU implementation of .BR pvalloc (3) is \(dqMT-Unsafe init\(dq. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -206,7 +218,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_vpvalloczn.3 b/man3/libsimple_vpvalloczn.3 index be9f1c5..e620758 100644 --- a/man3/libsimple_vpvalloczn.3 +++ b/man3/libsimple_vpvalloczn.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VPVALLOCZN 3 2018-11-03 libsimple +.TH LIBSIMPLE_VPVALLOCZN 3 libsimple .SH NAME libsimple_vpvalloczn \- allocate optionally initialised memory with page size alignment + .SH SYNOPSIS .nf #include <libsimple.h> @@ -34,6 +35,7 @@ static inline void *libsimple_epvalloczn(int \fIclear\fP, size_t \fIn\fP, ..., / .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_pvalloczn (), @@ -93,6 +95,7 @@ and respectively, that use .B va_list instead of variadic arguments. + .SH RETURN VALUE The .BR libsimple_vpvalloczn (), @@ -118,6 +121,7 @@ it indicate the error, and the and .BR libsimple_epvalloczn () functions terminated the process. + .SH ERRORS The .BR libsimple_vpvalloczn (), @@ -138,6 +142,7 @@ The and .BR libsimple_epvalloczn () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -186,20 +191,27 @@ T{ .BR libsimple_epvalloczn () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES The GNU implementation of .BR pvalloc (3) is \(dqMT-Unsafe init\(dq. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -208,7 +220,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_vreallocfn.3 b/man3/libsimple_vreallocfn.3 new file mode 100644 index 0000000..5dd5390 --- /dev/null +++ b/man3/libsimple_vreallocfn.3 @@ -0,0 +1,178 @@ +.TH LIBSIMPLE_VREALLOCFN 3 libsimple +.SH NAME +libsimple_vreallocfn \- reallocate memory + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +static inline void *libsimple_vreallocfn(void *\fIptr\fP, size_t \fIn\fP, va_list \fIap\fP); +static inline void *libsimple_reallocfn(void *\fIptr\fP, size_t \fIn\fP, ..., /* (size_t)0 */); + +#ifndef vreallocfn +# define vreallocfn libsimple_vreallocfn +#endif +#ifndef reallocfn +# define reallocfn libsimple_reallocfn +#endif +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_reallocfn () +function is a wrapper for the +.BR realloc (3) +function, it reallocate memory allocated on +the heap and return the older pointer or a new +pointer with the alignment of +.I alignof(max_align_t) +to the allocated memory of +.I N +bytes, where +.I N +is the product of +.I n +and all following arguments (which should have the type +.BR size_t ) +up to the first 0; +.I n +must not be 0. The returned pointer will contain the +same content as +.IR ptr , +but truncated to +.I N +bytes if it is smaller or with the new bytes +unitialised if it is larger. If a new pointer +is returned, rather than +.IR ptr , +.I ptr +is deallocated; +.I ptr +is also deallocated on failure. The function +.BR free (3) +shall be called with the returned pointer as +input when the allocated memory is no longer needed. +.PP +The +.BR libsimple_vreallocfn () +function is a version of the +.BR libsimple_reallocfn () +function that use +.B va_list +instead of variadic arguments. + +.SH RETURN VALUE +The +.BR libsimple_vreallocfn () +and +.BR libsimple_reallocfn (), +functions return a pointer to the allocated memory +upon success completion; otherwise the +.BR libsimple_vreallocfn () +and +.BR libsimple_reallocfn () +functions return +.B NULL +and set +.I errno +it indicate the error. + +.SH ERRORS +The +.BR libsimple_vreallocn (), +.BR libsimple_reallocn () +function will fail for the reasons specified for the +.BR realloc (3) +function, and if: +.TP +.B EINVAL +.I n +is 0. + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_vreallocfn (), +.br +.BR libsimple_reallocfn () +T} Thread safety MT-Safe +T{ +.BR libsimple_vreallocfn (), +.br +.BR libsimple_reallocfn () +T} Async-signal safety AS-Safe +T{ +.BR libsimple_vreallocfn (), +.br +.BR libsimple_reallocfn () +T} Async-cancel safety AC-Safe +.TE + +.SH EXAMPLES +None. + +.SH APPLICATION USAGE +None. + +.SH RATIONALE +None. + +.SH FUTURE DIRECTIONS +None. + +.SH NOTES +None. + +.SH BUGS +None. + +.SH SEE ALSO +.BR libsimple_enmalloc (3), +.BR libsimple_mallocz (3), +.BR libsimple_vmallocn (3), +.BR libsimple_vmalloczn (3), +.BR libsimple_encalloc (3), +.BR libsimple_vcallocn (3), +.BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), +.BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), +.BR libsimple_memalign (3), +.BR libsimple_memalignz (3), +.BR libsimple_vmemalignn (3), +.BR libsimple_vmemalignzn (3), +.BR libsimple_enposix_memalign (3), +.BR libsimple_posix_memalignz (3), +.BR libsimple_vposix_memalignn (3), +.BR libsimple_vposix_memalignzn (3), +.BR libsimple_enaligned_alloc (3), +.BR libsimple_aligned_allocz (3), +.BR libsimple_valigned_allocn (3), +.BR libsimple_valigned_alloczn (3), +.BR libsimple_pvalloc (3), +.BR libsimple_pvallocz (3), +.BR libsimple_vpvallocn (3), +.BR libsimple_vpvalloczn (3), +.BR libsimple_valloc (3), +.BR libsimple_vallocz (3), +.BR libsimple_vvallocn (3), +.BR libsimple_vvalloczn (3), +.BR libsimple_vmemalloc (3), +.BR libsimple_varrayalloc (3), +.BR malloc (3) diff --git a/man3/libsimple_vreallocn.3 b/man3/libsimple_vreallocn.3 index 2f61307..bddce8b 100644 --- a/man3/libsimple_vreallocn.3 +++ b/man3/libsimple_vreallocn.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VREALLOCN 3 2018-11-03 libsimple +.TH LIBSIMPLE_VREALLOCN 3 libsimple .SH NAME libsimple_vreallocn \- reallocate memory + .SH SYNOPSIS .nf #include <libsimple.h> @@ -34,6 +35,7 @@ static inline void *libsimple_ereallocn(void *\fIptr\fP, size_t \fIn\fP, ..., /* .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_reallocn (), @@ -43,7 +45,7 @@ and functions are wrappers for the .BR realloc (3) function, they reallocate memory allocated on -the heap and return the older pointer ot a new +the heap and return the older pointer or a new pointer with the alignment of .I alignof(max_align_t) to the allocated memory of @@ -106,6 +108,7 @@ and respectively, that use .B va_list instead of variadic arguments. + .SH RETURN VALUE The .BR libsimple_vreallocn (), @@ -131,11 +134,13 @@ it indicate the error, and the and .BR libsimple_ereallocn () functions terminated the process. + .SH ERRORS The -.BR libsimple_vreallocn (), +.BR libsimple_vreallocn () +and .BR libsimple_reallocn () -function will fail for the reasons specified for the +functions will fail for the reasons specified for the .BR realloc (3) function, and if: .TP @@ -150,6 +155,7 @@ The and .BR libsimple_ereallocn () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -198,18 +204,25 @@ T{ .BR libsimple_ereallocn () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -218,6 +231,16 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_vvallocn.3 b/man3/libsimple_vvallocn.3 index e21d37b..c378660 100644 --- a/man3/libsimple_vvallocn.3 +++ b/man3/libsimple_vvallocn.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VVALLOCN 3 2018-11-03 libsimple +.TH LIBSIMPLE_VVALLOCN 3 libsimple .SH NAME libsimple_vvallocn \- allocate memory with page size alignment + .SH SYNOPSIS .nf #include <libsimple.h> @@ -34,6 +35,7 @@ static inline void *libsimple_evallocn(size_t \fIn\fP, ..., /* (size_t)0 */); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_vallocn (), @@ -90,6 +92,7 @@ and respectively, that use .B va_list instead of variadic arguments. + .SH RETURN VALUE The .BR libsimple_vvallocn (), @@ -115,6 +118,7 @@ it indicate the error, and the and .BR libsimple_evallocn () functions terminated the process. + .SH ERRORS The .BR libsimple_vvallocn (), @@ -135,6 +139,7 @@ The and .BR libsimple_evallocn () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -183,20 +188,27 @@ T{ .BR libsimple_evallocn () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES The GNU implementation of .BR valloc (3) is \(dqMT-Unsafe init\(dq. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -205,7 +217,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_vvalloczn.3 b/man3/libsimple_vvalloczn.3 index 1b7a8e0..9a2f9e4 100644 --- a/man3/libsimple_vvalloczn.3 +++ b/man3/libsimple_vvalloczn.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VVALLOCZN 3 2018-11-03 libsimple +.TH LIBSIMPLE_VVALLOCZN 3 libsimple .SH NAME libsimple_vvalloczn \- allocate optionally initialised memory with page size alignment + .SH SYNOPSIS .nf #include <libsimple.h> @@ -34,6 +35,7 @@ static inline void *libsimple_evalloczn(int \fIclear\fP, size_t \fIn\fP, ..., /* .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_valloczn (), @@ -93,6 +95,7 @@ and respectively, that use .B va_list instead of variadic arguments. + .SH RETURN VALUE The .BR libsimple_vvalloczn (), @@ -118,6 +121,7 @@ it indicate the error, and the and .BR libsimple_evalloczn () functions terminated the process. + .SH ERRORS The .BR libsimple_vvalloczn (), @@ -138,6 +142,7 @@ The and .BR libsimple_evalloczn () functions will terminate the process on failure. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -186,20 +191,27 @@ T{ .BR libsimple_evalloczn () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES The GNU implementation of .BR valloc (3) is \(dqMT-Unsafe init\(dq. + .SH BUGS None. + .SH SEE ALSO .BR libsimple_enmalloc (3), .BR libsimple_mallocz (3), @@ -208,7 +220,17 @@ None. .BR libsimple_encalloc (3), .BR libsimple_vcallocn (3), .BR libsimple_enrealloc (3), +.BR libsimple_reallocarray (3), .BR libsimple_vreallocn (3), +.BR libsimple_reallocf (3), +.BR libsimple_reallocarrayf (3), +.BR libsimple_vreallocfn (3), +.BR libsimple_aligned_realloc (3), +.BR libsimple_aligned_reallocarray (3), +.BR libsimple_aligned_vreallocn (3), +.BR libsimple_aligned_reallocf (3), +.BR libsimple_aligned_reallocarrayf (3), +.BR libsimple_aligned_vreallocfn (3), .BR libsimple_memalign (3), .BR libsimple_memalignz (3), .BR libsimple_vmemalignn (3), diff --git a/man3/libsimple_vweprintf.3 b/man3/libsimple_vweprintf.3 index 06d339d..8db6f0a 100644 --- a/man3/libsimple_vweprintf.3 +++ b/man3/libsimple_vweprintf.3 @@ -1,6 +1,7 @@ -.TH LIBSIMPLE_VWEPRINTF 3 2018-11-06 libsimple +.TH LIBSIMPLE_VWEPRINTF 3 libsimple .SH NAME libsimple_vweprintf \- print an error message + .SH SYNOPSIS .nf #include <libsimple.h> @@ -38,6 +39,7 @@ static inline void libsimple_eprintf(const char *\fIfmt\fP, ...); .PP Link with .IR \-lsimple . + .SH DESCRIPTION The .BR libsimple_vweprintf () @@ -151,10 +153,13 @@ function called when or .I libsimple_eprint_postprint is called. + .SH RETURN VALUE None. + .SH ERRORS None. + .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -203,18 +208,25 @@ T{ .BR libsimple_eprintf () T} Async-cancel safety AC-Safe .TE + .SH EXAMPLES None. + .SH APPLICATION USAGE None. + .SH RATIONALE None. + .SH FUTURE DIRECTIONS None. + .SH NOTES None. + .SH BUGS None. + .SH SEE ALSO .BR perror (3), .BR fprintf (3), diff --git a/man3/libsimple_wcsdupa.3 b/man3/libsimple_wcsdupa.3 new file mode 120000 index 0000000..85a85a6 --- /dev/null +++ b/man3/libsimple_wcsdupa.3 @@ -0,0 +1 @@ +libsimple_enwcsdup.3
\ No newline at end of file diff --git a/man3/libsimple_wcsndup.3 b/man3/libsimple_wcsndup.3 new file mode 100644 index 0000000..6821d25 --- /dev/null +++ b/man3/libsimple_wcsndup.3 @@ -0,0 +1,167 @@ +.TH LIBSIMPLE_WCSNDUP 3 libsimple +.SH NAME +libsimple_wcsndup \- duplicate a wide-character string + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +wchar_t *libsimple_wcsndupa(const wchar_t *\fIs\fP, size_t \fIn\fP); +wchar_t *libsimple_wcsndup(const wchar_t *\fIs\fP, size_t \fIn\fP); +wchar_t *libsimple_enwcsndup(int \fIstatus\fP, const wchar_t *\fIs\fP, size_t \fIn\fP); +static inline wchar_t *libsimple_ewcsndup(const wchar_t *\fIs\fP, size_t \fIn\fP); + +#ifndef wcsndupa +# define wcsndupa libsimple_wcsndupa +#endif +#ifndef wcsndup +# define wcsndup libsimple_wcsndup +#endif +#ifndef enwcsndup +# define enwcsndup libsimple_enwcsndup +#endif +#ifndef ewcsndup +# define ewcsndup libsimple_ewcsndup +#endif +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_wcsndup () +function allocates memory and copies the string +.I s +into the new allocation, however only up to the +.I n +first wide-characters; a NUL wide-character will +always be written to the end of the new +wide-character string. +.PP +The +.BR libsimple_enwcsndup () +and +.BR libsimple_ewcsndup () +functions are versions of the +.BR libsimple_wcsndup () +function that call the +.BR libsimple_enprintf (3) +function on failure, causing the process to print +an error message and exit. See +.BR libsimple_enprintf (3) +for more information. +.PP +The +.BR libsimple_wcsndupa () +function is implemented as a macro and is a version +of the +.BR libsimple_wcsndup () +function that uses allocates the memory on the stack +rather than on the heap, causing the return pointer +to become invalid when the calling function returns. +It is only available when compling with GCC or Clang. + +.SH RETURN VALUE +Upon successful completion, the +.BR libsimple_wcsndupa (), +.BR libsimple_wcsndup (), +.BR libsimple_enwcsndup (), +and +.BR libsimple_ewcsndup () +functions return a non-null pointer, on failure the +.BR libsimple_wcsndup () +function returns +.B NULL +and set +.I errno +to indicate the error, and the +.BR libsimple_enwcsndup (), +and +.BR libsimple_ewcsndup () +functions exit the process. The +.BR libsimple_wcsndupa () +function cannot fail, however the kernel +can kill the thread, and possibly the process, with a +.B SIGSEGV +signal if the memory cannot be allocated. +.PP +The returned pointer should be deallocated when it +is no longer needed, except for the pointer returned +by the +.BR libsimple_wcsndupa () +function, it is automatically deallocated when the +calling function returns. + +.SH ERRORS +The +.BR libsimple_wcsndup () +function may fail for any reason specified for the +.BR malloc (3) +function. + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_wcsndupa (), +.br +.BR libsimple_wcsndup (), +.br +.BR libsimple_enwcsndup (), +.br +.BR libsimple_ewcsndup (), +T} Thread safety MT-Safe +T{ +.BR libsimple_wcsndupa (), +.br +.BR libsimple_wcsndup (), +.br +.BR libsimple_enwcsndup (), +.br +.BR libsimple_ewcsndup (), +T} Async-signal safety AS-Safe +T{ +.BR libsimple_wcsndupa (), +.br +.BR libsimple_wcsndup (), +.br +.BR libsimple_enwcsndup (), +.br +.BR libsimple_ewcsndup (), +T} Async-cancel safety AC-Safe +.TE + +.SH EXAMPLES +None. + +.SH APPLICATION USAGE +None. + +.SH RATIONALE +None. + +.SH FUTURE DIRECTIONS +None. + +.SH NOTES +None. + +.SH BUGS +None. + +.SH SEE ALSO +.BR libsimple_aligned_wcsndup (3), +.BR libsimple_enstrndup (3), +.BR libsimple_enstrdup (3), +.BR libsimple_memdup (3), +.BR libsimple_enwcsdup (3), +.BR libsimple_wmemdup (3), +.BR strndup (3), +.BR strdup (3), +.BR wcsdup (3) diff --git a/man3/libsimple_wcsndupa.3 b/man3/libsimple_wcsndupa.3 new file mode 120000 index 0000000..57c8250 --- /dev/null +++ b/man3/libsimple_wcsndupa.3 @@ -0,0 +1 @@ +libsimple_wcsndup.3
\ No newline at end of file diff --git a/man3/libsimple_wmemdup.3 b/man3/libsimple_wmemdup.3 new file mode 100644 index 0000000..1f9e9cd --- /dev/null +++ b/man3/libsimple_wmemdup.3 @@ -0,0 +1,167 @@ +.TH LIBSIMPLE_WMEMDUP 3 libsimple +.SH NAME +libsimple_wmemdup \- duplicate a wide-character array + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +wchar_t *libsimple_wmemdupa(const wchar_t *\fIs\fP, size_t \fIn\fP); +wchar_t *libsimple_wmemdup(const wchar_t *\fIs\fP, size_t \fIn\fP); +wchar_t *libsimple_enwmemdup(int \fIstatus\fP, const wchar_t *\fIs\fP, size_t \fIn\fP); +static inline wchar_t *libsimple_ewmemdup(const wchar_t *\fIs\fP, size_t \fIn\fP); + +#ifndef wmemdupa +# define wmemdupa libsimple_wmemdupa +#endif +#ifndef wmemdup +# define wmemdup libsimple_wmemdup +#endif +#ifndef enwmemdup +# define enwmemdup libsimple_enwmemdup +#endif +#ifndef ewmemdup +# define ewmemdup libsimple_ewmemdup +#endif +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_wmemdup () +function allocates memory and copies +.I n +first wide-characters +.RB ( wchar_t ) +from +.I s +into the new allocation. +.PP +The +.BR libsimple_enwmemdup () +and +.BR libsimple_ewmemdup () +functions are versions of the +.BR libsimple_wmemdup () +function that call the +.BR libsimple_enprintf (3) +function on failure, causing the process to print +an error message and exit. See +.BR libsimple_enprintf (3) +for more information. +.PP +The +.BR libsimple_wmemdupa () +function is implemented as a macro and is a version +of the +.BR libsimple_wmemdup () +function that uses allocates the memory on the stack +rather than on the heap, causing the return pointer +to become invalid when the calling function returns. +It is only available when compling with GCC or Clang. + +.SH RETURN VALUE +Upon successful completion, the +.BR libsimple_wmemdupa (), +.BR libsimple_wmemdup (), +.BR libsimple_enwmemdup (), +and +.BR libsimple_ewmemdup () +functions return a non-null pointer, on failure the +.BR libsimple_wmemdup () +function returns +.B NULL +and set +.I errno +to indicate the error, and the +.BR libsimple_enwmemdup (), +and +.BR libsimple_ewmemdup () +functions exit the process. The +.BR libsimple_wmemdupa () +function cannot fail, however the kernel +can kill the thread, and possibly the process, with a +.B SIGSEGV +signal if the memory cannot be allocated. +.PP +The returned pointer should be deallocated when it +is no longer needed, except for the pointer returned +by the +.BR libsimple_wmemdupa () +function, it is automatically deallocated when the +calling function returns. + +.SH ERRORS +The +.BR libsimple_wmemdup () +function may fail for any reason specified for the +.BR malloc (3) +function. + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_wmemdupa (), +.br +.BR libsimple_wmemdup (), +.br +.BR libsimple_enwmemdup (), +.br +.BR libsimple_ewmemdup (), +T} Thread safety MT-Safe +T{ +.BR libsimple_wmemdupa (), +.br +.BR libsimple_wmemdup (), +.br +.BR libsimple_enwmemdup (), +.br +.BR libsimple_ewmemdup (), +T} Async-signal safety AS-Safe +T{ +.BR libsimple_wmemdupa (), +.br +.BR libsimple_wmemdup (), +.br +.BR libsimple_enwmemdup (), +.br +.BR libsimple_ewmemdup (), +T} Async-cancel safety AC-Safe +.TE + +.SH EXAMPLES +None. + +.SH APPLICATION USAGE +None. + +.SH RATIONALE +None. + +.SH FUTURE DIRECTIONS +None. + +.SH NOTES +None. + +.SH BUGS +None. + +.SH SEE ALSO +.BR libsimple_aligned_wmemdup (3), +.BR libsimple_enstrndup (3), +.BR libsimple_enstrdup (3), +.BR libsimple_memdup (3), +.BR libsimple_enwcsdup (3), +.BR libsimple_wcsndup (3), +.BR strndup (3), +.BR strdup (3), +.BR wcsdup (3) diff --git a/man3/libsimple_wmemdupa.3 b/man3/libsimple_wmemdupa.3 new file mode 120000 index 0000000..93381ef --- /dev/null +++ b/man3/libsimple_wmemdupa.3 @@ -0,0 +1 @@ +libsimple_wmemdup.3
\ No newline at end of file diff --git a/man3/reallocarray.3libsimple b/man3/reallocarray.3libsimple new file mode 120000 index 0000000..9cb5fe4 --- /dev/null +++ b/man3/reallocarray.3libsimple @@ -0,0 +1 @@ +libsimple_reallocarray.3
\ No newline at end of file diff --git a/man3/reallocarrayf.3libsimple b/man3/reallocarrayf.3libsimple new file mode 120000 index 0000000..c0ad147 --- /dev/null +++ b/man3/reallocarrayf.3libsimple @@ -0,0 +1 @@ +libsimple_reallocarrayf.3
\ No newline at end of file diff --git a/man3/reallocf.3libsimple b/man3/reallocf.3libsimple new file mode 120000 index 0000000..e60bee6 --- /dev/null +++ b/man3/reallocf.3libsimple @@ -0,0 +1 @@ +libsimple_reallocf.3
\ No newline at end of file diff --git a/man3/reallocfn.3libsimple b/man3/reallocfn.3libsimple new file mode 120000 index 0000000..7db99ff --- /dev/null +++ b/man3/reallocfn.3libsimple @@ -0,0 +1 @@ +libsimple_reallocfn.3
\ No newline at end of file diff --git a/man3/valigned_reallocfn.3libsimple b/man3/valigned_reallocfn.3libsimple new file mode 120000 index 0000000..1ba44a5 --- /dev/null +++ b/man3/valigned_reallocfn.3libsimple @@ -0,0 +1 @@ +libsimple_valigned_reallocfn.3
\ No newline at end of file diff --git a/man3/valigned_reallocn.3libsimple b/man3/valigned_reallocn.3libsimple new file mode 120000 index 0000000..7c3a84f --- /dev/null +++ b/man3/valigned_reallocn.3libsimple @@ -0,0 +1 @@ +libsimple_valigned_reallocn.3
\ No newline at end of file diff --git a/man3/vreallocfn.3libsimple b/man3/vreallocfn.3libsimple new file mode 120000 index 0000000..d06b871 --- /dev/null +++ b/man3/vreallocfn.3libsimple @@ -0,0 +1 @@ +libsimple_vreallocfn.3
\ No newline at end of file diff --git a/man3/wcsdupa.3libsimple b/man3/wcsdupa.3libsimple new file mode 120000 index 0000000..4555af1 --- /dev/null +++ b/man3/wcsdupa.3libsimple @@ -0,0 +1 @@ +libsimple_wcsdupa.3
\ No newline at end of file diff --git a/man3/wcsndup.3libsimple b/man3/wcsndup.3libsimple new file mode 120000 index 0000000..57c8250 --- /dev/null +++ b/man3/wcsndup.3libsimple @@ -0,0 +1 @@ +libsimple_wcsndup.3
\ No newline at end of file diff --git a/man3/wcsndupa.3libsimple b/man3/wcsndupa.3libsimple new file mode 120000 index 0000000..ac844a1 --- /dev/null +++ b/man3/wcsndupa.3libsimple @@ -0,0 +1 @@ +libsimple_wcsndupa.3
\ No newline at end of file diff --git a/man3/wmemdup.3libsimple b/man3/wmemdup.3libsimple new file mode 120000 index 0000000..93381ef --- /dev/null +++ b/man3/wmemdup.3libsimple @@ -0,0 +1 @@ +libsimple_wmemdup.3
\ No newline at end of file diff --git a/man3/wmemdupa.3libsimple b/man3/wmemdupa.3libsimple new file mode 120000 index 0000000..919c84e --- /dev/null +++ b/man3/wmemdupa.3libsimple @@ -0,0 +1 @@ +libsimple_wmemdupa.3
\ No newline at end of file |