Debian Codegraph @

terps/jacl/types.h

raw symbols SCIP
1 /* types.h --- Header file for all complex types used in JACL.
2 * (C) 2008 Stuart Allen, distribute and use
3 * according to GNU GPL, see file COPYING for details.
4 */
5
6 #ifndef __JACL_TYPES_H__
7 #define __JACL_TYPES_H__
8
9 #include "constants.h"
10
11 // THIS STRUCTURE CONTAINS ALL THE INFORMATION THAT NEEDS TO BE
12 // SAVED IN ORDER TO CALL parse() RECURSIVELY
13 struct proxy_type {
14 int object_pointers[4]; // NOUN1 -> NOUN4
15 int integer[MAX_WORDS]; // THE COMANDS INTEGERS
16 char text[MAX_WORDS][256]; // THE COMANDS STRINGS
17 char command[MAX_WORDS][256]; // THE WHOLE COMMAND
18 int object_list[4][MAX_OBJECTS]; // THE RESOLVED OBJECTS
19 int list_size[4]; // THE SIZE OF THE ABOVE LISTS
20 int max_size[4]; // THE LAST USED INDEX OF THE ABOVE LISTS
21 int start_of_this_command; // PREPARSE STATE
22 int start_of_last_command; // PREPARSE STATE
23 int integercount; // THE NUMBER OF INTEGERS SAVED
24 int textcount; // THE NUMBER OF STRINGS SAVED
25 int commandcount; // THE NUMBER OF WORDS IN COMMAND
26 int last_exact; // WORD POINTER FOR MATCH
27 int after_from; // WORD POINTER FOR FROM WORD
28 };
29
30 struct stack_type {
31 FILE *infile, *outfile;
32 int arguments[MAX_WORDS];
33 char str_arguments[MAX_WORDS][256];
34 char text_buffer[1024];
35 char called_name[1024];
36 char override[84];
37 char scope_criterion[24];
38 char default_function[84];
39 const char *word[MAX_WORDS];
40 int quoted[MAX_WORDS];
41 int wp;
42 int argcount;
43 int local, local_x, local_y, local_a;
44 int *loop_integer;
45 int *select_integer;
46 int criterion_value;
47 int criterion_type;
48 int criterion_negate;
49 int current_level;
50 int execution_level;
51 #ifdef GLK
52 glsi32 top_of_loop;
53 glsi32 top_of_select;
54 glsi32 top_of_while;
55 glsi32 top_of_iterate;
56 glsi32 top_of_update;
57 glsi32 top_of_do_loop;
58 glsi32 address;
59 #else
60 long top_of_loop;
61 long top_of_select;
62 long top_of_while;
63 long top_of_iterate;
64 long top_of_update;
65 long top_of_do_loop;
66 long address;
67 #endif
68 struct function_type *function;
69 };
70
71 struct object_type {
72 char label[44];
73 char article[12];
74 char definite[12];
75 struct name_type *first_name;
76 struct name_type *first_plural;
77 char inventory[44];
78 char described[84];
79 int user_attributes;
80 int user_attributes_backup;
81 int attributes;
82 int attributes_backup;
83 int integer[16];
84 int integer_backup[16];
85 int nosave;
86 };
87
88 struct integer_type {
89 char name[44];
90 int value;
91 int value_backup;
92 struct integer_type *next_integer;
93 };
94
95 struct cinteger_type {
96 char name[44];
97 int value;
98 struct cinteger_type *next_cinteger;
99 };
100
101 struct attribute_type {
102 char name[44];
103 int value;
104 struct attribute_type *next_attribute;
105 };
106
107 struct string_type {
108 char name[44];
109 char value[1025];
110 struct string_type *next_string;
111 };
112
113 struct function_type {
114 char name[84];
115 #ifdef GLK
116 glui32 position;
117 #else
118 long position;
119 #endif
120
121 int self;
122 int call_count;
123 int call_count_backup;
124 struct function_type *next_function;
125 int nosave;
126 };
127
128 struct command_type {
129 char word[44];
130 struct command_type *next;
131 };
132
133 #ifdef GLK
134 struct window_type {
135 char name[44];
136 winid_t glk_window;
137 glui32 glk_type;
138 struct window_type *next_window;
139 };
140 #endif
141
142 struct word_type {
143 char word[44];
144 struct word_type *first_child;
145 struct word_type *next_sibling;
146 };
147
148 struct synonym_type {
149 char original[44];
150 char standard[44];
151 struct synonym_type *next_synonym;
152 };
153
154 struct name_type {
155 char name[44];
156 struct name_type *next_name;
157 };
158
159 struct filter_type {
160 char word[44];
161 struct filter_type *next_filter;
162 };
163
164 #ifndef GLK
165 struct parameter_type {
166 char name[44];
167 char container[44];
168 int low;
169 int high;
170 struct parameter_type *next_parameter;
171 };
172 #endif
173
174 #endif