Mon, 31 Dec 2001 02:33:50 +0000
*** empty log message ***
1 typedef struct
2 {
3 double width;
4 double height;
5 } page_size_t;
7 typedef struct
8 {
9 int first;
10 int last;
11 } range_t;
13 typedef struct
14 {
15 double left;
16 double right;
17 double top;
18 double bottom;
19 } crop_t;
21 typedef struct
22 {
23 boolean has_size;
24 page_size_t size;
26 boolean has_rotation;
27 int rotation;
29 boolean has_crop;
30 crop_t crop;
31 } input_modifiers_t;
34 typedef enum
35 {
36 INPUT_MODIFIER_ALL,
37 INPUT_MODIFIER_ODD,
38 INPUT_MODIFIER_EVEN,
39 INPUT_MODIFIER_TYPE_COUNT /* must be last */
40 } input_modifier_type_t;
43 typedef struct input_context_t
44 {
45 struct input_context_t *parent_input_context;
47 int page_count; /* how many pages reference this context,
48 including those from subcontexts */
50 input_modifiers_t modifiers [INPUT_MODIFIER_TYPE_COUNT];
51 } input_context_t;
54 extern int line; /* line number in spec file */
57 extern int input_page_count; /* total input pages in spec */
58 extern int output_page_count; /* total output pages in spec */
61 boolean parse_spec_file (char *fn);
64 /* semantic routines for input statements */
65 void input_push_context (void);
66 void input_pop_context (void);
67 void input_set_modifier_context (input_modifier_type_t type);
68 void input_set_file (char *name);
69 void input_set_rotation (int rotation);
70 void input_images (int first, int last);
72 /* semantic routines for output statements */
73 void output_set_file (char *name);
74 void output_pages (int first, int last);