]>
Commit | Line | Data |
---|---|---|
19361cb7 | 1 | /* Declaration for error-reporting function |
b80bfc8b | 2 | Copyright (C) 1995,1996,1997,2003,2006,2007 Free Software Foundation, Inc. |
8c620ae0 | 3 | This file is part of the GNU C Library. |
196980f5 | 4 | |
54d79e99 | 5 | The GNU C Library is free software; you can redistribute it and/or |
41bdb6e2 AJ |
6 | modify it under the terms of the GNU Lesser General Public |
7 | License as published by the Free Software Foundation; either | |
8 | version 2.1 of the License, or (at your option) any later version. | |
196980f5 | 9 | |
54d79e99 UD |
10 | The GNU C Library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
41bdb6e2 | 13 | Lesser General Public License for more details. |
196980f5 | 14 | |
41bdb6e2 AJ |
15 | You should have received a copy of the GNU Lesser General Public |
16 | License along with the GNU C Library; if not, write to the Free | |
17 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | |
18 | 02111-1307 USA. */ | |
196980f5 | 19 | |
5107cf1d UD |
20 | #ifndef _ERROR_H |
21 | #define _ERROR_H 1 | |
196980f5 | 22 | |
b80bfc8b | 23 | #include <features.h> |
196980f5 | 24 | |
b80bfc8b UD |
25 | |
26 | __BEGIN_DECLS | |
54d79e99 | 27 | |
19c3f208 RM |
28 | /* Print a message with `fprintf (stderr, FORMAT, ...)'; |
29 | if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). | |
30 | If STATUS is nonzero, terminate the program with `exit (STATUS)'. */ | |
31 | ||
8c620ae0 | 32 | extern void error (int __status, int __errnum, const char *__format, ...) |
19c3f208 RM |
33 | __attribute__ ((__format__ (__printf__, 3, 4))); |
34 | ||
8c620ae0 UD |
35 | extern void error_at_line (int __status, int __errnum, const char *__fname, |
36 | unsigned int __lineno, const char *__format, ...) | |
19bc17a9 RM |
37 | __attribute__ ((__format__ (__printf__, 5, 6))); |
38 | ||
19c3f208 RM |
39 | /* If NULL, error will flush stdout, then print on stderr the program |
40 | name, a colon and a space. Otherwise, error will call this | |
41 | function without parameters instead. */ | |
42 | extern void (*error_print_progname) (void); | |
43 | ||
196980f5 RM |
44 | /* This variable is incremented each time `error' is called. */ |
45 | extern unsigned int error_message_count; | |
46 | ||
19bc17a9 RM |
47 | /* Sometimes we want to have at most one error per line. This |
48 | variable controls whether this mode is selected or not. */ | |
49 | extern int error_one_per_line; | |
50 | ||
b80bfc8b UD |
51 | |
52 | #if defined __extern_always_inline && defined __va_arg_pack | |
53 | # include <bits/error.h> | |
54d79e99 UD |
54 | #endif |
55 | ||
b80bfc8b UD |
56 | __END_DECLS |
57 | ||
5107cf1d | 58 | #endif /* error.h */ |