aboutsummaryrefslogtreecommitdiff
path: root/deflate.c
diff options
context:
space:
mode:
authorJan Nijtmans <jan.nijtmans@gmail.com>2026-02-03 13:21:58 +0000
committerMark Adler <git@madler.net>2026-02-03 14:31:01 -0800
commit060c9e7c45f3ef736acffc35a8a83c52763f9a95 (patch)
tree2b7fdd08bc8c0edee9c2f26d5474d27242731f0a /deflate.c
parent9f25df2c80c2b26c8b050fba880f0851d9d243ea (diff)
downloadzlib-060c9e7c45f3ef736acffc35a8a83c52763f9a95.tar.gz
zlib-060c9e7c45f3ef736acffc35a8a83c52763f9a95.tar.bz2
zlib-060c9e7c45f3ef736acffc35a8a83c52763f9a95.zip
Remove all uses of the obsolete keyword "register".
Diffstat (limited to 'deflate.c')
-rw-r--r--deflate.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/deflate.c b/deflate.c
index 6ec1e456..1c29e2b4 100644
--- a/deflate.c
+++ b/deflate.c
@@ -1377,9 +1377,9 @@ int ZEXPORT deflateCopy(z_streamp dest, z_streamp source) {
1377 */ 1377 */
1378local uInt longest_match(deflate_state *s, IPos cur_match) { 1378local uInt longest_match(deflate_state *s, IPos cur_match) {
1379 unsigned chain_length = s->max_chain_length;/* max hash chain length */ 1379 unsigned chain_length = s->max_chain_length;/* max hash chain length */
1380 register Bytef *scan = s->window + s->strstart; /* current string */ 1380 Bytef *scan = s->window + s->strstart; /* current string */
1381 register Bytef *match; /* matched string */ 1381 Bytef *match; /* matched string */
1382 register int len; /* length of current match */ 1382 int len; /* length of current match */
1383 int best_len = (int)s->prev_length; /* best match length so far */ 1383 int best_len = (int)s->prev_length; /* best match length so far */
1384 int nice_match = s->nice_match; /* stop if match long enough */ 1384 int nice_match = s->nice_match; /* stop if match long enough */
1385 IPos limit = s->strstart > (IPos)MAX_DIST(s) ? 1385 IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
@@ -1394,13 +1394,13 @@ local uInt longest_match(deflate_state *s, IPos cur_match) {
1394 /* Compare two bytes at a time. Note: this is not always beneficial. 1394 /* Compare two bytes at a time. Note: this is not always beneficial.
1395 * Try with and without -DUNALIGNED_OK to check. 1395 * Try with and without -DUNALIGNED_OK to check.
1396 */ 1396 */
1397 register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; 1397 Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
1398 register ush scan_start = *(ushf*)scan; 1398 ush scan_start = *(ushf*)scan;
1399 register ush scan_end = *(ushf*)(scan + best_len - 1); 1399 ush scan_end = *(ushf*)(scan + best_len - 1);
1400#else 1400#else
1401 register Bytef *strend = s->window + s->strstart + MAX_MATCH; 1401 Bytef *strend = s->window + s->strstart + MAX_MATCH;
1402 register Byte scan_end1 = scan[best_len - 1]; 1402 Byte scan_end1 = scan[best_len - 1];
1403 register Byte scan_end = scan[best_len]; 1403 Byte scan_end = scan[best_len];
1404#endif 1404#endif
1405 1405
1406 /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. 1406 /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
@@ -1524,10 +1524,10 @@ local uInt longest_match(deflate_state *s, IPos cur_match) {
1524 * Optimized version for FASTEST only 1524 * Optimized version for FASTEST only
1525 */ 1525 */
1526local uInt longest_match(deflate_state *s, IPos cur_match) { 1526local uInt longest_match(deflate_state *s, IPos cur_match) {
1527 register Bytef *scan = s->window + s->strstart; /* current string */ 1527 Bytef *scan = s->window + s->strstart; /* current string */
1528 register Bytef *match; /* matched string */ 1528 Bytef *match; /* matched string */
1529 register int len; /* length of current match */ 1529 int len; /* length of current match */
1530 register Bytef *strend = s->window + s->strstart + MAX_MATCH; 1530 Bytef *strend = s->window + s->strstart + MAX_MATCH;
1531 1531
1532 /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. 1532 /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
1533 * It is easy to get rid of this optimization if necessary. 1533 * It is easy to get rid of this optimization if necessary.