* Local data
*/
-#define NIL 0
-/* Tail of hash chains */
-
/* Values for max_lazy_match, good_match and max_chain_length, depending on
* the desired pack level (0..9). The values given below have been tuned to
* exclude worst case performance for pathological files. Better values may be
do {
unsigned m;
m = *--p;
- *p = (Pos)(m >= wsize ? m-wsize : NIL);
+ *p = (Pos)(m >= wsize ? m-wsize : 0);
} while (--n);
#else
/* As of I make this change, gcc (4.8.*) isn't able to vectorize
for (i = 0; i < n; i++) {
Pos m = *q;
Pos t = wsize;
- *q++ = (Pos)(m >= t ? m-t: NIL);
+ *q++ = (Pos)(m >= t ? m-t: 0);
}
}
#endif /* NOT_TWEAK_COMPILER */
do {
unsigned m;
m = *--p;
- *p = (Pos)(m >= wsize ? m-wsize : NIL);
+ *p = (Pos)(m >= wsize ? m-wsize : 0);
/* If n is not on any hash chain, prev[n] is garbage but
* its value will never be used.
*/
for (i = 0; i < n; i++) {
Pos m = *q;
Pos t = wsize;
- *q++ = (Pos)(m >= t ? m-t: NIL);
+ *q++ = (Pos)(m >= t ? m-t: 0);
}
}
#endif /* NOT_TWEAK_COMPILER */
# define GZIP
#endif
-#define NIL 0
-/* Tail of hash chains */
-
-
/* ===========================================================================
* Internal compression state.
*/
* An index in this array is thus a window index modulo 32K.
*/
- Pos *head; /* Heads of the hash chains or NIL. */
+ Pos *head; /* Heads of the hash chains or 0. */
int block_start;
/* Window position at the beginning of the current output block. Gets
/* Insert the string window[strstart .. strstart+2] in the
* dictionary, and set hash_head to the head of the hash chain:
*/
- hash_head = NIL;
+ hash_head = 0;
if (LIKELY(s->lookahead >= MIN_MATCH)) {
hash_head = functable.quick_insert_string(s, s->strstart);
}
s->prev_match = (Pos)s->match_start;
match_len = MIN_MATCH-1;
- if (hash_head != NIL && s->prev_length < s->max_lazy_match && s->strstart - hash_head <= MAX_DIST(s)) {
+ if (hash_head != 0 && s->prev_length < s->max_lazy_match && s->strstart - hash_head <= MAX_DIST(s)) {
/* To simplify the code, we prevent matches with the string
* of window index 0 (in particular we have to avoid a match
* of the string with itself at the start of the input file).