tumble.c

changeset 48
3d0be1c1c1b2
parent 47
bfc6aaa089b0
child 49
be20d7e8466f
     1.1 --- a/tumble.c	Mon Aug 26 05:43:49 2002 +0000
     1.2 +++ b/tumble.c	Mon Aug 26 06:03:55 2002 +0000
     1.3 @@ -4,7 +4,7 @@
     1.4   *      will be compressed using ITU-T T.6 (G4) fax encoding.
     1.5   *
     1.6   * Main program
     1.7 - * $Id: tumble.c,v 1.18 2002/08/25 21:43:49 eric Exp $
     1.8 + * $Id: tumble.c,v 1.19 2002/08/25 22:02:31 eric Exp $
     1.9   * Copyright 2001 Eric Smith <eric@brouhaha.com>
    1.10   *
    1.11   * This program is free software; you can redistribute it and/or modify
    1.12 @@ -23,6 +23,8 @@
    1.13   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA */
    1.14  
    1.15  
    1.16 +#include <stdbool.h>
    1.17 +#include <stdint.h>
    1.18  #include <stdio.h>
    1.19  #include <stdlib.h>
    1.20  #include <unistd.h>
    1.21 @@ -33,7 +35,6 @@
    1.22  #include <panda/functions.h>
    1.23  #include <panda/constants.h>
    1.24  
    1.25 -#include "type.h"
    1.26  #include "bitblt.h"
    1.27  #include "semantics.h"
    1.28  #include "parser.tab.h"
    1.29 @@ -62,7 +63,7 @@
    1.30  /* panda_pdf *out; */
    1.31  
    1.32  
    1.33 -boolean close_tiff_input_file (void)
    1.34 +bool close_tiff_input_file (void)
    1.35  {
    1.36    if (in)
    1.37      {
    1.38 @@ -74,7 +75,7 @@
    1.39    return (1);
    1.40  }
    1.41  
    1.42 -boolean open_tiff_input_file (char *name)
    1.43 +bool open_tiff_input_file (char *name)
    1.44  {
    1.45    if (in)
    1.46      {
    1.47 @@ -99,7 +100,7 @@
    1.48  }
    1.49  
    1.50  
    1.51 -boolean close_pdf_output_files (void)
    1.52 +bool close_pdf_output_files (void)
    1.53  {
    1.54    output_file_t *o, *n;
    1.55  
    1.56 @@ -115,8 +116,8 @@
    1.57    return (1);
    1.58  }
    1.59  
    1.60 -boolean open_pdf_output_file (char *name,
    1.61 -			      pdf_file_attributes_t *attributes)
    1.62 +bool open_pdf_output_file (char *name,
    1.63 +			   pdf_file_attributes_t *attributes)
    1.64  {
    1.65    output_file_t *o;
    1.66  
    1.67 @@ -225,23 +226,23 @@
    1.68  
    1.69  #define SWAP(type,a,b) do { type temp; temp = a; a = b; b = temp; } while (0)
    1.70  
    1.71 -boolean process_page (int image,  /* range 1 .. n */
    1.72 -		      input_attributes_t input_attributes,
    1.73 -		      bookmark_t *bookmarks)
    1.74 +bool process_page (int image,  /* range 1 .. n */
    1.75 +		   input_attributes_t input_attributes,
    1.76 +		   bookmark_t *bookmarks)
    1.77  {
    1.78    int result = 0;
    1.79  
    1.80 -  u32 image_length, image_width;
    1.81 -  u32 dest_image_length, dest_image_width;
    1.82 +  uint32_t image_length, image_width;
    1.83 +  uint32_t dest_image_length, dest_image_width;
    1.84  #ifdef CHECK_DEPTH
    1.85 -  u32 image_depth;
    1.86 +  uint32_t image_depth;
    1.87  #endif
    1.88  
    1.89 -  u16 samples_per_pixel;
    1.90 -  u16 bits_per_sample;
    1.91 -  u16 planar_config;
    1.92 +  uint16_t samples_per_pixel;
    1.93 +  uint16_t bits_per_sample;
    1.94 +  uint16_t planar_config;
    1.95  
    1.96 -  u16 resolution_unit;
    1.97 +  uint16_t resolution_unit;
    1.98    float x_resolution, y_resolution;
    1.99    float dest_x_resolution, dest_y_resolution;
   1.100  
   1.101 @@ -381,7 +382,7 @@
   1.102        }
   1.103  
   1.104  #ifdef TIFF_REVERSE_BITS
   1.105 -  reverse_bits ((u8 *) bitmap->bits,
   1.106 +  reverse_bits ((uint8_t *) bitmap->bits,
   1.107  		image_length * bitmap->row_words * sizeof (word_type));
   1.108  #endif /* TIFF_REVERSE_BITS */
   1.109  
   1.110 @@ -424,7 +425,7 @@
   1.111    TIFFSetField (tiff_temp, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISWHITE);
   1.112  
   1.113  #ifdef TIFF_REVERSE_BITS
   1.114 -  reverse_bits ((u8 *) bitmap->bits,
   1.115 +  reverse_bits ((uint8_t *) bitmap->bits,
   1.116  		image_length * bitmap->row_words * sizeof (word_type));
   1.117  #endif /* TIFF_REVERSE_BITS */
   1.118