]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Minor style cleanup of zng_length_code and zng_dist_code
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Thu, 16 Jul 2026 17:35:50 +0000 (19:35 +0200)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 20 Jul 2026 20:06:31 +0000 (22:06 +0200)
deflate_p.h
trees_emit.h
trees_tbl.h
utils/maketrees.c

index 18c8b6780158294f0bfb2f4a9cec3b6b8060ca81..ba9c1eb9fa69af6f75b9ec80bc0247678c67611d 100644 (file)
@@ -58,8 +58,8 @@ Z_INTERNAL void PREFIX(flush_pending)(PREFIX3(stream) *strm);
  * the current block must be flushed.
  */
 
-extern const unsigned char Z_INTERNAL zng_length_code[];
-extern const unsigned char Z_INTERNAL zng_dist_code[];
+extern Z_INTERNAL const unsigned char zng_length_code[];
+extern Z_INTERNAL const unsigned char zng_dist_code[];
 
 static inline int zng_tr_tally_lit(deflate_state *s, unsigned char c) {
     /* c is the unmatched char */
index 5ba70254ee7b955d3793e89ba312cd653919a3ad..5f073714dd82e70351793ec23e8f4e54c3c416aa 100644 (file)
@@ -14,8 +14,8 @@
 extern Z_INTERNAL const ct_data static_ltree[L_CODES+2];
 extern Z_INTERNAL const ct_data static_dtree[D_CODES];
 
-extern const unsigned char Z_INTERNAL zng_dist_code[DIST_CODE_LEN];
-extern const unsigned char Z_INTERNAL zng_length_code[STD_MAX_MATCH-STD_MIN_MATCH+1];
+extern Z_INTERNAL const unsigned char zng_dist_code[DIST_CODE_LEN];
+extern Z_INTERNAL const unsigned char zng_length_code[STD_MAX_MATCH-STD_MIN_MATCH+1];
 
 /* Combined mask + extra_bits tables for single-lookup optimization */
 extern Z_INTERNAL const uint16_t lmask_extra[LENGTH_CODES];
index 7771cfb2f6452d41da075b26b1ddd0e5ee273422..7a249ccd5bb4edebf04f3a9ad282a291b26d1067 100644 (file)
@@ -73,7 +73,7 @@ Z_INTERNAL const ct_data static_dtree[D_CODES] = {
 {{19},{5}}, {{11},{5}}, {{27},{5}}, {{ 7},{5}}, {{23},{5}}
 };
 
-const unsigned char Z_INTERNAL zng_dist_code[DIST_CODE_LEN] = {
+Z_INTERNAL const unsigned char zng_dist_code[DIST_CODE_LEN] = {
  0,  1,  2,  3,  4,  4,  5,  5,  6,  6,  6,  6,  7,  7,  7,  7,  8,  8,  8,  8,
  8,  8,  8,  8,  9,  9,  9,  9,  9,  9,  9,  9, 10, 10, 10, 10, 10, 10, 10, 10,
 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
@@ -102,7 +102,7 @@ const unsigned char Z_INTERNAL zng_dist_code[DIST_CODE_LEN] = {
 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29
 };
 
-const unsigned char Z_INTERNAL zng_length_code[STD_MAX_MATCH-STD_MIN_MATCH+1] = {
+Z_INTERNAL const unsigned char zng_length_code[STD_MAX_MATCH-STD_MIN_MATCH+1] = {
  0,  1,  2,  3,  4,  5,  6,  7,  8,  8,  9,  9, 10, 10, 11, 11, 12, 12, 12, 12,
 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19,
index 00e01a7c886e5dbbc401ea78c9eb75dd617e04c1..57c7968e97a592a9e384a5e66cc8e88c761e561f 100644 (file)
@@ -116,12 +116,12 @@ static void gen_trees_header(void) {
         printf("{{%2u},{%u}}%s", static_dtree[i].Code, static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5));
     }
 
-    printf("const unsigned char Z_INTERNAL zng_dist_code[DIST_CODE_LEN] = {\n");
+    printf("Z_INTERNAL const unsigned char zng_dist_code[DIST_CODE_LEN] = {\n");
     for (i = 0; i < DIST_CODE_LEN; i++) {
         printf("%2u%s", dist_code[i], SEPARATOR(i, DIST_CODE_LEN-1, 20));
     }
 
-    printf("const unsigned char Z_INTERNAL zng_length_code[STD_MAX_MATCH-STD_MIN_MATCH+1] = {\n");
+    printf("Z_INTERNAL const unsigned char zng_length_code[STD_MAX_MATCH-STD_MIN_MATCH+1] = {\n");
     for (i = 0; i < STD_MAX_MATCH-STD_MIN_MATCH+1; i++) {
         printf("%2u%s", length_code[i], SEPARATOR(i, STD_MAX_MATCH-STD_MIN_MATCH, 20));
     }