I would like to use ZLib as part of a library. The library must not access 
globals. Is it possible to use ZLib without using globals?

I am getting an error on the calls to check for ZLib on the Palm, ZLibRef is a 
global and because I initiated in a mode where globals are not allowed I am 
getting a crash.

static UInt16 SharedZLibHandle(void)
{
        if (!ZLibRef) 
        {       // Returns 0 if loaded, non-zero if not loaded
                if (SysLibFind(ZLibName, &ZLibRef))
                if (SysLibLoad(ZLibType, ZLibCreator, &ZLibRef)==0)
                {
                                ZLibOpen(ZLibRef);
                                return ZLibRef;
                        }
                return ZLibRef = 0;
        }
        return ZLibRef;
}

Is there a different way to use ZLib without globals?

Thanks

Greg
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to