t2p.c

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