semantics.h

Fri, 21 Feb 2003 08:49:11 +0000

author
eric
date
Fri, 21 Feb 2003 08:49:11 +0000
changeset 63
6eddf63aa517
parent 48
3d0be1c1c1b2
child 104
82cb954059c4
permissions
-rw-r--r--

GPL.

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@25 21 typedef struct
eric@25 22 {
eric@25 23 char *prefix;
eric@25 24 char style;
eric@25 25 } page_label_t;
eric@25 26
eric@18 27
eric@18 28 typedef enum
eric@18 29 {
eric@18 30 INPUT_MODIFIER_ALL,
eric@18 31 INPUT_MODIFIER_ODD,
eric@18 32 INPUT_MODIFIER_EVEN,
eric@18 33 INPUT_MODIFIER_TYPE_COUNT /* must be last */
eric@18 34 } input_modifier_type_t;
eric@18 35
eric@18 36
eric@24 37 typedef struct bookmark_t
eric@24 38 {
eric@24 39 struct bookmark_t *next;
eric@24 40 int level; /* 1 is outermost */
eric@24 41 char *name;
eric@24 42 } bookmark_t;
eric@24 43
eric@24 44
eric@20 45 extern int line; /* line number in spec file */
eric@24 46 extern int bookmark_level;
eric@16 47
eric@16 48
eric@16 49 /* semantic routines for input statements */
eric@19 50 void input_push_context (void);
eric@16 51 void input_pop_context (void);
eric@19 52 void input_set_modifier_context (input_modifier_type_t type);
eric@16 53 void input_set_file (char *name);
eric@19 54 void input_set_rotation (int rotation);
eric@32 55 void input_set_page_size (page_size_t size);
eric@20 56 void input_images (range_t range);
eric@16 57
eric@16 58 /* semantic routines for output statements */
eric@24 59 void output_push_context (void);
eric@24 60 void output_pop_context (void);
eric@30 61
eric@16 62 void output_set_file (char *name);
eric@30 63 void output_set_author (char *author);
eric@30 64 void output_set_creator (char *creator);
eric@30 65 void output_set_title (char *title);
eric@30 66 void output_set_subject (char *subject);
eric@30 67 void output_set_keywords (char *keywords);
eric@30 68
eric@20 69 void output_set_bookmark (char *name);
eric@25 70 void output_set_page_label (page_label_t label);
eric@20 71 void output_pages (range_t range);
eric@26 72
eric@26 73
eric@26 74 /* functions to be called from main program: */
eric@48 75 bool parse_spec_file (char *fn);
eric@48 76 bool process_specs (void);