| 1 | /* General definitions for recording error and warning status. | 
|---|
| 2 | Copyright (C) 1998-2020 Free Software Foundation, Inc. | 
|---|
| 3 | This file is part of the GNU C Library. | 
|---|
| 4 |  | 
|---|
| 5 | This program is free software; you can redistribute it and/or modify | 
|---|
| 6 | it under the terms of the GNU General Public License as published | 
|---|
| 7 | by the Free Software Foundation; version 2 of the License, or | 
|---|
| 8 | (at your option) any later version. | 
|---|
| 9 |  | 
|---|
| 10 | This program is distributed in the hope that it will be useful, | 
|---|
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
| 13 | GNU General Public License for more details. | 
|---|
| 14 |  | 
|---|
| 15 | You should have received a copy of the GNU General Public License | 
|---|
| 16 | along with this program; if not, see <https://www.gnu.org/licenses/>.  */ | 
|---|
| 17 |  | 
|---|
| 18 | #ifndef _RECORD_STATUS_H | 
|---|
| 19 | #define _RECORD_STATUS_H 1 | 
|---|
| 20 |  | 
|---|
| 21 | #include <stdio.h> | 
|---|
| 22 | #include <stdbool.h> | 
|---|
| 23 |  | 
|---|
| 24 | /* Error, warning and verbose count and control.  */ | 
|---|
| 25 | extern int recorded_warning_count; | 
|---|
| 26 | extern int recorded_error_count; | 
|---|
| 27 | extern int be_quiet; | 
|---|
| 28 | extern int verbose; | 
|---|
| 29 | extern bool warn_ascii; | 
|---|
| 30 | extern bool warn_int_curr_symbol; | 
|---|
| 31 |  | 
|---|
| 32 | /* Record verbose, warnings, or errors... */ | 
|---|
| 33 | void record_verbose (FILE *stream, const char *format, ...); | 
|---|
| 34 | void record_warning (const char *format, ...); | 
|---|
| 35 | void record_error (int status, int errnum, const char *format, ...); | 
|---|
| 36 | void record_error_at_line (int status, int errnum, | 
|---|
| 37 | const char *filename, unsigned int linenum, | 
|---|
| 38 | const char *format, ...); | 
|---|
| 39 |  | 
|---|
| 40 | /* Locale related functionality for custom error functions.  */ | 
|---|
| 41 | struct locale_state | 
|---|
| 42 | { | 
|---|
| 43 | /* The current in-use locale.  */ | 
|---|
| 44 | char *cur_locale; | 
|---|
| 45 | }; | 
|---|
| 46 |  | 
|---|
| 47 | struct locale_state push_locale (void); | 
|---|
| 48 | void pop_locale (struct locale_state ls); | 
|---|
| 49 |  | 
|---|
| 50 |  | 
|---|
| 51 | #endif | 
|---|
| 52 |  | 
|---|