[trunk] continue work on getting API to use off_t instead of long toward LFS support in JPIP (metadata_manager)

This commit is contained in:
Mathieu Malaterre 2012-03-26 13:53:25 +00:00
parent 6bd41e47ac
commit 34af05ec30
2 changed files with 10 additions and 8 deletions

View File

@ -67,7 +67,7 @@ metadatalist_param_t * const_metadatalist( int fd)
int idx;
Byte8_t filesize;
if(!(filesize = get_filesize( fd)))
if(!(filesize = (Byte8_t)get_filesize( fd)))
return NULL;
if( !(toplev_boxlist = get_boxstructure( fd, 0, filesize))){
@ -182,7 +182,7 @@ void print_allmetadata( metadatalist_param_t *list)
}
}
boxcontents_param_t * gene_boxcontents( Byte8_t offset, Byte8_t length)
boxcontents_param_t * gene_boxcontents( OPJ_OFF_T offset, OPJ_SIZE_T length)
{
boxcontents_param_t *contents;
@ -210,8 +210,10 @@ metadata_param_t * search_metadata( int idx, metadatalist_param_t *list)
return NULL;
}
int search_metadataidx( char boxtype[4], metadatalist_param_t *list)
Byte8_t search_metadataidx( char boxtype[4], metadatalist_param_t *list)
{
/* MM FIXME: what is the return type of this function ?
Byte8_t or int ? */
metadata_param_t *ptr;
int i;
@ -225,7 +227,7 @@ int search_metadataidx( char boxtype[4], metadatalist_param_t *list)
box_param_t *box = ptr->boxlist->first;
while( box){
if( strncmp ( boxtype, box->type, 4) == 0)
return ptr->idx;
return (Byte8_t)ptr->idx;
box = box->next;
}
}
@ -245,5 +247,5 @@ int search_metadataidx( char boxtype[4], metadatalist_param_t *list)
}
ptr = ptr->next;
}
return -1;
return (Byte8_t)-1;
}

View File

@ -35,7 +35,7 @@
#include "placeholder_manager.h"
typedef struct boxcontents_param{
Byte8_t offset; /**< byte position of the box contents in the file*/
OPJ_OFF_T offset; /**< byte position of the box contents in the file*/
Byte8_t length; /**< length of the box contents*/
} boxcontents_param_t;
@ -103,7 +103,7 @@ void delete_metadata( metadata_param_t **metadata);
*
* @return pointer to the box contents
*/
boxcontents_param_t * gene_boxcontents( Byte8_t offset, Byte8_t length);
boxcontents_param_t * gene_boxcontents( OPJ_OFF_T offset, OPJ_SIZE_T length);
/**
* print metadata-bin parameters
@ -137,7 +137,7 @@ metadata_param_t * search_metadata( int idx, metadatalist_param_t *list);
* @param[in] list metadata-bin list pointer
* @return found metadata-bin index, if not found, -1
*/
int search_metadataidx( char boxtype[4], metadatalist_param_t *list);
Byte8_t search_metadataidx( char boxtype[4], metadatalist_param_t *list);
/**