]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Rename ZLIB_REGISTER to Z_REGISTER for consistency.
authorNathan Moinvaziri <nathan@solidstatenetworks.com>
Sun, 23 Aug 2020 01:07:50 +0000 (18:07 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 31 Aug 2020 10:33:16 +0000 (12:33 +0200)
arch/arm/crc32_acle.c
arch/arm/slide_neon.c
arch/s390/dfltcc_common.c
arch/s390/dfltcc_detail.h
crc32.c
match_tpl.h
trees.c
zutil.h

index 82731223088865c2db5b6f926e313396e405616f..88ba6c38c61d86070762cb1319642487f1b9c42e 100644 (file)
@@ -12,9 +12,9 @@
 #include "../../zutil.h"
 
 uint32_t crc32_acle(uint32_t crc, const unsigned char *buf, uint64_t len) {
-    ZLIB_REGISTER uint32_t c;
-    ZLIB_REGISTER const uint16_t *buf2;
-    ZLIB_REGISTER const uint32_t *buf4;
+    Z_REGISTER uint32_t c;
+    Z_REGISTER const uint16_t *buf2;
+    Z_REGISTER const uint32_t *buf4;
 
     c = ~crc;
     if (len && ((ptrdiff_t)buf & 1)) {
index e5bea64f069da4da1c69aed182a04d69ea544d79..8b1736db958561ceb73607cfa657fa04675009d3 100644 (file)
@@ -19,8 +19,8 @@
 
 /* SIMD version of hash_chain rebase */
 static inline void slide_hash_chain(Pos *table, unsigned int entries, uint16_t window_size) {
-    ZLIB_REGISTER uint16x8_t v, *p;
-    ZLIB_REGISTER size_t n;
+    Z_REGISTER uint16x8_t v, *p;
+    Z_REGISTER size_t n;
 
     size_t size = entries*sizeof(table[0]);
     Assert((size % sizeof(uint16x8_t) * 8 == 0), "hash table size err");
index b8ccfd82531cbb5bcfccf1eae6b148895d8e8f3d..f80d76bd88be77ae5abcce16904c27661530ee51 100644 (file)
@@ -14,7 +14,7 @@
 */
 static inline int is_dfltcc_enabled(void) {
     uint64_t facilities[(DFLTCC_FACILITY / 64) + 1];
-    ZLIB_REGISTER uint8_t r0 __asm__("r0");
+    Z_REGISTER uint8_t r0 __asm__("r0");
 
     memset(facilities, 0, sizeof(facilities));
     r0 = sizeof(facilities) / sizeof(facilities[0]) - 1;
index 6b2905bc356dfd0d0d207837363eda36c2368ac2..22886242fc4d2b4081a0d7ef107d45e11a11062b 100644 (file)
@@ -51,12 +51,12 @@ static inline dfltcc_cc dfltcc(int fn, void *param,
     size_t t3 = len1 ? *len1 : 0;
     const unsigned char *t4 = op2 ? *op2 : NULL;
     size_t t5 = len2 ? *len2 : 0;
-    ZLIB_REGISTER int r0 __asm__("r0") = fn;
-    ZLIB_REGISTER void *r1 __asm__("r1") = param;
-    ZLIB_REGISTER unsigned char *r2 __asm__("r2") = t2;
-    ZLIB_REGISTER size_t r3 __asm__("r3") = t3;
-    ZLIB_REGISTER const unsigned char *r4 __asm__("r4") = t4;
-    ZLIB_REGISTER size_t r5 __asm__("r5") = t5;
+    Z_REGISTER int r0 __asm__("r0") = fn;
+    Z_REGISTER void *r1 __asm__("r1") = param;
+    Z_REGISTER unsigned char *r2 __asm__("r2") = t2;
+    Z_REGISTER size_t r3 __asm__("r3") = t3;
+    Z_REGISTER const unsigned char *r4 __asm__("r4") = t4;
+    Z_REGISTER size_t r5 __asm__("r5") = t5;
     int cc;
 
     __asm__ volatile(
diff --git a/crc32.c b/crc32.c
index d46827307de91a53756e0099317da0bf1bdf294f..19b6a01937f284b1e9e902903fe4b6c0a384f44c 100644 (file)
--- a/crc32.c
+++ b/crc32.c
@@ -100,8 +100,8 @@ uint32_t ZEXPORT PREFIX(crc32)(uint32_t crc, const unsigned char *buf, uint32_t
 
 /* ========================================================================= */
 ZLIB_INTERNAL uint32_t crc32_little(uint32_t crc, const unsigned char *buf, uint64_t len) {
-    ZLIB_REGISTER uint32_t c;
-    ZLIB_REGISTER const uint32_t *buf4;
+    Z_REGISTER uint32_t c;
+    Z_REGISTER const uint32_t *buf4;
 
     c = crc;
     c = ~c;
@@ -142,8 +142,8 @@ ZLIB_INTERNAL uint32_t crc32_little(uint32_t crc, const unsigned char *buf, uint
 
 /* ========================================================================= */
 ZLIB_INTERNAL uint32_t crc32_big(uint32_t crc, const unsigned char *buf, uint64_t len) {
-    ZLIB_REGISTER uint32_t c;
-    ZLIB_REGISTER const uint32_t *buf4;
+    Z_REGISTER uint32_t c;
+    Z_REGISTER const uint32_t *buf4;
 
     c = ZSWAP32(crc);
     c = ~c;
index b853b2a3158e77edf6efd3d7bb8f532694572d54..306f9a070ceb52cfde96dbd8c520ddf04886c986 100644 (file)
@@ -34,8 +34,8 @@ ZLIB_INTERNAL int32_t LONGEST_MATCH(deflate_state *const s, Pos cur_match) {
     const unsigned wmask = s->w_mask;
     unsigned char *window = s->window;
     unsigned char *scan = window + strstart;
-    ZLIB_REGISTER unsigned char *mbase_start = window;
-    ZLIB_REGISTER unsigned char *mbase_end;
+    Z_REGISTER unsigned char *mbase_start = window;
+    Z_REGISTER unsigned char *mbase_end;
     const Pos *prev = s->prev;
     Pos limit;
     uint32_t chain_length, nice_match, best_len, offset;
@@ -98,7 +98,7 @@ ZLIB_INTERNAL int32_t LONGEST_MATCH(deflate_state *const s, Pos cur_match) {
 
     Assert((unsigned long)strstart <= s->window_size - MIN_LOOKAHEAD, "need lookahead");
     for (;;) {
-        ZLIB_REGISTER unsigned int len;
+        Z_REGISTER unsigned int len;
         if (cur_match >= strstart)
             break;
 
diff --git a/trees.c b/trees.c
index 83d77c154786e8b171293818b836402f19465b73..e7a9fcf05f6e4bc3791fe5666aaaed77343b250a 100644 (file)
--- a/trees.c
+++ b/trees.c
@@ -816,7 +816,7 @@ static void bi_flush(deflate_state *s) {
 ZLIB_INTERNAL unsigned bi_reverse(unsigned code, int len) {
     /* code: the value to invert */
     /* len: its bit length */
-    ZLIB_REGISTER unsigned res = 0;
+    Z_REGISTER unsigned res = 0;
     do {
         res |= code & 1;
         code >>= 1, res <<= 1;
diff --git a/zutil.h b/zutil.h
index 4fb2e2fd21b56ecdd0ba73bcda1862df6bbf86a2..647e2d40b1571c06ee5b6d18f90e46e1434813d0 100644 (file)
--- a/zutil.h
+++ b/zutil.h
@@ -19,9 +19,9 @@
 #endif
 
 #ifndef __cplusplus
-#  define ZLIB_REGISTER register
+#  define Z_REGISTER register
 #else
-#  define ZLIB_REGISTER
+#  define Z_REGISTER
 #endif
 
 #ifndef Z_TLS