1 /* Declaration for va_list error-reporting function 2 Copyright (C) 2006-2007, 2009-2021 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 #include <stdarg.h> 21 22 /* Get _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD. */ 23 #include <stdio.h> 24 25 #ifdef __cplusplus 26 extern "C" { 27 #endif 28 29 /* Print a message with 'vfprintf (stderr, FORMAT, ARGS)'; 30 if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). 31 If STATUS is nonzero, terminate the program with 'exit (STATUS)'. 32 Use the globals error_print_progname and error_message_count similarly 33 to error(). */ 34 35 extern void verror (int __status, int __errnum, const char *__format, 36 va_list __args) 37 _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 3, 0)); 38 39 /* Print a message with 'vfprintf (stderr, FORMAT, ARGS)'; 40 if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). 41 If STATUS is nonzero, terminate the program with 'exit (STATUS)'. 42 If FNAME is not NULL, prepend the message with "FNAME:LINENO:". 43 Use the globals error_print_progname, error_message_count, and 44 error_one_per_line similarly to error_at_line(). */ 45 46 extern void verror_at_line (int __status, int __errnum, const char *__fname, 47 unsigned int __lineno, const char *__format, 48 va_list __args) 49 _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 5, 0)); 50 51 #ifdef __cplusplus 52 } 53 #endif 54 55 #endif /* verror.h */