]>
Commit | Line | Data |
---|---|---|
f16491eb | 1 | /* General definitions for recording error and warning status. |
2b778ceb | 2 | Copyright (C) 1998-2021 Free Software Foundation, Inc. |
f16491eb CD |
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 | |
5a82c748 | 16 | along with this program; if not, see <https://www.gnu.org/licenses/>. */ |
f16491eb CD |
17 | |
18 | #ifndef _RECORD_STATUS_H | |
19 | #define _RECORD_STATUS_H 1 | |
20 | ||
02eec681 CD |
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. */ | |
f16491eb CD |
41 | struct locale_state |
42 | { | |
43 | /* The current in-use locale. */ | |
44 | char *cur_locale; | |
45 | }; | |
46 | ||
02eec681 CD |
47 | struct locale_state push_locale (void); |
48 | void pop_locale (struct locale_state ls); | |
f16491eb | 49 | |
f16491eb CD |
50 | |
51 | #endif |