#include #include #include #include #include #include #ifndef MAINH #define MAINH #define INITIAL_LINE_BUFFER 80 #define INITIAL_WORD_SIZE 80 #define INITIAL_NUM_ALIASES 50 #define INITIAL_NUM_VARIABLES 200 // the minimum size of an array, the automaic array allocator will not make // arrays smaller than this #define MIN_ARRAY_SIZE 50 #define NUM_BUILTINS 3 struct Alias { char *name; char *substitution; }; struct ArrayElement { void *value; char *key; }; typedef struct ArrayElement ArrayElement; struct GrowingArray { struct ArrayElement *inner; int elements; int space; }; typedef struct GrowingArray GrowingArray; struct State { struct Alias* aliases; struct GrowingArray variables; int num_aliases; FILE* code; FILE* input; FILE* output; bool interactive; char *ps1; }; typedef struct State State; typedef struct Alias Alias; #endif