.TH ERROR 3 2022-03-06 "libutil" "libutil Programmer's Manual" .SH NAME error, warn, alert \(em error reporting functions .SH SYNOPSYS #include "error.h" .PP extern char *\fIA0\fR; .br extern bool \fIwarned\fR; .PP void \fBerror\fR(int \fIstatus\fR, const char *\fIformat\fR, ...); .br void \fBwarn\fR(const char *\fIformat\fR, ...); .br void \fBalert\fR(const char *\fIformat\fR, ...); .SH DESCRIPTION The \fBerror\fR(), \fBwarn\fR(), and \fBalert\fR functions print a formatted error message to stderr. If the global variable \fIA0\fR is set, it is output, followed by a colon character and a space, in front of the formatted error message. .PP The \fBerror\fR() function will call the \fBexit\fR() function declared in with \fIstatus\fR as its argument after the error message has been printed. .PP The \fBwarn\fR() function will set the global variable \fIwarned\fR to true. .SH COPYRIGHT .nf Copyright (C) 2020, Jakob Wakeling MIT Licence (https://opensource.org/licenses/MIT) .fi