Ruby: ext/zlib/zlib-1.2.13/contrib/minizip/ioapi.h File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Data Structures | Macros | Typedefs | Functions
ioapi.h File Reference
`#include <stdio.h>`
`#include <stdlib.h>`
`#include "zlib.h"`

Go to the source code of this file.

## Data Structures
struct | zlib_filefunc_def_s
struct | zlib_filefunc64_def_s
struct | zlib_filefunc64_32_def_s

## Macros
#define | __USE_FILE_OFFSET64
#define | __USE_LARGEFILE64
#define | _LARGEFILE64_SOURCE
#define | _FILE_OFFSET_BIT 64
#define | fopen64 fopen
#define | ftello64 _ftelli64
#define | fseeko64 _fseeki64
#define | MAXU32 (0xffffffff)
#define | ZLIB_FILEFUNC_SEEK_CUR (1)
#define | ZLIB_FILEFUNC_SEEK_END (2)
#define | ZLIB_FILEFUNC_SEEK_SET (0)
#define | ZLIB_FILEFUNC_MODE_READ (1)
#define | ZLIB_FILEFUNC_MODE_WRITE (2)
#define | ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)
#define | ZLIB_FILEFUNC_MODE_EXISTING (4)
#define | ZLIB_FILEFUNC_MODE_CREATE (8)
#define | ZCALLBACK
#define | ZREAD64(filefunc, filestream, buf, size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))
#define | ZWRITE64(filefunc, filestream, buf, size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))
#define | ZCLOSE64(filefunc, filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream))
#define | ZERROR64(filefunc, filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream))
#define | ZOPEN64(filefunc, filename, mode) (call_zopen64((&(filefunc)),(filename),(mode)))
#define | ZTELL64(filefunc, filestream) (call_ztell64((&(filefunc)),(filestream)))
#define | ZSEEK64(filefunc, filestream, pos, mode) (call_zseek64((&(filefunc)),(filestream),(pos),(mode)))

## Typedefs
typedef unsigned __int64 | ZPOS64_T
typedef const char * | filename
typedef const char int | mode
typedef voidpf | stream
typedef voidpf void * | buf
typedef voidpf void uLong | size
typedef voidpf uLong | offset
typedef voidpf uLong int | origin
typedef struct zlib_filefunc_def_s | zlib_filefunc_def
typedef struct zlib_filefunc64_def_s | zlib_filefunc64_def
typedef struct zlib_filefunc64_32_def_s | zlib_filefunc64_32_def

## Functions
typedef | voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque
typedef | uLong (ZCALLBACK *read_file_func) OF((voidpf opaque
typedef | int (ZCALLBACK *close_file_func) OF((voidpf opaque
typedef | long (ZCALLBACK *tell_file_func) OF((voidpf opaque
typedef | ZPOS64_T (ZCALLBACK *tell64_file_func) OF((voidpf opaque
void fill_fopen64_filefunc | OF ((zlib_filefunc64_def *pzlib_filefunc_def))
void fill_fopen_filefunc | OF ((zlib_filefunc_def *pzlib_filefunc_def))
voidpf call_zopen64 | OF ((const zlib_filefunc64_32_def *pfilefunc, const void *filename, int mode))
long call_zseek64 | OF ((const zlib_filefunc64_32_def *pfilefunc, voidpf filestream, ZPOS64_T offset, int origin))
ZPOS64_T call_ztell64 | OF ((const zlib_filefunc64_32_def *pfilefunc, voidpf filestream))
void | fill_zlib_filefunc64_32_def_from_filefunc32 (zlib_filefunc64_32_def *p_filefunc64_32, const zlib_filefunc_def *p_filefunc32)

## Macro Definition Documentation

## ◆ __USE_FILE_OFFSET64

#define __USE_FILE_OFFSET64

Definition at line 30 of file ioapi.h.

## ◆ __USE_LARGEFILE64

#define __USE_LARGEFILE64

Definition at line 33 of file ioapi.h.

## ◆ _FILE_OFFSET_BIT

#define _FILE_OFFSET_BIT 64

Definition at line 39 of file ioapi.h.

## ◆ _LARGEFILE64_SOURCE

#define _LARGEFILE64_SOURCE

Definition at line 36 of file ioapi.h.

## ◆ fopen64

#define fopen64 fopen

Definition at line 59 of file ioapi.h.

## ◆ fseeko64

#define fseeko64 _fseeki64

Definition at line 62 of file ioapi.h.

## ◆ ftello64

#define ftello64 _ftelli64

Definition at line 61 of file ioapi.h.

## ◆ MAXU32

#define MAXU32 (0xffffffff)

Definition at line 106 of file ioapi.h.

## ◆ ZCALLBACK

#define ZCALLBACK

Definition at line 130 of file ioapi.h.

## ◆ ZCLOSE64

#define ZCLOSE64 | ( |  | filefunc,
|  |  | filestream
| ) |  | ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream))

Definition at line 193 of file ioapi.h.

## ◆ ZERROR64

#define ZERROR64 | ( |  | filefunc,
|  |  | filestream
| ) |  | ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream))

Definition at line 194 of file ioapi.h.

## ◆ ZLIB_FILEFUNC_MODE_CREATE

#define ZLIB_FILEFUNC_MODE_CREATE (8)

Definition at line 123 of file ioapi.h.

## ◆ ZLIB_FILEFUNC_MODE_EXISTING

#define ZLIB_FILEFUNC_MODE_EXISTING (4)

Definition at line 122 of file ioapi.h.

## ◆ ZLIB_FILEFUNC_MODE_READ

#define ZLIB_FILEFUNC_MODE_READ (1)

Definition at line 118 of file ioapi.h.

## ◆ ZLIB_FILEFUNC_MODE_READWRITEFILTER

#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)

Definition at line 120 of file ioapi.h.

## ◆ ZLIB_FILEFUNC_MODE_WRITE

#define ZLIB_FILEFUNC_MODE_WRITE (2)

Definition at line 119 of file ioapi.h.

## ◆ ZLIB_FILEFUNC_SEEK_CUR

#define ZLIB_FILEFUNC_SEEK_CUR (1)

Definition at line 114 of file ioapi.h.

## ◆ ZLIB_FILEFUNC_SEEK_END

#define ZLIB_FILEFUNC_SEEK_END (2)

Definition at line 115 of file ioapi.h.

## ◆ ZLIB_FILEFUNC_SEEK_SET

#define ZLIB_FILEFUNC_SEEK_SET (0)

Definition at line 116 of file ioapi.h.

## ◆ ZOPEN64

#define ZOPEN64 | ( |  | filefunc,
|  |  | filename,
|  |  | mode
| ) |  | (call_zopen64((&(filefunc)),(filename),(mode)))

Definition at line 202 of file ioapi.h.

## ◆ ZREAD64

#define ZREAD64 | ( |  | filefunc,
|  |  | filestream,
|  |  | buf,
|  |  | size
| ) |  | ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))

