]> git.saurik.com Git - wxWidgets.git/blobdiff - src/tiff/tools/fax2tiff.c
Fix problem with COMDLG_FILTERSPEC declaration with MinGW-w64 4.8.
[wxWidgets.git] / src / tiff / tools / fax2tiff.c
index f724180c6ce3e06f236aad729cc5523fbc41be6a..76e57f156703a2bade113f82947ad28159558a8e 100644 (file)
@@ -1,4 +1,3 @@
-/* $Id$ */
 
 /*
  * Copyright (c) 1990-1997 Sam Leffler
 # include <io.h>
 #endif
 
-#include "tiffiop.h"
-
-#ifndef BINMODE
-# define       BINMODE
+#ifdef NEED_LIBPORT
+# include "libport.h"
 #endif
 
+#include "tiffiop.h"
+
 #ifndef EXIT_SUCCESS
 # define EXIT_SUCCESS  0
 #endif
@@ -258,7 +257,7 @@ main(int argc, char* argv[])
        else if (compression_in == COMPRESSION_CCITTFAX4)
                TIFFSetField(faxTIFF, TIFFTAG_GROUP4OPTIONS, group4options_in);
        for (pn = 0; optind < argc; pn++, optind++) {
-               in = fopen(argv[optind], "r" BINMODE);
+               in = fopen(argv[optind], "rb");
                if (in == NULL) {
                        fprintf(stderr,
                            "%s: %s: Can not open\n", argv[0], argv[optind]);
@@ -351,7 +350,7 @@ copyFaxFile(TIFF* tifin, TIFF* tifout)
        uint16 badrun;
        int ok;
 
-       tifin->tif_rawdatasize = TIFFGetFileSize(tifin);
+       tifin->tif_rawdatasize = (tmsize_t)TIFFGetFileSize(tifin);
        tifin->tif_rawdata = _TIFFmalloc(tifin->tif_rawdatasize);
        if (tifin->tif_rawdata == NULL) {
                TIFFError(tifin->tif_name, "Not enough memory");
@@ -460,3 +459,10 @@ usage(void)
 }
 
 /* vim: set ts=8 sts=8 sw=8 noet: */
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 8
+ * fill-column: 78
+ * End:
+ */