]> Creatis software - gdcm.git/commitdiff
COMP: Fixing warnings on bcc32
authormalaterre <malaterre>
Thu, 9 Jun 2005 21:42:45 +0000 (21:42 +0000)
committermalaterre <malaterre>
Thu, 9 Jun 2005 21:42:45 +0000 (21:42 +0000)
src/gdcmjpegls/Decoder/CMakeLists.txt
src/gdcmjpegls/Decoder/decoder.c
src/gdcmjpegls/Decoder/lossy_d.c
src/gdcmjpegls/Encoder/CMakeLists.txt

index 35f9baebc86e666a92fcad423a4e52d29b956574..641f75ddc2dcae4e842abdc8a08c626643fc64ee 100644 (file)
@@ -13,5 +13,6 @@ SET(GDCMJPEGLS_SRCS
   melcode.c)
 
 ADD_LIBRARY(gdcmjpegls ${GDCMJPEGLS_SRCS})
+#ADD_EXECUTABLE(locod ${GDCMJPEGLS_SRCS})
 
 # TODO must do the INSTALL_ blah thing
index 0343c0899e135239214917f34775026945651cb9..16a88c00b4c274289ea16d5b741c5cc8ddb70bac 100644 (file)
@@ -127,7 +127,6 @@ void usage();
 /* Write one row of pixel values */
 inline void write_one_line(pixel* line, int cols, FILE* outfile)
 {
-
   int i, index;
   unsigned int* maptable;
       
@@ -227,7 +226,8 @@ inline void write_one_line(pixel* line, int cols, FILE* outfile)
 
 
 
-void initbuffers(int multi, int comp) {
+void initbuffers(int multi, int comp)
+{
 
   int  i;
 
@@ -282,25 +282,26 @@ void c_swaplines(int i)
   c_cscanline[i] = c_cscanl0[i] + (LEFTMARGIN-1);
 }
 
-void closebuffers(int multi) {
+void closebuffers(int multi)
+{
 
-  int     i;
+  int i;
 
   fclose(in);
   if (multi==0)
-     fclose(out);
-        else
-           for (i=0;i<components;i++)
-         fclose(c_out[i]);
+    fclose(out);
+  else
+    for (i=0;i<components;i++)
+      fclose(c_out[i]);
 
-        free(pscanl0);
-        free(cscanl0);
+  free(pscanl0);
+  free(cscanl0);
 }
 
 
-
-
-int initialize(int argc, char *argv[]) {
+/* command line argument parsing */
+int initialize(int argc, char *argv[])
+{
   char *infilename = NULL,
     *outfilename = OUTFILE ".out",
     *c_outfilename[MAX_COMPONENTS],
@@ -1481,33 +1482,33 @@ int main (int argc, char *argv[]) {
 void usage()
 {
   fprintf(stderr,"Usage: %s [flags] [infile] [outfile1 [outfile2, ...]]\n\
-DEFAULTS:\n\
-infile   = %s.\n\
-outfile1 = %s for color image in a single (PPM) output file.\n\
-outfile1 = %s for monochrome image in a single (PGM) output file.\n\
-outfile[1,2,...] = %s for multiple (PGM) output files \n\
-     in plane or line interleaved modes.\n",
+    DEFAULTS:\n\
+    infile   = %s.\n\
+    outfile1 = %s for color image in a single (PPM) output file.\n\
+    outfile1 = %s for monochrome image in a single (PGM) output file.\n\
+    outfile[1,2,...] = %s for multiple (PGM) output files \n\
+    in plane or line interleaved modes.\n",
     "locod", "specified JLS file", OUTFILE ".out", 
     OUTFILE "1.out",
     OUTFILE "[1,2,...].out");
-fprintf(stderr,"FLAGS:\n\
-outfile2, ... : Multiple output specification for plane or line int. mode.\n\
--i<infile>    : Alternate input specification, use -i- for stdin.\n\
--o<outfile>   : Alternate output specification, use -o- for stdout.\n\
--P            : Generate single (.ppm) output file for sample/line int. mode.\n\
-");
-    fprintf(stderr,"\
--h            : Print this help.\n\
-*** No spaces allowed between a flag and its argument.\n\
-");
+  fprintf(stderr,"FLAGS:\n\
+    outfile2, ... : Multiple output specification for plane or line int. mode.\n\
+    -i<infile>    : Alternate input specification, use -i- for stdin.\n\
+    -o<outfile>   : Alternate output specification, use -o- for stdout.\n\
+    -P            : Generate single (.ppm) output file for sample/line int. mode.\n\
+    ");
+  fprintf(stderr,"\
+    -h            : Print this help.\n\
+    *** No spaces allowed between a flag and its argument.\n\
+    ");
   
 }
 
 
 void bad_flag(char *s)
 {
-    fprintf(stderr,"Bad flag %s\n",s);
-    usage();
-    exit(10);
+  fprintf(stderr,"Bad flag %s\n",s);
+  usage();
+  exit(10);
 }
 
index 113080141b38f6dc39c7fe379d53bcaf8a9c14ee..a84c4c9dc14bfd41da3a918cef0b9dc2a44b2f4e 100644 (file)
@@ -311,14 +311,12 @@ int lossy_undoscanline(  pixel *psl,      /* previous scanline */
 /*** watch it! actual pixels in the scan line are numbered 1 to no .
      pixels with indices < 1 or > no are dummy "border" pixels  */
 {
-  int i, psfix;
+  int i;
   pixel Ra, Rb, Rc, Rd;
   int SIGN;
   int cont;
   int run_int_type;
 
-  psfix = 0;
-
   /**********************************************/
   /* Do for all pixels in the row in 8-bit mode */
   /**********************************************/
@@ -517,7 +515,7 @@ int lossy_undoscanline_pixel(  pixel *psl,    /* previous scanline */
 /*** watch it! actual pixels in the scan line are numbered 1 to no .
      pixels with indices < 1 or > no are dummy "border" pixels  */
 {
-  int i, psfix, n_c, color, enter_run=0, was_in_run = 0,
+  int i, n_c, color, was_in_run = 0,
       test_run;
   pixel Ra, Rb, Rc, Rd;
   pixel c_aa[MAX_COMPONENTS],
@@ -528,8 +526,6 @@ int lossy_undoscanline_pixel(  pixel *psl,    /* previous scanline */
   int  SIGN;
   int cont,c_cont[MAX_COMPONENTS];
 
-  psfix = 0;
-
 
   /**********************************************/
   /* Do for all pixels in the row in 8-bit mode */
@@ -569,7 +565,7 @@ int lossy_undoscanline_pixel(  pixel *psl,    /* previous scanline */
       Rd=c_dd[color];
       cont=c_cont[color];
 
-      enter_run = was_in_run = test_run = 0;
+      was_in_run = test_run = 0;
     
       if (color == 0) {
         test_run = 1;
@@ -586,7 +582,7 @@ int lossy_undoscanline_pixel(  pixel *psl,    /* previous scanline */
 
         register int n, m;
 
-        enter_run = was_in_run = 1;
+        was_in_run = 1;
 
         /* get length of the run */
         /* arg is # of pixels left */
@@ -720,7 +716,7 @@ int lossy_undoscanline_pixel(  pixel *psl,    /* previous scanline */
       Rd=c_dd[color];
       cont=c_cont[color];
 
-      enter_run = was_in_run = test_run = 0;
+      was_in_run = test_run = 0;
     
       if (color == 0) {
         test_run = 1;
@@ -737,7 +733,7 @@ int lossy_undoscanline_pixel(  pixel *psl,    /* previous scanline */
 
         register int n, m;
 
-        enter_run = was_in_run = 1;
+        was_in_run = 1;
 
         /* get length of the run */
         /* arg is # of pixels left */
index 9747c2e5c403c3340188e5883899893b79cafdf8..fe5d13670b5782c8b153afcb534916de5fa216cf 100644 (file)
@@ -1,4 +1,5 @@
 INCLUDE_REGULAR_EXPRESSION("^.*$")
+
 #CC=cc
 #PKGNAME=loco
 #OPTFLAGS= -Aa $(CFL) -DBIG_ENDIAN