semantics.h

Mon, 31 Dec 2001 02:33:50 +0000

author
eric
date
Mon, 31 Dec 2001 02:33:50 +0000
changeset 19
e9bf1ed4f331
parent 18
3de372e4b230
child 20
a1cd8cb9d09e
permissions
-rw-r--r--

*** 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@18 21 typedef struct
eric@18 22 {
eric@18 23 boolean has_size;
eric@18 24 page_size_t size;
eric@18 25
eric@18 26 boolean has_rotation;
eric@18 27 int rotation;
eric@18 28
eric@18 29 boolean has_crop;
eric@18 30 crop_t crop;
eric@18 31 } input_modifiers_t;
eric@18 32
eric@18 33
eric@18 34 typedef enum
eric@18 35 {
eric@18 36 INPUT_MODIFIER_ALL,
eric@18 37 INPUT_MODIFIER_ODD,
eric@18 38 INPUT_MODIFIER_EVEN,
eric@18 39 INPUT_MODIFIER_TYPE_COUNT /* must be last */
eric@18 40 } input_modifier_type_t;
eric@18 41
eric@18 42
eric@18 43 typedef struct input_context_t
eric@18 44 {
eric@18 45 struct input_context_t *parent_input_context;
eric@18 46
eric@18 47 int page_count; /* how many pages reference this context,
eric@18 48 including those from subcontexts */
eric@18 49
eric@18 50 input_modifiers_t modifiers [INPUT_MODIFIER_TYPE_COUNT];
eric@18 51 } input_context_t;
eric@18 52
eric@18 53
eric@16 54 extern int line; /* line number in spec file */
eric@16 55
eric@16 56
eric@18 57 extern int input_page_count; /* total input pages in spec */
eric@18 58 extern int output_page_count; /* total output pages in spec */
eric@16 59
eric@16 60
eric@16 61 boolean parse_spec_file (char *fn);
eric@16 62
eric@16 63
eric@16 64 /* semantic routines for input statements */
eric@19 65 void input_push_context (void);
eric@16 66 void input_pop_context (void);
eric@19 67 void input_set_modifier_context (input_modifier_type_t type);
eric@16 68 void input_set_file (char *name);
eric@19 69 void input_set_rotation (int rotation);
eric@16 70 void input_images (int first, int last);
eric@16 71
eric@16 72 /* semantic routines for output statements */
eric@16 73 void output_set_file (char *name);
eric@16 74 void output_pages (int first, int last);