From: malaterre Date: Sun, 4 Sep 2005 16:07:09 +0000 (+0000) Subject: COMP: Fix some more problem with cstring vs char* X-Git-Tag: Version1.2.bp~138 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;ds=sidebyside;h=e04cd35be4b621ea351b50bdd5cead23555c245d;hp=ec9d6b55339b0c9dc3f3172047f6e46557db5565;p=gdcm.git COMP: Fix some more problem with cstring vs char* --- diff --git a/src/gdcmjpegls/Decoder/decoder.c b/src/gdcmjpegls/Decoder/decoder.c index 463fa8d4..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\ @@ -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, diff --git a/src/gdcmjpegls/Decoder/global.c b/src/gdcmjpegls/Decoder/global.c index 89b69be3..5ec5c37d 100644 --- a/src/gdcmjpegls/Decoder/global.c +++ b/src/gdcmjpegls/Decoder/global.c @@ -103,10 +103,6 @@ int bpp, /* bits per sample */ limit_reduce; /* reduction on above for EOR states */ -/* define color mode strings */ -char plane_int_string[] = "plane by plane", - line_int_string[] = "line intlv", - pixel_int_string[] = "sample intlv"; /* function to print out error messages */ diff --git a/src/gdcmjpegls/Decoder/jpegmark.c b/src/gdcmjpegls/Decoder/jpegmark.c index c6c092bc..650d8585 100644 --- a/src/gdcmjpegls/Decoder/jpegmark.c +++ b/src/gdcmjpegls/Decoder/jpegmark.c @@ -64,7 +64,7 @@ #endif void -check_range(int param, char *name, int low, int high) +check_range(int param, const char *name, int low, int high) { if ( param < low || param > high ) { fprintf(stderr,"Allowed range for %s is [%d..%d]: got %d\n",