diff options
Diffstat (limited to 'rdtarga.c')
-rw-r--r-- | rdtarga.c | 15 |
1 files changed, 3 insertions, 12 deletions
@@ -28,18 +28,8 @@ /* Macros to deal with unsigned chars as efficiently as compiler allows */ -#ifdef HAVE_UNSIGNED_CHAR typedef unsigned char U_CHAR; #define UCH(x) ((int)(x)) -#else /* !HAVE_UNSIGNED_CHAR */ -#ifdef __CHAR_UNSIGNED__ -typedef char U_CHAR; -#define UCH(x) ((int)(x)) -#else -typedef char U_CHAR; -#define UCH(x) ((int)(x) & 0xFF) -#endif -#endif /* HAVE_UNSIGNED_CHAR */ #define ReadOK(file, buffer, len) \ @@ -344,8 +334,9 @@ start_input_tga(j_compress_ptr cinfo, cjpeg_source_ptr sinfo) unsigned int width, height, maplen; boolean is_bottom_up; -#define GET_2B(offset) ((unsigned int)UCH(targaheader[offset]) + \ - (((unsigned int)UCH(targaheader[offset + 1])) << 8)) +#define GET_2B(offset) \ + ((unsigned int)UCH(targaheader[offset]) + \ + (((unsigned int)UCH(targaheader[offset + 1])) << 8)) if (!ReadOK(source->pub.input_file, targaheader, 18)) ERREXIT(cinfo, JERR_INPUT_EOF); |