diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-12-18 14:47:08 -0800 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-12-18 14:47:08 -0800 |
commit | 3d85f02a098baeede07c7d8fcc5b147e805f127b (patch) | |
tree | 6d6168d78532c3a62e1b0ee29aaca4002c922a7e | |
parent | df60b50769ae9441c6ebd853948ee7da559286e0 (diff) | |
download | zlib-3d85f02a098baeede07c7d8fcc5b147e805f127b.tar.gz zlib-3d85f02a098baeede07c7d8fcc5b147e805f127b.tar.bz2 zlib-3d85f02a098baeede07c7d8fcc5b147e805f127b.zip |
Restore gzgetc function for binary compatibility.
Newly compiled applications will use the gzgetc macro.
-rw-r--r-- | as400/bndsrc | 1 | ||||
-rw-r--r-- | as400/zlib.inc | 3 | ||||
-rw-r--r-- | contrib/vstudio/vc10/zlibvc.def | 1 | ||||
-rw-r--r-- | contrib/vstudio/vc9/zlibvc.def | 1 | ||||
-rw-r--r-- | gzread.c | 12 | ||||
-rw-r--r-- | win32/zlib.def | 1 | ||||
-rw-r--r-- | zlib.h | 2 |
7 files changed, 16 insertions, 5 deletions
diff --git a/as400/bndsrc b/as400/bndsrc index 3e26283..a7df67b 100644 --- a/as400/bndsrc +++ b/as400/bndsrc | |||
@@ -53,6 +53,7 @@ STRPGMEXP PGMLVL(*CURRENT) SIGNATURE('ZLIB') | |||
53 | EXPORT SYMBOL("gzputs") | 53 | EXPORT SYMBOL("gzputs") |
54 | EXPORT SYMBOL("gzgets") | 54 | EXPORT SYMBOL("gzgets") |
55 | EXPORT SYMBOL("gzputc") | 55 | EXPORT SYMBOL("gzputc") |
56 | EXPORT SYMBOL("gzgetc") | ||
56 | EXPORT SYMBOL("gzflush") | 57 | EXPORT SYMBOL("gzflush") |
57 | EXPORT SYMBOL("gzseek") | 58 | EXPORT SYMBOL("gzseek") |
58 | EXPORT SYMBOL("gzrewind") | 59 | EXPORT SYMBOL("gzrewind") |
diff --git a/as400/zlib.inc b/as400/zlib.inc index d710e13..20e3228 100644 --- a/as400/zlib.inc +++ b/as400/zlib.inc | |||
@@ -186,6 +186,9 @@ | |||
186 | D file value like(gzFile) File pointer | 186 | D file value like(gzFile) File pointer |
187 | D c 10I 0 value Character to write | 187 | D c 10I 0 value Character to write |
188 | * | 188 | * |
189 | D gzgetc PR 10i 0 extproc('gzgetc') | ||
190 | D file value like(gzFile) File pointer | ||
191 | * | ||
189 | D gzgetc_ PR 10i 0 extproc('gzgetc_') | 192 | D gzgetc_ PR 10i 0 extproc('gzgetc_') |
190 | D file value like(gzFile) File pointer | 193 | D file value like(gzFile) File pointer |
191 | * | 194 | * |
diff --git a/contrib/vstudio/vc10/zlibvc.def b/contrib/vstudio/vc10/zlibvc.def index 5521885..6bc1e60 100644 --- a/contrib/vstudio/vc10/zlibvc.def +++ b/contrib/vstudio/vc10/zlibvc.def | |||
@@ -33,6 +33,7 @@ EXPORTS | |||
33 | zlibVersion @27 | 33 | zlibVersion @27 |
34 | gzprintf @28 | 34 | gzprintf @28 |
35 | gzputc @29 | 35 | gzputc @29 |
36 | gzgetc @30 | ||
36 | gzseek @31 | 37 | gzseek @31 |
37 | gzrewind @32 | 38 | gzrewind @32 |
38 | gztell @33 | 39 | gztell @33 |
diff --git a/contrib/vstudio/vc9/zlibvc.def b/contrib/vstudio/vc9/zlibvc.def index 5521885..6bc1e60 100644 --- a/contrib/vstudio/vc9/zlibvc.def +++ b/contrib/vstudio/vc9/zlibvc.def | |||
@@ -33,6 +33,7 @@ EXPORTS | |||
33 | zlibVersion @27 | 33 | zlibVersion @27 |
34 | gzprintf @28 | 34 | gzprintf @28 |
35 | gzputc @29 | 35 | gzputc @29 |
36 | gzgetc @30 | ||
36 | gzseek @31 | 37 | gzseek @31 |
37 | gzrewind @32 | 38 | gzrewind @32 |
38 | gztell @33 | 39 | gztell @33 |
@@ -390,10 +390,7 @@ int ZEXPORT gzgetc_(file) | |||
390 | (state->err != Z_OK && state->err != Z_BUF_ERROR)) | 390 | (state->err != Z_OK && state->err != Z_BUF_ERROR)) |
391 | return -1; | 391 | return -1; |
392 | 392 | ||
393 | /* try output buffer (no need to check for skip request) -- while | 393 | /* try output buffer (no need to check for skip request) */ |
394 | this check really isn't required since the gzgetc() macro has | ||
395 | already determined that x.have is zero, we leave it in for | ||
396 | completeness. */ | ||
397 | if (state->x.have) { | 394 | if (state->x.have) { |
398 | state->x.have--; | 395 | state->x.have--; |
399 | state->x.pos++; | 396 | state->x.pos++; |
@@ -405,6 +402,13 @@ int ZEXPORT gzgetc_(file) | |||
405 | return ret < 1 ? -1 : buf[0]; | 402 | return ret < 1 ? -1 : buf[0]; |
406 | } | 403 | } |
407 | 404 | ||
405 | #undef gzgetc | ||
406 | int ZEXPORT gzgetc(file) | ||
407 | gzFile file; | ||
408 | { | ||
409 | return gzgetc_(file); | ||
410 | } | ||
411 | |||
408 | /* -- see zlib.h -- */ | 412 | /* -- see zlib.h -- */ |
409 | int ZEXPORT gzungetc(c, file) | 413 | int ZEXPORT gzungetc(c, file) |
410 | int c; | 414 | int c; |
diff --git a/win32/zlib.def b/win32/zlib.def index 21bff1f..d96c18a 100644 --- a/win32/zlib.def +++ b/win32/zlib.def | |||
@@ -42,6 +42,7 @@ EXPORTS | |||
42 | gzputs | 42 | gzputs |
43 | gzgets | 43 | gzgets |
44 | gzputc | 44 | gzputc |
45 | gzgetc | ||
45 | gzungetc | 46 | gzungetc |
46 | gzflush | 47 | gzflush |
47 | gzseek | 48 | gzseek |
@@ -1363,8 +1363,8 @@ ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); | |||
1363 | returns the value that was written, or -1 in case of error. | 1363 | returns the value that was written, or -1 in case of error. |
1364 | */ | 1364 | */ |
1365 | 1365 | ||
1366 | /* | ||
1367 | ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); | 1366 | ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); |
1367 | /* | ||
1368 | Reads one byte from the compressed file. gzgetc returns this byte or -1 | 1368 | Reads one byte from the compressed file. gzgetc returns this byte or -1 |
1369 | in case of end of file or error. This is implemented as a macro for speed. | 1369 | in case of end of file or error. This is implemented as a macro for speed. |
1370 | As such, it does not do all of the checking the other functions do. I.e. | 1370 | As such, it does not do all of the checking the other functions do. I.e. |