]> Creatis software - gdcm.git/commitdiff
COMP: Fix some more problem with cstring vs char*
authormalaterre <malaterre>
Sun, 4 Sep 2005 16:07:09 +0000 (16:07 +0000)
committermalaterre <malaterre>
Sun, 4 Sep 2005 16:07:09 +0000 (16:07 +0000)
src/gdcmjpegls/Decoder/decoder.c
src/gdcmjpegls/Decoder/global.c
src/gdcmjpegls/Decoder/jpegmark.c

index 463fa8d43df4a73f52d2dd5a7c08fc50d40625ee..b193724ec8206a8538dabc3580757042fab04c3d 100644 (file)
 #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,
index 89b69be3a9e65c64b62bc0a69d60dd0ae3c697b8..5ec5c37d8f0f6bb92c9836e694edf073a2343760 100644 (file)
@@ -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 */
index c6c092bc7a2a8917ba44ceb7c7563ea9688f21d9..650d858511a484a34db75dd195298963381e5f21 100644 (file)
@@ -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",