]> Creatis software - gdcm.git/commitdiff
COMP: People really don't know what is the difference between cstring and char*
authormalaterre <malaterre>
Sun, 4 Sep 2005 15:51:46 +0000 (15:51 +0000)
committermalaterre <malaterre>
Sun, 4 Sep 2005 15:51:46 +0000 (15:51 +0000)
src/gdcmjpegls/Decoder/global.c
src/gdcmjpegls/Decoder/global.h

index 768a3ead7a4e3ec1148bc20bc8ff2f295e9c79f5..89b69be3a9e65c64b62bc0a69d60dd0ae3c697b8 100644 (file)
@@ -60,7 +60,7 @@
 
 
 
-char *disclaimer = "\
+char disclaimer[] = "\
 This program is Copyright (c) University of British Columbia.\n\
 All rights reserved. It may be freely redistributed in its\n\
 entirety provided that this copyright notice is not removed.\n\
@@ -104,13 +104,13 @@ int bpp,    /* bits per sample */
 
 
 /* define color mode strings */
-char *plane_int_string = "plane by plane",
-   *line_int_string = "line intlv",
-   *pixel_int_string = "sample intlv";
+char plane_int_string[] = "plane by plane",
+   line_int_string[] = "line intlv",
+   pixel_int_string[] = "sample intlv";
 
 
 /* function to print out error messages */
-void error(char *msg) {
+void error(const char *msg) {
   fprintf(stderr, msg);
   exit(-1);
 }
@@ -326,7 +326,7 @@ void check_compatibility(jpeg_ls_header *head_frame, jpeg_ls_header *head_scan,
 
 /* for writing disclaimer to command line in DOS */
 
-char *ttyfilename = "CON";
+char ttyfilename[] = "CON";
 
 #define PAUSE  20
 
index e7412bd05b2c59233fd10da17eda001d6d396f71..6bf1206d49b77984582e574e66391d973ac0836e 100644 (file)
 
 #define DEFAULT_COLOR_MODE LINE_INT
 
-extern char  *plane_int_string,
-      *line_int_string,
-      *pixel_int_string;
-
 
 #ifndef BIG_ENDIAN
 #define BIG_ENDIAN  1
@@ -151,8 +147,6 @@ extern int  sampling[MAX_COMPONENTS];
 #define RIGHTMARGIN  1
 
 
-extern char *disclaimer;
-
 
 /* alphabet size */
 #define MAXA8 (256)
@@ -334,7 +328,7 @@ extern int  N[TOT_CONTEXTS],
 /****** Function prototypes */
 
 /* global.c */
-void error(char *msg);
+void error(const char *msg);
 void *safealloc(size_t size);
 void *safecalloc(size_t numels, size_t size);
 double get_utime();