We use __CHAR_UNSIGNED__ (automatically defined by the AC_C_CHAR_UNSIGNED macro) rather than CHAR_IS_UNSIGNED (defined by custom autoconf code in libjpeg that we didn't port over), although I doubt it matters on any of the platforms we support.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1263 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
@@ -48,7 +48,7 @@
|
|||||||
* If you're not sure, leaving it undefined will work at some cost in speed.
|
* If you're not sure, leaving it undefined will work at some cost in speed.
|
||||||
* If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal.
|
* If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal.
|
||||||
*/
|
*/
|
||||||
#undef CHAR_IS_UNSIGNED
|
#undef __CHAR_UNSIGNED__
|
||||||
|
|
||||||
/* Define this if your system has an ANSI-conforming <stddef.h> file.
|
/* Define this if your system has an ANSI-conforming <stddef.h> file.
|
||||||
*/
|
*/
|
||||||
|
|||||||
2
rdbmp.c
2
rdbmp.c
@@ -35,7 +35,7 @@
|
|||||||
typedef unsigned char U_CHAR;
|
typedef unsigned char U_CHAR;
|
||||||
#define UCH(x) ((int) (x))
|
#define UCH(x) ((int) (x))
|
||||||
#else /* !HAVE_UNSIGNED_CHAR */
|
#else /* !HAVE_UNSIGNED_CHAR */
|
||||||
#ifdef CHAR_IS_UNSIGNED
|
#ifdef __CHAR_UNSIGNED__
|
||||||
typedef char U_CHAR;
|
typedef char U_CHAR;
|
||||||
#define UCH(x) ((int) (x))
|
#define UCH(x) ((int) (x))
|
||||||
#else
|
#else
|
||||||
|
|||||||
2
rdppm.c
2
rdppm.c
@@ -43,7 +43,7 @@
|
|||||||
typedef unsigned char U_CHAR;
|
typedef unsigned char U_CHAR;
|
||||||
#define UCH(x) ((int) (x))
|
#define UCH(x) ((int) (x))
|
||||||
#else /* !HAVE_UNSIGNED_CHAR */
|
#else /* !HAVE_UNSIGNED_CHAR */
|
||||||
#ifdef CHAR_IS_UNSIGNED
|
#ifdef __CHAR_UNSIGNED__
|
||||||
typedef char U_CHAR;
|
typedef char U_CHAR;
|
||||||
#define UCH(x) ((int) (x))
|
#define UCH(x) ((int) (x))
|
||||||
#else
|
#else
|
||||||
|
|||||||
12
rdtarga.c
12
rdtarga.c
@@ -28,7 +28,7 @@
|
|||||||
typedef unsigned char U_CHAR;
|
typedef unsigned char U_CHAR;
|
||||||
#define UCH(x) ((int) (x))
|
#define UCH(x) ((int) (x))
|
||||||
#else /* !HAVE_UNSIGNED_CHAR */
|
#else /* !HAVE_UNSIGNED_CHAR */
|
||||||
#ifdef CHAR_IS_UNSIGNED
|
#ifdef __CHAR_UNSIGNED__
|
||||||
typedef char U_CHAR;
|
typedef char U_CHAR;
|
||||||
#define UCH(x) ((int) (x))
|
#define UCH(x) ((int) (x))
|
||||||
#else
|
#else
|
||||||
@@ -177,7 +177,7 @@ get_8bit_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
|
|||||||
tga_source_ptr source = (tga_source_ptr) sinfo;
|
tga_source_ptr source = (tga_source_ptr) sinfo;
|
||||||
register JSAMPROW ptr;
|
register JSAMPROW ptr;
|
||||||
register JDIMENSION col;
|
register JDIMENSION col;
|
||||||
|
|
||||||
ptr = source->pub.buffer[0];
|
ptr = source->pub.buffer[0];
|
||||||
for (col = cinfo->image_width; col > 0; col--) {
|
for (col = cinfo->image_width; col > 0; col--) {
|
||||||
(*source->read_pixel) (source); /* Load next pixel into tga_pixel */
|
(*source->read_pixel) (source); /* Load next pixel into tga_pixel */
|
||||||
@@ -215,7 +215,7 @@ get_16bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
|
|||||||
register int t;
|
register int t;
|
||||||
register JSAMPROW ptr;
|
register JSAMPROW ptr;
|
||||||
register JDIMENSION col;
|
register JDIMENSION col;
|
||||||
|
|
||||||
ptr = source->pub.buffer[0];
|
ptr = source->pub.buffer[0];
|
||||||
for (col = cinfo->image_width; col > 0; col--) {
|
for (col = cinfo->image_width; col > 0; col--) {
|
||||||
(*source->read_pixel) (source); /* Load next pixel into tga_pixel */
|
(*source->read_pixel) (source); /* Load next pixel into tga_pixel */
|
||||||
@@ -242,7 +242,7 @@ get_24bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
|
|||||||
tga_source_ptr source = (tga_source_ptr) sinfo;
|
tga_source_ptr source = (tga_source_ptr) sinfo;
|
||||||
register JSAMPROW ptr;
|
register JSAMPROW ptr;
|
||||||
register JDIMENSION col;
|
register JDIMENSION col;
|
||||||
|
|
||||||
ptr = source->pub.buffer[0];
|
ptr = source->pub.buffer[0];
|
||||||
for (col = cinfo->image_width; col > 0; col--) {
|
for (col = cinfo->image_width; col > 0; col--) {
|
||||||
(*source->read_pixel) (source); /* Load next pixel into tga_pixel */
|
(*source->read_pixel) (source); /* Load next pixel into tga_pixel */
|
||||||
@@ -365,7 +365,7 @@ start_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
|
|||||||
(UCH(targaheader[16]) & 7) != 0 || /* bits/pixel must be multiple of 8 */
|
(UCH(targaheader[16]) & 7) != 0 || /* bits/pixel must be multiple of 8 */
|
||||||
interlace_type != 0) /* currently don't allow interlaced image */
|
interlace_type != 0) /* currently don't allow interlaced image */
|
||||||
ERREXIT(cinfo, JERR_TGA_BADPARMS);
|
ERREXIT(cinfo, JERR_TGA_BADPARMS);
|
||||||
|
|
||||||
if (subtype > 8) {
|
if (subtype > 8) {
|
||||||
/* It's an RLE-coded file */
|
/* It's an RLE-coded file */
|
||||||
source->read_pixel = read_rle_pixel;
|
source->read_pixel = read_rle_pixel;
|
||||||
@@ -440,7 +440,7 @@ start_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
|
|||||||
source->pub.buffer_height = 1;
|
source->pub.buffer_height = 1;
|
||||||
source->pub.get_pixel_rows = source->get_pixel_rows;
|
source->pub.get_pixel_rows = source->get_pixel_rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (idlen--) /* Throw away ID field */
|
while (idlen--) /* Throw away ID field */
|
||||||
(void) read_byte(source);
|
(void) read_byte(source);
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#define HAVE_UNSIGNED_SHORT
|
#define HAVE_UNSIGNED_SHORT
|
||||||
/* #define void char */
|
/* #define void char */
|
||||||
/* #define const */
|
/* #define const */
|
||||||
#undef CHAR_IS_UNSIGNED
|
#undef __CHAR_UNSIGNED__
|
||||||
#define HAVE_STDDEF_H
|
#define HAVE_STDDEF_H
|
||||||
#define HAVE_STDLIB_H
|
#define HAVE_STDLIB_H
|
||||||
#undef NEED_BSD_STRINGS
|
#undef NEED_BSD_STRINGS
|
||||||
|
|||||||
Reference in New Issue
Block a user