ada: Minor tweaks for comparison operators
[official-gcc.git] / gcc / diagnostic-color.h
blob213fd5ab4f2da925e0649f4b8d90707c90f7ba9c
1 /* Copyright (C) 2013-2023 Free Software Foundation, Inc.
2 Contributed by Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later
9 version.
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 for more details.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
20 /* Based on code from: */
21 /* grep.c - main driver file for grep.
22 Copyright (C) 1992-2023 Free Software Foundation, Inc.
24 This program is free software; you can redistribute it and/or modify
25 it under the terms of the GNU General Public License as published by
26 the Free Software Foundation; either version 3, or (at your option)
27 any later version.
29 This program is distributed in the hope that it will be useful,
30 but WITHOUT ANY WARRANTY; without even the implied warranty of
31 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 GNU General Public License for more details.
34 You should have received a copy of the GNU General Public License
35 along with this program; if not, write to the Free Software
36 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
37 02110-1301, USA.
39 Written July 1992 by Mike Haertel. */
41 #ifndef GCC_DIAGNOSTIC_COLOR_H
42 #define GCC_DIAGNOSTIC_COLOR_H
44 /* Whether to add color to diagnostics:
45 o DIAGNOSTICS_COLOR_NO: never
46 o DIAGNOSTICS_COLOR_YES: always
47 o DIAGNOSTICS_COLOR_AUTO: depending on the output stream. */
48 typedef enum
50 DIAGNOSTICS_COLOR_NO = 0,
51 DIAGNOSTICS_COLOR_YES = 1,
52 DIAGNOSTICS_COLOR_AUTO = 2
53 } diagnostic_color_rule_t;
55 const char *colorize_start (bool, const char *, size_t);
56 const char *colorize_stop (bool);
57 bool colorize_init (diagnostic_color_rule_t);
59 inline const char *
60 colorize_start (bool show_color, const char *name)
62 return colorize_start (show_color, name, strlen (name));
65 #endif /* ! GCC_DIAGNOSTIC_COLOR_H */