summaryrefslogtreecommitdiff
path: root/tiff/libtiff/mkg3states.c
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2022-05-10 17:05:54 +0100
committerChris Liddell <chris.liddell@artifex.com>2022-05-11 09:33:06 +0100
commitb6d377080747ed63f2742bcd9c32bc67255626a1 (patch)
tree1abfea68f4ea1b2bd2196f5907ca0b83accaf0a5 /tiff/libtiff/mkg3states.c
parent73c17cef9cc0be38219f533a98e35e0d693c3821 (diff)
downloadghostpdl-b6d377080747ed63f2742bcd9c32bc67255626a1.tar.gz
Update libtiff to 4.3.0
Changes to libtiff for gpdl. 1) Ensure that libtiff doesn't mess with 'boolean' in GS builds on Windows. Without this, the jpeg structures used by our JPEG lib build are different in size when called from gs and libtiff, resulting in runtime errors. 2) Update libtiff so that it can correctly call into the jpeg library so that memory operations happen from our pools, not malloc/free. Slightly horrid in that this is more complex with OJPEG than JPEG files. Fix some compiler warnings stemming from libtiff update Various tweaks for libtiff 4.3.0 to build on Windows Mainly "importing" tif_config.vc.h and tiffconf.vc.h - the tiff build now created those with cmake. Then typedef'ing several C99 ***_t style types. Finally defining matching C99 PRI* printf formatting macros
Diffstat (limited to 'tiff/libtiff/mkg3states.c')
-rw-r--r--tiff/libtiff/mkg3states.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/tiff/libtiff/mkg3states.c b/tiff/libtiff/mkg3states.c
index 2cb9174c6..44653255a 100644
--- a/tiff/libtiff/mkg3states.c
+++ b/tiff/libtiff/mkg3states.c
@@ -28,6 +28,7 @@
* Copyright (C) 1990, 1995 Frank D. Cringle.
*/
#include "tif_config.h"
+#include "libport.h"
#include <stdio.h>
#include <stdlib.h>
@@ -39,10 +40,6 @@
#include "tif_fax3.h"
-#ifndef HAVE_GETOPT
-extern int getopt(int argc, char * const argv[], const char *optstring);
-#endif
-
#define streq(a,b) (strcmp(a,b) == 0)
/* NB: can't use names in tif_fax3.h 'cuz they are declared const */
@@ -51,8 +48,8 @@ TIFFFaxTabEnt WhiteTable[4096];
TIFFFaxTabEnt BlackTable[8192];
struct proto {
- uint16 code; /* right justified, lsb-first, zero filled */
- uint16 val; /* (pixel count)<<4 + code width */
+ uint16_t code; /* right justified, lsb-first, zero filled */
+ uint16_t val; /* (pixel count)<<4 + code width */
};
static struct proto Pass[] = {
@@ -433,11 +430,19 @@ main(int argc, char* argv[])
fprintf(fd, "/* WARNING, this file was automatically generated by the\n");
fprintf(fd, " mkg3states program */\n");
+ fprintf(fd, "#include <stdint.h>\n");
fprintf(fd, "#include \"tiff.h\"\n");
fprintf(fd, "#include \"tif_fax3.h\"\n");
WriteTable(fd, MainTable, 128, "TIFFFaxMainTable");
WriteTable(fd, WhiteTable, 4096, "TIFFFaxWhiteTable");
WriteTable(fd, BlackTable, 8192, "TIFFFaxBlackTable");
+ fprintf(fd, "/*\n"
+ " * Local Variables:\n"
+ " * mode: c\n"
+ " * c-basic-offset: 8\n"
+ " * fill-column: 78\n"
+ " * End:\n"
+ " */\n");
fclose(fd);
return (0);
}