]> wimlib.net Git - wimlib/blobdiff - include/wimlib/decompress_common.h
Get rid of input_idx_t
[wimlib] / include / wimlib / decompress_common.h
index ef7ebe953960cd33c2e91efd341c37f4ba717441..fab3c3e009413c4ef9ed4b9f0a4a6a3a672cc1a9 100644 (file)
@@ -2,6 +2,9 @@
  * decompress_common.h
  *
  * Header for decompression code shared by multiple compression formats.
  * decompress_common.h
  *
  * Header for decompression code shared by multiple compression formats.
+ *
+ * The author dedicates this file to the public domain.
+ * You can do whatever you want with this file.
  */
 
 #ifndef _WIMLIB_DECOMPRESS_COMMON_H
  */
 
 #ifndef _WIMLIB_DECOMPRESS_COMMON_H
 #include "wimlib/endianness.h"
 #include "wimlib/types.h"
 
 #include "wimlib/endianness.h"
 #include "wimlib/types.h"
 
-#ifndef INPUT_IDX_T_DEFINED
-#define INPUT_IDX_T_DEFINED
-typedef u32 input_idx_t;
-#endif
-
 /* Structure to encapsulate a block of in-memory data that is being interpreted
  * as a stream of bits.
  *
 /* Structure to encapsulate a block of in-memory data that is being interpreted
  * as a stream of bits.
  *
@@ -36,13 +34,13 @@ struct input_bitstream {
        const u8 *data;
 
        /* Number of bytes of data that are left.  */
        const u8 *data;
 
        /* Number of bytes of data that are left.  */
-       input_idx_t data_bytes_left;
+       u32 data_bytes_left;
 };
 
 /* Initializes a bitstream to receive its input from @data. */
 static inline void
 init_input_bitstream(struct input_bitstream *istream,
 };
 
 /* Initializes a bitstream to receive its input from @data. */
 static inline void
 init_input_bitstream(struct input_bitstream *istream,
-                    const void *data, input_idx_t num_data_bytes)
+                    const void *data, u32 num_data_bytes)
 {
        istream->bitbuf          = 0;
        istream->bitsleft        = 0;
 {
        istream->bitbuf          = 0;
        istream->bitsleft        = 0;