semantics.h

changeset 18
3de372e4b230
parent 16
dbf5e39b1658
child 19
e9bf1ed4f331
     1.1 --- a/semantics.h	Sun Dec 30 16:29:50 2001 +0000
     1.2 +++ b/semantics.h	Sun Dec 30 17:09:08 2001 +0000
     1.3 @@ -1,3 +1,23 @@
     1.4 +typedef struct 
     1.5 +{
     1.6 +  double width;
     1.7 +  double height;
     1.8 +} page_size_t;
     1.9 +
    1.10 +typedef struct
    1.11 +{
    1.12 +  int first; 
    1.13 +  int last;
    1.14 + } range_t;
    1.15 +
    1.16 +typedef struct
    1.17 +{
    1.18 +  double left;
    1.19 +  double right;
    1.20 +  double top;
    1.21 +  double bottom;
    1.22 +} crop_t;
    1.23 +
    1.24  typedef enum
    1.25  {
    1.26    INPUT_CONTEXT_ALL,
    1.27 @@ -6,11 +26,44 @@
    1.28  } input_context_type_t;
    1.29  
    1.30  
    1.31 +typedef struct
    1.32 +{
    1.33 +  boolean has_size;
    1.34 +  page_size_t size;
    1.35 +
    1.36 +  boolean has_rotation;
    1.37 +  int rotation;
    1.38 +
    1.39 +  boolean has_crop;
    1.40 +  crop_t crop;
    1.41 +} input_modifiers_t;
    1.42 +
    1.43 +
    1.44 +typedef enum
    1.45 +{
    1.46 +  INPUT_MODIFIER_ALL,
    1.47 +  INPUT_MODIFIER_ODD,
    1.48 +  INPUT_MODIFIER_EVEN,
    1.49 +  INPUT_MODIFIER_TYPE_COUNT  /* must be last */
    1.50 +} input_modifier_type_t;
    1.51 +
    1.52 +
    1.53 +typedef struct input_context_t
    1.54 +{
    1.55 +  struct input_context_t *parent_input_context;
    1.56 +
    1.57 +  int page_count;  /* how many pages reference this context,
    1.58 +		      including those from subcontexts */
    1.59 +
    1.60 +  input_modifiers_t modifiers [INPUT_MODIFIER_TYPE_COUNT];
    1.61 +} input_context_t;
    1.62 +
    1.63 +
    1.64  extern int line;  /* line number in spec file */
    1.65  
    1.66  
    1.67 -extern int input_count;   /* total input pages in spec */
    1.68 -extern int output_count;  /* total output pages in spec */
    1.69 +extern int input_page_count;   /* total input pages in spec */
    1.70 +extern int output_page_count;  /* total output pages in spec */
    1.71  
    1.72  
    1.73  boolean parse_spec_file (char *fn);