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