semantics.h

Sun, 30 Dec 2001 17:09:08 +0000

author
eric
date
Sun, 30 Dec 2001 17:09:08 +0000
changeset 18
3de372e4b230
parent 16
dbf5e39b1658
child 19
e9bf1ed4f331
permissions
-rw-r--r--

*** 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 enum
    22 {
    23   INPUT_CONTEXT_ALL,
    24   INPUT_CONTEXT_ODD,
    25   INPUT_CONTEXT_EVEN
    26 } input_context_type_t;
    29 typedef struct
    30 {
    31   boolean has_size;
    32   page_size_t size;
    34   boolean has_rotation;
    35   int rotation;
    37   boolean has_crop;
    38   crop_t crop;
    39 } input_modifiers_t;
    42 typedef enum
    43 {
    44   INPUT_MODIFIER_ALL,
    45   INPUT_MODIFIER_ODD,
    46   INPUT_MODIFIER_EVEN,
    47   INPUT_MODIFIER_TYPE_COUNT  /* must be last */
    48 } input_modifier_type_t;
    51 typedef struct input_context_t
    52 {
    53   struct input_context_t *parent_input_context;
    55   int page_count;  /* how many pages reference this context,
    56 		      including those from subcontexts */
    58   input_modifiers_t modifiers [INPUT_MODIFIER_TYPE_COUNT];
    59 } input_context_t;
    62 extern int line;  /* line number in spec file */
    65 extern int input_page_count;   /* total input pages in spec */
    66 extern int output_page_count;  /* total output pages in spec */
    69 boolean parse_spec_file (char *fn);
    72 /* semantic routines for input statements */
    73 void input_push_context (input_context_type_t type);
    74 void input_pop_context (void);
    75 void input_set_file (char *name);
    76 void input_images (int first, int last);
    78 /* semantic routines for output statements */
    79 void output_set_file (char *name);
    80 void output_pages (int first, int last);