<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to bugs</title><link>https://sourceforge.net/p/palmzlib/bugs/</link><description>Recent changes to bugs</description><atom:link href="https://sourceforge.net/p/palmzlib/bugs/feed.rss" rel="self"/><language>en</language><lastBuildDate>Wed, 15 Jan 2003 20:06:58 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/palmzlib/bugs/feed.rss" rel="self" type="application/rss+xml"/><item><title>Zlib not recognized in OS5</title><link>https://sourceforge.net/p/palmzlib/bugs/5/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Zlib is not recognized in OS 5 (Tungsten). Using &lt;br /&gt;
Plucker, when opening documents, screen Zlib not &lt;br /&gt;
supported: &amp;amp;quot;This device cannot handle Zlib compressed &lt;br /&gt;
documents&amp;amp;quot;. Comes up and it does not find document.&lt;br /&gt;
Used Zlib distribution with Plucker, and then 1.1.3-7 &lt;br /&gt;
from your website, same results. Zlib is installed. &lt;br /&gt;
However, when viewing version, it shows version 0.0.&lt;br /&gt;
I need compiled Zlib for OS5, as I am not a Palm &lt;br /&gt;
developer.&lt;/p&gt;
&lt;p&gt;Theys Radmann&lt;br /&gt;
theys.radmann@radmann.cl&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 15 Jan 2003 20:06:58 -0000</pubDate><guid>https://sourceforge.net93ad5973e233e0aa8b280d0ef923dbf04d1e04bd</guid></item><item><title>ZLibcompr function always returns me buf</title><link>https://sourceforge.net/p/palmzlib/bugs/4/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Following are the snap of the code.&lt;/p&gt;
&lt;p&gt;if (ZLSetup)&lt;br /&gt;
{&lt;br /&gt;
char dest[100];&lt;br /&gt;
char result[100];&lt;br /&gt;
uLongf destLen = 100;&lt;/p&gt;
&lt;p&gt;char source[] = &amp;amp;quot;a string to compress&amp;amp;quot;;&lt;br /&gt;
int err;&lt;br /&gt;
uLongf sourceLen = strlen(source) + 1;&lt;/p&gt;
&lt;p&gt;err = ZLibcompress2(ZLibRef, (Bytef *)dest, &amp;amp;amp;destLen, &lt;br /&gt;
(Bytef *)source,&lt;br /&gt;
sourceLen, Z_DEFAULT_COMPRESSION);&lt;/p&gt;
&lt;p&gt;ULong lUncompLen = 100;&lt;br /&gt;
err = ZLibuncompress(ZLibRef,(Bytef *)result, &lt;br /&gt;
&amp;amp;amp;lUncompLen,&lt;br /&gt;
(const Bytef *)dest, destLen);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;but ZLibcompress2 always returns Z_BUF_ERROR &lt;br /&gt;
regardless of the destination&lt;br /&gt;
buffer size.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Sat, 10 Aug 2002 08:47:38 -0000</pubDate><guid>https://sourceforge.net622ffd9883843dced8e6c424f9c96efc57968a6a</guid></item><item><title>misuse of static variable in library cod</title><link>https://sourceforge.net/p/palmzlib/bugs/3/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;When I went through the source code, I found a lot of &lt;br /&gt;
misuse of static variables, in face according to rules &lt;br /&gt;
for library building, one must not use static &lt;br /&gt;
variables in the library source code.&lt;br /&gt;
Somehow it works with gcc, but I guess it hides some &lt;br /&gt;
bugs, that use this space, but when it come to &lt;br /&gt;
CodeWarrior it starts crashing.&lt;br /&gt;
I propose to pass all static variables as a structure &lt;br /&gt;
set thru TableEntry variable which can be accessed by &lt;br /&gt;
SysLibTblEntry(LibRef), that doesn't require locking &lt;br /&gt;
the table variable. The same way it can be accessed in &lt;br /&gt;
the library code.&lt;/p&gt;
&lt;p&gt;struct constants&lt;br /&gt;
{&lt;br /&gt;
char *data1 = ...&lt;br /&gt;
char *data2 = ...&lt;br /&gt;
bool data3 = ...&lt;br /&gt;
char *data4 = ...&lt;br /&gt;
....&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;struct constants const_data;&lt;br /&gt;
const_data.data1 = table1&lt;br /&gt;
const_data.data2 = ....&lt;br /&gt;
...&lt;br /&gt;
SysLibTblEntryPtr libEntryP = SysLibTblEntry(libRef);&lt;br /&gt;
libEntryP-&amp;amp;gt;globalsP = (void*) &amp;amp;amp;const_data;&lt;/p&gt;
&lt;p&gt;in the libarary you can use:&lt;/p&gt;
&lt;p&gt;((struct constants*)SysLibTblEntry(libRef))-&amp;amp;gt;data1;&lt;/p&gt;
&lt;p&gt;That's it&lt;/p&gt;
&lt;p&gt;Best Regards&lt;br /&gt;
Dmytry&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Semenov</dc:creator><pubDate>Fri, 01 Mar 2002 05:21:53 -0000</pubDate><guid>https://sourceforge.net3f77ac9d1e75de1062b64712689e2f07c53a3f72</guid></item><item><title>deflateInit() memory allocation problem</title><link>https://sourceforge.net/p/palmzlib/bugs/2/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Calling deflateInit() on machines with only 2Meg of &lt;br /&gt;
memory, results in a fatal error or other hard crash. &lt;br /&gt;
Depending on device, it looks like the screen memory &lt;br /&gt;
mapped area is getting over written with zero's.&lt;/p&gt;
&lt;p&gt;Providing my own Alloc and Free functions prior to the &lt;br /&gt;
deflateInit() call, where myAlloc() raises a &lt;br /&gt;
SystemFatalException if it runs out of memory (the &lt;br /&gt;
suspected root cause), shows that the allocated &lt;br /&gt;
request for compression are about twice as I expected &lt;br /&gt;
to see from the provided documentation. The memory &lt;br /&gt;
requirements for decompression looked as expected.&lt;/p&gt;
&lt;p&gt;E.G - decompression resulted in the following myAlloc&lt;br /&gt;
() calls:&lt;br /&gt;
item, size&lt;br /&gt;
1, 18&lt;br /&gt;
1, 52&lt;br /&gt;
4,1440&lt;br /&gt;
1,8192&lt;br /&gt;
296,2&lt;br /&gt;
19,2&lt;br /&gt;
288,2&lt;br /&gt;
1,20&lt;/p&gt;
&lt;p&gt;However, the compression side looks goofy to me:&lt;br /&gt;
item, size&lt;br /&gt;
1, 4595&lt;br /&gt;
8192, 2&lt;br /&gt;
8192, 2&lt;br /&gt;
8192, 2&lt;br /&gt;
4096, 4&lt;br /&gt;
3, 14&lt;/p&gt;
&lt;p&gt;For a total allocated request of 68K !!! Was expecting &lt;br /&gt;
a 38K hit.&lt;/p&gt;
&lt;p&gt;For small footprint PalmOS devices, they run out of &lt;br /&gt;
memory room in my application during the third 8192x2 &lt;br /&gt;
alloc().&lt;/p&gt;
&lt;p&gt;Eh, shouldn't the size requests for the 8192 and 4096 &lt;br /&gt;
items be 1 byte and *not* 2 bytes each?&lt;/p&gt;
&lt;p&gt;I'm guessing that the default memory allocation &lt;br /&gt;
function gets back a null pointer and then uses it in &lt;br /&gt;
the following zmemset(), giving the reported error.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 30 May 2001 23:10:06 -0000</pubDate><guid>https://sourceforge.netf82febe16a8cf897af0a51ef6b9282993506d08b</guid></item><item><title>Error when mem alloc fails in calloc</title><link>https://sourceforge.net/p/palmzlib/bugs/1/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;When the function calloc is called (When running on &lt;br /&gt;
the Palm OS) if not enough memory is available then &lt;br /&gt;
NULL is returned.  Then when setting the memory at &lt;br /&gt;
address NULL to zero the palm throws up a system error &lt;br /&gt;
message stating that you must reset the device.&lt;br /&gt;
Here's the original code and two possible ways to fix &lt;br /&gt;
it.&lt;/p&gt;
&lt;p&gt;voidpf zcalloc (opaque, items, size)&lt;br /&gt;
voidpf opaque;&lt;br /&gt;
unsigned items;&lt;br /&gt;
unsigned size;&lt;br /&gt;
{&lt;br /&gt;
#ifndef PALMOS&lt;br /&gt;
if (opaque) items += size - size; /* make compiler &lt;br /&gt;
happy */&lt;br /&gt;
return (voidpf)calloc(items, size);&lt;br /&gt;
#else&lt;br /&gt;
voidpf x;&lt;br /&gt;
UInt32 free, max;&lt;/p&gt;
&lt;p&gt;x = (voidpf) malloc(items*size);&lt;br /&gt;
zmemzero(x,items*size);  // This is where it fails&lt;br /&gt;
return x;&lt;br /&gt;
#endif&lt;br /&gt;
}&lt;/p&gt;
&lt;h1 id="new-version-mod-1"&gt;New version mod 1&lt;/h1&gt;
&lt;p&gt;voidpf zcalloc (opaque, items, size)&lt;br /&gt;
voidpf opaque;&lt;br /&gt;
unsigned items;&lt;br /&gt;
unsigned size;&lt;br /&gt;
{&lt;br /&gt;
#ifndef PALMOS&lt;br /&gt;
if (opaque) items += size - size; /* make compiler &lt;br /&gt;
happy */&lt;br /&gt;
return (voidpf)calloc(items, size);&lt;br /&gt;
#else&lt;br /&gt;
voidpf x;&lt;br /&gt;
UInt32 free, max;&lt;/p&gt;
&lt;p&gt;x = (voidpf) malloc(items*size);&lt;br /&gt;
if(x != Z_NULL)  // This stops it from crashing&lt;br /&gt;
zmemzero(x,items*size);&lt;br /&gt;
return x;&lt;br /&gt;
#endif&lt;br /&gt;
}&lt;/p&gt;
&lt;h1 id="new-mod-using-palm-os-specific-stuff"&gt;New mod using Palm OS Specific stuff&lt;/h1&gt;
&lt;p&gt;voidpf zcalloc (opaque, items, size)&lt;br /&gt;
voidpf opaque;&lt;br /&gt;
unsigned items;&lt;br /&gt;
unsigned size;&lt;br /&gt;
{&lt;br /&gt;
#ifndef PALMOS&lt;br /&gt;
if (opaque) items += size - size; /* make compiler &lt;br /&gt;
happy */&lt;br /&gt;
return (voidpf)calloc(items, size);&lt;br /&gt;
#else&lt;br /&gt;
voidpf x;&lt;br /&gt;
UInt32 free, max;&lt;/p&gt;
&lt;p&gt;x = (voidpf) malloc(items*size);&lt;/p&gt;
&lt;p&gt;if(x == Z_NULL)&lt;br /&gt;
{&lt;br /&gt;
MemHeapFreeBytes(0, &amp;amp;amp;free, &amp;amp;amp;max);&lt;br /&gt;
if(items*size &amp;amp;gt; max)&lt;br /&gt;
MemHeapCompact(0);&lt;br /&gt;
MemHeapFreeBytes(0, &amp;amp;amp;free, &amp;amp;amp;max);&lt;br /&gt;
if(max &amp;amp;gt;= size)&lt;br /&gt;
x = (voidpf) malloc(items*size);&lt;br /&gt;
}    &lt;br /&gt;
if(x != Z_NULL)&lt;br /&gt;
zmemzero(x,items*size);&lt;br /&gt;
return x;&lt;br /&gt;
#endif&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;This version checks to see if the allocation can work &lt;br /&gt;
after compacting the heap&lt;/p&gt;
&lt;h1 id="last-fix-number-3"&gt;Last fix number 3&lt;/h1&gt;
&lt;p&gt;extern inline void zmemzero OF((Bytef* dst, uInt num))&lt;br /&gt;
{&lt;br /&gt;
if(dst == NULL)  // added these two lines&lt;br /&gt;
return;        // which also fixes the problem&lt;br /&gt;
while (num--)&lt;br /&gt;
*((char *) dst)++ = 0;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;Hope this helps&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Morehouse</dc:creator><pubDate>Tue, 01 May 2001 21:22:44 -0000</pubDate><guid>https://sourceforge.net14af3af1fda6e6340e7a3fc90acd4119594cdada</guid></item></channel></rss>