1  /* Declaration for va_list error-reporting function
       2     Copyright (C) 2006-2007, 2009-2023 Free Software Foundation, Inc.
       3  
       4     This program is free software: you can redistribute it and/or modify
       5     it under the terms of the GNU General Public License as published by
       6     the Free Software Foundation, either version 3 of the License, or
       7     (at your option) any later version.
       8  
       9     This program is distributed in the hope that it will be useful,
      10     but WITHOUT ANY WARRANTY; without even the implied warranty of
      11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      12     GNU General Public License for more details.
      13  
      14     You should have received a copy of the GNU General Public License
      15     along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
      16  
      17  #ifndef _VERROR_H
      18  #define _VERROR_H 1
      19  
      20  /* This file uses _GL_ATTRIBUTE_FORMAT.  */
      21  #if !_GL_CONFIG_H_INCLUDED
      22   #error "Please include config.h first."
      23  #endif
      24  
      25  #include <stdarg.h>
      26  
      27  /* Get _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD.  */
      28  #include <stdio.h>
      29  
      30  #ifdef __cplusplus
      31  extern "C" {
      32  #endif
      33  
      34  /* Print a message with 'vfprintf (stderr, FORMAT, ARGS)';
      35     if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
      36     If STATUS is nonzero, terminate the program with 'exit (STATUS)'.
      37     Use the globals error_print_progname and error_message_count similarly
      38     to error().  */
      39  
      40  extern void verror (int __status, int __errnum, const char *__format,
      41                      va_list __args)
      42       _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 3, 0));
      43  
      44  /* Print a message with 'vfprintf (stderr, FORMAT, ARGS)';
      45     if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
      46     If STATUS is nonzero, terminate the program with 'exit (STATUS)'.
      47     If FNAME is not NULL, prepend the message with "FNAME:LINENO:".
      48     Use the globals error_print_progname, error_message_count, and
      49     error_one_per_line similarly to error_at_line().  */
      50  
      51  extern void verror_at_line (int __status, int __errnum, const char *__fname,
      52                              unsigned int __lineno, const char *__format,
      53                              va_list __args)
      54       _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 5, 0));
      55  
      56  #ifdef __cplusplus
      57  }
      58  #endif
      59  
      60  #endif /* verror.h */