- with the same hash are kept in a chain. */
-
-/* What the data in a hash_entry means */
-typedef enum
- {
- hash_integer, /* name->integer mapping */
- hash_string, /* name->string mapping */
- hash_macro, /* name is a macro */
- hash_formal /* name is a formal argument */
- } hash_type;
-
-typedef struct hs
- {
- sb key; /* symbol name */
- hash_type type; /* symbol meaning */
- union
- {
- sb s;
- int i;
- struct macro_struct *m;
- struct formal_struct *f;
- } value;
- struct hs *next; /* next hash_entry with same hash key */
- } hash_entry;
-
-typedef struct
- {
- hash_entry **table;
- int size;
- } hash_table;
-
-
-/* Structures used to store macros.
-
- Each macro knows its name and included text. It gets built with a
- list of formal arguments, and also keeps a hash table which points
- into the list to speed up formal search. Each formal knows its
- name and its default value. Each time the macro is expanded, the
- formals get the actual values attatched to them. */
-
-/* describe the formal arguments to a macro */
-
-typedef struct formal_struct
- {
- struct formal_struct *next; /* next formal in list */
- sb name; /* name of the formal */
- sb def; /* the default value */
- sb actual; /* the actual argument (changed on each expansion) */
- int index; /* the index of the formal 0..formal_count-1 */
- }
-formal_entry;
-
-/* describe the macro. */
-
-typedef struct macro_struct
- {
- sb sub; /* substitution text. */
- int formal_count; /* number of formal args. */
- formal_entry *formals; /* pointer to list of formal_structs */
- hash_table formal_hash; /* hash table of formals. */
- }
-macro_entry;
-
-/* how we nest files and expand macros etc.
-
- we keep a stack of of include_stack structs. each include file
- pushes a new level onto the stack. we keep an sb with a pushback
+ with the same hash are kept in a chain. */
+
+/* What the data in a hash_entry means. */
+typedef enum {
+ hash_integer, /* Name->integer mapping. */
+ hash_string, /* Name->string mapping. */
+ hash_macro, /* Name is a macro. */
+ hash_formal /* Name is a formal argument. */
+} hash_type;
+
+typedef struct hs {
+ sb key; /* Symbol name. */
+ hash_type type; /* Symbol meaning. */
+ union {
+ sb s;
+ int i;
+ struct macro_struct *m;
+ struct formal_struct *f;
+ } value;
+ struct hs *next; /* Next hash_entry with same hash key. */
+} hash_entry;
+
+typedef struct {
+ hash_entry **table;
+ int size;
+} hash_table;
+
+/* How we nest files and expand macros etc.
+
+ We keep a stack of of include_stack structs. Each include file
+ pushes a new level onto the stack. We keep an sb with a pushback