Definition at line 189 of file ioapi.h.

## ◆ ZSEEK64

#define ZSEEK64 | ( |  | filefunc,
|  |  | filestream,
|  |  | pos,
|  |  | mode
| ) |  | (call_zseek64((&(filefunc)),(filestream),(pos),(mode)))

Definition at line 204 of file ioapi.h.

## ◆ ZTELL64

#define ZTELL64 | ( |  | filefunc,
|  |  | filestream
| ) |  | (call_ztell64((&(filefunc)),(filestream)))

Definition at line 203 of file ioapi.h.

## ◆ ZWRITE64

#define ZWRITE64 | ( |  | filefunc,
|  |  | filestream,
|  |  | buf,
|  |  | size
| ) |  | ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))

Definition at line 190 of file ioapi.h.

## Typedef Documentation

## ◆ buf

typedef voidpf const void * buf

Definition at line 138 of file ioapi.h.

## ◆ filename

typedef const void * filename

Definition at line 137 of file ioapi.h.

## ◆ mode

typedef const void int mode

Definition at line 137 of file ioapi.h.

## ◆ offset

typedef voidpf ZPOS64_T offset

Definition at line 144 of file ioapi.h.

## ◆ origin

typedef voidpf ZPOS64_T int origin

Definition at line 144 of file ioapi.h.

## ◆ size

typedef voidpf const void uLong size

Definition at line 138 of file ioapi.h.

## ◆ stream

typedef voidpf stream

Definition at line 138 of file ioapi.h.

## ◆ zlib_filefunc64_32_def

typedef struct zlib_filefunc64_32_def_s zlib_filefunc64_32_def

## ◆ zlib_filefunc64_def

typedef struct zlib_filefunc64_def_s zlib_filefunc64_def

## ◆ zlib_filefunc_def

typedef struct zlib_filefunc_def_s zlib_filefunc_def

## ◆ ZPOS64_T

typedef unsigned __int64 ZPOS64_T

Definition at line 97 of file ioapi.h.

## Function Documentation

## ◆ fill_zlib_filefunc64_32_def_from_filefunc32()

void fill_zlib_filefunc64_32_def_from_filefunc32 | ( | zlib_filefunc64_32_def * | p_filefunc64_32,
|  | const zlib_filefunc_def * | p_filefunc32
| ) |  |

Definition at line 69 of file ioapi.c.

References NULL, zlib_filefunc_def_s::opaque, zlib_filefunc64_def_s::opaque, zlib_filefunc_def_s::zclose_file, zlib_filefunc64_def_s::zclose_file, zlib_filefunc_def_s::zerror_file, zlib_filefunc64_def_s::zerror_file, zlib_filefunc64_32_def_s::zfile_func64, zlib_filefunc64_32_def_s::zopen32_file, zlib_filefunc64_def_s::zopen64_file, zlib_filefunc_def_s::zopen_file, zlib_filefunc_def_s::zread_file, zlib_filefunc64_def_s::zread_file, zlib_filefunc64_32_def_s::zseek32_file, zlib_filefunc64_def_s::zseek64_file, zlib_filefunc_def_s::zseek_file, zlib_filefunc64_32_def_s::ztell32_file, zlib_filefunc64_def_s::ztell64_file, zlib_filefunc_def_s::ztell_file, zlib_filefunc_def_s::zwrite_file, and zlib_filefunc64_def_s::zwrite_file.

