diff options
| author | Mark Adler <madler@alumni.caltech.edu> | 2012-08-14 00:29:58 -0700 |
|---|---|---|
| committer | Mark Adler <madler@alumni.caltech.edu> | 2012-08-14 00:29:58 -0700 |
| commit | aa210a1b84615440e0f7fb84e03e0a5f17872279 (patch) | |
| tree | 2e1a95547a53c8a0a0fec229d53f62ed71946210 /examples | |
| parent | 360c3e9532a7086ed252e3ab187d03fb6b86c4ca (diff) | |
| download | zlib-aa210a1b84615440e0f7fb84e03e0a5f17872279.tar.gz zlib-aa210a1b84615440e0f7fb84e03e0a5f17872279.tar.bz2 zlib-aa210a1b84615440e0f7fb84e03e0a5f17872279.zip | |
Fix example/gzappend.c for proper z_const usage.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/gzappend.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/gzappend.c b/examples/gzappend.c index e9e878e..0fc42b9 100644 --- a/examples/gzappend.c +++ b/examples/gzappend.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* gzappend -- command to append to a gzip file | 1 | /* gzappend -- command to append to a gzip file |
| 2 | 2 | ||
| 3 | Copyright (C) 2003 Mark Adler, all rights reserved | 3 | Copyright (C) 2003, 2012 Mark Adler, all rights reserved |
| 4 | version 1.1, 4 Nov 2003 | 4 | version 1.2, 13 Aug 2012 |
| 5 | 5 | ||
| 6 | This software is provided 'as-is', without any express or implied | 6 | This software is provided 'as-is', without any express or implied |
| 7 | warranty. In no event will the author be held liable for any damages | 7 | warranty. In no event will the author be held liable for any damages |
| @@ -39,6 +39,7 @@ | |||
| 39 | * - Keep gzip file clean on appended file read errors | 39 | * - Keep gzip file clean on appended file read errors |
| 40 | * - Use in-place rotate instead of auxiliary buffer | 40 | * - Use in-place rotate instead of auxiliary buffer |
| 41 | * (Why you ask? Because it was fun to write!) | 41 | * (Why you ask? Because it was fun to write!) |
| 42 | * 1.2 13 Aug 2012 - Fix for proper z_const usage | ||
| 42 | */ | 43 | */ |
| 43 | 44 | ||
| 44 | /* | 45 | /* |
| @@ -170,7 +171,7 @@ typedef struct { | |||
| 170 | int size; /* 1 << size is bytes in buf */ | 171 | int size; /* 1 << size is bytes in buf */ |
| 171 | unsigned left; /* bytes available at next */ | 172 | unsigned left; /* bytes available at next */ |
| 172 | unsigned char *buf; /* buffer */ | 173 | unsigned char *buf; /* buffer */ |
| 173 | unsigned char *next; /* next byte in buffer */ | 174 | z_const unsigned char *next; /* next byte in buffer */ |
| 174 | char *name; /* file name for error messages */ | 175 | char *name; /* file name for error messages */ |
| 175 | } file; | 176 | } file; |
| 176 | 177 | ||
| @@ -467,7 +468,7 @@ int main(int argc, char **argv) | |||
| 467 | z_stream strm; | 468 | z_stream strm; |
| 468 | 469 | ||
| 469 | /* ignore command name */ | 470 | /* ignore command name */ |
| 470 | argv++; | 471 | argc--; argv++; |
| 471 | 472 | ||
| 472 | /* provide usage if no arguments */ | 473 | /* provide usage if no arguments */ |
| 473 | if (*argv == NULL) { | 474 | if (*argv == NULL) { |
