Rev 4872 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4349 | Serge | 1 | /* Declaration for error-reporting function |
2 | Copyright (C) 1995,1996,1997,2003,2006,2007 Free Software Foundation, Inc. |
||
3 | This file is part of the GNU C Library. |
||
4 | |||
5 | The GNU C Library is free software; you can redistribute it and/or |
||
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. |
||
9 | |||
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 |
||
13 | Lesser General Public License for more details. |
||
14 | |||
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. */ |
||
19 | |||
20 | #ifndef _ERROR_H |
||
21 | #define _ERROR_H 1 |
||
22 | |||
23 | |||
24 | /* Print a message with `fprintf (stderr, FORMAT, ...)'; |
||
25 | if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). |
||
26 | If STATUS is nonzero, terminate the program with `exit (STATUS)'. */ |
||
27 | |||
28 | extern void error (int __status, int __errnum, __const char *__format, ...) |
||
29 | __attribute__ ((__format__ (__printf__, 3, 4))); |
||
30 | |||
31 | extern void error_at_line (int __status, int __errnum, __const char *__fname, |
||
32 | unsigned int __lineno, __const char *__format, ...) |
||
33 | __attribute__ ((__format__ (__printf__, 5, 6))); |
||
34 | |||
35 | /* If NULL, error will flush stdout, then print on stderr the program |
||
36 | name, a colon and a space. Otherwise, error will call this |
||
37 | function without parameters instead. */ |
||
38 | extern void (*error_print_progname) (void); |
||
39 | |||
40 | /* This variable is incremented each time `error' is called. */ |
||
41 | extern unsigned int error_message_count; |
||
42 | |||
43 | /* Sometimes we want to have at most one error per line. This |
||
44 | variable controls whether this mode is selected or not. */ |
||
45 | extern int error_one_per_line; |
||
46 | |||
47 | #endif /* error.h */ |