1.1 diff -r e9bf1ed4f331 -r a1cd8cb9d09e semantics.h 1.2 --- a/semantics.h Mon Dec 31 02:33:50 2001 +0000 1.3 +++ b/semantics.h Mon Dec 31 07:25:08 2001 +0000 1.4 @@ -42,20 +42,58 @@ 1.5 1.6 typedef struct input_context_t 1.7 { 1.8 - struct input_context_t *parent_input_context; 1.9 + struct input_context_t *parent; 1.10 + struct input_context_t *next; 1.11 1.12 - int page_count; /* how many pages reference this context, 1.13 + int image_count; /* how many pages reference this context, 1.14 including those from subcontexts */ 1.15 1.16 + char *input_file; 1.17 + 1.18 input_modifiers_t modifiers [INPUT_MODIFIER_TYPE_COUNT]; 1.19 } input_context_t; 1.20 1.21 1.22 -extern int line; /* line number in spec file */ 1.23 +typedef struct input_image_t 1.24 +{ 1.25 + struct input_image_t *next; 1.26 + input_context_t *input_context; 1.27 + range_t range; 1.28 +} input_image_t; 1.29 + 1.30 + 1.31 +typedef struct bookmark_t 1.32 +{ 1.33 + struct bookmark_t *next; 1.34 + char *name; 1.35 +} bookmark_t; 1.36 1.37 1.38 -extern int input_page_count; /* total input pages in spec */ 1.39 -extern int output_page_count; /* total output pages in spec */ 1.40 +typedef struct output_context_t 1.41 +{ 1.42 + struct output_context_t *parent; 1.43 + struct output_context_t *next; 1.44 + 1.45 + int page_count; /* how many pages reference this context, 1.46 + including those from subcontexts */ 1.47 + 1.48 + char *output_file; 1.49 + bookmark_t *first_bookmark; 1.50 + bookmark_t *last_bookmark; 1.51 + char *page_number_format; 1.52 +} output_context_t; 1.53 + 1.54 + 1.55 +typedef struct output_page_t 1.56 +{ 1.57 + struct output_page_t *next; 1.58 + output_context_t *output_context; 1.59 + range_t range; 1.60 + bookmark_t *bookmark_list; 1.61 +} output_page_t; 1.62 + 1.63 + 1.64 +extern int line; /* line number in spec file */ 1.65 1.66 1.67 boolean parse_spec_file (char *fn); 1.68 @@ -67,8 +105,10 @@ 1.69 void input_set_modifier_context (input_modifier_type_t type); 1.70 void input_set_file (char *name); 1.71 void input_set_rotation (int rotation); 1.72 -void input_images (int first, int last); 1.73 +void input_images (range_t range); 1.74 1.75 /* semantic routines for output statements */ 1.76 void output_set_file (char *name); 1.77 -void output_pages (int first, int last); 1.78 +void output_set_bookmark (char *name); 1.79 +void output_set_page_number_format (char *format); 1.80 +void output_pages (range_t range);