track all declarations after statement for C90 compilers (VS2005)
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Mon, 30 Jan 2012 09:08:45 +0000 (09:08 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Mon, 30 Jan 2012 09:08:45 +0000 (09:08 +0000)
applications/jpip/libopenjpip/boxheader_manager.h
applications/jpip/libopenjpip/codestream_manager.h
applications/jpip/libopenjpip/index_manager.c
applications/jpip/libopenjpip/manfbox_manager.h
applications/jpip/libopenjpip/marker_manager.h

index eab3b64293afe8d9017b959e8bdcbfcdc37062d8..7851561f3e03462fb4a8839253ff177af779037a 100644 (file)
 #include "byte_manager.h"
 #include "box_manager.h"
 
-//! box header parameters
+/** box header parameters*/
 typedef struct boxheader_param{
-  Byte_t  headlen;              //!< header length  8 or 16
-  Byte8_t length;               //!< length of the reference Box
-  char    type[4];              //!< type of information in the DBox
-  struct boxheader_param *next; //!< pointer to the next header box
+  Byte_t  headlen;              /**< header length  8 or 16*/
+  Byte8_t length;               /**< length of the reference Box*/
+  char    type[4];              /**< type of information in the DBox*/
+  struct boxheader_param *next; /**< pointer to the next header box*/
 } boxheader_param_t;
 
 
index fcefbeeaceee395b2361918d7cd9eb5c650a13af..0e1b06842b9eb700748d4d65b4b0d93560d1b9c0 100644 (file)
 
 #include "byte_manager.h"
 
-//! codestream parameters
+/** codestream parameters*/
 typedef struct codestream_param{
-  int fd;         //!< file descriptor
-  Byte8_t offset; //!< byte position of DBox (Box Contents) in the file
-  Byte8_t length; //!< content length
+  int fd;         /**< file descriptor*/
+  Byte8_t offset; /**< byte position of DBox (Box Contents) in the file*/
+  Byte8_t length; /**< content length*/
 } codestream_param_t;
 
 
index 6cecff050263540498dfe8d9202eeb2309600747..5a590fa27307a4ee29574f2533c856680cb37196 100644 (file)
@@ -50,7 +50,7 @@
 #define FCGI_stdout stdout
 #define FCGI_stderr stderr
 #define logstream stderr
-#endif //SERVER
+#endif /*SERVER*/
 
 /**
  * chekc JP2 box indexing
@@ -134,7 +134,7 @@ void print_index( index_param_t index)
   print_faixbox( index.tilepart);
 
   fprintf( logstream, "Tile header information: \n");
-  for( i=0; i<index.SIZ.XTnum*index.SIZ.YTnum ;i++)
+  for( i=0; i<(int)(index.SIZ.XTnum*index.SIZ.YTnum);i++)
     print_mhixbox( index.tileheader[i]);
 
   fprintf( logstream, "Precinct packet information: \n");
@@ -187,7 +187,7 @@ void delete_index( index_param_t **index)
   
   delete_faixbox( &((*index)->tilepart));
 
-  for( i=0; i< (*index)->SIZ.XTnum*(*index)->SIZ.YTnum ;i++)
+  for( i=0; i< (int)((*index)->SIZ.XTnum*(*index)->SIZ.YTnum);i++)
     delete_mhixbox( &((*index)->tileheader[i]));
   free( (*index)->tileheader);
   
@@ -208,6 +208,14 @@ bool check_JP2boxidx( boxlist_param_t *toplev_boxlist)
 {
   box_param_t *iptr, *fidx, *prxy;
   box_param_t *cidx, *jp2c;
+  Byte8_t off;
+  Byte8_t len;
+  int pos;
+  Byte8_t ooff;
+  boxheader_param_t *obh;
+  Byte_t ni;
+  Byte8_t ioff;
+  boxheader_param_t *ibh;
 
   iptr = search_box( "iptr", toplev_boxlist);
   fidx = search_box( "fidx", toplev_boxlist);
@@ -215,40 +223,39 @@ bool check_JP2boxidx( boxlist_param_t *toplev_boxlist)
   jp2c = search_box( "jp2c", toplev_boxlist);
   prxy = gene_childboxbyType( fidx, 0, "prxy");
 
-  Byte8_t off = fetch_DBox8bytebigendian( iptr, 0);
+  off = fetch_DBox8bytebigendian( iptr, 0);
   if( off != fidx->offset)
     fprintf( FCGI_stderr, "Reference File Index box offset in Index Finder box not correct\n");
 
-  Byte8_t len = fetch_DBox8bytebigendian( iptr, 8);
+  len = fetch_DBox8bytebigendian( iptr, 8);
   if( len != fidx->length)
     fprintf( FCGI_stderr, "Reference File Index box length in Index Finder box not correct\n");
 
-  int pos = 0;
-  Byte8_t ooff = fetch_DBox8bytebigendian( prxy, pos);
+  pos = 0;
+  ooff = fetch_DBox8bytebigendian( prxy, pos);
   if( ooff != jp2c->offset)
     fprintf( FCGI_stderr, "Reference jp2c offset in prxy box not correct\n");
   pos += 8;
 
-  boxheader_param_t *obh = gene_childboxheader( prxy, pos);
+  obh = gene_childboxheader( prxy, pos);
   if( obh->length != jp2c->length || strncmp( obh->type, "jp2c",4)!=0)
     fprintf( FCGI_stderr, "Reference jp2c header in prxy box not correct\n");
   pos += obh->headlen;
   free(obh);
   
-  Byte_t ni = fetch_DBox1byte( prxy, pos);
+  ni = fetch_DBox1byte( prxy, pos);
   if( ni != 1){
     fprintf( FCGI_stderr, "Multiple indexes not supported\n");
     return false;
   }  
   pos += 1;
   
-  Byte8_t ioff = fetch_DBox8bytebigendian( prxy, pos);
+  ioff = fetch_DBox8bytebigendian( prxy, pos);
   if( ioff != cidx->offset)
     fprintf( FCGI_stderr, "Reference cidx offset in prxy box not correct\n");
   pos += 8;
 
-  boxheader_param_t *ibh = gene_childboxheader( prxy, pos);
+  ibh = gene_childboxheader( prxy, pos);
   if( ibh->length != cidx->length || strncmp( ibh->type, "cidx",4)!=0)
     fprintf( FCGI_stderr, "Reference cidx header in prxy box not correct\n");
   pos += ibh->headlen;
@@ -359,23 +366,23 @@ bool set_cidxdata( box_param_t *cidx_box, index_param_t *jp2idx)
 
 bool set_cptrdata( box_param_t *cidx_box, index_param_t *jp2idx)
 {
-  box_param_t *box;   //!< cptr box
+  box_param_t *box;   /**< cptr box*/
   Byte2_t dr, cont;
 
   if( !(box = gene_boxbyType( cidx_box->fd, get_DBoxoff( cidx_box), get_DBoxlen( cidx_box), "cptr")))
     return false;
   
-  // DR: Data Reference. 
-  // If 0, the codestream or its Fragment Table box exists in the current file
+  /* DR: Data Reference. */
+  /* If 0, the codestream or its Fragment Table box exists in the current file*/
   if(( dr = fetch_DBox2bytebigendian( box, 0))){
     fprintf( FCGI_stderr, "Error: Codestream not present in current file\n");
     free( box);
     return false;  
   }
   
-  // CONT: Container Type
-  // If 0, the entire codestream appears as a contiguous range of
-  // bytes within its file or resource.
+  /* CONT: Container Type*/
+  /* If 0, the entire codestream appears as a contiguous range of*/
+  /* bytes within its file or resource.*/
   if(( cont = fetch_DBox2bytebigendian( box, 2))){
     fprintf( FCGI_stderr, "Error: Can't cope with fragmented codestreams yet\n");
     free( box);
@@ -443,8 +450,8 @@ bool set_mainmhixdata( box_param_t *cidx_box, codestream_param_t codestream, ind
 
 bool set_tpixdata( box_param_t *cidx_box, index_param_t *jp2idx)
 {
-  box_param_t *tpix_box;   //!< tpix box
-  box_param_t *faix_box;   //!< faix box
+  box_param_t *tpix_box;   /**< tpix box*/
+  box_param_t *faix_box;   /**< faix box*/
   
   if( !(tpix_box = gene_boxbyType( cidx_box->fd, get_DBoxoff( cidx_box), get_DBoxlen( cidx_box), "tpix"))){
     fprintf( FCGI_stderr, "Error: tpix box not present in cidx box\n");
@@ -518,9 +525,9 @@ bool set_thixdata( box_param_t *cidx_box, index_param_t *jp2idx)
 bool set_ppixdata( box_param_t *cidx_box, index_param_t *jp2idx)
 {
   box_param_t *ppix_box, *faix_box, *manf_box;
-  manfbox_param_t *manf;     //!< manf
-  boxheader_param_t *bh;     //!< box headers
-  faixbox_param_t *faix;     //!< faix
+  manfbox_param_t *manf;     /**< manf*/
+  boxheader_param_t *bh;     /**< box headers*/
+  faixbox_param_t *faix;     /**< faix*/
   Byte8_t inbox_offset;
   int comp_idx;
 
@@ -630,7 +637,7 @@ bool set_CODmkrdata( markeridx_param_t *codmkidx, codestream_param_t codestream,
     COD->YPsiz = (Byte4_t *)malloc( (COD->numOfdecomp+1)*sizeof(Byte4_t));
 
     for( i=0; i<=COD->numOfdecomp; i++){
-      //precinct size
+      /*precinct size*/
       COD->XPsiz[i] = pow( 2, fetch_marker1byte( codmkr, 12+i) & 0x0F);
       COD->YPsiz[i] = pow( 2,(fetch_marker1byte( codmkr, 12+i) & 0xF0) >> 4);
     }
index 26306976a72613304c8dc77e5959f887cb891f00..484e7af3101ce592194f8732c6e34dd85cbe6822 100644 (file)
 #include "boxheader_manager.h"
 
 
-//! manifest box parameters
-//! I.3.2.3 Manifest box
+/** manifest box parameters*/
+/** I.3.2.3 Manifest box*/
 typedef struct manfbox_param{
-  boxheader_param_t *first; //!< top of the box header list
+  boxheader_param_t *first; /**< top of the box header list*/
 } manfbox_param_t;
 
 
index ba2542332f17dd446f08cda47d23a70eccc4595f..6d5c9fe9c8b81c62f132594fa1335a64e8c2eebe 100644 (file)
 #include "codestream_manager.h"
 
 
-//! Marker parameters
+/** Marker parameters*/
 typedef struct marker_param{
-  codestream_param_t cs; //!< corresponding codestream
-  Byte2_t code;          //!< marker code
-  Byte8_t offset;        //!< offset relative to the start of the codestream ( including the length parameter but not the marker itself)
-  Byte2_t length;        //!< marker segment length
+  codestream_param_t cs; /**< corresponding codestream*/
+  Byte2_t code;          /**< marker code*/
+  Byte8_t offset;        /**< offset relative to the start of the codestream ( including the length parameter but not the marker itself)*/
+  Byte2_t length;        /**< marker segment length*/
 } marker_param_t;