1997-01-30 04:09:36 +00:00
|
|
|
/* Declaration for error-reporting function
|
2018-01-01 00:32:25 +00:00
|
|
|
Copyright (C) 1995-2018 Free Software Foundation, Inc.
|
2003-08-30 08:31:39 +00:00
|
|
|
This file is part of the GNU C Library.
|
1995-12-06 00:14:32 +00:00
|
|
|
|
1996-11-15 04:08:00 +00:00
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 04:58:11 +00:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
1995-12-06 00:14:32 +00:00
|
|
|
|
1996-11-15 04:08:00 +00:00
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2001-07-06 04:58:11 +00:00
|
|
|
Lesser General Public License for more details.
|
1995-12-06 00:14:32 +00:00
|
|
|
|
2001-07-06 04:58:11 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2012-02-09 23:18:22 +00:00
|
|
|
License along with the GNU C Library; if not, see
|
|
|
|
|
<http://www.gnu.org/licenses/>. */
|
1995-12-06 00:14:32 +00:00
|
|
|
|
1997-06-21 02:59:26 +00:00
|
|
|
#ifndef _ERROR_H
|
|
|
|
|
#define _ERROR_H 1
|
1995-12-06 00:14:32 +00:00
|
|
|
|
2007-10-04 18:07:28 +00:00
|
|
|
#include <features.h>
|
1995-12-06 00:14:32 +00:00
|
|
|
|
2007-10-04 18:07:28 +00:00
|
|
|
|
|
|
|
|
__BEGIN_DECLS
|
1996-11-15 04:08:00 +00:00
|
|
|
|
1996-01-29 16:05:21 +00:00
|
|
|
/* Print a message with `fprintf (stderr, FORMAT, ...)';
|
|
|
|
|
if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
|
|
|
|
|
If STATUS is nonzero, terminate the program with `exit (STATUS)'. */
|
|
|
|
|
|
2012-01-07 23:57:22 -05:00
|
|
|
extern void error (int __status, int __errnum, const char *__format, ...)
|
1996-01-29 16:05:21 +00:00
|
|
|
__attribute__ ((__format__ (__printf__, 3, 4)));
|
|
|
|
|
|
2012-01-07 23:57:22 -05:00
|
|
|
extern void error_at_line (int __status, int __errnum, const char *__fname,
|
|
|
|
|
unsigned int __lineno, const char *__format, ...)
|
1996-03-28 08:30:38 +00:00
|
|
|
__attribute__ ((__format__ (__printf__, 5, 6)));
|
|
|
|
|
|
1996-01-29 16:05:21 +00:00
|
|
|
/* If NULL, error will flush stdout, then print on stderr the program
|
|
|
|
|
name, a colon and a space. Otherwise, error will call this
|
|
|
|
|
function without parameters instead. */
|
|
|
|
|
extern void (*error_print_progname) (void);
|
|
|
|
|
|
1995-12-06 00:14:32 +00:00
|
|
|
/* This variable is incremented each time `error' is called. */
|
|
|
|
|
extern unsigned int error_message_count;
|
|
|
|
|
|
1996-03-28 08:30:38 +00:00
|
|
|
/* Sometimes we want to have at most one error per line. This
|
|
|
|
|
variable controls whether this mode is selected or not. */
|
|
|
|
|
extern int error_one_per_line;
|
|
|
|
|
|
2007-10-04 18:07:28 +00:00
|
|
|
|
|
|
|
|
#if defined __extern_always_inline && defined __va_arg_pack
|
|
|
|
|
# include <bits/error.h>
|
1996-11-15 04:08:00 +00:00
|
|
|
#endif
|
|
|
|
|
|
2007-10-04 18:07:28 +00:00
|
|
|
__END_DECLS
|
|
|
|
|
|
1997-06-21 02:59:26 +00:00
|
|
|
#endif /* error.h */
|