Blame lib/error.h

Packit 15a96c
/* Declaration for error-reporting function
Packit 15a96c
   $Id: error.h,v 1.1.1.1 2003-03-30 18:55:40 al-guest Exp $
Packit 15a96c
  
Packit 15a96c
   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
Packit 15a96c
Packit 15a96c
   This file is part of the GNU C Library.  Its master source is NOT part of
Packit 15a96c
   the C library, however.  The master source lives in /gd/gnu/lib.
Packit 15a96c
Packit 15a96c
   The GNU C Library is free software; you can redistribute it and/or
Packit 15a96c
   modify it under the terms of the GNU Library General Public License as
Packit 15a96c
   published by the Free Software Foundation; either version 2 of the
Packit 15a96c
   License, or (at your option) any later version.
Packit 15a96c
Packit 15a96c
   The GNU C Library is distributed in the hope that it will be useful,
Packit 15a96c
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 15a96c
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 15a96c
   Library General Public License for more details.
Packit 15a96c
Packit 15a96c
   You should have received a copy of the GNU Library General Public
Packit 15a96c
   License along with the GNU C Library; see the file COPYING.LIB.  If not,
Packit 15a96c
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Packit 15a96c
   Boston, MA 02111-1307, USA.  */
Packit 15a96c
Packit 15a96c
#ifndef _ERROR_H
Packit 15a96c
#define _ERROR_H 1
Packit 15a96c
Packit 15a96c
#ifndef __attribute__
Packit 15a96c
/* This feature is available in gcc versions 2.5 and later.  */
Packit 15a96c
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
Packit 15a96c
#  define __attribute__(Spec) /* empty */
Packit 15a96c
# endif
Packit 15a96c
/* The __-protected variants of `format' and `printf' attributes
Packit 15a96c
   are accepted by gcc versions 2.6.4 (effectively 2.7) and later.  */
Packit 15a96c
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
Packit 15a96c
#  define __format__ format
Packit 15a96c
#  define __printf__ printf
Packit 15a96c
# endif
Packit 15a96c
#endif
Packit 15a96c
Packit 15a96c
#ifdef	__cplusplus
Packit 15a96c
extern "C" {
Packit 15a96c
#endif
Packit 15a96c
Packit 15a96c
#if defined (__STDC__) && __STDC__
Packit 15a96c
Packit 15a96c
/* Print a message with `fprintf (stderr, FORMAT, ...)';
Packit 15a96c
   if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
Packit 15a96c
   If STATUS is nonzero, terminate the program with `exit (STATUS)'.  */
Packit 15a96c
Packit 15a96c
extern void error (int status, int errnum, const char *format, ...)
Packit 15a96c
     __attribute__ ((__format__ (__printf__, 3, 4)));
Packit 15a96c
Packit 15a96c
extern void error_at_line (int status, int errnum, const char *fname,
Packit 15a96c
			   unsigned int lineno, const char *format, ...)
Packit 15a96c
     __attribute__ ((__format__ (__printf__, 5, 6)));
Packit 15a96c
Packit 15a96c
/* If NULL, error will flush stdout, then print on stderr the program
Packit 15a96c
   name, a colon and a space.  Otherwise, error will call this
Packit 15a96c
   function without parameters instead.  */
Packit 15a96c
extern void (*error_print_progname) (void);
Packit 15a96c
Packit 15a96c
#else
Packit 15a96c
void error ();
Packit 15a96c
void error_at_line ();
Packit 15a96c
extern void (*error_print_progname) ();
Packit 15a96c
#endif
Packit 15a96c
Packit 15a96c
/* This variable is incremented each time `error' is called.  */
Packit 15a96c
extern unsigned int error_message_count;
Packit 15a96c
Packit 15a96c
/* Sometimes we want to have at most one error per line.  This
Packit 15a96c
   variable controls whether this mode is selected or not.  */
Packit 15a96c
extern int error_one_per_line;
Packit 15a96c
Packit 15a96c
#ifdef	__cplusplus
Packit 15a96c
}
Packit 15a96c
#endif
Packit 15a96c
Packit 15a96c
#endif /* error.h */