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