]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/m2/pge-boot/GNameKey.h
Update copyright years.
[thirdparty/gcc.git] / gcc / m2 / pge-boot / GNameKey.h
CommitLineData
1eee94d3
GM
1/* do not edit automatically generated by mc from NameKey. */
2/* NameKey.def provides a dynamic binary tree name to key.
3
83ffe9cd 4Copyright (C) 2001-2023 Free Software Foundation, Inc.
1eee94d3
GM
5Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
6
7This file is part of GNU Modula-2.
8
9GNU Modula-2 is free software; you can redistribute it and/or modify
10it under the terms of the GNU General Public License as published by
11the Free Software Foundation; either version 3, or (at your option)
12any later version.
13
14GNU Modula-2 is distributed in the hope that it will be useful, but
15WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17General Public License for more details.
18
19You should have received a copy of the GNU General Public License
20along 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
30extern "C" {
31# endif
32# if !defined (PROC_D)
33# define PROC_D
34 typedef void (*PROC_t) (void);
35 typedef struct { PROC_t proc; } PROC;
36# endif
37
38# include "GSYSTEM.h"
39
40# if defined (_NameKey_C)
41# define EXTERN
42# else
43# define EXTERN extern
44# endif
45
46# define NameKey_NulName 0
47typedef unsigned int NameKey_Name;
48
49
50/*
51 MakeKey - returns the Key of the symbol, a. If a is not in the
52 name table then it is added, otherwise the Key of a is returned
53 directly. Note that the name table has no scope - it merely
54 presents a more convienient way of expressing strings. By a Key.
55 These keys last for the duration of compilation.
56*/
57
58EXTERN NameKey_Name NameKey_MakeKey (const char *a_, unsigned int _a_high);
59
60/*
61 makekey - returns the Key of the symbol, a. If a is not in the
62 name table then it is added, otherwise the Key of a is returned
63 directly. Note that the name table has no scope - it merely
64 presents a more convienient way of expressing strings. By a Key.
65 These keys last for the duration of compilation.
66*/
67
68EXTERN NameKey_Name NameKey_makekey (void * a);
69
70/*
71 GetKey - returns the name, a, of the key, key.
72*/
73
74EXTERN void NameKey_GetKey (NameKey_Name key, char *a, unsigned int _a_high);
75
76/*
77 LengthKey - returns the StrLen of a Key.
78*/
79
80EXTERN unsigned int NameKey_LengthKey (NameKey_Name Key);
81
82/*
83 IsKey - returns TRUE if string, a, is currently a key.
84*/
85
86EXTERN unsigned int NameKey_IsKey (const char *a_, unsigned int _a_high);
87
88/*
89 WriteKey - Display the symbol represented by Key.
90*/
91
92EXTERN void NameKey_WriteKey (NameKey_Name key);
93
94/*
95 IsSameExcludingCase - returns TRUE if key1 and key2 are
96 the same. It is case insensitive.
97*/
98
99EXTERN unsigned int NameKey_IsSameExcludingCase (NameKey_Name key1, NameKey_Name key2);
100
101/*
102 KeyToCharStar - returns the C char * string equivalent for, key.
103*/
104
105EXTERN void * NameKey_KeyToCharStar (NameKey_Name key);
106
107/*
108 CharKey - returns the key[i] character.
109*/
110
111EXTERN char NameKey_CharKey (NameKey_Name key, unsigned int i);
112# ifdef __cplusplus
113}
114# endif
115
116# undef EXTERN
117#endif