Sun, 30 Dec 2001 17:09:08 +0000
*** empty log message ***
eric@18 | 1 | typedef struct |
eric@18 | 2 | { |
eric@18 | 3 | double width; |
eric@18 | 4 | double height; |
eric@18 | 5 | } page_size_t; |
eric@18 | 6 | |
eric@18 | 7 | typedef struct |
eric@18 | 8 | { |
eric@18 | 9 | int first; |
eric@18 | 10 | int last; |
eric@18 | 11 | } range_t; |
eric@18 | 12 | |
eric@18 | 13 | typedef struct |
eric@18 | 14 | { |
eric@18 | 15 | double left; |
eric@18 | 16 | double right; |
eric@18 | 17 | double top; |
eric@18 | 18 | double bottom; |
eric@18 | 19 | } crop_t; |
eric@18 | 20 | |
eric@16 | 21 | typedef enum |
eric@16 | 22 | { |
eric@16 | 23 | INPUT_CONTEXT_ALL, |
eric@16 | 24 | INPUT_CONTEXT_ODD, |
eric@16 | 25 | INPUT_CONTEXT_EVEN |
eric@16 | 26 | } input_context_type_t; |
eric@16 | 27 | |
eric@16 | 28 | |
eric@18 | 29 | typedef struct |
eric@18 | 30 | { |
eric@18 | 31 | boolean has_size; |
eric@18 | 32 | page_size_t size; |
eric@18 | 33 | |
eric@18 | 34 | boolean has_rotation; |
eric@18 | 35 | int rotation; |
eric@18 | 36 | |
eric@18 | 37 | boolean has_crop; |
eric@18 | 38 | crop_t crop; |
eric@18 | 39 | } input_modifiers_t; |
eric@18 | 40 | |
eric@18 | 41 | |
eric@18 | 42 | typedef enum |
eric@18 | 43 | { |
eric@18 | 44 | INPUT_MODIFIER_ALL, |
eric@18 | 45 | INPUT_MODIFIER_ODD, |
eric@18 | 46 | INPUT_MODIFIER_EVEN, |
eric@18 | 47 | INPUT_MODIFIER_TYPE_COUNT /* must be last */ |
eric@18 | 48 | } input_modifier_type_t; |
eric@18 | 49 | |
eric@18 | 50 | |
eric@18 | 51 | typedef struct input_context_t |
eric@18 | 52 | { |
eric@18 | 53 | struct input_context_t *parent_input_context; |
eric@18 | 54 | |
eric@18 | 55 | int page_count; /* how many pages reference this context, |
eric@18 | 56 | including those from subcontexts */ |
eric@18 | 57 | |
eric@18 | 58 | input_modifiers_t modifiers [INPUT_MODIFIER_TYPE_COUNT]; |
eric@18 | 59 | } input_context_t; |
eric@18 | 60 | |
eric@18 | 61 | |
eric@16 | 62 | extern int line; /* line number in spec file */ |
eric@16 | 63 | |
eric@16 | 64 | |
eric@18 | 65 | extern int input_page_count; /* total input pages in spec */ |
eric@18 | 66 | extern int output_page_count; /* total output pages in spec */ |
eric@16 | 67 | |
eric@16 | 68 | |
eric@16 | 69 | boolean parse_spec_file (char *fn); |
eric@16 | 70 | |
eric@16 | 71 | |
eric@16 | 72 | /* semantic routines for input statements */ |
eric@16 | 73 | void input_push_context (input_context_type_t type); |
eric@16 | 74 | void input_pop_context (void); |
eric@16 | 75 | void input_set_file (char *name); |
eric@16 | 76 | void input_images (int first, int last); |
eric@16 | 77 | |
eric@16 | 78 | /* semantic routines for output statements */ |
eric@16 | 79 | void output_set_file (char *name); |
eric@16 | 80 | void output_pages (int first, int last); |