mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Default zlib foreign import
This commit is contained in:
Vendored
+34
-29
@@ -2,8 +2,13 @@ package vendor_zlib
|
|||||||
|
|
||||||
import "core:c"
|
import "core:c"
|
||||||
|
|
||||||
when ODIN_OS == .Windows { foreign import zlib "libz.lib" }
|
when ODIN_OS == .Windows {
|
||||||
when ODIN_OS == .Linux { foreign import zlib "system:z" }
|
foreign import zlib "libz.lib"
|
||||||
|
} else when ODIN_OS == .Linux {
|
||||||
|
foreign import zlib "system:z"
|
||||||
|
} else {
|
||||||
|
foreign import zlib "system:z"
|
||||||
|
}
|
||||||
|
|
||||||
VERSION :: "1.2.12"
|
VERSION :: "1.2.12"
|
||||||
VERNUM :: 0x12c0
|
VERNUM :: 0x12c0
|
||||||
@@ -41,39 +46,39 @@ gzFile_s :: struct {
|
|||||||
gzFile :: ^gzFile_s
|
gzFile :: ^gzFile_s
|
||||||
|
|
||||||
z_stream_s :: struct {
|
z_stream_s :: struct {
|
||||||
next_in: ^Bytef,
|
next_in: ^Bytef,
|
||||||
avail_in: uInt,
|
avail_in: uInt,
|
||||||
total_in: uLong,
|
total_in: uLong,
|
||||||
next_out: ^Bytef,
|
next_out: ^Bytef,
|
||||||
avail_out: uInt,
|
avail_out: uInt,
|
||||||
total_out: uLong,
|
total_out: uLong,
|
||||||
msg: [^]c.char,
|
msg: [^]c.char,
|
||||||
state: rawptr,
|
state: rawptr,
|
||||||
zalloc: alloc_func,
|
zalloc: alloc_func,
|
||||||
zfree: free_func,
|
zfree: free_func,
|
||||||
opaque: voidpf,
|
opaque: voidpf,
|
||||||
data_type: c.int,
|
data_type: c.int,
|
||||||
adler: uLong,
|
adler: uLong,
|
||||||
reserved: uLong,
|
reserved: uLong,
|
||||||
}
|
}
|
||||||
|
|
||||||
z_stream :: z_stream_s
|
z_stream :: z_stream_s
|
||||||
z_streamp :: ^z_stream
|
z_streamp :: ^z_stream
|
||||||
|
|
||||||
gz_header_s :: struct {
|
gz_header_s :: struct {
|
||||||
text: c.int,
|
text: c.int,
|
||||||
time: uLong,
|
time: uLong,
|
||||||
xflags: c.int,
|
xflags: c.int,
|
||||||
os: c.int,
|
os: c.int,
|
||||||
extra: [^]Bytef,
|
extra: [^]Bytef,
|
||||||
extra_len: uInt,
|
extra_len: uInt,
|
||||||
extra_max: uInt,
|
extra_max: uInt,
|
||||||
name: [^]Bytef,
|
name: [^]Bytef,
|
||||||
name_max: uInt,
|
name_max: uInt,
|
||||||
comment: [^]Bytef,
|
comment: [^]Bytef,
|
||||||
comm_max: uInt,
|
comm_max: uInt,
|
||||||
hcrc: c.int,
|
hcrc: c.int,
|
||||||
done: c.int,
|
done: c.int,
|
||||||
}
|
}
|
||||||
|
|
||||||
gz_header :: gz_header_s
|
gz_header :: gz_header_s
|
||||||
|
|||||||
Reference in New Issue
Block a user