Referenced by unzOpen2(), and zipOpen2().

## ◆ int()

typedef int | ( | ZCALLBACK * | close_file_func | ) |

Referenced by bits(), dtoa(), fchmod(), ffi_closure_helper_SYSV(), ffi_prep_args(), ffi_prep_args_v8(), ffi_prep_cif_machdep(), ffi_prep_closure_loc(), ffs(), gunpipe(), gz_comp(), gzputs(), in(), inflate(), inflate_table(), inflate_table9(), Init_heap(), longest_match(), main(), onig_bbuf_init(), onig_node_str_cat(), onig_scan_unsigned_number(), onigenc_with_ascii_strncmp(), onigenc_with_ascii_strnicmp(), ossl_generate_cb_2(), out(), rb_ast_add_local_table(), rb_big_lshift(), rb_big_rshift(), rb_enc_mbclen(), rb_enc_symname_type(), rb_file_expand_path_internal(), rb_fix2str(), rb_getaddrinfo(), rb_getnameinfo(), rb_io_ungetc(), rb_iseq_mark_insn_storage(), rb_iseq_memsize(), rb_num_to_uint(), rb_parser_set_location(), rb_parser_set_location_from_strterm_heredoc(), rb_parser_set_location_of_none(), rb_print_backtrace(), rb_str_buf_cat_escaped_char(), rb_str_drop_bytes(), rb_str_escape(), rb_str_format(), rb_str_inspect(), rb_thread_wait_for_single_fd(), rb_vm_encoded_insn_data_table_init(), rb_vmdebug_debug_print_pre(), rb_w32_getppid(), rb_w32_inet_pton(), rb_w32_map_errno(), rb_w32_pipe(), rb_w32_select_with_thread(), rb_w32_strerror(), recvmsg(), rsock_connect(), rsock_inspect_sockaddr(), rsock_s_accept(), ruby_each_words(), ruby_scan_hex(), ruby_scan_oct(), sendmsg(), SHA256_Final(), SHA256_Update(), SHA512_Last(), SHA512_Update(), st_hash(), strtod(), unz64local_DosDateToTmuDate(), unz64local_getByte(), unzOpenCurrentFile3(), unzReadCurrentFile(), unzRepair(), win32_read_file_func(), win32_seek64_file_func(), win32_seek_file_func(), win32_tell64_file_func(), win32_tell_file_func(), win32_write_file_func(), and zip64local_getByte().

## ◆ long()

typedef long | ( | ZCALLBACK * | tell_file_func | ) |

Referenced by adler32_combine_(), bget4(), bits(), bload(), clock_getres(), crypt_r(), deflateSetDictionary(), ffi_call(), ffi_closure_helper_SYSV(), ffi_prep_args(), ffi_prep_args_SYSV(), ffi_prep_args_v9(), ffi_prep_cif_machdep(), ffi_prep_closure_loc(), fill_window(), gzcopy(), gzip_normalize(), inflate_fast(), inflateMark(), main(), rb_big2long(), rb_big2ulong(), rb_big_lshift(), rb_big_rshift(), rb_econv_append(), rb_enc_strlen_cr(), rb_execution_context_update(), rb_fix2str(), rb_int_parse_cstr(), rb_int_powm(), rb_integer_float_cmp(), rb_integer_float_eq(), rb_w32_getppid(), read4(), rsock_s_recvfrom(), ruby_enc_find_extname(), ruby_scan_digits(), ruby_strtoul(), signbit(), and win32_tell_file_func().

## ◆ OF() [1/5]

voidpf call_zopen64 OF | ( | (const zlib_filefunc64_32_def *pfilefunc, const void *filename, int mode) |  | ) |

## ◆ OF() [2/5]

ZPOS64_T call_ztell64 OF | ( | (const zlib_filefunc64_32_def *pfilefunc, voidpf filestream) |  | ) |

## ◆ OF() [3/5]

long call_zseek64 OF | ( | (const zlib_filefunc64_32_def *pfilefunc, voidpf filestream, ZPOS64_T offset, int origin) |  | ) |

## ◆ OF() [4/5]

void fill_fopen64_filefunc OF | ( | (zlib_filefunc64_def *pzlib_filefunc_def) |  | ) |

## ◆ OF() [5/5]

void fill_fopen_filefunc OF | ( | (zlib_filefunc_def *pzlib_filefunc_def) |  | ) |

## ◆ uLong()

typedef uLong | ( | ZCALLBACK * | read_file_func | ) |

## ◆ voidpf()

typedef voidpf | ( | ZCALLBACK * | open_file_func | ) |

## ◆ ZPOS64_T()

typedef ZPOS64_T | ( | ZCALLBACK * | tell64_file_func | ) |