1.1 diff -r d4699dfddcc0 -r 3de372e4b230 semantics.h 1.2 --- a/semantics.h Sun Dec 30 16:29:50 2001 +0000 1.3 +++ b/semantics.h Sun Dec 30 17:09:08 2001 +0000 1.4 @@ -1,3 +1,23 @@ 1.5 +typedef struct 1.6 +{ 1.7 + double width; 1.8 + double height; 1.9 +} page_size_t; 1.10 + 1.11 +typedef struct 1.12 +{ 1.13 + int first; 1.14 + int last; 1.15 + } range_t; 1.16 + 1.17 +typedef struct 1.18 +{ 1.19 + double left; 1.20 + double right; 1.21 + double top; 1.22 + double bottom; 1.23 +} crop_t; 1.24 + 1.25 typedef enum 1.26 { 1.27 INPUT_CONTEXT_ALL, 1.28 @@ -6,11 +26,44 @@ 1.29 } input_context_type_t; 1.30 1.31 1.32 +typedef struct 1.33 +{ 1.34 + boolean has_size; 1.35 + page_size_t size; 1.36 + 1.37 + boolean has_rotation; 1.38 + int rotation; 1.39 + 1.40 + boolean has_crop; 1.41 + crop_t crop; 1.42 +} input_modifiers_t; 1.43 + 1.44 + 1.45 +typedef enum 1.46 +{ 1.47 + INPUT_MODIFIER_ALL, 1.48 + INPUT_MODIFIER_ODD, 1.49 + INPUT_MODIFIER_EVEN, 1.50 + INPUT_MODIFIER_TYPE_COUNT /* must be last */ 1.51 +} input_modifier_type_t; 1.52 + 1.53 + 1.54 +typedef struct input_context_t 1.55 +{ 1.56 + struct input_context_t *parent_input_context; 1.57 + 1.58 + int page_count; /* how many pages reference this context, 1.59 + including those from subcontexts */ 1.60 + 1.61 + input_modifiers_t modifiers [INPUT_MODIFIER_TYPE_COUNT]; 1.62 +} input_context_t; 1.63 + 1.64 + 1.65 extern int line; /* line number in spec file */ 1.66 1.67 1.68 -extern int input_count; /* total input pages in spec */ 1.69 -extern int output_count; /* total output pages in spec */ 1.70 +extern int input_page_count; /* total input pages in spec */ 1.71 +extern int output_page_count; /* total output pages in spec */ 1.72 1.73 1.74 boolean parse_spec_file (char *fn);