]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - bitstream.c
Trivial whitespace fixes.
[paraslash.git] / bitstream.c
index c4c465e8a24904347bcc739399a09140734ff6ac..23adb2bd28912bd3364234b2a367d562ced1740e 100644 (file)
 
 #define GET_DATA(v, table, i, wrap, size) \
 {\
-    const uint8_t *ptr = (const uint8_t *)table + i * wrap;\
-    switch(size) {\
-    case 1:\
-        v = *(const uint8_t *)ptr;\
-        break;\
-    case 2:\
-        v = *(const uint16_t *)ptr;\
-        break;\
-    default:\
-        v = *(const uint32_t *)ptr;\
-        break;\
-    }\
+       const uint8_t *ptr = (const uint8_t *)table + i * wrap; \
+       switch (size) { \
+       case 1: \
+               v = *(const uint8_t *)ptr; \
+               break; \
+       case 2: \
+               v = *(const uint16_t *)ptr; \
+               break; \
+       default: \
+               v = *(const uint32_t *)ptr; \
+               break; \
+       } \
 }
 
 static int alloc_table(struct vlc *vlc, int size)
@@ -51,10 +51,8 @@ static int alloc_table(struct vlc *vlc, int size)
        vlc->table_size += size;
        if (vlc->table_size > vlc->table_allocated) {
                vlc->table_allocated += (1 << vlc->bits);
-               vlc->table = realloc(vlc->table,
+               vlc->table = para_realloc(vlc->table,
                        sizeof(VLC_TYPE) * 2 * vlc->table_allocated);
-               if (!vlc->table)
-                       return -E_TABLE_ALLOC;
        }
        return idx;
 }
@@ -160,11 +158,11 @@ static int build_table(struct vlc *vlc, int table_nb_bits,
  * \param bits_wrap The number of bytes between each entry of the
  * 'bits' or 'codes' tables.
  *
- *
  * \param bits_size The number of bytes of each entry of the
  * 'bits' or 'codes' tables.
  *
  * \param codes_wrap Same as bits_wrap but uses the 'codes' table.
+ *
  * \param codes_size Same as bits_size but for the 'codes' table.
  *
  * The wrap and size parameters allow to use any memory configuration and