FILE COMPARISON
Produced: 19/09/2007 13:51:59
Mode: Just Differences
Left base folder: original zlib source code, as taken from zlib.net
Right base folder: zlib source code incorperated in ezlib2
File: adler32.cpp

|  | -+ | 1 | /* Portions Copyright (c) Symbian Software Ltd 2007. All rights reserved. */
1 | /* adler32.c -- compute the Adler-32 checksum of a data stream | <> | 3 | /* adler32.cpp -- compute the Adler-32 checksum of a data stream
9 | #include "zlib.h" | <> | 11 | #include "libzcore.h"
|  | -+ | 61 | #ifdef __SYMBIAN32__
|  |  | 62 | EXPORT_C uLong adler32_r(uLong adler,const Bytef * buf,uInt len)
|  |  | 63 | #else
|  | -+ | 68 | #endif /* __SYMBIAN32__ */
|  | -+ | 137 | #ifdef __SYMBIAN32__
|  |  | 138 | EXPORT_C uLong adler32_combine_r(uLong adler1, uLong adler2, z_off_t len2)
|  |  | 139 | #else
|  | -+ | 144 | #endif /* __SYMBIAN32__ */

File: compress.cpp

|  | -+ | 1 | /* Portions Copyright (c) Symbian Software Ltd 2007. All rights reserved. */
1 | /* compress.c -- compress a memory buffer | <> | 3 | /* compress.cpp -- compress a memory buffer
9 | #include "zlib.h" | <> | 11 | #include "libzcore.h"
|  | -+ | 25 | #ifdef __SYMBIAN32__
|  |  | 26 | EXPORT_C int compress2_r (Bytef * dest, uLongf * destLen,const Bytef * source,uLong sourceLen,int level)
|  |  | 27 | #else
|  | -+ | 34 | #endif //__SYMBIAN32__
46 | err = deflateInit(&stream, level); | <> | 53 | err = deflateInit_r(&stream, level);
49 | err = deflate(&stream, Z_FINISH); | <> | 56 | err = deflate_r(&stream, Z_FINISH);
51 | deflateEnd(&stream); | <> | 58 | deflateEnd_r(&stream);
56 | err = deflateEnd(&stream); | <> | 63 | err = deflateEnd_r(&stream);
|  | -+ | 70 | #ifdef __SYMBIAN32__
|  |  | 71 | EXPORT_C int compress_r (Bytef * dest, uLongf * destLen, const Bytef * source, uLong sourceLen)
|  |  | 72 | #else
|  | -+ | 78 | #endif //__SYMBIAN32__
68 | return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); | <> | 80 | return compress2_r(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
|  | -+ | 90 | #ifdef __SYMBIAN32__
|  |  | 91 | EXPORT_C uLong compressBound_r (uLong sourceLen)
|  |  | 92 | #else
|  | -+ | 95 | #endif //__SYMBIAN32__

File: crc32.cpp

|  | -+ | 1 | /* Portions Copyright (c) Symbian Software Ltd 2007. All rights reserved. */
1 | /* crc32.c -- compute the CRC-32 of a data stream | <> | 3 | /* crc32.cpp -- compute the CRC-32 of a data stream
|  | -+ | 31 | /* These defines are usually taken from limits.h, however this file is not supported in Symbian. */
|  |  | 32 | #if (defined(__SYMBIAN32__) && !defined(__TOOLS2__) && !defined(__TOOLS__))
|  |  | 33 | #define UINT_MAX 0xffffffffU /* Values taken from _limits.h:from PIPS */
|  |  | 34 | #define ULONG_MAX 0xffffffffUL /* Removing may slow down the crc operation */
|  |  | 35 | typedef int ptrdiff_t;
|  |  | 36 | #endif /* __SYMBIAN32__ && !__TOOLS2__) && !__TOOLS__ */
31 | #define local static | +- |  |
|  | -+ | 44 | # if (!defined(__SYMBIAN32__) || defined(__TOOLS2__) || defined(__TOOLS__)) /* only include for Tools builds */
|  | -+ | 46 | # endif /* !__SYMBIAN32__ || __TOOLS2__) || __TOOLS__ */
|  | -+ | 193 | #ifdef __SYMBIAN32__
|  |  | 194 | local void write_table(FILE * out, const unsigned long FAR * table)
|  |  | 195 | #else
|  | -+ | 199 | #endif //__SYMBIAN32__
|  | -+ | 219 | #ifdef __SYMBIAN32__
|  |  | 220 | EXPORT_C const unsigned long FAR * get_crc_table_r()
|  |  | 221 | #else
|  | -+ | 223 | #endif //__SYMBIAN32__
|  | -+ | 238 | #ifdef __SYMBIAN32__
|  |  | 239 | EXPORT_C unsigned long crc32_r( unsigned long crc, const unsigned char FAR * buf,unsigned len)
|  |  | 240 | #else
|  | -+ | 245 | #endif //__SYMBIAN32__
|  | -+ | 264 | else
|  |  | 265 | {
|  | -+ | 276 | #ifdef BYFOUR
|  |  | 277 | }
|  |  | 278 | #endif
|  | -+ | 291 | #ifdef __SYMBIAN32__
|  |  | 292 | local unsigned long crc32_little( unsigned long crc,const unsigned char FAR * buf,unsigned len)
|  |  | 293 | #else
|  | -+ | 298 | #endif //__SYMBIAN32__
|  | -+ | 335 | #ifdef __SYMBIAN32__
|  |  | 336 | local unsigned long crc32_big( unsigned long crc, const unsigned char FAR * buf,unsigned len)
|  |  | 337 | #else
|  | -+ | 342 | #endif //__SYMBIAN32__
|  | -+ | 380 | #ifdef __SYMBIAN32__
|  |  | 381 | local unsigned long gf2_matrix_times( unsigned long * mat, unsigned long vec)
|  |  | 382 | #else
|  | -+ | 386 | #endif //__SYMBIAN32__
|  | -+ | 402 | #ifdef __SYMBIAN32__
|  |  | 403 | local void gf2_matrix_square( unsigned long * square,unsigned long * mat)
|  |  | 404 | #else
|  | -+ | 408 | #endif //__SYMBIAN32__
|  | -+ | 419 | #ifdef __SYMBIAN32__
|  |  | 420 | EXPORT_C uLong crc32_combine_r(uLong crc1,uLong crc2,z_off_t len2)
|  |  | 421 | #else
|  | -+ | 426 | #endif //__SYMBIAN32__

File: deflate.cpp

