]> git.saurik.com Git - wxWidgets.git/blobdiff - src/tiff/tools/bmp2tiff.c
Don't generate any events from wxSpinCtrl and wxSpinCtrlDouble methods.
[wxWidgets.git] / src / tiff / tools / bmp2tiff.c
index 08d991754811723bb515d6ec196e0e5ffc4c8e34..1c9443432b5ff0733ef1fe75faf8ccb6b8b4c0c2 100644 (file)
@@ -1,4 +1,3 @@
-/* $Id$
  *
  * Project:  libtiff tools
  * Purpose:  Convert Windows BMP files in TIFF.
 # include <io.h>
 #endif
 
+#ifdef NEED_LIBPORT
+# include "libport.h"
+#endif
+
 #include "tiffio.h"
 
 #ifndef O_BINARY
@@ -428,7 +431,7 @@ main(int argc, char* argv[])
                                read(fd, clr_tbl, n_clr_elems * clr_tbl_size);
 
                                red_tbl = (unsigned short*)
-                                       _TIFFmalloc(1<<depth * sizeof(unsigned short));
+                                       _TIFFmalloc(((tmsize_t)1)<<depth * sizeof(unsigned short));
                                if (!red_tbl) {
                                        TIFFError(infilename,
                                "Can't allocate space for red component table");
@@ -436,7 +439,7 @@ main(int argc, char* argv[])
                                        goto bad1;
                                }
                                green_tbl = (unsigned short*)
-                                       _TIFFmalloc(1<<depth * sizeof(unsigned short));
+                                       _TIFFmalloc(((tmsize_t)1)<<depth * sizeof(unsigned short));
                                if (!green_tbl) {
                                        TIFFError(infilename,
                                "Can't allocate space for green component table");
@@ -444,7 +447,7 @@ main(int argc, char* argv[])
                                        goto bad2;
                                }
                                blue_tbl = (unsigned short*)
-                                       _TIFFmalloc(1<<depth * sizeof(unsigned short));
+                                       _TIFFmalloc(((tmsize_t)1)<<depth * sizeof(unsigned short));
                                if (!blue_tbl) {
                                        TIFFError(infilename,
                                "Can't allocate space for blue component table");
@@ -841,3 +844,10 @@ usage(void)
 }
 
 /* vim: set ts=8 sts=8 sw=8 noet: */
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 8
+ * fill-column: 78
+ * End:
+ */