verror.h 2.0 KB

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