]> granicus.if.org Git - openjpeg/commitdiff
[trunk] continue work on getting API to use off_t instead of long toward LFS support...
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Mon, 26 Mar 2012 12:59:33 +0000 (12:59 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Mon, 26 Mar 2012 12:59:33 +0000 (12:59 +0000)
applications/jpip/libopenjpip/codestream_manager.c
applications/jpip/libopenjpip/codestream_manager.h

index 7fccc2129a22448eb0eb3e1060732215b2c71062..d7797c1330386be929b29133d00ff1c9bd7b9485 100644 (file)
@@ -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);
 }
index 0e1b06842b9eb700748d4d65b4b0d93560d1b9c0..b600d8e58aebd878833829c93d7b79df0c4d5f3a 100644 (file)
@@ -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);
 
 
 /**