mirror of
https://github.com/ptitSeb/box64.git
synced 2025-05-09 00:21:32 +08:00
Better wrapping for libz inflate
This commit is contained in:
parent
323783bf49
commit
27cf5c81b2
@ -2936,6 +2936,8 @@ wrappedlibz:
|
||||
- iFp:
|
||||
- deflateEnd
|
||||
- inflateEnd
|
||||
- iFpi:
|
||||
- inflate
|
||||
- iFppi:
|
||||
- inflateInit_
|
||||
- iFpipi:
|
||||
|
@ -12,6 +12,7 @@
|
||||
#endif
|
||||
|
||||
typedef int64_t (*iFp_t)(void*);
|
||||
typedef int64_t (*iFpi_t)(void*, int64_t);
|
||||
typedef int64_t (*iFppi_t)(void*, void*, int64_t);
|
||||
typedef int64_t (*iFpipi_t)(void*, int64_t, void*, int64_t);
|
||||
typedef int64_t (*iFpippi_t)(void*, int64_t, void*, void*, int64_t);
|
||||
@ -20,6 +21,7 @@ typedef int64_t (*iFpiiiiipi_t)(void*, int64_t, int64_t, int64_t, int64_t, int64
|
||||
#define SUPER() ADDED_FUNCTIONS() \
|
||||
GO(deflateEnd, iFp_t) \
|
||||
GO(inflateEnd, iFp_t) \
|
||||
GO(inflate, iFpi_t) \
|
||||
GO(inflateInit_, iFppi_t) \
|
||||
GO(deflateInit_, iFpipi_t) \
|
||||
GO(inflateInit2_, iFpipi_t) \
|
||||
|
@ -173,6 +173,15 @@ EXPORT int my_deflateEnd(x64emu_t* emu, void* str)
|
||||
return r;
|
||||
}
|
||||
|
||||
EXPORT int my_inflate(x64emu_t* emu, void* str, int flush)
|
||||
{
|
||||
libz_my_t *my = (libz_my_t *)emu->context->zlib->priv.w.p2;
|
||||
wrapper_stream_z(emu, str);
|
||||
return my->inflate(str, flush);
|
||||
//TODO: should unwrap the stream
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define CUSTOM_INIT \
|
||||
box64->zlib = lib; \
|
||||
|
@ -61,7 +61,7 @@ GO(gztell64, lFp)
|
||||
GO(gzungetc, iFip)
|
||||
//GO(gzvprintf, iFppA)
|
||||
GO(gzwrite, iFppu)
|
||||
GO(inflate, iFpi)
|
||||
GOM(inflate, iFEpi)
|
||||
//GO(inflateBack, iFp@p@p)
|
||||
GO(inflateBackEnd, iFp)
|
||||
GOM(inflateBackInit_, iFEpippi)
|
||||
|
Loading…
x
Reference in New Issue
Block a user