| 1 | #cxx . . $ `<file>/compat/ioapi.c`/include "mz.h"cxx . . $ `<file>/mz.h`/ |
| 2 | #include "mz_strm.h"cxx . . $ `<file>/mz_strm.h`/ |
| 3 | #include "mz_strm_mem.h"cxx . . $ `<file>/mz_strm_mem.h`/ |
| 4 | |
| 5 | #include "ioapi.h"cxx . . $ `<file>/compat/ioapi.h`/ |
| 6 | |
| 7 | typedef struct mz_stream_ioapi_scxx . . $ mz_stream_ioapi_s# { |
| 8 | mz_streamcxx . . $ mz_stream# streamcxx . . $ mz_stream_ioapi_s#stream.; |
| 9 | void *handlecxx . . $ mz_stream_ioapi_s#handle.; |
| 10 | zlib_filefunc_defcxx . . $ zlib_filefunc_def# filefunccxx . . $ mz_stream_ioapi_s#filefunc.; |
| 11 | zlib_filefunc64_defcxx . . $ zlib_filefunc64_def# filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64.; |
| 12 | } mz_stream_ioapicxx . . $ mz_stream_ioapi#; |
| 13 | |
| 14 | /***************************************************************************/ |
| 15 | |
| 16 | static int32_tcxx . . $ int32_t# mz_stream_ioapi_opencxx . . $ mz_stream_ioapi_open(7083a8984c0735e8).(void *stream, const char *path, int32_tcxx . . $ int32_t# mode); |
| 17 | static int32_tcxx . . $ int32_t# mz_stream_ioapi_is_opencxx . . $ mz_stream_ioapi_is_open(dedf1e9b1c614a07).(void *stream); |
| 18 | static int32_tcxx . . $ int32_t# mz_stream_ioapi_readcxx . . $ mz_stream_ioapi_read(8bc41909eac9e5d8).(void *stream, void *buf, int32_tcxx . . $ int32_t# size); |
| 19 | static int32_tcxx . . $ int32_t# mz_stream_ioapi_writecxx . . $ mz_stream_ioapi_write(91e54fd90adbb21).(void *stream, const void *buf, int32_tcxx . . $ int32_t# size); |
| 20 | static int64_tcxx . . $ int64_t# mz_stream_ioapi_tellcxx . . $ mz_stream_ioapi_tell(72c1818a5177f981).(void *stream); |
| 21 | static int32_tcxx . . $ int32_t# mz_stream_ioapi_seekcxx . . $ mz_stream_ioapi_seek(8bc0ff128761c75d).(void *stream, int64_tcxx . . $ int64_t# offset, int32_tcxx . . $ int32_t# origin); |
| 22 | static int32_tcxx . . $ int32_t# mz_stream_ioapi_closecxx . . $ mz_stream_ioapi_close(dedf1e9b1c614a07).(void *stream); |
| 23 | static int32_tcxx . . $ int32_t# mz_stream_ioapi_errorcxx . . $ mz_stream_ioapi_error(dedf1e9b1c614a07).(void *stream); |
| 24 | |
| 25 | /***************************************************************************/ |
| 26 | |
| 27 | static mz_stream_vtblcxx . . $ mz_stream_vtbl# mz_stream_ioapi_vtblcxx . . $ mz_stream_ioapi_vtbl. = {mz_stream_ioapi_opencxx . . $ mz_stream_ioapi_open(7083a8984c0735e8)., |
| 28 | mz_stream_ioapi_is_opencxx . . $ mz_stream_ioapi_is_open(dedf1e9b1c614a07)., |
| 29 | mz_stream_ioapi_readcxx . . $ mz_stream_ioapi_read(8bc41909eac9e5d8)., |
| 30 | mz_stream_ioapi_writecxx . . $ mz_stream_ioapi_write(91e54fd90adbb21)., |
| 31 | mz_stream_ioapi_tellcxx . . $ mz_stream_ioapi_tell(72c1818a5177f981)., |
| 32 | mz_stream_ioapi_seekcxx . . $ mz_stream_ioapi_seek(8bc0ff128761c75d)., |
| 33 | mz_stream_ioapi_closecxx . . $ mz_stream_ioapi_close(dedf1e9b1c614a07)., |
| 34 | mz_stream_ioapi_errorcxx . . $ mz_stream_ioapi_error(dedf1e9b1c614a07)., |
| 35 | mz_stream_ioapi_createcxx . . $ mz_stream_ioapi_create(50c7df7de5344ebb)., |
| 36 | mz_stream_ioapi_deletecxx . . $ mz_stream_ioapi_delete(539e082cf00e1f43)., |
| 37 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 38 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!}; |
| 39 | |
| 40 | /***************************************************************************/ |
| 41 | |
| 42 | static int32_tcxx . . $ int32_t# mz_stream_ioapi_opencxx . . $ mz_stream_ioapi_open(7083a8984c0735e8).(void *stream, const char *path, int32_tcxx . . $ int32_t# mode) { |
| 43 | mz_stream_ioapicxx . . $ mz_stream_ioapi# *ioapi = (mz_stream_ioapicxx . . $ mz_stream_ioapi# *)stream; |
| 44 | int32_tcxx . . $ int32_t# ioapi_mode = 0; |
| 45 | |
| 46 | if ((mode & MZ_OPEN_MODE_READWRITEcxx . . $ `mz.h:52:9`!) == MZ_OPEN_MODE_READcxx . . $ `mz.h:50:9`!) |
| 47 | ioapi_mode = ZLIB_FILEFUNC_MODE_READcxx . . $ `compat/ioapi.h:23:9`!; |
| 48 | else if (mode & MZ_OPEN_MODE_APPENDcxx . . $ `mz.h:53:9`!) |
| 49 | ioapi_mode = ZLIB_FILEFUNC_MODE_EXISTINGcxx . . $ `compat/ioapi.h:27:9`!; |
| 50 | else if (mode & MZ_OPEN_MODE_CREATEcxx . . $ `mz.h:54:9`!) |
| 51 | ioapi_mode = ZLIB_FILEFUNC_MODE_CREATEcxx . . $ `compat/ioapi.h:28:9`!; |
| 52 | else |
| 53 | return MZ_OPEN_ERRORcxx . . $ `mz.h:40:9`!; |
| 54 | |
| 55 | if (ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..zopen64_filecxx . . $ zlib_filefunc64_def_s#zopen64_file.) |
| 56 | ioapi->handlecxx . . $ mz_stream_ioapi_s#handle. = ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..zopen64_filecxx . . $ zlib_filefunc64_def_s#zopen64_file.(ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..opaquecxx . . $ zlib_filefunc64_def_s#opaque., path, ioapi_mode); |
| 57 | else if (ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..zopen_filecxx . . $ zlib_filefunc_def_s#zopen_file.) |
| 58 | ioapi->handlecxx . . $ mz_stream_ioapi_s#handle. = ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..zopen_filecxx . . $ zlib_filefunc_def_s#zopen_file.(ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..opaquecxx . . $ zlib_filefunc_def_s#opaque., path, ioapi_mode); |
| 59 | |
| 60 | if (!ioapi->handlecxx . . $ mz_stream_ioapi_s#handle.) |
| 61 | return MZ_PARAM_ERRORcxx . . $ `mz.h:31:9`!; |
| 62 | |
| 63 | return MZ_OKcxx . . $ `mz.h:21:9`!; |
| 64 | } |
| 65 | |
| 66 | static int32_tcxx . . $ int32_t# mz_stream_ioapi_is_opencxx . . $ mz_stream_ioapi_is_open(dedf1e9b1c614a07).(void *stream) { |
| 67 | mz_stream_ioapicxx . . $ mz_stream_ioapi# *ioapi = (mz_stream_ioapicxx . . $ mz_stream_ioapi# *)stream; |
| 68 | if (!ioapi->handlecxx . . $ mz_stream_ioapi_s#handle.) |
| 69 | return MZ_OPEN_ERRORcxx . . $ `mz.h:40:9`!; |
| 70 | return MZ_OKcxx . . $ `mz.h:21:9`!; |
| 71 | } |
| 72 | |
| 73 | static int32_tcxx . . $ int32_t# mz_stream_ioapi_readcxx . . $ mz_stream_ioapi_read(8bc41909eac9e5d8).(void *stream, void *buf, int32_tcxx . . $ int32_t# size) { |
| 74 | mz_stream_ioapicxx . . $ mz_stream_ioapi# *ioapi = (mz_stream_ioapicxx . . $ mz_stream_ioapi# *)stream; |
| 75 | read_file_funccxx . . $ read_file_func# zread = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 76 | void *opaque = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 77 | |
| 78 | if (mz_stream_ioapi_is_opencxx . . $ mz_stream_ioapi_is_open(dedf1e9b1c614a07).(stream) != MZ_OKcxx . . $ `mz.h:21:9`!) |
| 79 | return MZ_OPEN_ERRORcxx . . $ `mz.h:40:9`!; |
| 80 | |
| 81 | if (ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..zread_filecxx . . $ zlib_filefunc64_def_s#zread_file.) { |
| 82 | zread = ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..zread_filecxx . . $ zlib_filefunc64_def_s#zread_file.; |
| 83 | opaque = ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..opaquecxx . . $ zlib_filefunc64_def_s#opaque.; |
| 84 | } else if (ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..zread_filecxx . . $ zlib_filefunc_def_s#zread_file.) { |
| 85 | zread = ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..zread_filecxx . . $ zlib_filefunc_def_s#zread_file.; |
| 86 | opaque = ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..opaquecxx . . $ zlib_filefunc_def_s#opaque.; |
| 87 | } else |
| 88 | return MZ_PARAM_ERRORcxx . . $ `mz.h:31:9`!; |
| 89 | |
| 90 | return (int32_tcxx . . $ int32_t#)zread(opaque, ioapi->handlecxx . . $ mz_stream_ioapi_s#handle., buf, size); |
| 91 | } |
| 92 | |
| 93 | static int32_tcxx . . $ int32_t# mz_stream_ioapi_writecxx . . $ mz_stream_ioapi_write(91e54fd90adbb21).(void *stream, const void *buf, int32_tcxx . . $ int32_t# size) { |
| 94 | mz_stream_ioapicxx . . $ mz_stream_ioapi# *ioapi = (mz_stream_ioapicxx . . $ mz_stream_ioapi# *)stream; |
| 95 | write_file_funccxx . . $ write_file_func# zwrite = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 96 | int32_tcxx . . $ int32_t# written = 0; |
| 97 | void *opaque = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 98 | |
| 99 | if (mz_stream_ioapi_is_opencxx . . $ mz_stream_ioapi_is_open(dedf1e9b1c614a07).(stream) != MZ_OKcxx . . $ `mz.h:21:9`!) |
| 100 | return MZ_OPEN_ERRORcxx . . $ `mz.h:40:9`!; |
| 101 | |
| 102 | if (ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..zwrite_filecxx . . $ zlib_filefunc64_def_s#zwrite_file.) { |
| 103 | zwrite = ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..zwrite_filecxx . . $ zlib_filefunc64_def_s#zwrite_file.; |
| 104 | opaque = ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..opaquecxx . . $ zlib_filefunc64_def_s#opaque.; |
| 105 | } else if (ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..zwrite_filecxx . . $ zlib_filefunc_def_s#zwrite_file.) { |
| 106 | zwrite = ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..zwrite_filecxx . . $ zlib_filefunc_def_s#zwrite_file.; |
| 107 | opaque = ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..opaquecxx . . $ zlib_filefunc_def_s#opaque.; |
| 108 | } else |
| 109 | return MZ_PARAM_ERRORcxx . . $ `mz.h:31:9`!; |
| 110 | |
| 111 | written = (int32_tcxx . . $ int32_t#)zwrite(opaque, ioapi->handlecxx . . $ mz_stream_ioapi_s#handle., buf, size); |
| 112 | return written; |
| 113 | } |
| 114 | |
| 115 | static int64_tcxx . . $ int64_t# mz_stream_ioapi_tellcxx . . $ mz_stream_ioapi_tell(72c1818a5177f981).(void *stream) { |
| 116 | mz_stream_ioapicxx . . $ mz_stream_ioapi# *ioapi = (mz_stream_ioapicxx . . $ mz_stream_ioapi# *)stream; |
| 117 | |
| 118 | if (mz_stream_ioapi_is_opencxx . . $ mz_stream_ioapi_is_open(dedf1e9b1c614a07).(stream) != MZ_OKcxx . . $ `mz.h:21:9`!) |
| 119 | return MZ_OPEN_ERRORcxx . . $ `mz.h:40:9`!; |
| 120 | |
| 121 | if (ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..ztell64_filecxx . . $ zlib_filefunc64_def_s#ztell64_file.) |
| 122 | return ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..ztell64_filecxx . . $ zlib_filefunc64_def_s#ztell64_file.(ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..opaquecxx . . $ zlib_filefunc64_def_s#opaque., ioapi->handlecxx . . $ mz_stream_ioapi_s#handle.); |
| 123 | else if (ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..ztell_filecxx . . $ zlib_filefunc_def_s#ztell_file.) |
| 124 | return ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..ztell_filecxx . . $ zlib_filefunc_def_s#ztell_file.(ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..opaquecxx . . $ zlib_filefunc_def_s#opaque., ioapi->handlecxx . . $ mz_stream_ioapi_s#handle.); |
| 125 | |
| 126 | return MZ_INTERNAL_ERRORcxx . . $ `mz.h:33:9`!; |
| 127 | } |
| 128 | |
| 129 | static int32_tcxx . . $ int32_t# mz_stream_ioapi_seekcxx . . $ mz_stream_ioapi_seek(8bc0ff128761c75d).(void *stream, int64_tcxx . . $ int64_t# offset, int32_tcxx . . $ int32_t# origin) { |
| 130 | mz_stream_ioapicxx . . $ mz_stream_ioapi# *ioapi = (mz_stream_ioapicxx . . $ mz_stream_ioapi# *)stream; |
| 131 | |
| 132 | if (mz_stream_ioapi_is_opencxx . . $ mz_stream_ioapi_is_open(dedf1e9b1c614a07).(stream) != MZ_OKcxx . . $ `mz.h:21:9`!) |
| 133 | return MZ_OPEN_ERRORcxx . . $ `mz.h:40:9`!; |
| 134 | |
| 135 | if (ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..zseek64_filecxx . . $ zlib_filefunc64_def_s#zseek64_file.) { |
| 136 | if (ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..zseek64_filecxx . . $ zlib_filefunc64_def_s#zseek64_file.(ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..opaquecxx . . $ zlib_filefunc64_def_s#opaque., ioapi->handlecxx . . $ mz_stream_ioapi_s#handle., offset, origin) != 0) |
| 137 | return MZ_INTERNAL_ERRORcxx . . $ `mz.h:33:9`!; |
| 138 | } else if (ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..zseek_filecxx . . $ zlib_filefunc_def_s#zseek_file.) { |
| 139 | if (ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..zseek_filecxx . . $ zlib_filefunc_def_s#zseek_file.(ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..opaquecxx . . $ zlib_filefunc_def_s#opaque., ioapi->handlecxx . . $ mz_stream_ioapi_s#handle., (int32_tcxx . . $ int32_t#)offset, origin) != 0) |
| 140 | return MZ_INTERNAL_ERRORcxx . . $ `mz.h:33:9`!; |
| 141 | } else |
| 142 | return MZ_PARAM_ERRORcxx . . $ `mz.h:31:9`!; |
| 143 | |
| 144 | return MZ_OKcxx . . $ `mz.h:21:9`!; |
| 145 | } |
| 146 | |
| 147 | static int32_tcxx . . $ int32_t# mz_stream_ioapi_closecxx . . $ mz_stream_ioapi_close(dedf1e9b1c614a07).(void *stream) { |
| 148 | mz_stream_ioapicxx . . $ mz_stream_ioapi# *ioapi = (mz_stream_ioapicxx . . $ mz_stream_ioapi# *)stream; |
| 149 | close_file_funccxx . . $ close_file_func# zclose = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 150 | void *opaque = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 151 | |
| 152 | if (mz_stream_ioapi_is_opencxx . . $ mz_stream_ioapi_is_open(dedf1e9b1c614a07).(stream) != MZ_OKcxx . . $ `mz.h:21:9`!) |
| 153 | return MZ_OPEN_ERRORcxx . . $ `mz.h:40:9`!; |
| 154 | |
| 155 | if (ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..zclose_filecxx . . $ zlib_filefunc_def_s#zclose_file.) { |
| 156 | zclose = ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..zclose_filecxx . . $ zlib_filefunc_def_s#zclose_file.; |
| 157 | opaque = ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..opaquecxx . . $ zlib_filefunc_def_s#opaque.; |
| 158 | } else if (ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..zclose_filecxx . . $ zlib_filefunc64_def_s#zclose_file.) { |
| 159 | zclose = ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..zclose_filecxx . . $ zlib_filefunc64_def_s#zclose_file.; |
| 160 | opaque = ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..opaquecxx . . $ zlib_filefunc64_def_s#opaque.; |
| 161 | } else |
| 162 | return MZ_PARAM_ERRORcxx . . $ `mz.h:31:9`!; |
| 163 | |
| 164 | if (zclose(opaque, ioapi->handlecxx . . $ mz_stream_ioapi_s#handle.) != 0) |
| 165 | return MZ_CLOSE_ERRORcxx . . $ `mz.h:41:9`!; |
| 166 | ioapi->handlecxx . . $ mz_stream_ioapi_s#handle. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 167 | return MZ_OKcxx . . $ `mz.h:21:9`!; |
| 168 | } |
| 169 | |
| 170 | static int32_tcxx . . $ int32_t# mz_stream_ioapi_errorcxx . . $ mz_stream_ioapi_error(dedf1e9b1c614a07).(void *stream) { |
| 171 | mz_stream_ioapicxx . . $ mz_stream_ioapi# *ioapi = (mz_stream_ioapicxx . . $ mz_stream_ioapi# *)stream; |
| 172 | testerror_file_funccxx . . $ testerror_file_func# zerror = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 173 | void *opaque = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 174 | |
| 175 | if (mz_stream_ioapi_is_opencxx . . $ mz_stream_ioapi_is_open(dedf1e9b1c614a07).(stream) != MZ_OKcxx . . $ `mz.h:21:9`!) |
| 176 | return MZ_OPEN_ERRORcxx . . $ `mz.h:40:9`!; |
| 177 | |
| 178 | if (ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..zerror_filecxx . . $ zlib_filefunc_def_s#zerror_file.) { |
| 179 | zerror = ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..zerror_filecxx . . $ zlib_filefunc_def_s#zerror_file.; |
| 180 | opaque = ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc..opaquecxx . . $ zlib_filefunc_def_s#opaque.; |
| 181 | } else if (ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..zerror_filecxx . . $ zlib_filefunc64_def_s#zerror_file.) { |
| 182 | zerror = ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..zerror_filecxx . . $ zlib_filefunc64_def_s#zerror_file.; |
| 183 | opaque = ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64..opaquecxx . . $ zlib_filefunc64_def_s#opaque.; |
| 184 | } else |
| 185 | return MZ_PARAM_ERRORcxx . . $ `mz.h:31:9`!; |
| 186 | |
| 187 | return zerror(opaque, ioapi->handlecxx . . $ mz_stream_ioapi_s#handle.); |
| 188 | } |
| 189 | |
| 190 | int32_tcxx . . $ int32_t# mz_stream_ioapi_set_filefunccxx . . $ mz_stream_ioapi_set_filefunc(c7baa3b6b19787c2).(void *stream, zlib_filefunc_defcxx . . $ zlib_filefunc_def# *filefunc) { |
| 191 | mz_stream_ioapicxx . . $ mz_stream_ioapi# *ioapi = (mz_stream_ioapicxx . . $ mz_stream_ioapi# *)stream; |
| 192 | memcpycxx . . $ memcpy(cc817cb175f282d).(&ioapi->filefunccxx . . $ mz_stream_ioapi_s#filefunc., filefunc, sizeof(zlib_filefunc_defcxx . . $ zlib_filefunc_def#)); |
| 193 | return MZ_OKcxx . . $ `mz.h:21:9`!; |
| 194 | } |
| 195 | |
| 196 | int32_tcxx . . $ int32_t# mz_stream_ioapi_set_filefunc64cxx . . $ mz_stream_ioapi_set_filefunc64(ca0c56fe0832fb26).(void *stream, zlib_filefunc64_defcxx . . $ zlib_filefunc64_def# *filefunc) { |
| 197 | mz_stream_ioapicxx . . $ mz_stream_ioapi# *ioapi = (mz_stream_ioapicxx . . $ mz_stream_ioapi# *)stream; |
| 198 | memcpycxx . . $ memcpy(cc817cb175f282d).(&ioapi->filefunc64cxx . . $ mz_stream_ioapi_s#filefunc64., filefunc, sizeof(zlib_filefunc64_defcxx . . $ zlib_filefunc64_def#)); |
| 199 | return MZ_OKcxx . . $ `mz.h:21:9`!; |
| 200 | } |
| 201 | |
| 202 | void *mz_stream_ioapi_createcxx . . $ mz_stream_ioapi_create(50c7df7de5344ebb).(void) { |
| 203 | mz_stream_ioapicxx . . $ mz_stream_ioapi# *ioapi = (mz_stream_ioapicxx . . $ mz_stream_ioapi# *)calloccxx . . $ calloc(63a7bf2941bfcd7a).(1, sizeof(mz_stream_ioapicxx . . $ mz_stream_ioapi#)); |
| 204 | if (ioapi) |
| 205 | ioapi->streamcxx . . $ mz_stream_ioapi_s#stream..vtblcxx . . $ mz_stream_s#vtbl. = &mz_stream_ioapi_vtblcxx . . $ mz_stream_ioapi_vtbl.; |
| 206 | return ioapi; |
| 207 | } |
| 208 | |
| 209 | void mz_stream_ioapi_deletecxx . . $ mz_stream_ioapi_delete(539e082cf00e1f43).(void **stream) { |
| 210 | mz_stream_ioapicxx . . $ mz_stream_ioapi# *ioapi = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 211 | if (!stream) |
| 212 | return; |
| 213 | ioapi = (mz_stream_ioapicxx . . $ mz_stream_ioapi# *)*stream; |
| 214 | freecxx . . $ free(5d22bdacc48458e8).(ioapi); |
| 215 | *stream = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 216 | } |
| 217 | |
| 218 | /***************************************************************************/ |
| 219 | |
| 220 | void fill_fopen_filefunccxx . . $ fill_fopen_filefunc(1a50b5b7c2234ef7).(zlib_filefunc_defcxx . . $ zlib_filefunc_def# *pzlib_filefunc_def) { |
| 221 | /* For 32-bit file support only, compile with MZ_FILE32_API */ |
| 222 | if (pzlib_filefunc_def) |
| 223 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(pzlib_filefunc_def, 0, sizeof(zlib_filefunc_defcxx . . $ zlib_filefunc_def#)); |
| 224 | } |
| 225 | |
| 226 | void fill_fopen64_filefunccxx . . $ fill_fopen64_filefunc(83ae4746d8b1ad4b).(zlib_filefunc64_defcxx . . $ zlib_filefunc64_def# *pzlib_filefunc_def) { |
| 227 | /* All mz_stream_os_* support large files if compilation supports it */ |
| 228 | if (pzlib_filefunc_def) |
| 229 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(pzlib_filefunc_def, 0, sizeof(zlib_filefunc64_defcxx . . $ zlib_filefunc64_def#)); |
| 230 | } |
| 231 | |
| 232 | void fill_win32_filefunccxx . . $ fill_win32_filefunc(1a50b5b7c2234ef7).(zlib_filefunc_defcxx . . $ zlib_filefunc_def# *pzlib_filefunc_def) { |
| 233 | /* Handled by mz_stream_os_win32 */ |
| 234 | if (pzlib_filefunc_def) |
| 235 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(pzlib_filefunc_def, 0, sizeof(zlib_filefunc_defcxx . . $ zlib_filefunc_def#)); |
| 236 | } |
| 237 | |
| 238 | void fill_win32_filefunc64cxx . . $ fill_win32_filefunc64(83ae4746d8b1ad4b).(zlib_filefunc64_defcxx . . $ zlib_filefunc64_def# *pzlib_filefunc_def) { |
| 239 | /* Automatically supported in mz_stream_os_win32 */ |
| 240 | if (pzlib_filefunc_def) |
| 241 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(pzlib_filefunc_def, 0, sizeof(zlib_filefunc64_defcxx . . $ zlib_filefunc64_def#)); |
| 242 | } |
| 243 | |
| 244 | void fill_win32_filefunc64Acxx . . $ fill_win32_filefunc64A(83ae4746d8b1ad4b).(zlib_filefunc64_defcxx . . $ zlib_filefunc64_def# *pzlib_filefunc_def) { |
| 245 | /* Automatically supported in mz_stream_os_win32 */ |
| 246 | if (pzlib_filefunc_def) |
| 247 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(pzlib_filefunc_def, 0, sizeof(zlib_filefunc64_defcxx . . $ zlib_filefunc64_def#)); |
| 248 | } |
| 249 | |
| 250 | /* NOTE: fill_win32_filefunc64W is no longer necessary since wide-character |
| 251 | support is automatically handled by the underlying os stream. Do not |
| 252 | pass wide-characters to zipOpen or unzOpen. */ |
| 253 | |
| 254 | void fill_memory_filefunccxx . . $ fill_memory_filefunc(1a50b5b7c2234ef7).(zlib_filefunc_defcxx . . $ zlib_filefunc_def# *pzlib_filefunc_def) { |
| 255 | /* Use opaque to indicate which stream interface to create */ |
| 256 | if (pzlib_filefunc_def) { |
| 257 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(pzlib_filefunc_def, 0, sizeof(zlib_filefunc_defcxx . . $ zlib_filefunc_def#)); |
| 258 | pzlib_filefunc_def->opaquecxx . . $ zlib_filefunc_def_s#opaque. = mz_stream_mem_get_interfacecxx . . $ mz_stream_mem_get_interface(50c7df7de5344ebb).(); |
| 259 | } |
| 260 | } |