[trunk] Fix one remaining issue with C90 compat
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Mon, 10 Sep 2012 12:46:42 +0000 (12:46 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Mon, 10 Sep 2012 12:46:42 +0000 (12:46 +0000)
applications/jpip/util/addXMLinJP2.c
tests/j2k_random_tile_access.c
tests/test_tile_decoder.c
tests/test_tile_encoder.c

index ffb162e5984470e0876598d752bb9f7e2d484c38..f136e913a13917e235889af841f692773203d78e 100644 (file)
@@ -73,14 +73,14 @@ char * read_xmlfile( const char filename[], long *fsize);
 
 int main(int argc, char *argv[])
 {
+  FILE *fp;
+  char *xmldata, type[]="xml ";
+  long fsize, boxsize;
+
   if( argc<3){
     fprintf( stderr, "USAGE: ./addXMLinJP2 modifing.jp2 adding.xml\n");
     return -1;
   }
-  
-  FILE *fp;
-  char *xmldata, type[]="xml ";
-  long fsize, boxsize;
 
   fp = open_jp2file( argv[1]);
   if( !fp)
@@ -111,14 +111,14 @@ FILE * open_jp2file( const char filename[])
     fprintf( stderr, "Original JP2 %s not found\n", filename);
     return NULL;
   }
-  // Check resource is a JP family file.
+  /* Check resource is a JP family file. */
   if( fseek( fp, 0, SEEK_SET)==-1){
     fclose(fp);
     fprintf( stderr, "Original JP2 %s broken (fseek error)\n", filename);
     return NULL;
   }
   
-  data = (char *)malloc( 12); // size of header
+  data = (char *)malloc( 12); /* size of header */
   if( fread( data, 12, 1, fp) != 1){
     free( data);
     fclose(fp);
@@ -142,7 +142,7 @@ char * read_xmlfile( const char filename[], long *fsize)
   FILE *fp;
   char *data;
   
-  //  fprintf( stderr, "open %s\n", filename);
+  /*  fprintf( stderr, "open %s\n", filename);*/
   if(!(fp = fopen( filename, "r"))){
     fprintf( stderr, "XML file %s not found\n", filename);
     return NULL;
index 5a36d8071ce670b84f004d5d58074983fdbb21ce..d8b70f1506f635d0a0120b02456e0d0341b1a333 100644 (file)
@@ -295,7 +295,7 @@ int main(int argc, char **argv)
 
        return EXIT_SUCCESS;
 }
-//end main
+/*end main*/
 
 
 
index f0f4c952a0034354a99e56b4040971a6a4a1640a..8ff7ad28e960a1b7ba9c28ee2a29962b41a2fd20 100644 (file)
@@ -26,7 +26,7 @@
 #define USE_OPJ_DEPRECATED
 /* set this macro to enable profiling for the given test */
 /* warning : in order to be effective, openjpeg must have been built with profiling enabled !! */
-//#define _PROFILE
+/*#define _PROFILE*/
 
 #include <stdio.h>
 #include <string.h>
@@ -249,7 +249,7 @@ int main (int argc, char *argv[])
         l_param.cp_reduce = 0;
 
         /* to decode only a part of the image data */
-        //opj_restrict_decoding(&l_param,0,0,1000,1000);
+        /*opj_restrict_decoding(&l_param,0,0,1000,1000);*/
 
 
         switch(l_param.decod_format) {
@@ -382,8 +382,8 @@ int main (int argc, char *argv[])
         opj_destroy_codec(l_codec);
         opj_image_destroy(l_image);
 
-        // Print profiling
-        //PROFPRINT();
+        /* Print profiling*/
+        /*PROFPRINT();*/
 
         return EXIT_SUCCESS;
 }
index e1d93b3da19d51c14cff7b2a89941d95e9a01c05..160391b049557d880851d67b7bafdfa93a366d3d 100644 (file)
@@ -147,7 +147,7 @@ int main (int argc, char *argv[])
 
        fprintf(stdout, "Encoding random values -> keep in mind that this is very hard to compress\n");
        for (i=0;i<l_data_size;++i)     {
-               l_data[i] = i; //rand();
+               l_data[i] = i; /*rand();*/
        }
 
        opj_set_default_encoder_parameters(&l_param);
@@ -240,7 +240,7 @@ int main (int argc, char *argv[])
                ++l_current_param_ptr;
        }
 
-  // should we do j2k or jp2 ?
+  /* should we do j2k or jp2 ?*/
   len = strlen( output_file );
   if( strcmp( output_file + len - 4, ".jp2" ) == 0 )
     {
@@ -324,8 +324,8 @@ int main (int argc, char *argv[])
 
        free(l_data);
 
-       // Print profiling
-       //PROFPRINT();
+       /* Print profiling*/
+       /*PROFPRINT();*/
 
        return 0;
 }