diff options
| author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2012-09-10 12:46:42 +0000 |
|---|---|---|
| committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2012-09-10 12:46:42 +0000 |
| commit | 4a845f3d04ecd072177925044885f730ad4a9c31 (patch) | |
| tree | 0962726fc6c2eb92b54d298a72b3657607b86edd | |
| parent | 0452ebdfcd6170c595ef791992bbeee2a6473352 (diff) | |
[trunk] Fix one remaining issue with C90 compat
| -rw-r--r-- | applications/jpip/util/addXMLinJP2.c | 14 | ||||
| -rw-r--r-- | tests/j2k_random_tile_access.c | 2 | ||||
| -rw-r--r-- | tests/test_tile_decoder.c | 8 | ||||
| -rw-r--r-- | tests/test_tile_encoder.c | 8 |
4 files changed, 16 insertions, 16 deletions
diff --git a/applications/jpip/util/addXMLinJP2.c b/applications/jpip/util/addXMLinJP2.c index ffb162e5..f136e913 100644 --- a/applications/jpip/util/addXMLinJP2.c +++ b/applications/jpip/util/addXMLinJP2.c @@ -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; diff --git a/tests/j2k_random_tile_access.c b/tests/j2k_random_tile_access.c index 5a36d807..d8b70f15 100644 --- a/tests/j2k_random_tile_access.c +++ b/tests/j2k_random_tile_access.c @@ -295,7 +295,7 @@ int main(int argc, char **argv) return EXIT_SUCCESS; } -//end main +/*end main*/ diff --git a/tests/test_tile_decoder.c b/tests/test_tile_decoder.c index f0f4c952..8ff7ad28 100644 --- a/tests/test_tile_decoder.c +++ b/tests/test_tile_decoder.c @@ -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; } diff --git a/tests/test_tile_encoder.c b/tests/test_tile_encoder.c index e1d93b3d..160391b0 100644 --- a/tests/test_tile_encoder.c +++ b/tests/test_tile_encoder.c @@ -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; } |
