From e04cd35be4b621ea351b50bdd5cead23555c245d Mon Sep 17 00:00:00 2001 From: malaterre Date: Sun, 4 Sep 2005 16:07:09 +0000 Subject: [PATCH 1/1] COMP: Fix some more problem with cstring vs char* --- src/gdcmjpegls/Decoder/decoder.c | 13 +++++++++---- src/gdcmjpegls/Decoder/global.c | 4 ---- src/gdcmjpegls/Decoder/jpegmark.c | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) 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", -- 2.45.2