diff options
author | Mattias Andrée <maandree@kth.se> | 2024-08-18 10:07:51 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2024-08-18 10:07:51 +0200 |
commit | 2de8dae44c40d97e3947070353c1db709a35f92c (patch) | |
tree | 13a9827273a54b2a9235135c84eae735ced05009 /man3 | |
parent | Add @since for definitions added in version 1.5 (diff) | |
parent | Add missing .c files (diff) | |
download | libsimple-2de8dae44c40d97e3947070353c1db709a35f92c.tar.gz libsimple-2de8dae44c40d97e3947070353c1db709a35f92c.tar.bz2 libsimple-2de8dae44c40d97e3947070353c1db709a35f92c.tar.xz |
Merge tag '1.6' into since
Version 1.6
Diffstat (limited to 'man3')
26 files changed, 179 insertions, 37 deletions
diff --git a/man3/MAX.3libsimple b/man3/MAX.3libsimple index ac374d0..a8ff50e 100644 --- a/man3/MAX.3libsimple +++ b/man3/MAX.3libsimple @@ -39,11 +39,7 @@ The macro returns to the greater value. .SH ERRORS -The -.BR libsimple_close () -function fail for the reasons specified for the -.BR close (3) -function. +None. .SH EXAMPLES None. diff --git a/man3/MAX3.3libsimple b/man3/MAX3.3libsimple index d0171f8..a578033 100644 --- a/man3/MAX3.3libsimple +++ b/man3/MAX3.3libsimple @@ -42,11 +42,7 @@ The 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. +None. .SH EXAMPLES None. diff --git a/man3/MIN.3libsimple b/man3/MIN.3libsimple index 552b334..e54a867 100644 --- a/man3/MIN.3libsimple +++ b/man3/MIN.3libsimple @@ -39,11 +39,7 @@ The macro returns to the lesser value. .SH ERRORS -The -.BR libsimple_close () -function fail for the reasons specified for the -.BR close (3) -function. +None. .SH EXAMPLES None. diff --git a/man3/MIN3.3libsimple b/man3/MIN3.3libsimple index 19eeae9..0c257c5 100644 --- a/man3/MIN3.3libsimple +++ b/man3/MIN3.3libsimple @@ -42,11 +42,7 @@ The 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. +None. .SH EXAMPLES None. diff --git a/man3/_enprintf.3libsimple b/man3/_enprintf.3libsimple new file mode 120000 index 0000000..d06df60 --- /dev/null +++ b/man3/_enprintf.3libsimple @@ -0,0 +1 @@ +enprintf.3libsimple
\ No newline at end of file diff --git a/man3/_eprintf.3libsimple b/man3/_eprintf.3libsimple new file mode 120000 index 0000000..7990141 --- /dev/null +++ b/man3/_eprintf.3libsimple @@ -0,0 +1 @@ +eprintf.3libsimple
\ No newline at end of file diff --git a/man3/_venprintf.3libsimple b/man3/_venprintf.3libsimple new file mode 120000 index 0000000..e007970 --- /dev/null +++ b/man3/_venprintf.3libsimple @@ -0,0 +1 @@ +venprintf.3libsimple
\ No newline at end of file diff --git a/man3/_veprintf.3libsimple b/man3/_veprintf.3libsimple new file mode 120000 index 0000000..5f64b97 --- /dev/null +++ b/man3/_veprintf.3libsimple @@ -0,0 +1 @@ +veprintf.3libsimple
\ No newline at end of file diff --git a/man3/libsimple__enprintf.3 b/man3/libsimple__enprintf.3 new file mode 120000 index 0000000..3d2d430 --- /dev/null +++ b/man3/libsimple__enprintf.3 @@ -0,0 +1 @@ +libsimple_enprintf.3
\ No newline at end of file diff --git a/man3/libsimple__eprintf.3 b/man3/libsimple__eprintf.3 new file mode 120000 index 0000000..07276cb --- /dev/null +++ b/man3/libsimple__eprintf.3 @@ -0,0 +1 @@ +libsimple_eprintf.3
\ No newline at end of file diff --git a/man3/libsimple__venprintf.3 b/man3/libsimple__venprintf.3 new file mode 120000 index 0000000..574bdd9 --- /dev/null +++ b/man3/libsimple__venprintf.3 @@ -0,0 +1 @@ +libsimple_venprintf.3
\ No newline at end of file diff --git a/man3/libsimple__veprintf.3 b/man3/libsimple__veprintf.3 new file mode 120000 index 0000000..3a87c2d --- /dev/null +++ b/man3/libsimple__veprintf.3 @@ -0,0 +1 @@ +libsimple_veprintf.3
\ No newline at end of file diff --git a/man3/libsimple_aligned_realloc.3 b/man3/libsimple_aligned_realloc.3 index 0e176b9..244ad8f 100644 --- a/man3/libsimple_aligned_realloc.3 +++ b/man3/libsimple_aligned_realloc.3 @@ -44,7 +44,7 @@ same content as but truncated to .I n bytes if it is smaller or with the new bytes -unitialised if it is larger. If a new pointer +uninitialised if it is larger. If a new pointer is returned, rather than .IR ptr , .I ptr diff --git a/man3/libsimple_aligned_reallocarray.3 b/man3/libsimple_aligned_reallocarray.3 index c4cc765..b2f1361 100644 --- a/man3/libsimple_aligned_reallocarray.3 +++ b/man3/libsimple_aligned_reallocarray.3 @@ -46,7 +46,7 @@ same content as 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 +uninitialised if it is larger. If a new pointer is returned, rather than .IR ptr , .I ptr diff --git a/man3/libsimple_aligned_reallocarrayf.3 b/man3/libsimple_aligned_reallocarrayf.3 index 46a4057..22a08a3 100644 --- a/man3/libsimple_aligned_reallocarrayf.3 +++ b/man3/libsimple_aligned_reallocarrayf.3 @@ -31,7 +31,7 @@ same content as 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 +uninitialised if it is larger. If a new pointer is returned, rather than .IR ptr , .I ptr diff --git a/man3/libsimple_aligned_reallocf.3 b/man3/libsimple_aligned_reallocf.3 index 4ad9fcc..edd52c8 100644 --- a/man3/libsimple_aligned_reallocf.3 +++ b/man3/libsimple_aligned_reallocf.3 @@ -31,7 +31,7 @@ same content as but truncated to .I n bytes if it is smaller or with the new bytes -unitialised if it is larger. If a new pointer +uninitialised if it is larger. If a new pointer is returned, rather than .IR ptr , .I ptr diff --git a/man3/libsimple_close.3 b/man3/libsimple_close.3 index 7050899..017318c 100644 --- a/man3/libsimple_close.3 +++ b/man3/libsimple_close.3 @@ -57,4 +57,5 @@ None. None. .SH SEE ALSO -.BR close (3) +.BR close (3), +.BR libsimple_close_range (3) diff --git a/man3/libsimple_close_range.3 b/man3/libsimple_close_range.3 new file mode 100644 index 0000000..891ac3f --- /dev/null +++ b/man3/libsimple_close_range.3 @@ -0,0 +1,74 @@ +.TH LIBSIMPLE_CLOSE 3 libsimple +.SH NAME +libsimple_close_range \- close a range of file descriptors + +.SH SYNOPSIS +.nf +#include <libsimple.h> + +#define LIBSIMPLE_CLOSE_RANGE_MAX (~0U) + +int libsimple_close_range(unsigned int first, unsigned int last, unsigned int *next); +.fi +.PP +Link with +.IR \-lsimple . + +.SH DESCRIPTION +The +.BR libsimple_close_range () +function closes all file descriptors in the +range inclusive range +.RI [ *first ", " last ]. +.PP +Unless +.I next +is, +.IR NULL , +the first potentially unclosed file descriptor +will be written to +.I *next . + +.SH RETURN VALUE +The +.BR libsimple_close_range () +function returns 0 upon successful completion; +otherwise \-1 is returned (potentially partially +successful). + +.SH ERRORS +The +.BR libsimple_close_range () +function fail for the reasons specified for the +.BR close (3) +function except +.BR EBADF , +or if +.TP +.B EINVAL +.I first +is greater than +.IR last . + +.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_range (2), +.BR close (3), +.BR libsimple_close (3) diff --git a/man3/libsimple_reallocarray.3 b/man3/libsimple_reallocarray.3 index 5626e63..44d1dfa 100644 --- a/man3/libsimple_reallocarray.3 +++ b/man3/libsimple_reallocarray.3 @@ -48,7 +48,7 @@ same content as 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 +uninitialised if it is larger. If a new pointer is returned, rather than .IR ptr , .I ptr diff --git a/man3/libsimple_reallocarrayf.3 b/man3/libsimple_reallocarrayf.3 index f0d3104..e10793b 100644 --- a/man3/libsimple_reallocarrayf.3 +++ b/man3/libsimple_reallocarrayf.3 @@ -33,7 +33,7 @@ same content as 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 +uninitialised if it is larger. If a new pointer is returned, rather than .IR ptr , .I ptr diff --git a/man3/libsimple_reallocf.3 b/man3/libsimple_reallocf.3 index d3b7523..55e6aad 100644 --- a/man3/libsimple_reallocf.3 +++ b/man3/libsimple_reallocf.3 @@ -33,7 +33,7 @@ same content as but truncated to .I n bytes if it is smaller or with the new bytes -unitialised if it is larger. If a new pointer +uninitialised if it is larger. If a new pointer is returned, rather than .IR ptr , .I ptr diff --git a/man3/libsimple_valigned_reallocfn.3 b/man3/libsimple_valigned_reallocfn.3 index 2afa6c2..b9ac02c 100644 --- a/man3/libsimple_valigned_reallocfn.3 +++ b/man3/libsimple_valigned_reallocfn.3 @@ -43,7 +43,7 @@ same content as but truncated to .I N bytes if it is smaller or with the new bytes -unitialised if it is larger. If a new pointer +uninitialised if it is larger. If a new pointer is returned, rather than .IR ptr , .I ptr diff --git a/man3/libsimple_valigned_reallocn.3 b/man3/libsimple_valigned_reallocn.3 index 607684b..847af93 100644 --- a/man3/libsimple_valigned_reallocn.3 +++ b/man3/libsimple_valigned_reallocn.3 @@ -64,7 +64,7 @@ same content as but truncated to .I N bytes if it is smaller or with the new bytes -unitialised if it is larger. If a new pointer +uninitialised if it is larger. If a new pointer is returned, rather than .IR ptr , .I ptr diff --git a/man3/libsimple_vreallocfn.3 b/man3/libsimple_vreallocfn.3 index e0e75e0..ad588c2 100644 --- a/man3/libsimple_vreallocfn.3 +++ b/man3/libsimple_vreallocfn.3 @@ -45,7 +45,7 @@ same content as but truncated to .I N bytes if it is smaller or with the new bytes -unitialised if it is larger. If a new pointer +uninitialised if it is larger. If a new pointer is returned, rather than .IR ptr , .I ptr diff --git a/man3/libsimple_vreallocn.3 b/man3/libsimple_vreallocn.3 index f1a8fad..cedcef9 100644 --- a/man3/libsimple_vreallocn.3 +++ b/man3/libsimple_vreallocn.3 @@ -64,7 +64,7 @@ same content as but truncated to .I N bytes if it is smaller or with the new bytes -unitialised if it is larger. If a new pointer +uninitialised if it is larger. If a new pointer is returned, rather than .IR ptr , .I ptr diff --git a/man3/libsimple_vweprintf.3 b/man3/libsimple_vweprintf.3 index b40799d..bd11957 100644 --- a/man3/libsimple_vweprintf.3 +++ b/man3/libsimple_vweprintf.3 @@ -16,6 +16,10 @@ inline void libsimple_venprintf(int \fIstatus\fP, const char *\fIfmt\fP, va_list inline void libsimple_enprintf(int \fIstatus\fP, const char *\fIfmt\fP, ...); inline void libsimple_veprintf(const char *\fIfmt\fP, va_list \fIap\fP); inline void libsimple_eprintf(const char *\fIfmt\fP, ...); +inline void libsimple__venprintf(int \fIstatus\fP, const char *\fIfmt\fP, va_list \fIap\fP); +inline void libsimple__enprintf(int \fIstatus\fP, const char *\fIfmt\fP, ...); +inline void libsimple__veprintf(const char *\fIfmt\fP, va_list \fIap\fP); +inline void libsimple__eprintf(const char *\fIfmt\fP, ...); #ifndef vweprintf # define vweprintf libsimple_vweprintf @@ -35,6 +39,18 @@ inline void libsimple_eprintf(const char *\fIfmt\fP, ...); #ifndef eprintf # define eprintf libsimple_eprintf #endif +#ifndef _venprintf +# define _venprintf libsimple__venprintf +#endif +#ifndef _enprintf +# define _enprintf libsimple__enprintf +#endif +#ifndef _veprintf +# define _veprintf libsimple__veprintf +#endif +#ifndef _eprintf +# define _eprintf libsimple__eprintf +#endif .fi .PP Link with @@ -102,6 +118,19 @@ the exit value of the process will be .IR status . .PP The +.BR libsimple__venprintf () +and +.BR libsimple__enprintf () +functions are versions of the +.BR libsimple_vweprintf () +and +.BR libsimple_weprintf () +functions that terminate the process by calling +.BR _exit (3), +the exit value of the process will be +.IR status . +.PP +The .BR libsimple_veprintf () and .BR libsimple_eprintf () @@ -116,13 +145,31 @@ the exit value of the process will be which is 1 by default. .PP The +.BR libsimple__veprintf () +and +.BR libsimple__eprintf () +functions are versions of the +.BR libsimple_vweprintf () +and +.BR libsimple_weprintf () +functions that terminate the process by calling +.BR _exit (3), +the exit value of the process will be +.IR libsimple_default_failure_exit (3), +which is 1 by default. +.PP +The .BR libsimple_vweprintf (), .BR libsimple_weprintf (), .BR libsimple_venprintf (), .BR libsimple_enprintf (), .BR libsimple_veprintf (), +.BR libsimple_eprintf (), +.BR libsimple__venprintf (), +.BR libsimple__enprintf (), +.BR libsimple__veprintf (), and -.BR libsimple_eprintf () +.BR libsimple__eprintf () functions call .I libsimple_eprintf_preprint unless it is @@ -146,8 +193,12 @@ may have a different value from when the .BR libsimple_venprintf (), .BR libsimple_enprintf (), .BR libsimple_veprintf (), +.BR libsimple_eprintf (), +.BR libsimple__venprintf (), +.BR libsimple__enprintf (), +.BR libsimple__veprintf (), or -.BR libsimple_eprintf () +.BR libsimple__eprintf () function called when .I libsimple_eprintf_preprint or @@ -179,7 +230,15 @@ T{ .br .BR libsimple_veprintf (), .br -.BR libsimple_eprintf () +.BR libsimple_eprintf (), +.br +.BR libsimple__venprintf (), +.br +.BR libsimple__enprintf (), +.br +.BR libsimple__veprintf (), +.br +.BR libsimple__eprintf () T} Thread safety MT-Unsafe race:strerror T{ .BR libsimple_vweprintf (), @@ -192,7 +251,15 @@ T{ .br .BR libsimple_veprintf (), .br -.BR libsimple_eprintf () +.BR libsimple_eprintf (), +.br +.BR libsimple__venprintf (), +.br +.BR libsimple__enprintf (), +.br +.BR libsimple__veprintf (), +.br +.BR libsimple__eprintf () T} Async-signal safety AS-Safe T{ .BR libsimple_vweprintf (), @@ -205,7 +272,15 @@ T{ .br .BR libsimple_veprintf (), .br -.BR libsimple_eprintf () +.BR libsimple_eprintf (), +.br +.BR libsimple__venprintf (), +.br +.BR libsimple__enprintf (), +.br +.BR libsimple__veprintf (), +.br +.BR libsimple__eprintf () T} Async-cancel safety AC-Safe .TE |