Avoided ABI breakage
[openjpeg.git] / indexer_JPIP / bio.c
index 17078cef85fa4f7e827315e58382bdd1df949246..2c989e5614b6c7831123cde564538e0e00693297 100644 (file)
@@ -42,19 +42,6 @@ int bio_numbytes() {
     return bio_bp-bio_start;
 }
 
-/// <summary>
-/// Init encoder.
-/// </summary>
-/// <param name="bp">Output buffer</param>
-/// <param name="len">Output buffer length</param>
-void bio_init_enc(unsigned char *bp, int len) {
-    bio_start=bp;
-    bio_end=bp+len;
-    bio_bp=bp;
-    bio_buf=0;
-    bio_ct=8;
-}
-
 /// <summary>
 /// Init decoder.
 /// </summary>
@@ -68,15 +55,14 @@ void bio_init_dec(unsigned char *bp, int len) {
     bio_ct=0;
 }
 
-/// <summary>
-/// Write byte.
-/// </summary>
-int bio_byteout() {
-    bio_buf=(bio_buf<<8)&0xffff;
-    bio_ct=bio_buf==0xff00?7:8;
-    if (bio_bp>=bio_end) return 1; //longjmp(j2k_error, 1);
-    *bio_bp++=bio_buf>>8;
-    return 0;
+int bio_byteout()
+{
+       bio_buf = (bio_buf << 8) & 0xffff;
+       bio_ct = bio_buf == 0xff00 ? 7 : 8;
+       if (bio_bp >= bio_end)
+               return 1;
+       *bio_bp++ = bio_buf >> 8;
+       return 0;
 }
 
 /// <summary>
@@ -90,18 +76,6 @@ int bio_bytein() {
     return 0;
 }
 
-/// <summary>
-/// Write bit.
-/// </summary>
-/// <param name="b">Bit to write (0 or 1)</param>
-void bio_putbit(int b) {
-    if (bio_ct==0) {
-        bio_byteout();
-    }
-    bio_ct--;
-    bio_buf|=b<<bio_ct;
-}
-
 /// <summary>
 /// Read bit.
 /// </summary>
@@ -113,18 +87,6 @@ int bio_getbit() {
     return (bio_buf>>bio_ct)&1;
 }
 
-/// <summary>
-/// Write bits.
-/// </summary>
-/// <param name="v">Value of bits</param>
-/// <param name="n">Number of bits to write</param>
-void bio_write(int v, int n) {
-    int i;
-    for (i=n-1; i>=0; i--) {
-        bio_putbit((v>>i)&1);
-    }
-}
-
 /// <summary>
 /// Read bits.
 /// </summary>