os/ossrv/compressionlibs/ziplib/test/oldezlib/EZLib/README.txt
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/compressionlibs/ziplib/test/oldezlib/EZLib/README.txt	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,137 @@
     1.4 +This is an epoc port of zlib (http://www.cdrom.com/pub/infozip/zlib/)
     1.5 +
     1.6 +Changes made in getting zlib lib to compile.
     1.7 +
     1.8 +General Changes:
     1.9 +------------------
    1.10 +
    1.11 +All .c files renamed to .cpp
    1.12 +
    1.13 +K&R function defintions are rewritten to conform with ansi C.
    1.14 +
    1.15 +
    1.16 +
    1.17 +ZLib.h:
    1.18 +---------
    1.19 +Since all our files are going to be .cpp files we don't need the extern c stuff so thats been commented out.
    1.20 +At the start of zlib.h, the macros ZEXPORT, ZEXPORTVA are set to nothing.  ZEXTERN is set to IMPORT_C.
    1.21 +At the end of zlib.h ZEXTERN is set to nothing.  This is nasty and hacky but it involes the least
    1.22 +amount of changes to the zlib code.  Anyway it can go if we decide not to export to c interface.
    1.23 +Every exported function has had EXPORT_C appended to its definition.  This affects many files.  Again
    1.24 +if we decide not to export the c interface these changes can be reversed.
    1.25 +
    1.26 +
    1.27 +ZUtil.h:
    1.28 +-----------
    1.29 +Includes <e32std.h> at the top.
    1.30 +Commented out bit of code which checks moew msvc and messes redefines fdopen as _fdopen.  Lines 139
    1.31 +
    1.32 +
    1.33 +
    1.34 +deflate.h:
    1.35 +------------
    1.36 +
    1.37 +Added a STATIC_CAST to first two lines of _tr_tally_dist
    1.38 +
    1.39 +delate.cpp:
    1.40 +----------
    1.41 +
    1.42 +#included <e32def.h>
    1.43 +
    1.44 +Altered C style casts in INSERT_STRING macro to STATIC_CAST and added some more casts
    1.45 +
    1.46 +Lines 1041 & 1211 commented out.  They contained trhe name of a macro in a piece of code which was
    1.47 +#defed out of the compliation process.  Unforntately makmake didn't like it.
    1.48 +
    1.49 +MSDOS & MACOS? specific stuff has been commented out.  I guess this should be replace with an appropriate
    1.50 +#ifdef but I'm not sure what this should be yet.
    1.51 +
    1.52 +Added line 284 
    1.53 +s->status = INIT_STATE;
    1.54 +to fix zlib bug where a memory leak can occur when zalloc fails
    1.55 +
    1.56 +
    1.57 +infblock.cpp
    1.58 +-------------
    1.59 +
    1.60 +This file has been modified to fix a bug in zlib 1.1.3 which can cause a crash when ZALLOC fails.
    1.61 +Essentially what happens is that in certain circumstances s->sub.trees.blens can be deleted twice.
    1.62 +I have altered infblock.cpp with a patch sent to me by jloup@gzip.org which fixes this problem.  I guess
    1.63 +this fix will appear in zlib 1.1.4.
    1.64 +
    1.65 +trees.h:
    1.66 +----------
    1.67 +The array sizes specified for _dist_code & _length_code have been removed from the square brackets as
    1.68 +it conflicts with another extern definition which appears elsewhere in the code.
    1.69 +
    1.70 +trees.cpp:
    1.71 +------------
    1.72 +
    1.73 +#included <e32def.h>
    1.74 +
    1.75 +STATIC_CASTS added on lines 594, 607, 679, 730, 225
    1.76 +
    1.77 +
    1.78 +inftrees.cpp:
    1.79 +--------------
    1.80 +commented out unused formal parameter z in inflate_trees_fixed at line 399.  Seems to be some global
    1.81 +data in here.  Something is going to have to be done about it.
    1.82 +
    1.83 +
    1.84 +gzio.cpp:
    1.85 +----------
    1.86 +Swapped around includes for zconf.h and stdio.h so we don't get warnings about multiple defintions of 
    1.87 +NULL.
    1.88 +gzprintf uses to much stack for epoc.  Compliation gives a failure to link with _chkstk.  Rather than 
    1.89 +reducing the size of the buffer, I'm going to allocate the buffer on the heap.
    1.90 +
    1.91 +
    1.92 +zconf.h
    1.93 +-----------
    1.94 +Commented out lines that include unistd.h
    1.95 +
    1.96 +Global Variables:
    1.97 +-------------------
    1.98 +Since EPOC cannot support writeable global data some modifications were required to the global variables
    1.99 +in zlib.  Conveniently, however, all of the global variables which were no const did not need to be so
   1.100 +and I believe their non const status was dues to backward compatibility with older compilers.  The 
   1.101 +following global variables were made read only to facilitate a marm build.
   1.102 +
   1.103 +inftrees.cpp:
   1.104 +-------------
   1.105 +
   1.106 +fixed_td
   1.107 +fixed_tl
   1.108 +inflate_mask
   1.109 +
   1.110 +trees.cpp:
   1.111 +----------
   1.112 +
   1.113 +static_bl_desc
   1.114 +static_d_desc
   1.115 +static_l_desc
   1.116 +table	
   1.117 +z_verbose	
   1.118 +
   1.119 +
   1.120 +deflate.cpp:
   1.121 +-------------
   1.122 +delateInit2::my_version
   1.123 +
   1.124 +
   1.125 +Changes made to remove dependency on the c standard library.
   1.126 +-------------------------------------------------------------
   1.127 +
   1.128 +zutil.h 
   1.129 +----------
   1.130 +the following macros are redefined to make use of the Epoc32 Mem class, zmemcpy, zmemcmp,
   1.131 +zmemzero.
   1.132 +
   1.133 +zutil.cpp
   1.134 +----------
   1.135 +zcalloc and zfree now call memory functions defined in User.
   1.136 +
   1.137 +
   1.138 +
   1.139 +
   1.140 +