From 3b268d16564a96a31a877949ecb3922b4a4c3a45 Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Mon, 26 Mar 2012 12:59:33 +0000 Subject: [PATCH] [trunk] continue work on getting API to use off_t instead of long toward LFS support in JPIP (codestream_param_t) --- applications/jpip/libopenjpip/codestream_manager.c | 10 +++++----- applications/jpip/libopenjpip/codestream_manager.h | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/applications/jpip/libopenjpip/codestream_manager.c b/applications/jpip/libopenjpip/codestream_manager.c index 7fccc212..d7797c13 100644 --- a/applications/jpip/libopenjpip/codestream_manager.c +++ b/applications/jpip/libopenjpip/codestream_manager.c @@ -41,7 +41,7 @@ #define logstream stderr #endif /*SERVER */ -codestream_param_t set_codestream( int fd, Byte8_t offset, Byte8_t length) +codestream_param_t set_codestream( int fd, OPJ_OFF_T offset, OPJ_SIZE_T length) { codestream_param_t cs; @@ -52,22 +52,22 @@ codestream_param_t set_codestream( int fd, Byte8_t offset, Byte8_t length) return cs; } -Byte_t * fetch_codestreambytes( codestream_param_t *cs, long offset, int size) +Byte_t * fetch_codestreambytes( codestream_param_t *cs, OPJ_OFF_T offset, OPJ_SIZE_T size) { return fetch_bytes( cs->fd, cs->offset+offset, size); } -Byte_t fetch_codestream1byte( codestream_param_t *cs, long offset) +Byte_t fetch_codestream1byte( codestream_param_t *cs, OPJ_OFF_T offset) { return fetch_1byte( cs->fd, cs->offset+offset); } -Byte2_t fetch_codestream2bytebigendian( codestream_param_t *cs, long offset) +Byte2_t fetch_codestream2bytebigendian( codestream_param_t *cs, OPJ_OFF_T offset) { return fetch_2bytebigendian( cs->fd, cs->offset+offset); } -Byte4_t fetch_codestream4bytebigendian( codestream_param_t *cs, long offset) +Byte4_t fetch_codestream4bytebigendian( codestream_param_t *cs, OPJ_OFF_T offset) { return fetch_4bytebigendian( cs->fd, cs->offset+offset); } diff --git a/applications/jpip/libopenjpip/codestream_manager.h b/applications/jpip/libopenjpip/codestream_manager.h index 0e1b0684..b600d8e5 100644 --- a/applications/jpip/libopenjpip/codestream_manager.h +++ b/applications/jpip/libopenjpip/codestream_manager.h @@ -36,7 +36,7 @@ /** codestream parameters*/ typedef struct codestream_param{ int fd; /**< file descriptor*/ - Byte8_t offset; /**< byte position of DBox (Box Contents) in the file*/ + OPJ_OFF_T offset; /**< byte position of DBox (Box Contents) in the file*/ Byte8_t length; /**< content length*/ } codestream_param_t; @@ -49,7 +49,7 @@ typedef struct codestream_param{ * @param[in] length codestream length * @return structure of generated codestream parameters */ -codestream_param_t set_codestream( int fd, Byte8_t offset, Byte8_t length); +codestream_param_t set_codestream( int fd, OPJ_OFF_T offset, OPJ_SIZE_T length); /** @@ -60,7 +60,7 @@ codestream_param_t set_codestream( int fd, Byte8_t offset, Byte8_t length); * @param[in] size Byte length * @return pointer to the fetched data */ -Byte_t * fetch_codestreambytes( codestream_param_t *cs, long offset, int size); +Byte_t * fetch_codestreambytes( codestream_param_t *cs, OPJ_OFF_T offset, OPJ_SIZE_T size); /** * fetch Codestream 1-byte Byte code in file stream @@ -69,7 +69,7 @@ Byte_t * fetch_codestreambytes( codestream_param_t *cs, long offset, int size); * @param[in] offset start Byte position in codestream * @return fetched code */ -Byte_t fetch_codestream1byte( codestream_param_t *cs, long offset); +Byte_t fetch_codestream1byte( codestream_param_t *cs, OPJ_OFF_T offset); /** * fetch Codestream 2-byte big endian Byte codes in file stream @@ -78,7 +78,7 @@ Byte_t fetch_codestream1byte( codestream_param_t *cs, long offset); * @param[in] offset start Byte position in codestream * @return fetched code */ -Byte2_t fetch_codestream2bytebigendian( codestream_param_t *cs, long offset); +Byte2_t fetch_codestream2bytebigendian( codestream_param_t *cs, OPJ_OFF_T offset); /** * fetch Codestream 4-byte big endian Byte codes in file stream @@ -87,7 +87,7 @@ Byte2_t fetch_codestream2bytebigendian( codestream_param_t *cs, long offset); * @param[in] offset start Byte position in codestream * @return fetched code */ -Byte4_t fetch_codestream4bytebigendian( codestream_param_t *cs, long offset); +Byte4_t fetch_codestream4bytebigendian( codestream_param_t *cs, OPJ_OFF_T offset); /** -- 2.40.0