From 7b07e674dd18635e43c6e4ccafd4a852ad845233 Mon Sep 17 00:00:00 2001 From: "bernard.xiong@gmail.com" Date: Fri, 11 Mar 2011 14:19:20 +0000 Subject: [PATCH] remove FILE using in jpeg. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1328 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- components/external/jpeg/SConscript | 63 ++++++++++++++++++++++++++++- components/external/jpeg/jconfig.h | 1 + components/external/jpeg/jerror.c | 4 +- components/external/jpeg/jmemsys.h | 2 +- components/external/jpeg/jpeglib.h | 4 +- components/external/libz/SConscript | 1 - 6 files changed, 68 insertions(+), 7 deletions(-) diff --git a/components/external/jpeg/SConscript b/components/external/jpeg/SConscript index 164a90f6a0..df092e9fa9 100644 --- a/components/external/jpeg/SConscript +++ b/components/external/jpeg/SConscript @@ -2,7 +2,7 @@ Import('RTT_ROOT') Import('rtconfig') from building import * -src = Split(''' +s = ''' jaricom.c jcomapi.c jutils.c @@ -30,7 +30,68 @@ jquant1.c jquant2.c jdmerge.c jmemnobs.c +''' + +j62 = ''' +jcomapi.c +jdapimin.c +jdapistd.c +jdcoefct.c +jdcolor.c +jddctmgr.c +jdhuff.c +jdinput.c +jdmainct.c +jdmarker.c +jdmaster.c +jdmerge.c +jdphuff.c +jdpostct.c +jdsample.c +jdtrans.c +jerror.c +jfdctflt.c +jfdctfst.c +jfdctint.c +jidctflt.c +jidctfst.c +jidctint.c +jidctred.c +jmemmgr.c +jquant1.c +jquant2.c +jutils.c +''' + +src = Split(''' +jaricom.c +jcomapi.c +jutils.c +jerror.c +jmemmgr.c +jdapimin.c +jdapistd.c +jdarith.c +jdtrans.c +jdmaster.c +jdinput.c +jdmarker.c +jdhuff.c +jdmainct.c +jdcoefct.c +jdpostct.c +jddctmgr.c +jidctfst.c +jidctflt.c +jidctint.c +jdsample.c +jdcolor.c +jquant1.c +jquant2.c +jdmerge.c +jmemnobs.c ''') + CPPPATH = [RTT_ROOT + '/components/external/jpeg'] group = DefineGroup('jpeg', src, depend = ['RTGUI_IMAGE_JPEG'], CPPPATH = CPPPATH) diff --git a/components/external/jpeg/jconfig.h b/components/external/jpeg/jconfig.h index e1cc4c3324..c165f20737 100644 --- a/components/external/jpeg/jconfig.h +++ b/components/external/jpeg/jconfig.h @@ -1,5 +1,6 @@ /* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */ /* see jconfig.txt for explanations */ +#define NO_GETENV #define HAVE_PROTOTYPES #define HAVE_UNSIGNED_CHAR diff --git a/components/external/jpeg/jerror.c b/components/external/jpeg/jerror.c index 3da7be86a0..b1cbe5d675 100644 --- a/components/external/jpeg/jerror.c +++ b/components/external/jpeg/jerror.c @@ -75,7 +75,7 @@ error_exit (j_common_ptr cinfo) /* Let the memory manager delete any temp files before we die */ jpeg_destroy(cinfo); - exit(EXIT_FAILURE); + // exit(EXIT_FAILURE); } @@ -108,7 +108,7 @@ output_message (j_common_ptr cinfo) MB_OK | MB_ICONERROR); #else /* Send it to stderr, adding a newline */ - fprintf(stderr, "%s\n", buffer); + // fprintf(stderr, "%s\n", buffer); #endif } diff --git a/components/external/jpeg/jmemsys.h b/components/external/jpeg/jmemsys.h index 6c3c6d348f..fa0594cb17 100644 --- a/components/external/jpeg/jmemsys.h +++ b/components/external/jpeg/jmemsys.h @@ -162,7 +162,7 @@ typedef struct backing_store_struct { char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */ #else /* For a typical implementation with temp files, we need: */ - FILE * temp_file; /* stdio reference to temp file */ + // FILE * temp_file; /* stdio reference to temp file */ char temp_name[TEMP_NAME_LENGTH]; /* name of temp file */ #endif #endif diff --git a/components/external/jpeg/jpeglib.h b/components/external/jpeg/jpeglib.h index 341a19c9a3..4686c8194b 100644 --- a/components/external/jpeg/jpeglib.h +++ b/components/external/jpeg/jpeglib.h @@ -935,8 +935,8 @@ EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo)); /* Standard data source and destination managers: stdio streams. */ /* Caller is responsible for opening the file before and closing after. */ -EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile)); -EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile)); +// EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile)); +// EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile)); /* Default parameter setup for compression */ EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo)); diff --git a/components/external/libz/SConscript b/components/external/libz/SConscript index 2b6aa8a664..0ab46278b8 100644 --- a/components/external/libz/SConscript +++ b/components/external/libz/SConscript @@ -7,7 +7,6 @@ adler32.c compress.c crc32.c deflate.c -gzio.c infback.c inffast.c inflate.c