|  | -+ | 1 | /* Portions Copyright (c) Symbian Software Ltd 2007. All rights reserved. */
1 | /* deflate.c -- compress data using the deflation algorithm | <> | 3 | /* deflate.cpp -- compress data using the deflation algorithm
|  | -+ | 207 | #ifdef __SYMBIAN32__
|  |  | 208 | EXPORT_C int deflateInit__r( z_streamp strm,int level,const char * version,int stream_size)
|  |  | 209 | #else
|  | -+ | 215 | #endif //__SYMBIAN32__
210 | return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, | <> | 217 | return deflateInit2__r(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
|  | -+ | 223 | #ifdef __SYMBIAN32__
|  |  | 224 | EXPORT_C int deflateInit2__r(z_streamp strm, int level,int method,int windowBits,int memLevel,int strategy,
|  |  | 225 | const char * version,int stream_size)
|  |  | 226 | #else
|  | -+ | 237 | #endif //__SYMBIAN32__
301 | deflateEnd (strm); | <> | 314 | deflateEnd_r (strm);
311 | return deflateReset(strm); | <> | 324 | return deflateReset_r (strm);
|  | -+ | 328 | #ifdef __SYMBIAN32__
|  |  | 329 | EXPORT_C int deflateSetDictionary_r (z_streamp strm, const Bytef * dictionary,uInt dictLength)
|  |  | 330 | #else
|  | -+ | 335 | #endif //__SYMBIAN32__
|  | -+ | 342 | // Line to stop compiler warning about unused mandatory global variable 'deflate_copyright'
|  |  | 343 | char dontCare = deflate_copyright[0]; dontCare = dontCare;
332 | strm->adler = adler32(strm->adler, dictionary, dictLength); | <> | 352 | strm->adler = adler32_r(strm->adler, dictionary, dictLength);
|  | -+ | 377 | #ifdef __SYMBIAN32__
|  |  | 378 | EXPORT_C int deflateReset_r (z_streamp strm)
|  |  | 379 | #else
|  | -+ | 382 | #endif //__SYMBIAN32__
381 | s->wrap == 2 ? crc32(0L, Z_NULL, 0) : | <> | 405 | s->wrap == 2 ? crc32_r(0L, Z_NULL, 0) :
383 | adler32(0L, Z_NULL, 0); | <> | 407 | adler32_r(0L, Z_NULL, 0);
|  | -+ | 418 | #ifdef __SYMBIAN32__
|  |  | 419 | EXPORT_C int deflateSetHeader_r (z_streamp strm, gz_headerp head)
|  |  | 420 | #else
|  | -+ | 424 | #endif //__SYMBIAN32__
|  | -+ | 433 | #ifdef __SYMBIAN32__
|  |  | 434 | EXPORT_C int deflatePrime_r (z_streamp strm,int bits,int value)
|  |  | 435 | #else
|  | -+ | 440 | #endif //__SYMBIAN32__
|  | -+ | 450 | #ifdef __SYMBIAN32__
|  |  | 451 | EXPORT_C int deflateParams_r (z_streamp strm,int level,int strategy)
|  |  | 452 | #else
|  | -+ | 457 | #endif //__SYMBIAN32__
440 | err = deflate(strm, Z_PARTIAL_FLUSH); | <> | 478 | err = deflate_r(strm, Z_PARTIAL_FLUSH);
|  | -+ | 493 | #ifdef __SYMBIAN32__
|  |  | 494 | EXPORT_C int deflateTune_r(z_streamp strm, int good_length, int max_lazy, int nice_length, int max_chain)
|  |  | 495 | #else
|  | -+ | 502 | #endif //__SYMBIAN32__
|  | -+ | 533 | #ifdef __SYMBIAN32__
|  |  | 534 | EXPORT_C uLong deflateBound_r(z_streamp strm,uLong sourceLen)
|  |  | 535 | #else
|  | -+ | 539 | #endif //__SYMBIAN32__
510 | return compressBound(sourceLen); | <> | 558 | return compressBound_r(sourceLen);
|  | -+ | 567 | #ifdef __SYMBIAN32__
|  |  | 568 | local void putShortMSB (deflate_state * s, uInt b)
|  |  | 569 | #else
|  | -+ | 573 | #endif //__SYMBIAN32__
|  | -+ | 585 | #ifdef __SYMBIAN32__
|  |  | 586 | local void flush_pending(z_streamp strm)
|  |  | 587 | #else
|  | -+ | 590 | #endif //__SYMBIAN32__
|  | -+ | 610 | #ifdef __SYMBIAN32__
|  |  | 611 | EXPORT_C int deflate_r (z_streamp strm,int flush)
|  |  | 612 | #else
|  | -+ | 616 | #endif //__SYMBIAN32__
580 | strm->adler = crc32(0L, Z_NULL, 0); | <> | 642 | strm->adler = crc32_r(0L, Z_NULL, 0);
616 | strm->adler = crc32(strm->adler, s->pending_buf, | <> | 678 | strm->adler = crc32_r(strm->adler, s->pending_buf,
648 | strm->adler = adler32(0L, Z_NULL, 0); | <> | 710 | strm->adler = adler32_r(0L, Z_NULL, 0);
659 | strm->adler = crc32(strm->adler, s->pending_buf + beg, | <> | 721 | strm->adler = crc32_r(strm->adler, s->pending_buf + beg,
670 | strm->adler = crc32(strm->adler, s->pending_buf + beg, | <> | 732 | strm->adler = crc32_r(strm->adler, s->pending_buf + beg,
688 | strm->adler = crc32(strm->adler, s->pending_buf + beg, | <> | 750 | strm->adler = crc32_r(strm->adler, s->pending_buf + beg,
701 | strm->adler = crc32(strm->adler, s->pending_buf + beg, | <> | 763 | strm->adler = crc32_r(strm->adler, s->pending_buf + beg,
719 | strm->adler = crc32(strm->adler, s->pending_buf + beg, | <> | 781 | strm->adler = crc32_r(strm->adler, s->pending_buf + beg,
732 | strm->adler = crc32(strm->adler, s->pending_buf + beg, | <> | 794 | strm->adler = crc32_r(strm->adler, s->pending_buf + beg,
747 | strm->adler = crc32(0L, Z_NULL, 0); | <> | 809 | strm->adler = crc32_r(0L, Z_NULL, 0);
|  | -+ | 921 | #ifdef __SYMBIAN32__
|  |  | 922 | EXPORT_C int deflateEnd_r (z_streamp strm)
|  |  | 923 | #else
|  | -+ | 926 | #endif //__SYMBIAN32__
|  | -+ | 961 | #ifdef __SYMBIAN32__
|  |  | 962 | EXPORT_C int deflateCopy_r (z_streamp dest, z_streamp source)
|  |  | 963 | #else
|  | -+ | 967 | #endif //__SYMBIAN32__
928 | deflateEnd (dest); | <> | 999 | deflateEnd_r (dest);
|  | -+ | 1027 | #ifdef __SYMBIAN32__
|  |  | 1028 | local int read_buf(z_streamp strm,Bytef * buf,unsigned size)
|  |  | 1029 | #else
|  | -+ | 1034 | #endif //__SYMBIAN32__
969 | strm->adler = adler32(strm->adler, strm->next_in, len); | <> | 1044 | strm->adler = adler32_r(strm->adler, strm->next_in, len);
973 | strm->adler = crc32(strm->adler, strm->next_in, len); | <> | 1048 | strm->adler = crc32_r(strm->adler, strm->next_in, len);
|  | -+ | 1062 | #ifdef __SYMBIAN32__
|  |  | 1063 | local void lm_init (deflate_state * s)
|  |  | 1064 | #else
|  | -+ | 1067 | #endif //__SYMBIAN32__
|  | -+ | 1107 | #ifdef __SYMBIAN32__
|  |  | 1108 | local uInt longest_match(deflate_state * s,IPos cur_match)
|  |  | 1109 | #else
|  | -+ | 1113 | #endif //__SYMBIAN32__
|  | -+ | 1259 | #ifdef __SYMBIAN32__
|  |  | 1260 | local uInt longest_match_fast(deflate_state * s,IPos cur_match)
|  |  | 1261 | #else
|  | -+ | 1265 | #endif //__SYMBIAN32__
|  | -+ | 1320 | #ifdef __SYMBIAN32__
|  |  | 1321 | local void check_match( deflate_state * s,IPos start, match,int length)
|  |  | 1322 | #else
|  | -+ | 1327 | #endif //__SYMBIAN32__
|  | -+ | 1358 | #ifdef __SYMBIAN32__
|  |  | 1359 | local void fill_window( deflate_state * s)
|  |  | 1360 | #else
|  | -+ | 1363 | #endif //__SYMBIAN32__
|  | -+ | 1486 | #ifdef __SYMBIAN32__
|  |  | 1487 | local block_state deflate_stored(deflate_state * s,int flush)
|  |  | 1488 | #else
|  | -+ | 1492 | #endif //__SYMBIAN32__
|  | -+ | 1548 | #ifdef __SYMBIAN32__
|  |  | 1549 | local block_state deflate_fast( deflate_state * s,int flush)
|  |  | 1550 | #else
|  | -+ | 1554 | #endif //__SYMBIAN32__
|  | -+ | 1658 | #ifdef __SYMBIAN32__
|  |  | 1659 | local block_state deflate_slow( deflate_state * s,int flush)
|  |  | 1660 | #else
|  | -+ | 1664 | #endif //__SYMBIAN32__

File: deflate.h

|  | -+ | 1 | /* Portions Copyright (c) Symbian Software Ltd 2007. All rights reserved. */
|  | -+ | 86 | #ifdef SYMBIAN_EZLIB_DEVICE
|  |  | 87 | const static_tree_desc *stat_desc; /* the corresponding static tree */
|  |  | 88 | #else
|  | -+ | 90 | #endif //SYMBIAN_EZLIB_DEVICE
316 | { uch len = (length); \ | <> | 323 | { uch len = (uch)(length); /* suspect downcast from uInt to uch */\
317 | ush dist = (distance); \ |  | 324 | ush dist = (ush)(distance); /* suspect downcast from uInt to ush */\

File: gzio.cpp

|  | -+ | 1 | /* Portions Copyright (c) Symbian Software Ltd 2007. All rights reserved. */
11 |  | <> | 13 | #include "libzgzio.h" /* libzgzio.h must be included BEFORE zutil.h, as its header guard is used in zutil.h */
|  | -+ | 77 | #ifdef SYMBIAN_EZLIB_DEVICE
|  |  | 78 | /* This array is a copy of the one originally defined in zutil.cpp. It is
|  |  | 79 | required here as zutil.cpp is now compiled seperately in libzcore.dll */
|  |  | 80 | const char * const z_errmsg[10] = {
|  |  | 81 | "need dictionary", /* Z_NEED_DICT 2 */
|  |  | 82 | "stream end", /* Z_STREAM_END 1 */
|  |  | 83 | "", /* Z_OK 0 */
|  |  | 84 | "file error", /* Z_ERRNO (-1) */
|  |  | 85 | "stream error", /* Z_STREAM_ERROR (-2) */
|  |  | 86 | "data error", /* Z_DATA_ERROR (-3) */
|  |  | 87 | "insufficient memory", /* Z_MEM_ERROR (-4) */
|  |  | 88 | "buffer error", /* Z_BUF_ERROR (-5) */
|  |  | 89 | "incompatible version",/* Z_VERSION_ERROR (-6) */
|  |  | 90 | ""};
|  |  | 91 | #endif /* SYMBIAN_EZLIB_DEVICE */
|  | -+ | 110 | #ifdef __SYMBIAN32__
|  |  | 111 | local gzFile gz_open (const char * path,const char * mode, int fd)
|  |  | 112 | #else
|  | -+ | 117 | #endif /* __SYMBIAN32__ */
123 | s->crc = crc32(0L, Z_NULL, 0); | <> | 145 | s->crc = crc32_r(0L, Z_NULL, 0);
155 | err = deflateInit2(&(s->stream), level, | <> | 177 | err = deflateInit2_r(&(s->stream), level,
167 | err = inflateInit2(&(s->stream), -MAX_WBITS); | <> | 189 | err = inflateInit2_r(&(s->stream), -MAX_WBITS);
|  | -+ | 230 | #ifdef __SYMBIAN32__
|  |  | 231 | gzFile gzopen_r (const char * path, const char * mode)
|  |  | 232 | #else
|  | -+ | 236 | #endif /* __SYMBIAN32__ */
|  | -+ | 246 | #ifdef __SYMBIAN32__
|  |  | 247 | gzFile gzdopen_r (int fd, const char * mode)
|  |  | 248 | #else
|  | -+ | 252 | #endif /* __SYMBIAN32__ */
|  | -+ | 265 | #ifdef __SYMBIAN32__
|  |  | 266 | int gzsetparams_r (gzFile file,int level,int strategy)
|  |  | 267 | #else
|  | -+ | 272 | #endif /* __SYMBIAN32__ */
253 | return deflateParams (&(s->stream), level, strategy); | <> | 289 | return deflateParams_r (&(s->stream), level, strategy);
|  | -+ | 297 | #ifdef __SYMBIAN32__
|  |  | 298 | local int get_byte (gz_stream *s)
|  |  | 299 | #else
|  | -+ | 302 | #endif /* __SYMBIAN32__ */
|  | -+ | 328 | #ifdef __SYMBIAN32__
|  |  | 329 | local void check_header (gz_stream * s)
|  |  | 330 | #else
|  | -+ | 333 | #endif /* __SYMBIAN32__ */
352 | * Cleanup then free the given gz_stream. Return a zlib error code. | <> | 396 | Cleanup then free the given gz_stream. Return a zlib error code.
|  | -+ | 399 | #ifdef __SYMBIAN32__
|  |  | 400 | local int destroy (gz_stream * s)
|  |  | 401 | #else
|  | -+ | 404 | #endif /* __SYMBIAN32__ */
369 | err = deflateEnd(&(s->stream)); | <> | 417 | err = deflateEnd_r(&(s->stream));
372 | err = inflateEnd(&(s->stream)); | <> | 420 | err = inflateEnd_r(&(s->stream));
|  | -+ | 442 | #ifdef __SYMBIAN32__
|  |  | 443 | int gzread_r (gzFile file,voidp buf,unsigned len)
|  |  | 444 | #else
|  | -+ | 449 | #endif /* __SYMBIAN32__ */
464 | s->z_err = inflate(&(s->stream), Z_NO_FLUSH); | <> | 516 | s->z_err = inflate_r(&(s->stream), Z_NO_FLUSH);
470 | s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start)); | <> | 522 | s->crc = crc32_r(s->crc, start, (uInt)(s->stream.next_out - start));
483 | inflateReset(&(s->stream)); | <> | 535 | inflateReset_r(&(s->stream));
484 | s->crc = crc32(0L, Z_NULL, 0); |  | 536 | s->crc = crc32_r(0L, Z_NULL, 0);
490 | s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start)); | <> | 542 | s->crc = crc32_r(s->crc, start, (uInt)(s->stream.next_out - start));
|  | -+ | 555 | #ifdef __SYMBIAN32__
|  |  | 556 | int gzgetc_r (gzFile file)
|  |  | 557 | #else
|  | -+ | 560 | #endif /* __SYMBIAN32__ */
508 | return gzread(file, &c, 1) == 1 ? c : -1; | <> | 565 | return gzread_r(file, &c, 1) == 1 ? c : -1;
|  | -+ | 572 | #ifdef __SYMBIAN32__
|  |  | 573 | int gzungetc_r (int c,gzFile file)
|  |  | 574 | #else
|  | -+ | 578 | #endif /* __SYMBIAN32__ */
|  | -+ | 601 | #ifdef __SYMBIAN32__
|  |  | 602 | char * gzgets_r (gzFile file, char * buf, int len)
|  |  | 603 | #else
|  | -+ | 608 | #endif /* __SYMBIAN32__ */
548 | while (--len > 0 && gzread(file, buf, 1) == 1 && *buf++ != '\n') ; | <> | 613 | while (--len > 0 && gzread_r(file, buf, 1) == 1 && *buf++ != '\n') ;
|  | -+ | 624 | #ifdef __SYMBIAN32__
|  |  | 625 | int gzwrite_r (gzFile file,voidpc buf,unsigned len)
|  |  | 626 | #else
|  | -+ | 631 | #endif /* __SYMBIAN32__ */
584 | s->z_err = deflate(&(s->stream), Z_NO_FLUSH); | <> | 653 | s->z_err = deflate_r(&(s->stream), Z_NO_FLUSH);
589 | s->crc = crc32(s->crc, (const Bytef *)buf, len); | <> | 658 | s->crc = crc32_r(s->crc, (const Bytef *)buf, len);
|  | -+ | 672 | #ifdef __SYMBIAN32__
|  |  | 673 | int gzprintf_r (gzFile file, const char *format, va_list va)
|  |  | 674 | #else
|  | -+ | 676 | #endif /* __SYMBIAN32__ */
605 | char buf[Z_PRINTF_BUFSIZE]; | +- |  |
606 | va_list va; |  |  |
|  | -+ | 679 | int ret;
|  | -+ | 681 | #ifndef SYMBIAN_EZLIB_DEVICE
|  |  | 682 | char buf[Z_PRINTF_BUFSIZE];
|  | <> | 684 | #else
|  |  | 685 | char *buf = (char*)0;
|  |  | 686 | buf = (char*) ALLOC(Z_PRINTF_BUFSIZE * sizeof(char));
|  |  | 687 | if(!buf)
610 | va_start(va, format); |  | 688 | return 0;
|  |  | 689 | buf[Z_PRINTF_BUFSIZE - 1] = 0;
|  |  | 690 | #endif /* SYMBIAN_EZLIB_DEVICE */
|  | -+ | 696 | # ifndef SYMBIAN_EZLIB_DEVICE
|  | -+ | 698 | # else
|  |  | 699 | for (len = 0; len < Z_PRINTF_BUFSIZE; len++)
|  |  | 700 | # endif /* SYMBIAN_EZLIB_DEVICE */
|  | -+ | 708 | # ifndef SYMBIAN_EZLIB_DEVICE
|  | -+ | 710 | # else
|  |  | 711 | (void)vsnprintf(buf, Z_PRINTF_BUFSIZE, format, va);
|  |  | 712 | # endif /* SYMBIAN_EZLIB_DEVICE */
|  | -+ | 716 | # ifndef SYMBIAN_EZLIB_DEVICE
|  | -+ | 718 | # else
|  |  | 719 | len = vsnprintf(buf, Z_PRINTF_BUFSIZE, format, va);
|  |  | 720 | # endif /* SYMBIAN_EZLIB_DEVICE */
|  | -+ | 725 | #ifndef SYMBIAN_EZLIB_DEVICE
|  | -+ | 727 | {
|  |  | 728 | #else
|  |  | 729 | if (len <= 0 || len >= Z_PRINTF_BUFSIZE || buf[Z_PRINTF_BUFSIZE - 1] != 0)
|  |  | 730 | {
|  |  | 731 | free(buf);
|  |  | 732 | #endif /* SYMBIAN_EZLIB_DEVICE */
|  | <> | 734 | }
633 | return gzwrite(file, buf, (unsigned)len); |  | 735 | ret = gzwrite_r(file, buf, (unsigned)len);
|  | -+ | 737 | #ifdef SYMBIAN_EZLIB_DEVICE
|  |  | 738 | free(buf);
|  |  | 739 | #endif /* SYMBIAN_EZLIB_DEVICE */
|  |  | 740 | return ret;
|  | -+ | 786 | #ifdef __SYMBIAN32__
|  |  | 787 | int gzputc_r (gzFile file,int c)
|  |  | 788 | #else
|  | -+ | 792 | #endif /* __SYMBIAN32__ */
684 | return gzwrite(file, &cc, 1) == 1 ? (int)cc : -1; | <> | 796 | return gzwrite_r(file, &cc, 1) == 1 ? (int)cc : -1;
|  | -+ | 805 | #ifdef __SYMBIAN32__
|  |  | 806 | int gzputs_r (gzFile file, const char * s)
|  |  | 807 | #else
|  | -+ | 811 | #endif /* __SYMBIAN32__ */
697 | return gzwrite(file, (char*)s, (unsigned)strlen(s)); | <> | 813 | return gzwrite_r(file, (char*)s, (unsigned)strlen(s));
|  | -+ | 821 | #ifdef __SYMBIAN32__
|  |  | 822 | local int do_flush (gzFile file,int flush)
|  |  | 823 | #else
|  | -+ | 827 | #endif /* __SYMBIAN32__ */
730 | s->z_err = deflate(&(s->stream), flush); | <> | 850 | s->z_err = deflate_r(&(s->stream), flush);
|  | <> | 865 | #ifdef __SYMBIAN32__
|  |  | 866 | int gzflush_r (gzFile file,int flush)
745 |  |  | 867 | #else
|  | -+ | 871 | #endif /* __SYMBIAN32__ */
|  | -+ | 890 | #ifdef __SYMBIAN32__
|  |  | 891 | z_off_t gzseek_r (gzFile file,z_off_t offset,int whence)
|  |  | 892 | #else
|  | -+ | 897 | #endif /* __SYMBIAN32__ */
798 | size = gzwrite(file, s->inbuf, size); | <> | 926 | size = gzwrite_r(file, s->inbuf, size);
828 | } else if (gzrewind(file) < 0) { | <> | 956 | } else if (gzrewind_r(file) < 0) {
847 | size = gzread(file, s->outbuf, (uInt)size); | <> | 975 | size = gzread_r(file, s->outbuf, (uInt)size);
|  | -+ | 985 | #ifdef __SYMBIAN32__
|  |  | 986 | int gzrewind_r (gzFile file)
|  |  | 987 | #else
|  | -+ | 990 | #endif /* __SYMBIAN32__ */
869 | s->crc = crc32(0L, Z_NULL, 0); | <> | 1001 | s->crc = crc32_r(0L, Z_NULL, 0);
870 | if (!s->transparent) (void)inflateReset(&s->stream); |  | 1002 | if (!s->transparent) (void)inflateReset_r(&s->stream);
|  | -+ | 1013 | #ifdef __SYMBIAN32__
|  |  | 1014 | z_off_t gztell_r (gzFile file)
|  |  | 1015 | #else
|  | -+ | 1018 | #endif /* __SYMBIAN32__ */
884 | return gzseek(file, 0L, SEEK_CUR); | <> | 1020 | return gzseek_r(file, 0L, SEEK_CUR);
|  | -+ | 1027 | #ifdef __SYMBIAN32__
|  |  | 1028 | int gzeof_r (gzFile file)
|  |  | 1029 | #else
|  | -+ | 1032 | #endif /* __SYMBIAN32__ */
|  | -+ | 1048 | #ifdef __SYMBIAN32__
|  |  | 1049 | int gzdirect_r (gzFile file)
|  |  | 1050 | #else
|  | -+ | 1053 | #endif /* __SYMBIAN32__ */
|  | -+ | 1064 | #ifdef __SYMBIAN32__
|  |  | 1065 | local void putLong (FILE * file,uLong x)
|  |  | 1066 | #else
|  | -+ | 1070 | #endif /* __SYMBIAN32__ */
|  | -+ | 1083 | #ifdef __SYMBIAN32__
|  |  | 1084 | local uLong getLong (gz_stream * s)
|  |  | 1085 | #else
|  | -+ | 1088 | #endif /* __SYMBIAN32__ */
|  | -+ | 1105 | #ifdef __SYMBIAN32__
|  |  | 1106 | int gzclose_r(gzFile file)
|  |  | 1107 | #else
|  | -+ | 1110 | #endif /* __SYMBIAN32__ */
|  | -+ | 1143 | #ifdef __SYMBIAN32__
|  |  | 1144 | const char * gzerror_r (gzFile file, int * errnum)
|  |  | 1145 | #else
|  | -+ | 1149 | #endif /* __SYMBIAN32__ */
|  | -+ | 1177 | #ifdef __SYMBIAN32__
|  |  | 1178 | void gzclearerr_r (gzFile file)
|  |  | 1179 | #else
|  | -+ | 1182 | #endif /* __SYMBIAN32__ */

File: infback.cpp

|  | -+ | 1 | /* Portions Copyright (c) Symbian Software Ltd 2007. All rights reserved. */
1 | /* infback.c -- inflate using a call-back interface | <> | 3 | /* infback.cpp -- inflate using a call-back interface
|  | -+ | 31 | #ifdef __SYMBIAN32__
|  |  | 32 | EXPORT_C int inflateBackInit__r(z_streamp strm, int windowBits,unsigned char FAR * window,const char * version,int stream_size)
|  |  | 33 | #else
|  | -+ | 40 | #endif //__SYMBIAN32__
|  | -+ | 82 | #ifdef __SYMBIAN32__
|  |  | 83 | local void fixedtables(struct inflate_state FAR * state)
|  |  | 84 | #else
|  | -+ | 87 | #endif //__SYMBIAN32__
|  | -+ | 256 | #ifdef __SYMBIAN32__
|  |  | 257 | EXPORT_C int inflateBack_r(z_streamp strm,in_func in, void FAR * in_desc,out_func out,void FAR * out_desc)
|  |  | 258 | #else
|  | -+ | 265 | #endif //__SYMBIAN32__
|  | -+ | 276 | /* Need to replace "this" variable with "current" as "this" is a reserved
|  |  | 277 | * keyword in C++ which is prefectly fine for a c code. As this file
|  |  | 278 | * has been changed to C++ "this" needs to be changed.
|  |  | 279 | */
|  |  | 280 | # define this current
|  | -+ | 640 | #ifdef __SYMBIAN32__
|  |  | 641 | EXPORT_C int inflateBackEnd_r(z_streamp strm)
|  |  | 642 | #else
|  | -+ | 645 | #endif //__SYMBIAN32__

File: inffast.cpp

|  | -+ | 1 | /* Portions Copyright (c) Symbian Software Ltd 2007. All rights reserved. */
1 | /* inffast.c -- fast decoding | <> | 4 | /* inffast.cpp -- fast decoding
|  | -+ | 70 | #ifdef __SYMBIAN32__
|  |  | 71 | void inflate_fast(z_streamp strm,unsigned start)
|  |  | 72 | #else
|  | -+ | 76 | #endif //__SYMBIAN32__
|  | -+ | 97 | /* Need to replace "this" variable with "current" as "this" is a reserved
|  |  | 98 | * keyword in C++ which is prefectly fine for a c code. As this file
|  |  | 99 | * has been changed to C++ "this" needs to be changed.
|  |  | 100 | */
|  |  | 101 | # define this current

File: inflate.cpp

|  | -+ | 1 | /* Portions Copyright (c) Symbian Software Ltd 2007. All rights reserved. */
1 | /* inflate.c -- zlib decompression | <> | 3 | /* inflate.cpp -- zlib decompression
|  | <> | 105 | #ifdef __SYMBIAN32__
|  |  | 106 | EXPORT_C int inflateReset_r (z_streamp strm)
102 |  |  | 107 | #else
|  | -+ | 110 | #endif //__SYMBIAN32__
|  | -+ | 135 | #ifdef __SYMBIAN32__
|  |  | 136 | EXPORT_C int inflatePrime_r(z_streamp strm, int bits, int value)
|  |  | 137 | #else
|  | -+ | 142 | #endif //__SYMBIAN32__
|  | -+ | 155 | #ifdef __SYMBIAN32__
|  |  | 156 | EXPORT_C int inflateInit2__r(z_streamp strm, int windowBits,const char * version,int stream_size)
|  |  | 157 | #else
|  | -+ | 163 | #endif //__SYMBIAN32__
184 | return inflateReset(strm); | <> | 199 | return inflateReset_r (strm);
|  | -+ | 202 | #ifdef __SYMBIAN32__
|  |  | 203 | EXPORT_C int inflateInit__r (z_streamp strm,const char * version,int stream_size)
|  |  | 204 | #else
|  | -+ | 209 | #endif //__SYMBIAN32__
192 | return inflateInit2_(strm, DEF_WBITS, version, stream_size); | <> | 211 | return inflateInit2__r(strm, DEF_WBITS, version, stream_size);
|  | -+ | 226 | #ifdef __SYMBIAN32__
|  |  | 227 | local void fixedtables(struct inflate_state FAR * state)
|  |  | 228 | #else
|  | -+ | 231 | #endif //__SYMBIAN32__
|  | -+ | 273 | #ifndef SYMBIAN_EZLIB_DEVICE
|  | -+ | 336 | #endif //SYMBIAN_EZLIB_DEVICE
|  | -+ | 353 | #ifdef __SYMBIAN32__
|  |  | 354 | local int updatewindow(z_streamp strm,unsigned out)
|  |  | 355 | #else
|  | -+ | 359 | #endif //__SYMBIAN32__
378 | (state->flags ? crc32(check, buf, len) : adler32(check, buf, len)) | <> | 414 | (state->flags ? crc32_r(check, buf, len) : adler32_r(check, buf, len))
380 | # define UPDATE(check, buf, len) adler32(check, buf, len) | <> | 416 | # define UPDATE(check, buf, len) adler32_r(check, buf, len)
389 | check = crc32(check, hbuf, 2); \ | <> | 425 | check = crc32_r(check, hbuf, 2); \
398 | check = crc32(check, hbuf, 4); \ | <> | 434 | check = crc32_r(check, hbuf, 4); \
|  | <> | 590 | #ifdef __SYMBIAN32__
|  |  | 591 | EXPORT_C int inflate_r (z_streamp strm,int flush)
553 |  |  | 592 | #else
|  | -+ | 596 | #endif //__SYMBIAN32__
|  | -+ | 608 | /* Need to replace "this" variable with "current" as "this" is a reserved
|  |  | 609 | * keyword in C++ which is prefectly fine for a c code. As this file
|  |  | 610 | * has been changed to C++ "this" needs to be changed.
|  |  | 611 | */
|  |  | 612 | # define this current
597 | state->check = crc32(0L, Z_NULL, 0); | <> | 643 | state->check = crc32_r(0L, Z_NULL, 0);
629 | strm->adler = state->check = adler32(0L, Z_NULL, 0); | <> | 675 | strm->adler = state->check = adler32_r(0L, Z_NULL, 0);
693 | state->check = crc32(state->check, next, copy); | <> | 739 | state->check = crc32_r(state->check, next, copy);
714 | state->check = crc32(state->check, next, copy); | <> | 760 | state->check = crc32_r(state->check, next, copy);
735 | state->check = crc32(state->check, next, copy); | <> | 781 | state->check = crc32_r(state->check, next, copy);
757 | strm->adler = state->check = crc32(0L, Z_NULL, 0); | <> | 803 | strm->adler = state->check = crc32_r(0L, Z_NULL, 0);
771 | strm->adler = state->check = adler32(0L, Z_NULL, 0); | <> | 817 | strm->adler = state->check = adler32_r(0L, Z_NULL, 0);
|  | <> | 1200 | #ifdef __SYMBIAN32__
|  |  | 1201 | EXPORT_C int inflateEnd_r (z_streamp strm)
1154 |  |  | 1202 | #else
|  | -+ | 1205 | #endif //__SYMBIAN32__
|  | <> | 1217 | #ifdef __SYMBIAN32__
|  |  | 1218 | EXPORT_C int inflateSetDictionary_r (z_streamp strm,const Bytef * dictionary,uInt dictLength)
1168 |  |  | 1219 | #else
|  | -+ | 1224 | #endif //__SYMBIAN32__
1185 | id = adler32(0L, Z_NULL, 0); | <> | 1237 | id = adler32_r(0L, Z_NULL, 0);
1186 | id = adler32(id, dictionary, dictLength); |  | 1238 | id = adler32_r(id, dictionary, dictLength);
|  | -+ | 1264 | #ifdef __SYMBIAN32__
|  |  | 1265 | EXPORT_C int inflateGetHeader_r(z_streamp strm, gz_headerp head)
|  |  | 1266 | #else
|  | -+ | 1270 | #endif //__SYMBIAN32__
|  | -+ | 1297 | #ifdef __SYMBIAN32__
|  |  | 1298 | local unsigned syncsearch(unsigned FAR * have,unsigned char FAR * buf,unsigned len)
|  |  | 1299 | #else
|  | -+ | 1304 | #endif //__SYMBIAN32__
|  | -+ | 1325 | #ifdef __SYMBIAN32__
|  |  | 1326 | EXPORT_C int inflateSync_r (z_streamp strm)
|  |  | 1327 | #else
|  | -+ | 1330 | #endif //__SYMBIAN32__
1299 | inflateReset(strm); | <> | 1366 | inflateReset_r(strm);
|  | -+ | 1380 | #ifdef __SYMBIAN32__
|  |  | 1381 | EXPORT_C int inflateSyncPoint_r (z_streamp strm)
|  |  | 1382 | #else
|  | -+ | 1385 | #endif //__SYMBIAN32__
|  | -+ | 1395 | #ifdef __SYMBIAN32__
|  |  | 1396 | EXPORT_C int inflateCopy_r(z_streamp dest, z_streamp source)
|  |  | 1397 | #else
|  | -+ | 1401 | #endif //__SYMBIAN32__

File: inftrees.cpp

|  | -+ | 1 | /* Portions Copyright (c) Symbian Software Ltd 2007. All rights reserved. */
1 | /* inftrees.c -- generate Huffman trees for efficient decoding | <> | 3 | /* inftrees.cpp -- generate Huffman trees for efficient decoding
|  | -+ | 35 | #ifdef __SYMBIAN32__
|  |  | 36 | int inflate_table(codetype type,unsigned short FAR * lens,unsigned codes, code FAR * FAR * table,unsigned FAR * bits,unsigned short FAR * work)
|  |  | 37 | #else
|  | -+ | 45 | #endif //__SYMBIAN32__
|  | -+ | 47 | // Line to stop compiler warning about unused mandatory global variable
|  |  | 48 | char dontCare = inflate_copyright[0]; dontCare = dontCare;
|  | -+ | 64 | /* Need to replace "this" variable with "current" as "this" is a reserved
|  |  | 65 | * keyword in C++ which is prefectly fine for a c code. As this file
|  |  | 66 | * has been changed to C++ "this" needs to be changed.
|  |  | 67 | */
|  |  | 68 | # define this current

File: trees.cpp

|  | -+ | 1 | /* Portions Copyright (c) Symbian Software Ltd 2007. All rights reserved. */
1 | /* trees.c -- output deflated data using Huffman coding | <> | 3 | /* trees.cpp -- output deflated data using Huffman coding
128 |  | <> | 130 | #ifndef SYMBIAN_EZLIB_DEVICE
|  | -+ | 140 | #else
|  | -+ | 142 | local const static_tree_desc static_l_desc =
|  |  | 143 | {static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS};
|  | -+ | 145 | local const static_tree_desc static_d_desc =
|  |  | 146 | {static_dtree, extra_dbits, 0, D_CODES, MAX_BITS};
|  | -+ | 148 | local const static_tree_desc static_bl_desc =
|  |  | 149 | {(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS};
|  | -+ | 151 | #endif //SYMBIAN_EZLIB_DEVICE
|  | -+ | 208 | #ifdef __SYMBIAN32__
|  |  | 209 | local void send_bits(deflate_state * s, int value,int length)
|  |  | 210 | #else
|  | -+ | 215 | #endif //__SYMBIAN32__
|  | -+ | 401 | #ifdef __SYMBIAN32__
|  |  | 402 | void _tr_init( deflate_state * s)
|  |  | 403 | #else
|  | -+ | 406 | #endif //__SYMBIAN32__
|  | -+ | 434 | #ifdef __SYMBIAN32__
|  |  | 435 | local void init_block( deflate_state * s)
|  |  | 436 | #else
|  | -+ | 439 | #endif //__SYMBIAN32__
|  | -+ | 482 | #ifdef __SYMBIAN32__
|  |  | 483 | local void pqdownheap( deflate_state * s,ct_data * tree,int k)
|  |  | 484 | #else
|  | -+ | 489 | #endif //__SYMBIAN32__
|  | -+ | 521 | #ifdef __SYMBIAN32__
|  |  | 522 | local void gen_bitlen( deflate_state * s, tree_desc * desc)
|  |  | 523 | #else
|  | -+ | 527 | #endif //__SYMBIAN32__
|  | -+ | 612 | #ifdef __SYMBIAN32__
|  |  | 613 | local void gen_codes ( ct_data * tree, int max_code, ushf * bl_count)
|  |  | 614 | #else
|  | -+ | 619 | #endif //__SYMBIAN32__
|  | -+ | 658 | #ifdef __SYMBIAN32__
|  |  | 659 | local void build_tree( deflate_state * s, tree_desc * desc)
|  |  | 660 | #else
|  | -+ | 664 | #endif //__SYMBIAN32__
|  | -+ | 750 | #ifdef __SYMBIAN32__
|  |  | 751 | local void scan_tree ( deflate_state * s, ct_data * tree,int max_code)
|  |  | 752 | #else
|  | -+ | 757 | #endif //__SYMBIAN32__
|  | -+ | 799 | #ifdef __SYMBIAN32__
|  |  | 800 | local void send_tree ( deflate_state * s, ct_data * tree, int max_code)
|  |  | 801 | #else
|  | -+ | 806 | #endif //__SYMBIAN32__
|  | -+ | 854 | #ifdef __SYMBIAN32__
|  |  | 855 | local int build_bl_tree( deflate_state * s)
|  |  | 856 | #else
|  | -+ | 859 | #endif //__SYMBIAN32__
|  | -+ | 893 | #ifdef __SYMBIAN32__
|  |  | 894 | local void send_all_trees( deflate_state * s, int lcodes, int dcodes, int blcodes)
|  |  | 895 | #else
|  | -+ | 899 | #endif //__SYMBIAN32__
|  | -+ | 926 | #ifdef __SYMBIAN32__
|  |  | 927 | void _tr_stored_block( deflate_state * s, charf * buf,ulg stored_len, int eof)
|  |  | 928 | #else
|  | -+ | 934 | #endif //__SYMBIAN32__
|  | -+ | 955 | #ifdef __SYMBIAN32__
|  |  | 956 | void _tr_align( deflate_state * s)
|  |  | 957 | #else
|  | -+ | 960 | #endif //__SYMBIAN32__
|  | -+ | 988 | #ifdef __SYMBIAN32__
|  |  | 989 | void _tr_flush_block( deflate_state * s, charf * buf,ulg stored_len,int eof)
|  |  | 990 | #else
|  | -+ | 996 | #endif //__SYMBIAN32__
|  | -+ | 1093 | #ifndef SYMBIAN_EZLIB_DEVICE
|  | -+ | 1095 | #ifdef __SYMBIAN32__
|  |  | 1096 | int _tr_tally ( deflate_state * s,unsigned dist,unsigned lc)
|  |  | 1097 | #else
|  | -+ | 1102 | #endif //__SYMBIAN32__
1068 |  | <> | 1145 | #endif //SYMBIAN_EZLIB_DEVICE
|  | -+ | 1149 | #ifdef __SYMBIAN32__
|  |  | 1150 | local void compress_block( deflate_state * s, ct_data * ltree, ct_data * dtree)
|  |  | 1151 | #else
|  | -+ | 1156 | #endif //__SYMBIAN32__
|  | -+ | 1207 | #ifdef __SYMBIAN32__
|  |  | 1208 | local void set_data_type( deflate_state * s)
|  |  | 1209 | #else
|  | -+ | 1212 | #endif //__SYMBIAN32__
|  | -+ | 1231 | #ifdef __SYMBIAN32__
|  |  | 1232 | local unsigned bi_reverse(unsigned code,int len)
|  |  | 1233 | #else
|  | -+ | 1237 | #endif //__SYMBIAN32__
|  | -+ | 1250 | #ifdef __SYMBIAN32__
|  |  | 1251 | local void bi_flush( deflate_state * s)
|  |  | 1252 | #else
|  | -+ | 1255 | #endif //__SYMBIAN32__
|  | -+ | 1271 | #ifdef __SYMBIAN32__
|  |  | 1272 | local void bi_windup( deflate_state * s)
|  |  | 1273 | #else
|  | -+ | 1276 | #endif //__SYMBIAN32__
|  | -+ | 1294 | #ifdef __SYMBIAN32__
|  |  | 1295 | local void copy_block( deflate_state * s, charf * buf,unsigned len,int header)
|  |  | 1296 | #else
|  | -+ | 1302 | #endif //__SYMBIAN32__

File: uncompr.cpp

|  | -+ | 1 | /* Portions Copyright (c) Symbian Software Ltd 2007. All rights reserved. */
1 | /* uncompr.c -- decompress a memory buffer | <> | 3 | /* uncompr.cpp -- decompress a memory buffer
9 | #include "zlib.h" | <> | 11 | #include "libzcore.h"
|  | -+ | 28 | #ifdef __SYMBIAN32__
|  |  | 29 | EXPORT_C int uncompress_r ( Bytef * dest,uLongf * destLen, const Bytef * source,uLong sourceLen)
|  |  | 30 | #else
|  | -+ | 36 | #endif //__SYMBIAN32__
47 | err = inflateInit(&stream); | <> | 53 | err = inflateInit_r(&stream);
50 | err = inflate(&stream, Z_FINISH); | <> | 56 | err = inflate_r(&stream, Z_FINISH);
52 | inflateEnd(&stream); | <> | 58 | inflateEnd_r(&stream);
59 | err = inflateEnd(&stream); | <> | 65 | err = inflateEnd_r(&stream);

File: zconf.h

|  | -+ | 1 | /* Portions Copyright (c) Symbian Software Ltd 2007. All rights reserved. */
8 | #ifndef ZCONF_H | <> | 10 | #ifndef _ZCONF_H
9 | #define ZCONF_H |  | 11 | #define _ZCONF_H
|  | -+ | 13 | #if (defined(__TOOLS2__) || defined(__TOOLS__))
|  |  | 14 | #define EXPORT_C /* Defined as nothing for tools builds, as EXPORT_C keyword not supported on these platforms */
|  |  | 15 | #else
|  |  | 16 | #ifdef __SYMBIAN32__
|  |  | 17 | #include <e32def.h> /* Include for definition of IMPORT_C below */
|  |  | 18 | #define ZEXTERN IMPORT_C /* This macro is used in function prototypes in zlib.h and libzcore.h. Use Symbian definition IMPORT_C instead of ZEXTERN */
|  |  | 19 | #define SYMBIAN_EZLIB_DEVICE
|  |  | 20 | #endif /* __SYMBIAN32__ */
|  |  | 21 | #endif /* __TOOLS2__ || __TOOLS__ */
332 | #endif /* ZCONF_H */ | <> | 346 | #endif /* _ZCONF_H */

File: zlib.h

|  | -+ | 1 | /* Portions Copyright (c) Symbian Software Ltd 2007. All rights reserved.
|  |  | 2 | * Portions Copyright (c) 2005-2006 Nokia Corporation. All rights reserved.
|  |  | 3 | */
31 | #ifndef ZLIB_H | <> | 35 | #ifndef _ZLIB_H
32 | #define ZLIB_H |  | 36 | #define _ZLIB_H
|  | -+ | 38 | #if (defined(__TOOLS2__) || defined(__TOOLS__))
|  |  | 39 | // A tools build picks up the zconf.h file from the user include path
|  | -+ | 41 | #else
|  |  | 42 | // Any other build picks up zconf.h from stdapis system include directory
|  |  | 43 | #include <stdapis/zconf.h>
|  |  | 44 | #endif
|  | -+ | 1075 | #ifndef SYMBIAN_EZLIB_EXCLUDE_GZ_FUNCTIONS
|  | -+ | 1262 | #endif //SYMBIAN_EZLIB_EXCLUDE_GZ_FUNCTIONS
1357 | #endif /* ZLIB_H */ | <> | 1373 | #endif /* _ZLIB_H */

File: zutil.cpp

|  | -+ | 1 | /* Portions Copyright (c) Symbian Software Ltd 2007. All rights reserved. */
1 | /* zutil.c -- target dependent utility functions for the compression library | <> | 3 | /* zutil.cpp -- target dependent utility functions for the compression library
|  | -+ | 10 | #ifdef SYMBIAN_EZLIB_DEVICE
|  |  | 11 | #include <e32base.h>
|  |  | 12 | #endif
|  | -+ | 35 | #ifdef __SYMBIAN32__
|  |  | 36 | EXPORT_C const char * zlibVersion_r()
|  |  | 37 | #else
|  | -+ | 39 | #endif //__SYMBIAN32__
|  | -+ | 45 | #ifdef __SYMBIAN32__
|  |  | 46 | EXPORT_C uLong zlibCompileFlags_r()
|  |  | 47 | #else
|  | -+ | 49 | #endif //__SYMBIAN32__
|  | -+ | 151 | #ifdef __SYMBIAN32__
|  |  | 152 | EXPORT_C const char * zError_r(int err)
|  |  | 153 | #else
|  | -+ | 156 | #endif //__SYMBIAN32__
|  | -+ | 172 | #ifdef __SYMBIAN32__
|  |  | 173 | void zmemcpy( Bytef* dest,const Bytef* source,uInt len)
|  |  | 174 | #else
|  | -+ | 179 | #endif //__SYMBIAN32__
|  | -+ | 187 | #ifdef __SYMBIAN32__
|  |  | 188 | int zmemcmp( const Bytef* s1, const Bytef* s2,uInt len)
|  |  | 189 | #else
|  | -+ | 194 | #endif //__SYMBIAN32__
|  | -+ | 204 | #ifdef __SYMBIAN32__
|  |  | 205 | void zmemzero( Bytef* dest,uInt len)
|  |  | 206 | #else
|  | -+ | 210 | #endif //__SYMBIAN32__
|  | -+ | 336 | #ifdef __SYMBIAN32__
|  |  | 337 | voidpf zcalloc (voidpf opaque,unsigned items, unsigned size)
|  |  | 338 | #else
|  | -+ | 343 | #endif //__SYMBIAN32__
|  | <> | 346 | #ifndef SYMBIAN_EZLIB_DEVICE
306 | return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) : |  | 347 | return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) : (voidpf)calloc(items, size);
|  |  | 348 | #else
|  |  | 349 | TInt bytes = items*size;
|  |  | 350 | TAny *ptr = User::AllocZ(bytes); // Symbian Native memory allocation API
307 | (voidpf)calloc(items, size); |  | 351 | return (voidpf) ptr;
|  |  | 352 | #endif //SYMBIAN_EZLIB_DEVICE
|  | -+ | 355 | #ifdef __SYMBIAN32__
|  |  | 356 | void zcfree (voidpf opaque,voidpf ptr)
|  |  | 357 | #else
|  | -+ | 361 | #endif //__SYMBIAN32__
|  | -+ | 363 | #ifndef SYMBIAN_EZLIB_DEVICE
|  | -+ | 365 | #else
|  |  | 366 | User::Free(ptr); // Symbian Native memory deallocation API
|  |  | 367 | #endif //SYMBIAN_EZLIB_DEVICE

File: zutil.h

|  | -+ | 1 | /* Portions Copyright (c) Symbian Software Ltd 2007. All rights reserved. */
11 | /* @(#) $Id$ */ | +- |  |
17 | #include "zlib.h" | <> | 17 | #include "libzcore.h"
|  | -+ | 19 | #if defined(SYMBIAN_EZLIB_DEVICE) && !defined(LIBZGZIO_H)
|  |  | 20 | #include <e32std.h>
|  |  | 21 | #endif
|  | -+ | 23 | #if !defined(SYMBIAN_EZLIB_DEVICE) || defined(LIBZGZIO_H)
|  | -+ | 48 | #endif //SYMBIAN_EZLIB_DEVICE
|  | -+ | 184 | #if !defined(SYMBIAN_EZLIB_DEVICE) || defined(LIBZGZIO_H)
|  | -+ | 213 | #ifndef SYMBIAN_EZLIB_DEVICE
|  | -+ | 215 | # endif //SYMBIAN_EZLIB_DEVICE
|  | -+ | 226 | #endif // !SYMBIAN_EZLIB_DEVICE || LIBZGZIO_H
|  | -+ | 257 | // Native Symbian Memory Functions Symbian
|  |  | 258 | #if defined(SYMBIAN_EZLIB_DEVICE) && !defined(LIBZGZIO_H)
|  |  | 259 | #define HAVE_MEMCPY
|  |  | 260 | #undef zmemcpy
|  |  | 261 | #undef zmemcmp
|  |  | 262 | #undef zmemzero
|  |  | 263 | #define zmemcpy Mem::Copy
|  |  | 264 | #define zmemcmp(s1,s2,len) Mem::Compare(s1,len,s2,len)
|  |  | 265 | #define zmemzero(dest, len) Mem::FillZ(dest, len)
|  |  | 266 | #endif //SYMBIAN_EZLIB_DEVICE && !LIBZGZIO_H