Debian Codegraph @

gcc/m2/gm2-gcc/m2color.def

raw
1 (* m2color.def interface to gcc colorization.
2
3 Copyright (C) 2019-2025 Free Software Foundation, Inc.
4 Contributed by Gaius Mulley <[email protected]>.
5
6 This file is part of GNU Modula-2.
7
8 GNU Modula-2 is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
11 any later version.
12
13 GNU Modula-2 is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with GNU Modula-2; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. *)
21
22 DEFINITION MODULE FOR "C" m2color ;
23
24 FROM SYSTEM IMPORT ADDRESS ;
25
26 TYPE
27 PtrToChar = POINTER TO CHAR ;
28
29
30 (* colorize_start returns a C string containing the color escape sequences
31 mapped onto, name. See diagnostic-color.c for the definitive
32 list of GCC colors. The name list includes: error, warning,
33 note, range1, range2, quote, locus, fixit-insert, fixit-delete,
34 diff-filename, diff-hunk, diff-delete, diff-insert, type-diff. *)
35
36 PROCEDURE colorize_start (show_color: BOOLEAN; name: ADDRESS;
37 _name_high: CARDINAL) : PtrToChar ;
38
39 (* colorize_stop return a C string containing the escape sequences to
40 stop text colorization. *)
41
42 PROCEDURE colorize_stop (show_color: BOOLEAN) : PtrToChar ;
43
44
45 (* open_quote return a C string containing the open quote character which
46 might be a UTF-8 character if on a UTF-8 supporting host. *)
47
48 PROCEDURE open_quote () : PtrToChar ;
49
50
51 (* close_quote return a C string containing the close quote character which
52 might be a UTF-8 character if on a UTF-8 supporting host. *)
53
54 PROCEDURE close_quote () : PtrToChar ;
55
56
57 END m2color.