diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-12-16 23:58:31 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-12-16 23:58:31 +0000 |
commit | ea064523b82a76cc6a1a61843793695ab6227472 (patch) | |
tree | a0eea1b42577b3dc5a559a3d0f96302ed4bef21e /sys/lib/libz/infback.c | |
parent | 119ff8aeb381bd2409167fb7eeaf9ea9e5b43fa9 (diff) |
Add #ifdef SMALL and #ifdef SLOW and include sys/unistd.h instead of unistd.h
Diffstat (limited to 'sys/lib/libz/infback.c')
-rw-r--r-- | sys/lib/libz/infback.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/lib/libz/infback.c b/sys/lib/libz/infback.c index 110b03b857f..9496e675c7e 100644 --- a/sys/lib/libz/infback.c +++ b/sys/lib/libz/infback.c @@ -307,7 +307,11 @@ void FAR *out_desc; state->mode = TABLE; break; case 3: +#ifdef SMALL + strm->msg = "error"; +#else strm->msg = (char *)"invalid block type"; +#endif state->mode = BAD; } DROPBITS(2); @@ -318,7 +322,11 @@ void FAR *out_desc; BYTEBITS(); /* go to byte boundary */ NEEDBITS(32); if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { +#ifdef SMALL + strm->msg = "error"; +#else strm->msg = (char *)"invalid stored block lengths"; +#endif state->mode = BAD; break; } @@ -356,7 +364,11 @@ void FAR *out_desc; DROPBITS(4); #ifndef PKZIP_BUG_WORKAROUND if (state->nlen > 286 || state->ndist > 30) { +#ifdef SMALL + strm->msg = "error"; +#else strm->msg = (char *)"too many length or distance symbols"; +#endif state->mode = BAD; break; } @@ -458,6 +470,7 @@ void FAR *out_desc; state->mode = LEN; case LEN: +#ifndef SLOW /* use inflate_fast() if we have enough input and output */ if (have >= 6 && left >= 258) { RESTORE(); @@ -467,6 +480,7 @@ void FAR *out_desc; LOAD(); break; } +#endif /* get a literal, length, or end-of-block code */ for (;;) { |