1.1 --- a/pdf_prim.c Thu Feb 20 12:21:10 2003 +0000 1.2 +++ b/pdf_prim.c Thu Feb 20 12:44:17 2003 +0000 1.3 @@ -1,7 +1,36 @@ 1.4 +/* 1.5 + * t2p: Create a PDF file from the contents of one or more TIFF 1.6 + * bilevel image files. The images in the resulting PDF file 1.7 + * will be compressed using ITU-T T.6 (G4) fax encoding. 1.8 + * 1.9 + * PDF routines 1.10 + * $Id: pdf_prim.c,v 1.3 2003/02/20 04:44:17 eric Exp $ 1.11 + * Copyright 2001, 2002, 2003 Eric Smith <eric@brouhaha.com> 1.12 + * 1.13 + * This program is free software; you can redistribute it and/or modify 1.14 + * it under the terms of the GNU General Public License version 2 as 1.15 + * published by the Free Software Foundation. Note that permission is 1.16 + * not granted to redistribute this program under the terms of any 1.17 + * other version of the General Public License. 1.18 + * 1.19 + * This program is distributed in the hope that it will be useful, 1.20 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 1.21 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1.22 + * GNU General Public License for more details. 1.23 + * 1.24 + * You should have received a copy of the GNU General Public License 1.25 + * along with this program; if not, write to the Free Software 1.26 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA 1.27 + */ 1.28 + 1.29 + 1.30 +#include <stdbool.h> 1.31 +#include <stdint.h> 1.32 #include <stdio.h> 1.33 #include <stdlib.h> 1.34 #include <string.h> 1.35 1.36 +#include "bitblt.h" 1.37 #include "pdf.h" 1.38 #include "pdf_util.h" 1.39 #include "pdf_prim.h" 1.40 @@ -60,7 +89,7 @@ 1.41 unsigned long ref_count; 1.42 pdf_obj_type type; 1.43 union { 1.44 - int bool; 1.45 + bool boolean; 1.46 char *name; 1.47 char *string; 1.48 unsigned long integer; 1.49 @@ -170,10 +199,10 @@ 1.50 } 1.51 1.52 1.53 -struct pdf_obj *pdf_new_bool (int bool) 1.54 +struct pdf_obj *pdf_new_bool (bool val) 1.55 { 1.56 struct pdf_obj *obj = pdf_new_obj (PT_BOOL); 1.57 - obj->val.bool = bool; 1.58 + obj->val.boolean = val; 1.59 return (obj); 1.60 } 1.61 1.62 @@ -450,7 +479,7 @@ 1.63 fprintf (pdf_file->f, "null "); 1.64 break; 1.65 case PT_BOOL: 1.66 - if (obj->val.bool) 1.67 + if (obj->val.boolean) 1.68 fprintf (pdf_file->f, "true "); 1.69 else 1.70 fprintf (pdf_file->f, "false ");