|
Packit |
6c4009 |
/* General definitions for recording error and warning status.
|
|
Packit |
6c4009 |
Copyright (C) 1998-2018 Free Software Foundation, Inc.
|
|
Packit |
6c4009 |
This file is part of the GNU C Library.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
This program is free software; you can redistribute it and/or modify
|
|
Packit |
6c4009 |
it under the terms of the GNU General Public License as published
|
|
Packit |
6c4009 |
by the Free Software Foundation; version 2 of the License, or
|
|
Packit |
6c4009 |
(at your option) any later version.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
This program is distributed in the hope that it will be useful,
|
|
Packit |
6c4009 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
6c4009 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
6c4009 |
GNU General Public License for more details.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
You should have received a copy of the GNU General Public License
|
|
Packit |
6c4009 |
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#ifndef _RECORD_STATUS_H
|
|
Packit |
6c4009 |
#define _RECORD_STATUS_H 1
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#include <stdio.h>
|
|
Packit |
6c4009 |
#include <stdbool.h>
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Error, warning and verbose count and control. */
|
|
Packit |
6c4009 |
extern int recorded_warning_count;
|
|
Packit |
6c4009 |
extern int recorded_error_count;
|
|
Packit |
6c4009 |
extern int be_quiet;
|
|
Packit |
6c4009 |
extern int verbose;
|
|
Packit |
6c4009 |
extern bool warn_ascii;
|
|
Packit |
6c4009 |
extern bool warn_int_curr_symbol;
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Record verbose, warnings, or errors... */
|
|
Packit |
6c4009 |
void record_verbose (FILE *stream, const char *format, ...);
|
|
Packit |
6c4009 |
void record_warning (const char *format, ...);
|
|
Packit |
6c4009 |
void record_error (int status, int errnum, const char *format, ...);
|
|
Packit |
6c4009 |
void record_error_at_line (int status, int errnum,
|
|
Packit |
6c4009 |
const char *filename, unsigned int linenum,
|
|
Packit |
6c4009 |
const char *format, ...);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Locale related functionality for custom error functions. */
|
|
Packit |
6c4009 |
struct locale_state
|
|
Packit |
6c4009 |
{
|
|
Packit |
6c4009 |
/* The current in-use locale. */
|
|
Packit |
6c4009 |
char *cur_locale;
|
|
Packit |
6c4009 |
};
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
struct locale_state push_locale (void);
|
|
Packit |
6c4009 |
void pop_locale (struct locale_state ls);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#endif
|