diff options
| author | Mark Adler <git@madler.net> | 2026-02-12 00:53:08 -0800 |
|---|---|---|
| committer | Mark Adler <git@madler.net> | 2026-02-12 01:01:44 -0800 |
| commit | 3f5d21e8f573a549ffc200e17dd95321db454aa1 (patch) | |
| tree | 71e7bd8651e7f58416830d5fa82a5225e10fd930 /examples/zlib_how.html | |
| parent | af0aa9b66a2d123a1ca26d9bfe138695012b045b (diff) | |
| download | zlib-3f5d21e8f573a549ffc200e17dd95321db454aa1.tar.gz zlib-3f5d21e8f573a549ffc200e17dd95321db454aa1.tar.bz2 zlib-3f5d21e8f573a549ffc200e17dd95321db454aa1.zip | |
Use underscores for Windows POSIX names in zpipe.c.
Diffstat (limited to 'examples/zlib_how.html')
| -rw-r--r-- | examples/zlib_how.html | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/zlib_how.html b/examples/zlib_how.html index 43271b98..286308b3 100644 --- a/examples/zlib_how.html +++ b/examples/zlib_how.html | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | <head> | 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| 6 | <title>zlib Usage Example</title> | 6 | <title>zlib Usage Example</title> |
| 7 | <!-- Copyright (c) 2004-2023 Mark Adler. --> | 7 | <!-- Copyright (c) 2004-2026 Mark Adler. --> |
| 8 | </head> | 8 | </head> |
| 9 | <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#00A000"> | 9 | <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#00A000"> |
| 10 | <h2 align="center"> zlib Usage Example </h2> | 10 | <h2 align="center"> zlib Usage Example </h2> |
| @@ -21,7 +21,7 @@ Without further ado, here is the program <a href="zpipe.c"><tt>zpipe.c</tt></a>: | |||
| 21 | <pre><b> | 21 | <pre><b> |
| 22 | /* zpipe.c: example of proper use of zlib's inflate() and deflate() | 22 | /* zpipe.c: example of proper use of zlib's inflate() and deflate() |
| 23 | Not copyrighted -- provided to the public domain | 23 | Not copyrighted -- provided to the public domain |
| 24 | Version 1.4 11 December 2005 Mark Adler */ | 24 | Version 1.5 11 February 2026 Mark Adler */ |
| 25 | 25 | ||
| 26 | /* Version history: | 26 | /* Version history: |
| 27 | 1.0 30 Oct 2004 First version | 27 | 1.0 30 Oct 2004 First version |
| @@ -31,6 +31,7 @@ Without further ado, here is the program <a href="zpipe.c"><tt>zpipe.c</tt></a>: | |||
| 31 | 1.3 6 Apr 2005 Remove incorrect assertion in inf() | 31 | 1.3 6 Apr 2005 Remove incorrect assertion in inf() |
| 32 | 1.4 11 Dec 2005 Add hack to avoid MSDOS end-of-line conversions | 32 | 1.4 11 Dec 2005 Add hack to avoid MSDOS end-of-line conversions |
| 33 | Avoid some compiler warnings for input and output buffers | 33 | Avoid some compiler warnings for input and output buffers |
| 34 | 1.5 11 Feb 2026 Use underscores for Windows POSIX names | ||
| 34 | */ | 35 | */ |
| 35 | </b></pre><!-- --> | 36 | </b></pre><!-- --> |
| 36 | We now include the header files for the required definitions. From | 37 | We now include the header files for the required definitions. From |
| @@ -60,7 +61,7 @@ This sets the input and output to binary which suppresses the end-of-line conver | |||
| 60 | #if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) | 61 | #if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) |
| 61 | # include <fcntl.h> | 62 | # include <fcntl.h> |
| 62 | # include <io.h> | 63 | # include <io.h> |
| 63 | # define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) | 64 | # define SET_BINARY_MODE(file) _setmode(_fileno(file), _O_BINARY) |
| 64 | #else | 65 | #else |
| 65 | # define SET_BINARY_MODE(file) | 66 | # define SET_BINARY_MODE(file) |
| 66 | #endif | 67 | #endif |
| @@ -538,8 +539,8 @@ int main(int argc, char **argv) | |||
| 538 | } | 539 | } |
| 539 | </b></pre> | 540 | </b></pre> |
| 540 | <hr> | 541 | <hr> |
| 541 | <i>Last modified 24 January 2023<br> | 542 | <i>Last modified 12 February 2026<br> |
| 542 | Copyright © 2004-2023 Mark Adler</i><br> | 543 | Copyright © 2004-2026 Mark Adler</i><br> |
| 543 | <a rel="license" href="http://creativecommons.org/licenses/by-nd/4.0/"> | 544 | <a rel="license" href="http://creativecommons.org/licenses/by-nd/4.0/"> |
| 544 | <img alt="Creative Commons License" style="border-width:0" | 545 | <img alt="Creative Commons License" style="border-width:0" |
| 545 | src="https://i.creativecommons.org/l/by-nd/4.0/88x31.png"></a> | 546 | src="https://i.creativecommons.org/l/by-nd/4.0/88x31.png"></a> |
