X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2Fgdcmjpegls%2FDecoder%2Fdecoder.c;h=b193724ec8206a8538dabc3580757042fab04c3d;hb=88d681d129a1e8b361c75a0d4f246f68b39db1b9;hp=afdf4799d871ed12efc22c70d66be83d538f899f;hpb=0e7335260978504ed389d17c6785eef506707ed4;p=gdcm.git diff --git a/src/gdcmjpegls/Decoder/decoder.c b/src/gdcmjpegls/Decoder/decoder.c index afdf4799..b193724e 100644 --- a/src/gdcmjpegls/Decoder/decoder.c +++ b/src/gdcmjpegls/Decoder/decoder.c @@ -58,7 +58,12 @@ #define PGMNAME PGMPREFIX "d" #define EPGMNAME PGMPREFIX "e" -static char *banner="\n\ +/* define color mode strings */ +char plane_int_string[] = "plane by plane", + line_int_string[] = "line intlv", + pixel_int_string[] = "sample intlv"; + +static char banner[]="\n\ =============================================\n\ SPMG/JPEG-LS DECOMPRESSOR " JPEGLSVERSION "\n\ =============================================\n\ @@ -118,8 +123,8 @@ int alpha, /* alphabet size */ int highmask; #endif -void usage(); +void usage(); @@ -138,7 +143,7 @@ inline void write_one_line(pixel* line, int cols, FILE* outfile) line8 = (unsigned char*)safealloc(cols); for (i=0; i< cols; i++) - *(line8+i)=ENDIAN8(*(line+i)); + *(line8+i)=(unsigned char)ENDIAN8(*(line+i)); fwrite(line8, sizeof(unsigned char), cols, outfile); @@ -302,9 +307,9 @@ void closebuffers(int multi) /* command line argument parsing */ int initialize(int argc, char *argv[]) { - char *infilename = NULL, - *outfilename = OUTFILE ".out", - *c_outfilename[MAX_COMPONENTS], + char *infilename = NULL; + const char *outfilename = OUTFILE ".out"; + char *c_outfilename[MAX_COMPONENTS], *color_mode_string; int i, max_samp_columns, max_samp_rows, mk, n_s, end_of_seek=0, @@ -316,7 +321,7 @@ int initialize(int argc, char *argv[]) int pos; /* position in the file, after the header */ for (i=0;i