Skip to content

Commit 514038c

Browse files
Remove zlib
1 parent 0d2846f commit 514038c

File tree

4 files changed

+16
-187
lines changed

4 files changed

+16
-187
lines changed

lib/pkg_editor/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ if(ZLIB_FOUND)
2020
target_compile_definitions(pkg_editor PRIVATE WINDOWS_ZLIB_PATH="${WINDOWS_ZLIB_DLL_PATH}")
2121
endif()
2222
target_link_libraries(pkg_editor PRIVATE ZLIB::ZLIB)
23-
target_sources(pkg_editor PRIVATE src/zlib.c)
2423
endif()
2524

2625
install(TARGETS pkg_editor

lib/pkg_editor/src/pkg_editor.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
#include "pkg_editor/pkg_editor.h"
4242
#if USE_ZLIB
43-
#include "zlib_interface.h"
43+
#include "zlib.h"
4444
#endif
4545

4646
typedef struct acl_pkg_file {
@@ -1162,6 +1162,21 @@ void acl_pkg_set_show_mode(acl_pkg_file *pkg, int show_mode) {
11621162

11631163
#if USE_ZLIB
11641164

1165+
int zlib_deflateInit(z_streamp strm, int level) {
1166+
return deflateInit_(strm, level, ZLIB_VERSION, (int)sizeof(z_stream));
1167+
}
1168+
1169+
int zlib_deflate(z_streamp strm, int flush) { return deflate(strm, flush); }
1170+
1171+
int zlib_deflateEnd(z_streamp strm) { return deflateEnd(strm); }
1172+
1173+
int zlib_inflateInit(z_streamp strm) {
1174+
return inflateInit_(strm, ZLIB_VERSION, (int)sizeof(z_stream));
1175+
}
1176+
1177+
int zlib_inflate(z_streamp strm, int flush) { return inflate(strm, flush); }
1178+
int zlib_inflateEnd(z_streamp strm) { return inflateEnd(strm); }
1179+
11651180
typedef struct ZInfo {
11661181
z_stream strm;
11671182
unsigned char buffer[32 * 1024];

lib/pkg_editor/src/zlib.c

Lines changed: 0 additions & 155 deletions
This file was deleted.

lib/pkg_editor/src/zlib_interface.h

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)