summaryrefslogtreecommitdiff
path: root/rdtarga.c
diff options
context:
space:
mode:
Diffstat (limited to 'rdtarga.c')
-rw-r--r--rdtarga.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/rdtarga.c b/rdtarga.c
index 37bd286..c17073f 100644
--- a/rdtarga.c
+++ b/rdtarga.c
@@ -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);