From 0335a7cf215f1c5cba9ae8a49b3dbd1b980a20b1 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 6 Nov 2018 20:32:42 +0100 Subject: Add libsimple_eprintf_preprint and libsimple_eprintf_postprint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- man/libsimple_vweprintf.3 | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) (limited to 'man/libsimple_vweprintf.3') diff --git a/man/libsimple_vweprintf.3 b/man/libsimple_vweprintf.3 index ca241b1..06d339d 100644 --- a/man/libsimple_vweprintf.3 +++ b/man/libsimple_vweprintf.3 @@ -6,6 +6,8 @@ libsimple_vweprintf \- print an error message #include extern int libsimple_default_failure_exit; +extern void (*libsimple_eprint_preprint)(void); +extern void (*libsimple_eprint_postprint)(void); void libsimple_vweprintf(const char *\fIfmt\fP, va_list \fIap\fP); static inline void libsimple_weprintf(const char *\fIfmt\fP, ...); @@ -74,7 +76,7 @@ does not start with the output is preffixed with .nf - \fB\(dq%s: \(dq, \fPIargv0\fP + \fB\(dq%s: \(dq, \fP\fIargv0\fP .fi .PP The @@ -110,6 +112,45 @@ functions that terminate the process by calling 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 (), +and +.BR libsimple_eprintf () +functions call +.I libsimple_eprint_preprint +unless it is +.B NULL +before they print the message, after printing +the message they call +.I libsimple_eprint_postprint +unless it is +.BR NULL . +The +.I libsimple_eprint_preprint +and +.I libsimple_eprint_postprint +variables are +.B NULL +byte default. +.I errno +may have a different value from when the +.BR libsimple_vweprintf (), +.BR libsimple_weprintf (), +.BR libsimple_venprintf (), +.BR libsimple_enprintf (), +.BR libsimple_veprintf (), +or +.BR libsimple_eprintf () +function called when +.I libsimple_eprint_preprint +or +.I libsimple_eprint_postprint +is called. .SH RETURN VALUE None. .SH ERRORS -- cgit v1.2.3-70-g09d2