Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – tendra.SVN – Blame – /branches/tendra4/src/utilities/sid/entry.h – Rev 2

Subversion Repositories tendra.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
2
    		 Crown Copyright (c) 1997
3
 
4
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
12
 
13
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
15
 
16
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
19
 
20
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
22
        these conditions;
23
 
24
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
27
        it may be put.
28
*/
29
 
30
 
31
/*** entry.h --- Identifier table entry ADT.
32
 *
33
 ** Author: Steve Folkes <smf@hermes.mod.uk>
34
 *
35
 *** Commentary:
36
 *
37
 * See the file "entry.c" for more information.
38
 *
39
 *** Change Log:
40
 * $Log: entry.h,v $
41
 * Revision 1.1.1.1  1998/01/17  15:57:46  release
42
 * First version to be checked into rolling release.
43
 *
44
 * Revision 1.2  1994/12/15  09:58:11  smf
45
 * Brought into line with OSSG C Coding Standards Document, as per
46
 * "CR94_178.sid+tld-update".
47
 *
48
 * Revision 1.1.1.1  1994/07/25  16:04:34  smf
49
 * Initial import of SID 1.8 non shared files.
50
 *
51
**/
52
 
53
/****************************************************************************/
54
 
55
#ifndef H_ENTRY
56
#define H_ENTRY
57
 
58
#include "os-interface.h"
59
#include "dalloc.h"
60
#include "dstring.h"
61
#include "ostream.h"
62
#include "key.h"
63
 
64
/* To avoid circularity: */
65
#ifdef __TenDRA__
66
#pragma TenDRA begin
67
#pragma TenDRA complete struct/union analysis off
68
#endif
69
struct ActionT;
70
struct BasicT;
71
struct NameT;
72
struct RuleT;
73
struct TypeT;
74
 
75
/*--------------------------------------------------------------------------*/
76
 
77
#ifdef FS_NO_ENUM
78
typedef int EntryTypeT, *EntryTypeP;
79
#define ET_TYPE		(0)
80
#define ET_BASIC	(1)
81
#define ET_RULE		(2)
82
#define ET_ACTION	(3)
83
#define ET_NAME		(4)
84
#define ET_RENAME	(5)
85
#define ET_PREDICATE	(6)
86
#define ET_NON_LOCAL	(7)
87
#else
88
typedef enum {
89
    ET_TYPE,
90
    ET_BASIC,
91
    ET_RULE,
92
    ET_ACTION,
93
    ET_NAME,
94
    ET_RENAME,
95
    ET_PREDICATE,
96
    ET_NON_LOCAL
97
} EntryTypeT, *EntryTypeP;
98
#endif /* defined (FS_NO_ENUM) */
99
 
100
typedef struct EntryT {
101
    struct EntryT	       *next;
102
    KeyT			key;
103
    BoolT			mapped;
104
    NStringT			mapping;
105
    EntryTypeT			type;
106
    BoolT			traced;
107
    union {
108
	struct BasicT	       *basic;
109
	struct RuleT	       *rule;
110
	struct ActionT	       *action;
111
	struct TypeT	       *type;
112
	struct EntryT	       *non_local;
113
    } u;
114
    struct NameT	       *name;
115
} EntryT, *EntryP;
116
 
117
/*--------------------------------------------------------------------------*/
118
 
119
extern EntryP			entry_create_from_string
120
	PROTO_S ((NStringP, unsigned, EntryTypeT));
121
extern EntryP			entry_create_from_number
122
	PROTO_S ((unsigned, EntryTypeT, BoolT, EntryP));
123
extern void			entry_set_basic
124
	PROTO_S ((EntryP, struct BasicT *));
125
extern void			entry_set_rule
126
	PROTO_S ((EntryP, struct RuleT *));
127
extern void			entry_set_action
128
	PROTO_S ((EntryP, struct ActionT *));
129
extern void			entry_set_type
130
	PROTO_S ((EntryP, struct TypeT *));
131
extern void			entry_set_non_local
132
	PROTO_S ((EntryP, EntryP));
133
extern EntryP			entry_next
134
	PROTO_S ((EntryP));
135
extern EntryP		       *entry_next_ref
136
	PROTO_S ((EntryP));
137
extern KeyP			entry_key
138
	PROTO_S ((EntryP));
139
extern EntryTypeT		entry_type
140
	PROTO_S ((EntryP));
141
extern void			entry_change_type
142
	PROTO_S ((EntryP, EntryTypeT));
143
extern BoolT			entry_is_basic
144
	PROTO_S ((EntryP));
145
extern BoolT			entry_is_action
146
	PROTO_S ((EntryP));
147
extern BoolT			entry_is_rule
148
	PROTO_S ((EntryP));
149
extern BoolT			entry_is_type
150
	PROTO_S ((EntryP));
151
extern BoolT			entry_is_non_local
152
	PROTO_S ((EntryP));
153
extern struct BasicT	       *entry_get_basic
154
	PROTO_S ((EntryP));
155
extern struct ActionT	       *entry_get_action
156
	PROTO_S ((EntryP));
157
extern struct RuleT	       *entry_get_rule
158
	PROTO_S ((EntryP));
159
extern struct NameT	       *entry_get_name
160
	PROTO_S ((EntryP));
161
extern struct TypeT	       *entry_get_type
162
	PROTO_S ((EntryP));
163
extern EntryP			entry_get_non_local
164
	PROTO_S ((EntryP));
165
extern void			entry_set_mapping
166
	PROTO_S ((EntryP, NStringP));
167
extern NStringP			entry_get_mapping
168
	PROTO_S ((EntryP));
169
extern void			entry_iter
170
	PROTO_S ((EntryP, BoolT, void (*) (EntryP, GenericP), GenericP));
171
extern void			entry_not_traced
172
	PROTO_S ((EntryP));
173
extern BoolT			entry_is_traced
174
	PROTO_S ((EntryP));
175
 
176
/*--------------------------------------------------------------------------*/
177
 
178
#ifdef FS_FAST
179
#define entry_set_basic(e, b)  ((e)->u.basic = (b))
180
#define entry_set_rule(e, r)  ((e)->u.rule = (r))
181
#define entry_set_action(e, a)  ((e)->u.action = (a))
182
#define entry_set_type(e, t)  ((e)->u.type = (t))
183
#define entry_next(e) ((e)->next)
184
#define entry_next_ref(e) (&((e)->next))
185
#define entry_key(e) (&((e)->key))
186
#define entry_type(e) ((e)->type)
187
#define entry_change_type(e, t) ((e)->type = (t))
188
#define entry_is_basic(e) ((e)->type == ET_BASIC)
189
#define entry_is_action(e) ((e)->type == ET_ACTION)
190
#define entry_is_rule(e) ((e)->type == ET_RULE)
191
#define entry_is_type(e) ((e)->type == ET_TYPE)
192
#define entry_is_non_local(e) ((e)->type == ET_NON_LOCAL)
193
#define entry_get_basic(e) ((e)->u.basic)
194
#define entry_get_action(e) ((e)->u.action)
195
#define entry_get_rule(e) ((e)->u.rule)
196
#define entry_get_name(e) ((e)->name)
197
#define entry_get_type(e) ((e)->u.type)
198
#define entry_not_traced(e) ((e)->traced = FALSE)
199
#define entry_is_traced(e) ((e)->traced)
200
#endif /* defined (FS_FAST) */
201
 
202
#endif /* !defined (H_ENTRY) */
203
 
204
/*
205
 * Local variables(smf):
206
 * eval: (include::add-path-entry "../os-interface" "../library")
207
 * eval: (include::add-path-entry "../generated")
208
 * end:
209
**/