]> git.ipfire.org Git - thirdparty/glibc.git/blame - locale/programs/record-status.h
Update copyright dates with scripts/update-copyrights
[thirdparty/glibc.git] / locale / programs / record-status.h
CommitLineData
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. */
25extern int recorded_warning_count;
26extern int recorded_error_count;
27extern int be_quiet;
28extern int verbose;
29extern bool warn_ascii;
30extern bool warn_int_curr_symbol;
31
32/* Record verbose, warnings, or errors... */
33void record_verbose (FILE *stream, const char *format, ...);
34void record_warning (const char *format, ...);
35void record_error (int status, int errnum, const char *format, ...);
36void 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
41struct locale_state
42{
43 /* The current in-use locale. */
44 char *cur_locale;
45};
46
02eec681
CD
47struct locale_state push_locale (void);
48void pop_locale (struct locale_state ls);
f16491eb 49
f16491eb
CD
50
51#endif