Debian Codegraph @

gcc/m2/mc-boot/GnameKey.h

raw
1 /* do not edit automatically generated by mc from nameKey. */
2 /* nameKey.def provides a dynamic binary tree name to key.
3
4 Copyright (C) 2015-2025 Free Software Foundation, Inc.
5 Contributed by Gaius Mulley <[email protected]>.
6
7 This file is part of GNU Modula-2.
8
9 GNU Modula-2 is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3, or (at your option)
12 any later version.
13
14 GNU Modula-2 is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with GNU Modula-2; see the file COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
22
23
24 #if !defined (_nameKey_H)
25 # define _nameKey_H
26
27 #include "config.h"
28 #include "system.h"
29 # ifdef __cplusplus
30 extern "C" {
31 # endif
32 #include <stdbool.h>
33 # if !defined (PROC_D)
34 # define PROC_D
35 typedef void (*PROC_t) (void);
36 typedef struct { PROC_t proc; } PROC;
37 # endif
38
39 # include "GSYSTEM.h"
40
41 # if defined (_nameKey_C)
42 # define EXTERN
43 # else
44 # define EXTERN extern
45 # endif
46
47 # define nameKey_NulName 0
48 typedef unsigned int nameKey_Name;
49
50
51 /*
52 makeKey - returns the Key of the symbol, a. If a is not in the
53 name table then it is added, otherwise the Key of a is returned
54 directly. Note that the name table has no scope - it merely
55 presents a more convienient way of expressing strings. By a Key.
56 These keys last for the duration of compilation.
57 */
58
59 EXTERN nameKey_Name nameKey_makeKey (const char *a_, unsigned int _a_high);
60
61 /*
62 makekey - returns the Key of the symbol, a. If a is not in the
63 name table then it is added, otherwise the Key of a is returned
64 directly. Note that the name table has no scope - it merely
65 presents a more convienient way of expressing strings. By a Key.
66 These keys last for the duration of compilation.
67 */
68
69 EXTERN nameKey_Name nameKey_makekey (void * a);
70
71 /*
72 getKey - returns the name, a, of the key, key.
73 */
74
75 EXTERN void nameKey_getKey (nameKey_Name key, char *a, unsigned int _a_high);
76
77 /*
78 lengthKey - returns the length of a Key.
79 */
80
81 EXTERN unsigned int nameKey_lengthKey (nameKey_Name key);
82
83 /*
84 isKey - returns TRUE if string, a, is currently a key.
85 */
86
87 EXTERN bool nameKey_isKey (const char *a_, unsigned int _a_high);
88
89 /*
90 writeKey - Display the symbol represented by Key.
91 */
92
93 EXTERN void nameKey_writeKey (nameKey_Name key);
94
95 /*
96 isSameExcludingCase - returns TRUE if key1 and key2 are
97 the same. It is case insensitive.
98 */
99
100 EXTERN bool nameKey_isSameExcludingCase (nameKey_Name key1, nameKey_Name key2);
101
102 /*
103 keyToCharStar - returns the C char * string equivalent for, key.
104 */
105
106 EXTERN void * nameKey_keyToCharStar (nameKey_Name key);
107 # ifdef __cplusplus
108 }
109 # endif
110
111 # undef EXTERN
112 #endif