[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:
parent
6bd41e47ac
commit
34af05ec30
|
@ -67,7 +67,7 @@ metadatalist_param_t * const_metadatalist( int fd)
|
||||||
int idx;
|
int idx;
|
||||||
Byte8_t filesize;
|
Byte8_t filesize;
|
||||||
|
|
||||||
if(!(filesize = get_filesize( fd)))
|
if(!(filesize = (Byte8_t)get_filesize( fd)))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if( !(toplev_boxlist = get_boxstructure( fd, 0, filesize))){
|
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;
|
boxcontents_param_t *contents;
|
||||||
|
|
||||||
|
@ -210,8 +210,10 @@ metadata_param_t * search_metadata( int idx, metadatalist_param_t *list)
|
||||||
return NULL;
|
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;
|
metadata_param_t *ptr;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -225,7 +227,7 @@ int search_metadataidx( char boxtype[4], metadatalist_param_t *list)
|
||||||
box_param_t *box = ptr->boxlist->first;
|
box_param_t *box = ptr->boxlist->first;
|
||||||
while( box){
|
while( box){
|
||||||
if( strncmp ( boxtype, box->type, 4) == 0)
|
if( strncmp ( boxtype, box->type, 4) == 0)
|
||||||
return ptr->idx;
|
return (Byte8_t)ptr->idx;
|
||||||
box = box->next;
|
box = box->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -245,5 +247,5 @@ int search_metadataidx( char boxtype[4], metadatalist_param_t *list)
|
||||||
}
|
}
|
||||||
ptr = ptr->next;
|
ptr = ptr->next;
|
||||||
}
|
}
|
||||||
return -1;
|
return (Byte8_t)-1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#include "placeholder_manager.h"
|
#include "placeholder_manager.h"
|
||||||
|
|
||||||
typedef struct boxcontents_param{
|
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*/
|
Byte8_t length; /**< length of the box contents*/
|
||||||
} boxcontents_param_t;
|
} boxcontents_param_t;
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ void delete_metadata( metadata_param_t **metadata);
|
||||||
*
|
*
|
||||||
* @return pointer to the box contents
|
* @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
|
* 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
|
* @param[in] list metadata-bin list pointer
|
||||||
* @return found metadata-bin index, if not found, -1
|
* @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);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue