semantics.c

changeset 48
3d0be1c1c1b2
parent 45
23ef95d6ff07
child 49
be20d7e8466f
     1.1 diff -r bfc6aaa089b0 -r 3d0be1c1c1b2 semantics.c
     1.2 --- a/semantics.c	Mon Aug 26 05:43:49 2002 +0000
     1.3 +++ b/semantics.c	Mon Aug 26 06:03:55 2002 +0000
     1.4 @@ -1,8 +1,9 @@
     1.5 +#include <stdbool.h>
     1.6 +#include <stdint.h>
     1.7  #include <stdlib.h>
     1.8  #include <string.h>
     1.9  #include <stdio.h>
    1.10  
    1.11 -#include "type.h"
    1.12  #include "semantics.h"
    1.13  #include "parser.tab.h"
    1.14  #include "t2p.h"
    1.15 @@ -10,13 +11,13 @@
    1.16  
    1.17  typedef struct
    1.18  {
    1.19 -  boolean has_page_size;
    1.20 +  bool has_page_size;
    1.21    page_size_t page_size;
    1.22  
    1.23 -  boolean has_rotation;
    1.24 +  bool has_rotation;
    1.25    int rotation;
    1.26  
    1.27 -  boolean has_crop;
    1.28 +  bool has_crop;
    1.29    crop_t crop;
    1.30  } input_modifiers_t;
    1.31  
    1.32 @@ -57,7 +58,7 @@
    1.33    bookmark_t *first_bookmark;
    1.34    bookmark_t *last_bookmark;
    1.35  
    1.36 -  boolean has_page_label;
    1.37 +  bool has_page_label;
    1.38    page_label_t page_label;
    1.39  } output_context_t;
    1.40  
    1.41 @@ -432,9 +433,9 @@
    1.42    exit (2);
    1.43  }
    1.44  
    1.45 -static boolean get_input_rotation (input_context_t *context,
    1.46 -				   input_modifier_type_t type,
    1.47 -				   int *rotation)
    1.48 +static bool get_input_rotation (input_context_t *context,
    1.49 +				input_modifier_type_t type,
    1.50 +				int *rotation)
    1.51  {
    1.52    for (; context; context = context->parent)
    1.53      {
    1.54 @@ -452,9 +453,9 @@
    1.55    return (0);  /* default */
    1.56  }
    1.57  
    1.58 -static boolean get_input_page_size (input_context_t *context,
    1.59 -				    input_modifier_type_t type,
    1.60 -				    page_size_t *page_size)
    1.61 +static bool get_input_page_size (input_context_t *context,
    1.62 +				 input_modifier_type_t type,
    1.63 +				 page_size_t *page_size)
    1.64  {
    1.65    for (; context; context = context->parent)
    1.66      {
    1.67 @@ -510,7 +511,7 @@
    1.68      for (i = image->range.first; i <= image->range.last; i++)
    1.69        {
    1.70  	input_modifier_type_t parity = (i % 2) ? INPUT_MODIFIER_ODD : INPUT_MODIFIER_EVEN;
    1.71 -	boolean has_rotation, has_page_size;
    1.72 +	bool has_rotation, has_page_size;
    1.73  	int rotation;
    1.74  	page_size_t page_size;
    1.75  
    1.76 @@ -571,9 +572,9 @@
    1.77  }
    1.78  
    1.79  
    1.80 -boolean parse_spec_file (char *fn)
    1.81 +bool parse_spec_file (char *fn)
    1.82  {
    1.83 -  boolean result = 0;
    1.84 +  bool result = 0;
    1.85  
    1.86    yyin = fopen (fn, "r");
    1.87    if (! yyin)
    1.88 @@ -617,7 +618,7 @@
    1.89  }
    1.90  
    1.91  
    1.92 -boolean process_specs (void)
    1.93 +bool process_specs (void)
    1.94  {
    1.95    input_image_t *image = NULL;
    1.96    output_page_t *page = NULL;