backport rev[824-834] and rev[837-859] into the openjpeg-1.5 branch
[openjpeg.git] / libopenjpeg / bio.h
index 0f0add1e75fd521690573cc1bacdff1a5784f8c6..764d7cb2e92a51ea2a6cbbb1750de837e06ed3aa 100644 (file)
@@ -1,9 +1,10 @@
 /*
+ * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
+ * Copyright (c) 2002-2007, Professor Benoit Macq
  * Copyright (c) 2001-2003, David Janssens
  * Copyright (c) 2002-2003, Yannick Verschueren
- * Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
- * Copyright (c) 2005, Herv� Drolon, FreeImage Team
- * Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
+ * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
+ * Copyright (c) 2005, Herve Drolon, FreeImage Team
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -28,7 +29,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-
 #ifndef __BIO_H
 #define __BIO_H
 /** 
@@ -45,48 +45,18 @@ The functions in BIO.C have for goal to realize an individual bit input - output
 Individual bit input-output stream (BIO)
 */
 typedef struct opj_bio {
-  /** pointer to the start of the buffer */
-  unsigned char *start;
-  /** pointer to the end of the buffer */
-  unsigned char *end;
-  /** pointer to the present position in the buffer */
-  unsigned char *bp;
-  /** temporary place where each byte is read or written */
-  unsigned int buf;
-  /** coder : number of bits free to write. decoder : number of bits read */
-  int ct;
+       /** pointer to the start of the buffer */
+       unsigned char *start;
+       /** pointer to the end of the buffer */
+       unsigned char *end;
+       /** pointer to the present position in the buffer */
+       unsigned char *bp;
+       /** temporary place where each byte is read or written */
+       unsigned int buf;
+       /** coder : number of bits free to write. decoder : number of bits read */
+       int ct;
 } opj_bio_t;
 
-/** @name Local static functions */
-/*@{*/
-/* ----------------------------------------------------------------------- */
-/**
-Write a bit
-@param bio BIO handle
-@param b Bit to write (0 or 1)
-*/
-static void bio_putbit(opj_bio_t *bio, int b);
-/**
-Read a bit
-@param bio BIO handle
-@return Returns the read bit
-*/
-static int bio_getbit(opj_bio_t *bio);
-/**
-Write a byte
-@param bio BIO handle
-@return Returns 0 if successful, returns 1 otherwise
-*/
-static int bio_byteout(opj_bio_t *bio);
-/**
-Read a byte
-@param bio BIO handle
-@return Returns 0 if successful, returns 1 otherwise
-*/
-static int bio_bytein(opj_bio_t *bio);
-/* ----------------------------------------------------------------------- */
-/*@}*/
-
 /** @name Exported functions */
 /*@{*/
 /* ----------------------------------------------------------------------- */
@@ -94,7 +64,7 @@ static int bio_bytein(opj_bio_t *bio);
 Create a new BIO handle 
 @return Returns a new BIO handle if successful, returns NULL otherwise
 */
-opj_bio_t* bio_create();
+opj_bio_t* bio_create(void);
 /**
 Destroy a previously created BIO handle
 @param bio BIO handle to destroy