summaryrefslogtreecommitdiffstats
path: root/man3/error.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/error.3')
-rw-r--r--man3/error.323
1 files changed, 11 insertions, 12 deletions
diff --git a/man3/error.3 b/man3/error.3
index 1b12a60..fce50fa 100644
--- a/man3/error.3
+++ b/man3/error.3
@@ -25,7 +25,7 @@
.\"
.\" References:
.\" glibc manual and source
-.TH error 3 2023-07-20 "Linux man-pages 6.05.01"
+.TH error 3 2023-10-31 "Linux man-pages 6.7"
.SH NAME
error, error_at_line, error_message_count, error_one_per_line,
error_print_progname \- glibc error reporting functions
@@ -35,14 +35,14 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <error.h>
-.PP
+.P
.BI "void error(int " status ", int " errnum ", const char *" format ", ...);"
.BI "void error_at_line(int " status ", int " errnum ", const char *" filename ,
.BI " unsigned int " linenum ", const char *" format ", ...);"
-.PP
+.P
.BI "extern unsigned int " error_message_count ;
.BI "extern int " error_one_per_line ;
-.PP
+.P
.BI "extern void (*" error_print_progname ")(void);"
.fi
.SH DESCRIPTION
@@ -63,7 +63,7 @@ should follow
.I format
in the argument list.
The output is terminated by a newline character.
-.PP
+.P
The program name printed by
.BR error ()
is the value of the global variable
@@ -74,14 +74,14 @@ initially has the same value as
.IR argv[0] .
The value of this variable can be modified to change the output of
.BR error ().
-.PP
+.P
If \fIstatus\fP has a nonzero value, then
.BR error ()
calls
.BR exit (3)
to terminate the program using the given value as the exit status;
otherwise it returns after printing the error message.
-.PP
+.P
The
.BR error_at_line ()
function is exactly the same as
@@ -101,20 +101,20 @@ The preprocessor values \fB__LINE__\fP and
.BR error_at_line (),
but other values can also be used.
For example, these arguments could refer to a location in an input file.
-.PP
+.P
If the global variable \fIerror_one_per_line\fP is set nonzero,
a sequence of
.BR error_at_line ()
calls with the
same value of \fIfilename\fP and \fIlinenum\fP will result in only
one message (the first) being output.
-.PP
+.P
The global variable \fIerror_message_count\fP counts the number of
messages that have been output by
.BR error ()
and
.BR error_at_line ().
-.PP
+.P
If the global variable \fIerror_print_progname\fP
is assigned the address of a function
(i.e., is not NULL), then that function is called
@@ -144,8 +144,7 @@ T} Thread safety T{
MT-Unsafe\ race: error_at_line/\:error_one_per_line locale
T}
.TE
-.sp 1
-.PP
+.P
The internal
.I error_one_per_line
variable is accessed (without any form of synchronization, but since it's an