Differences From Artifact [d01cbc1eac]:
- File src/huffman_tree.h — part of check-in [6cbc2253b8] at 2018-06-03 18:15:06 on branch trunk — OFLHAArchive: Support for -lh[4567]- compression (user: js, size: 1391) [annotate] [blame] [check-ins using]
To Artifact [11f24074b8]:
- File
src/huffman_tree.h
— part of check-in
[44413ada84]
at
2018-06-03 20:11:18
on branch trunk
— Work around GCC being extremely buggy
This includes GCC thinking uint16_t and uint_fast16_t have a different
signedness and pointers to subclasses of OFStream and pointers to
OFStream being incompatible pointer types. (user: js, size: 1359) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
18 19 20 21 22 23 24 | #include <stdbool.h> #include <stdint.h> #import "macros.h" OF_ASSUME_NONNULL_BEGIN | < < | | | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | #include <stdbool.h> #include <stdint.h> #import "macros.h" OF_ASSUME_NONNULL_BEGIN struct of_huffman_tree { struct of_huffman_tree *_Nullable leaves[2]; uint16_t value; }; #ifdef __cplusplus extern "C" { #endif extern struct of_huffman_tree *_Nonnull of_huffman_tree_construct( uint8_t lengths[_Nonnull], uint16_t count); extern struct of_huffman_tree *_Nonnull of_huffman_tree_construct_single( uint16_t value); extern bool of_huffman_tree_walk(id _Nullable stream, bool (*bitReader)(id _Nullable, uint16_t *_Nonnull, uint8_t), struct of_huffman_tree *_Nonnull *_Nonnull tree, uint16_t *_Nonnull value); extern void of_huffman_tree_release(struct of_huffman_tree *_Nonnull tree); #ifdef __cplusplus } #endif OF_ASSUME_NONNULL_END |