Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: third_party/zlib/contrib/minizip/mztools.c

Issue 11632002: Use generated shim headers for zlib. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 Additional tools for Minizip 2 Additional tools for Minizip
3 Code: Xavier Roche '2004 3 Code: Xavier Roche '2004
4 License: Same as ZLIB (www.gzip.org) 4 License: Same as ZLIB (www.gzip.org)
5 */ 5 */
6 6
7 /* Code */ 7 /* Code */
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
11 #if defined(USE_SYSTEM_ZLIB)
12 #include <zlib.h>
13 #else
14 #include "third_party/zlib/zlib.h" 11 #include "third_party/zlib/zlib.h"
15 #endif
16 #include "unzip.h" 12 #include "unzip.h"
17 13
18 #define READ_8(adr) ((unsigned char)*(adr)) 14 #define READ_8(adr) ((unsigned char)*(adr))
19 #define READ_16(adr) ( READ_8(adr) | (READ_8(adr+1) << 8) ) 15 #define READ_16(adr) ( READ_8(adr) | (READ_8(adr+1) << 8) )
20 #define READ_32(adr) ( READ_16(adr) | (READ_16((adr)+2) << 16) ) 16 #define READ_32(adr) ( READ_16(adr) | (READ_16((adr)+2) << 16) )
21 17
22 #define WRITE_8(buff, n) do { \ 18 #define WRITE_8(buff, n) do { \
23 *((unsigned char*)(buff)) = (unsigned char) ((n) & 0xff); \ 19 *((unsigned char*)(buff)) = (unsigned char) ((n) & 0xff); \
24 } while(0) 20 } while(0)
25 #define WRITE_16(buff, n) do { \ 21 #define WRITE_16(buff, n) do { \
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 } 272 }
277 if (bytesRecovered != NULL) { 273 if (bytesRecovered != NULL) {
278 *bytesRecovered = totalBytes; 274 *bytesRecovered = totalBytes;
279 } 275 }
280 } 276 }
281 } else { 277 } else {
282 err = Z_STREAM_ERROR; 278 err = Z_STREAM_ERROR;
283 } 279 }
284 return err; 280 return err;
285 } 281 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698