- int bmWidth;
- int bmHeight;
- unsigned char bmPlanes;
- unsigned char bmBitsPixel;
- unsigned char m1,m2;
- unsigned long sizeimage;
- short res1,res2;
- long filesize, pixoff;
- long bmisize, compression;
- long xscale, yscale;
- long colors, impcol;
- unsigned long m_bytesRead = 0;
+#define INVALID_FORMAT do{\
+ fprintf(stderr,"%s:%d: Error file '%s' is malformed.\n",__FILE__,__LINE__,gbmp.name);\
+ fclose(fp);\
+ return NULL;\
+}while(0);
+
+ int32_t bmWidth;
+ int32_t bmHeight;
+ uint16_t bmPlanes;
+ uint16_t bmBitsPixel;
+ uint8_t m1,m2;
+ uint32_t sizeimage;
+ int16_t res1,res2;
+ int32_t filesize, pixoff;
+ int32_t bmisize, compression;
+ int32_t xscale, yscale;
+ int32_t colors, impcol;
+ uint32_t m_bytesRead = 0;