Files
glibc/misc/error.h
T

58 lines
2.0 KiB
C
Raw Normal View History

1997-01-30 04:09:36 +00:00
/* Declaration for error-reporting function
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.
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.
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.
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/>. */
1997-06-21 02:59:26 +00:00
#ifndef _ERROR_H
#define _ERROR_H 1
#include <features.h>
__BEGIN_DECLS
1996-11-15 04:08:00 +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, ...)
__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, ...)
__attribute__ ((__format__ (__printf__, 5, 6)));
/* 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);
/* This variable is incremented each time `error' is called. */
extern unsigned int error_message_count;
/* 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;
#if defined __extern_always_inline && defined __va_arg_pack
# include <bits/error.h>
1996-11-15 04:08:00 +00:00
#endif
__END_DECLS
1997-06-21 02:59:26 +00:00
#endif /* error.h */