mirror of
https://github.com/GerbilSoft/zlib-ng.git
synced 2025-06-18 11:35:35 -04:00
Rename table headers with tbl suffix.
This commit is contained in:
parent
5fad6c557a
commit
4490d52d0a
@ -822,20 +822,20 @@ set(ZLIB_PUBLIC_HDRS
|
||||
set(ZLIB_PRIVATE_HDRS
|
||||
adler32_p.h
|
||||
chunkset_tpl.h
|
||||
crc32.h
|
||||
crc32_p.h
|
||||
crc32_tbl.h
|
||||
deflate.h
|
||||
deflate_p.h
|
||||
functable.h
|
||||
gzguts.h
|
||||
inffast.h
|
||||
inffixed.h
|
||||
inffixed_tbl.h
|
||||
inflate.h
|
||||
inflate_p.h
|
||||
inftrees.h
|
||||
insert_string_tpl.h
|
||||
match_tpl.h
|
||||
trees.h
|
||||
trees_tbl.h
|
||||
trees_emit.h
|
||||
trees_p.h
|
||||
zbuild.h
|
||||
@ -1173,24 +1173,24 @@ if(ZLIB_ENABLE_TESTS)
|
||||
add_test(NAME makefixed
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
"-DCOMMAND=${MAKEFIXED_COMMAND}"
|
||||
-DOUTPUT=${CMAKE_CURRENT_SOURCE_DIR}/inffixed._h
|
||||
-DCOMPARE=${CMAKE_CURRENT_SOURCE_DIR}/inffixed.h
|
||||
-DOUTPUT=${CMAKE_CURRENT_SOURCE_DIR}/inffixed_tbl._h
|
||||
-DCOMPARE=${CMAKE_CURRENT_SOURCE_DIR}/inffixed_tbl.h
|
||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/run-and-compare.cmake)
|
||||
|
||||
set(MAKETREES_COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:maketrees>)
|
||||
add_test(NAME maketrees
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
"-DCOMMAND=${MAKETREES_COMMAND}"
|
||||
-DOUTPUT=${CMAKE_CURRENT_SOURCE_DIR}/trees._h
|
||||
-DCOMPARE=${CMAKE_CURRENT_SOURCE_DIR}/trees.h
|
||||
-DOUTPUT=${CMAKE_CURRENT_SOURCE_DIR}/trees_tbl._h
|
||||
-DCOMPARE=${CMAKE_CURRENT_SOURCE_DIR}/trees_tbl.h
|
||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/run-and-compare.cmake)
|
||||
|
||||
set(MAKECRCT_COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:makecrct>)
|
||||
add_test(NAME makecrct
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
"-DCOMMAND=${MAKECRCT_COMMAND}"
|
||||
-DOUTPUT=${CMAKE_CURRENT_SOURCE_DIR}/crc32._h
|
||||
-DCOMPARE=${CMAKE_CURRENT_SOURCE_DIR}/crc32.h
|
||||
-DOUTPUT=${CMAKE_CURRENT_SOURCE_DIR}/crc32_tbl._h
|
||||
-DCOMPARE=${CMAKE_CURRENT_SOURCE_DIR}/crc32_tbl.h
|
||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/run-and-compare.cmake)
|
||||
|
||||
set(INFCOVER_COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:infcover>)
|
||||
|
2
INDEX.md
2
INDEX.md
@ -27,7 +27,7 @@ Contents
|
||||
| infback.* | Inflate using a callback interface |
|
||||
| inflate.* | Decompress data |
|
||||
| inffast.* | Decompress data with speed optimizations |
|
||||
| inffixed.h | Table for decoding fixed codes |
|
||||
| inffixed_tbl.h | Table for decoding fixed codes |
|
||||
| inftrees.h | Generate Huffman trees for efficient decoding |
|
||||
| trees.* | Output deflated data using Huffman coding |
|
||||
| uncompr.c | Decompress a memory buffer |
|
||||
|
2
crc32.c
2
crc32.c
@ -15,7 +15,7 @@
|
||||
#include "deflate.h"
|
||||
#include "functable.h"
|
||||
#include "crc32_p.h"
|
||||
#include "crc32.h"
|
||||
#include "crc32_tbl.h"
|
||||
|
||||
|
||||
/* Local functions for crc concatenation */
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef CRC32_H_
|
||||
#define CRC32_H_
|
||||
#ifndef CRC32_TBL_H_
|
||||
#define CRC32_TBL_H_
|
||||
|
||||
/* crc32.h -- tables for rapid CRC calculation
|
||||
/* crc32_tbl.h -- tables for rapid CRC calculation
|
||||
* Generated automatically by makecrct.c
|
||||
*/
|
||||
|
||||
@ -732,4 +732,4 @@ static const uint32_t crc_comb[32][32] =
|
||||
0x04000000, 0x08000000
|
||||
}
|
||||
};
|
||||
#endif /* CRC32_H_ */
|
||||
#endif /* CRC32_TBL_H_ */
|
@ -1,4 +1,4 @@
|
||||
/* inffixed.h -- table for decoding fixed codes
|
||||
/* inffixed_tbl.h -- table for decoding fixed codes
|
||||
* Generated automatically by makefixed().
|
||||
*/
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "inflate.h"
|
||||
#include "inffast.h"
|
||||
#include "inflate_p.h"
|
||||
#include "inffixed.h"
|
||||
#include "inffixed_tbl.h"
|
||||
#include "functable.h"
|
||||
|
||||
/* Architecture-specific hooks. */
|
||||
@ -190,7 +190,7 @@ int32_t ZEXPORT PREFIX(inflatePrime)(PREFIX3(stream) *strm, int32_t bits, int32_
|
||||
|
||||
/*
|
||||
Return state with length and distance decoding tables and index sizes set to
|
||||
fixed code decoding. This returns fixed tables from inffixed.h.
|
||||
fixed code decoding. This returns fixed tables from inffixed_tbl.h.
|
||||
*/
|
||||
|
||||
void ZLIB_INTERNAL fixedtables(struct inflate_state *state) {
|
||||
|
@ -112,9 +112,9 @@ static void make_crc_table() {
|
||||
|
||||
static void print_crc32_tables() {
|
||||
int k;
|
||||
printf("#ifndef CRC32_H_\n");
|
||||
printf("#define CRC32_H_\n\n");
|
||||
printf("/* crc32.h -- tables for rapid CRC calculation\n");
|
||||
printf("#ifndef CRC32_TBL_H_\n");
|
||||
printf("#define CRC32_TBL_H_\n\n");
|
||||
printf("/* crc32_tbl.h -- tables for rapid CRC calculation\n");
|
||||
printf(" * Generated automatically by makecrct.c\n */\n\n");
|
||||
|
||||
/* print CRC table */
|
||||
@ -136,7 +136,7 @@ static void print_crc32_tables() {
|
||||
write_table(crc_comb[k], GF2_DIM);
|
||||
}
|
||||
printf(" }\n};\n");
|
||||
printf("#endif /* CRC32_H_ */\n");
|
||||
printf("#endif /* CRC32_TBL_H_ */\n");
|
||||
}
|
||||
|
||||
static void write_table(const uint32_t *table, int k) {
|
||||
|
@ -38,15 +38,15 @@ void ZLIB_INTERNAL buildfixedtables(struct inflate_state *state) {
|
||||
}
|
||||
|
||||
|
||||
// Create fixed tables on the fly and write out a inffixed.h file that is #include'd above.
|
||||
// makefixed() writes those tables to stdout, which would be piped to inffixed.h.
|
||||
// Create fixed tables on the fly and write out a inffixed_tbl.h file that is #include'd above.
|
||||
// makefixed() writes those tables to stdout, which would be piped to inffixed_tbl.h.
|
||||
void makefixed(void) {
|
||||
unsigned low, size;
|
||||
struct inflate_state state;
|
||||
|
||||
memset(&state, 0, sizeof(state));
|
||||
buildfixedtables(&state);
|
||||
puts(" /* inffixed.h -- table for decoding fixed codes");
|
||||
puts(" /* inffixed_tbl.h -- table for decoding fixed codes");
|
||||
puts(" * Generated automatically by makefixed().");
|
||||
puts(" */");
|
||||
puts("");
|
||||
@ -82,9 +82,8 @@ void makefixed(void) {
|
||||
puts("\n };");
|
||||
}
|
||||
|
||||
// The output of this application can be piped out to recreate inffixed.h
|
||||
// The output of this application can be piped out to recreate inffixed_tbl.h
|
||||
int main(void) {
|
||||
makefixed();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -101,8 +101,8 @@ static void tr_static_init(void) {
|
||||
static void gen_trees_header() {
|
||||
int i;
|
||||
|
||||
printf("#ifndef TREES_H_\n");
|
||||
printf("#define TREES_H_\n\n");
|
||||
printf("#ifndef TREES_TBL_H_\n");
|
||||
printf("#define TREES_TBL_H_\n\n");
|
||||
|
||||
printf("/* header created automatically with maketrees.c */\n\n");
|
||||
|
||||
@ -136,7 +136,7 @@ static void gen_trees_header() {
|
||||
printf("%5d%s", base_dist[i], SEPARATOR(i, D_CODES-1, 10));
|
||||
}
|
||||
|
||||
printf("#endif /* TREES_H_ */\n");
|
||||
printf("#endif /* TREES_TBL_H_ */\n");
|
||||
}
|
||||
|
||||
// The output of this application can be piped out to recreate trees.h
|
||||
|
2
trees.c
2
trees.c
@ -34,7 +34,7 @@
|
||||
#include "deflate.h"
|
||||
#include "trees_p.h"
|
||||
#include "trees_emit.h"
|
||||
#include "trees.h"
|
||||
#include "trees_tbl.h"
|
||||
|
||||
/* The lengths of the bit length codes are sent in order of decreasing
|
||||
* probability, to avoid transmitting the lengths for unused bit length codes.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef TREES_H_
|
||||
#define TREES_H_
|
||||
#ifndef TREES_TBL_H_
|
||||
#define TREES_TBL_H_
|
||||
|
||||
/* header created automatically with maketrees.c */
|
||||
|
||||
@ -129,4 +129,4 @@ ZLIB_INTERNAL const int base_dist[D_CODES] = {
|
||||
1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576
|
||||
};
|
||||
|
||||
#endif /* TREES_H_ */
|
||||
#endif /* TREES_TBL_H_ */
|
@ -157,7 +157,7 @@ gzread.obj: $(SRCDIR)/gzread.c $(SRCDIR)/zbuild.h $(SRCDIR)/gzguts.h
|
||||
gzwrite.obj: $(SRCDIR)/gzwrite.c $(SRCDIR)/zbuild.h $(SRCDIR)/gzguts.h
|
||||
compress.obj: $(SRCDIR)/compress.c $(SRCDIR)/zbuild.h $(SRCDIR)/zlib$(SUFFIX).h
|
||||
uncompr.obj: $(SRCDIR)/uncompr.c $(SRCDIR)/zbuild.h $(SRCDIR)/zlib$(SUFFIX).h
|
||||
crc32.obj: $(SRCDIR)/crc32.c $(SRCDIR)/zbuild.h $(SRCDIR)/zendian.h $(SRCDIR)/deflate.h $(SRCDIR)/functable.h $(SRCDIR)/crc32.h
|
||||
crc32.obj: $(SRCDIR)/crc32.c $(SRCDIR)/zbuild.h $(SRCDIR)/zendian.h $(SRCDIR)/deflate.h $(SRCDIR)/functable.h $(SRCDIR)/crc32_tbl.h
|
||||
deflate.obj: $(SRCDIR)/deflate.c $(SRCDIR)/zbuild.h $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h
|
||||
deflate_quick.obj: $(SRCDIR)/deflate_quick.c $(SRCDIR)/zbuild.h $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h $(SRCDIR)/trees_emit.h
|
||||
deflate_fast.obj: $(SRCDIR)/deflate_fast.c $(SRCDIR)/zbuild.h $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h
|
||||
@ -167,7 +167,7 @@ infback.obj: $(SRCDIR)/infback.c $(SRCDIR)/zbuild.h $(SRCDIR)/zutil.h $(SRCDIR)/
|
||||
inffast.obj: $(SRCDIR)/inffast.c $(SRCDIR)/zbuild.h $(SRCDIR)/zutil.h $(SRCDIR)/inftrees.h $(SRCDIR)/inflate.h $(SRCDIR)/inffast.h $(SRCDIR)/functable.h
|
||||
inflate.obj: $(SRCDIR)/inflate.c $(SRCDIR)/zbuild.h $(SRCDIR)/zutil.h $(SRCDIR)/inftrees.h $(SRCDIR)/inflate.h $(SRCDIR)/inffast.h $(SRCDIR)/functable.h $(SRCDIR)/functable.h
|
||||
inftrees.obj: $(SRCDIR)/inftrees.c $(SRCDIR)/zbuild.h $(SRCDIR)/zutil.h $(SRCDIR)/inftrees.h
|
||||
trees.obj: $(SRCDIR)/zbuild.h $(SRCDIR)/deflate.h $(SRCDIR)/trees.h
|
||||
trees.obj: $(SRCDIR)/zbuild.h $(SRCDIR)/deflate.h $(SRCDIR)/trees_tbl.h
|
||||
zutil.obj: $(SRCDIR)/zbuild.h $(SRCDIR)/zutil.h $(SRCDIR)/gzguts.h
|
||||
|
||||
example.obj: $(TOP)/test/example.c $(TOP)/zbuild.h $(TOP)/zlib$(SUFFIX).h
|
||||
|
@ -169,7 +169,7 @@ gzwrite.obj: $(SRCDIR)/gzwrite.c $(SRCDIR)/zbuild.h $(SRCDIR)/gzguts.h
|
||||
compress.obj: $(SRCDIR)/compress.c $(SRCDIR)/zbuild.h $(SRCDIR)/zlib$(SUFFIX).h
|
||||
uncompr.obj: $(SRCDIR)/uncompr.c $(SRCDIR)/zbuild.h $(SRCDIR)/zlib$(SUFFIX).h
|
||||
chunkset.obj: $(SRCDIR)/zbuild.h $(SRCDIR)/zutil.h
|
||||
crc32.obj: $(SRCDIR)/crc32.c $(SRCDIR)/zbuild.h $(SRCDIR)/zendian.h $(SRCDIR)/deflate.h $(SRCDIR)/functable.h $(SRCDIR)/crc32.h
|
||||
crc32.obj: $(SRCDIR)/crc32.c $(SRCDIR)/zbuild.h $(SRCDIR)/zendian.h $(SRCDIR)/deflate.h $(SRCDIR)/functable.h $(SRCDIR)/crc32_tbl.h
|
||||
deflate.obj: $(SRCDIR)/deflate.c $(SRCDIR)/zbuild.h $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h
|
||||
deflate_fast.obj: $(SRCDIR)/deflate_fast.c $(SRCDIR)/zbuild.h $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h
|
||||
deflate_medium.obj: $(SRCDIR)/deflate_medium.c $(SRCDIR)/zbuild.h $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h
|
||||
@ -179,7 +179,7 @@ infback.obj: $(SRCDIR)/infback.c $(SRCDIR)/zbuild.h $(SRCDIR)/zutil.h $(SRCDIR)/
|
||||
inffast.obj: $(SRCDIR)/inffast.c $(SRCDIR)/zbuild.h $(SRCDIR)/zutil.h $(SRCDIR)/inftrees.h $(SRCDIR)/inflate.h $(SRCDIR)/inffast.h $(SRCDIR)/functable.h
|
||||
inflate.obj: $(SRCDIR)/inflate.c $(SRCDIR)/zbuild.h $(SRCDIR)/zutil.h $(SRCDIR)/inftrees.h $(SRCDIR)/inflate.h $(SRCDIR)/inffast.h $(SRCDIR)/functable.h $(SRCDIR)/functable.h
|
||||
inftrees.obj: $(SRCDIR)/inftrees.c $(SRCDIR)/zbuild.h $(SRCDIR)/zutil.h $(SRCDIR)/inftrees.h
|
||||
trees.obj: $(SRCDIR)/zbuild.h $(SRCDIR)/deflate.h $(SRCDIR)/trees.h
|
||||
trees.obj: $(SRCDIR)/zbuild.h $(SRCDIR)/deflate.h $(SRCDIR)/trees_tbl.h
|
||||
zutil.obj: $(SRCDIR)/zbuild.h $(SRCDIR)/zutil.h $(SRCDIR)/gzguts.h
|
||||
|
||||
example.obj: $(TOP)/test/example.c $(TOP)/zbuild.h $(TOP)/zlib$(SUFFIX).h
|
||||
|
@ -167,7 +167,7 @@ compress.obj: $(SRCDIR)/compress.c $(SRCDIR)/zbuild.h $(SRCDIR)/zlib$(SUFFIX).h
|
||||
uncompr.obj: $(SRCDIR)/uncompr.c $(SRCDIR)/zbuild.h $(SRCDIR)/zlib$(SUFFIX).h
|
||||
chunkset.obj: $(SRCDIR)/zbuild.h $(SRCDIR)/zutil.h
|
||||
chunkset_sse.obj: $(SRCDIR)/arch/x86/chunkset_sse.c $(SRCDIR)/zbuild.h $(SRCDIR)/zutil.h
|
||||
crc32.obj: $(SRCDIR)/crc32.c $(SRCDIR)/zbuild.h $(SRCDIR)/zendian.h $(SRCDIR)/deflate.h $(SRCDIR)/functable.h $(SRCDIR)/crc32.h
|
||||
crc32.obj: $(SRCDIR)/crc32.c $(SRCDIR)/zbuild.h $(SRCDIR)/zendian.h $(SRCDIR)/deflate.h $(SRCDIR)/functable.h $(SRCDIR)/crc32_tbl.h
|
||||
deflate.obj: $(SRCDIR)/deflate.c $(SRCDIR)/zbuild.h $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h
|
||||
deflate_fast.obj: $(SRCDIR)/deflate_fast.c $(SRCDIR)/zbuild.h $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h
|
||||
deflate_medium.obj: $(SRCDIR)/deflate_medium.c $(SRCDIR)/zbuild.h $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h
|
||||
@ -178,7 +178,7 @@ inffast.obj: $(SRCDIR)/inffast.c $(SRCDIR)/zbuild.h $(SRCDIR)/zutil.h $(SRCDIR)/
|
||||
inflate.obj: $(SRCDIR)/inflate.c $(SRCDIR)/zbuild.h $(SRCDIR)/zutil.h $(SRCDIR)/inftrees.h $(SRCDIR)/inflate.h $(SRCDIR)/inffast.h $(SRCDIR)/functable.h $(SRCDIR)/functable.h
|
||||
inftrees.obj: $(SRCDIR)/inftrees.c $(SRCDIR)/zbuild.h $(SRCDIR)/zutil.h $(SRCDIR)/inftrees.h
|
||||
slide_sse.obj: $(SRCDIR)/arch/x86/slide_sse.c $(SRCDIR)/deflate.h
|
||||
trees.obj: $(SRCDIR)/zbuild.h $(SRCDIR)/deflate.h $(SRCDIR)/trees.h
|
||||
trees.obj: $(SRCDIR)/zbuild.h $(SRCDIR)/deflate.h $(SRCDIR)/trees_tbl.h
|
||||
zutil.obj: $(SRCDIR)/zbuild.h $(SRCDIR)/zutil.h $(SRCDIR)/gzguts.h
|
||||
|
||||
example.obj: $(TOP)/test/example.c $(TOP)/zbuild.h $(TOP)/zlib$(SUFFIX).h
|
||||
|
Loading…
Reference in New Issue
Block a user