* succeed.
*/
-#include "util.h"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "wimlib.h"
-#include "lzx.h"
-#include "decompress.h"
+#include "wimlib/decompress.h"
+#include "wimlib/lzx.h"
+#include "wimlib/util.h"
+
#include <string.h>
/* Huffman decoding tables and maps from symbols to code lengths. */
struct lzx_tables {
u16 maintree_decode_table[(1 << LZX_MAINTREE_TABLEBITS) +
- (LZX_MAINTREE_NUM_SYMBOLS * 2)];
+ (LZX_MAINTREE_NUM_SYMBOLS * 2)]
+ _aligned_attribute(DECODE_TABLE_ALIGNMENT);
u8 maintree_lens[LZX_MAINTREE_NUM_SYMBOLS];
u16 lentree_decode_table[(1 << LZX_LENTREE_TABLEBITS) +
- (LZX_LENTREE_NUM_SYMBOLS * 2)];
+ (LZX_LENTREE_NUM_SYMBOLS * 2)]
+ _aligned_attribute(DECODE_TABLE_ALIGNMENT);
u8 lentree_lens[LZX_LENTREE_NUM_SYMBOLS];
u16 alignedtree_decode_table[(1 << LZX_ALIGNEDTREE_TABLEBITS) +
- (LZX_ALIGNEDTREE_NUM_SYMBOLS * 2)];
+ (LZX_ALIGNEDTREE_NUM_SYMBOLS * 2)]
+ _aligned_attribute(DECODE_TABLE_ALIGNMENT);
u8 alignedtree_lens[LZX_ALIGNEDTREE_NUM_SYMBOLS];
-};
+} _aligned_attribute(DECODE_TABLE_ALIGNMENT);
/*
static void
undo_call_insn_translation(u32 *call_insn_target, int input_pos,
- int32_t file_size)
+ s32 file_size)
{
- int32_t abs_offset;
- int32_t rel_offset;
+ s32 abs_offset;
+ s32 rel_offset;
abs_offset = le32_to_cpu(*call_insn_target);
if (abs_offset >= -input_pos && abs_offset < file_size) {