#include <system.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
Go to the source code of this file.
|
int | mspack_version (int entity) |
|
int | mspack_sys_selftest_internal (int offt_size) |
|
int | mspack_valid_system (struct mspack_system *sys) |
|
int | mspack_sys_filelen (struct mspack_system *system, struct mspack_file *file, off_t *length) |
|
static struct mspack_file * | msp_open (struct mspack_system *self, const char *filename, int mode) |
|
static void | msp_close (struct mspack_file *file) |
|
static int | msp_read (struct mspack_file *file, void *buffer, int bytes) |
|
static int | msp_write (struct mspack_file *file, void *buffer, int bytes) |
|
static int | msp_seek (struct mspack_file *file, off_t offset, int mode) |
|
static off_t | msp_tell (struct mspack_file *file) |
|
static void | msp_msg (struct mspack_file *file, const char *format,...) |
|
static void * | msp_alloc (struct mspack_system *self, size_t bytes) |
|
static void | msp_free (void *buffer) |
|
static void | msp_copy (void *src, void *dest, size_t bytes) |
|
◆ msp_alloc()
◆ msp_close()
Definition at line 138 of file system.c.
RZ_API void Ht_() free(HtName_(Ht) *ht)
References free().
◆ msp_copy()
static void msp_copy |
( |
void * |
src, |
|
|
void * |
dest, |
|
|
size_t |
bytes |
|
) |
| |
|
static |
Definition at line 229 of file system.c.
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
References bytes, dest, memcpy(), and src.
◆ msp_free()
static void msp_free |
( |
void * |
buffer | ) |
|
|
static |
◆ msp_msg()
Definition at line 191 of file system.c.
194 va_start(ap, format);
195 vfprintf(stderr, format, ap);
197 fputc((
int)
'\n', stderr);
◆ msp_open()
◆ msp_read()
Definition at line 146 of file system.c.
150 if (!ferror(self->fh))
return (
int)
count;
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
References bytes, and count.
◆ msp_seek()
◆ msp_tell()
◆ msp_write()
◆ mspack_sys_filelen()
Definition at line 66 of file system.c.
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
int(* seek)(struct mspack_file *file, off_t offset, int mode)
off_t(* tell)(struct mspack_file *file)
References length, MSPACK_ERR_OK, MSPACK_ERR_OPEN, MSPACK_ERR_SEEK, MSPACK_SYS_SEEK_END, MSPACK_SYS_SEEK_START, mspack_system::seek, and mspack_system::tell.
Referenced by cabd_search().
◆ mspack_sys_selftest_internal()
int mspack_sys_selftest_internal |
( |
int |
offt_size | ) |
|
◆ mspack_valid_system()
Definition at line 58 of file system.c.
void(* copy)(void *src, void *dest, size_t bytes)
void(* close)(struct mspack_file *file)
struct mspack_file *(* open)(struct mspack_system *self, const char *filename, int mode)
void(* message)(struct mspack_file *file, const char *format,...)
int(* read)(struct mspack_file *file, void *buffer, int bytes)
int(* write)(struct mspack_file *file, void *buffer, int bytes)
void *(* alloc)(struct mspack_system *self, size_t bytes)
References mspack_system::alloc, mspack_system::close, mspack_system::copy, mspack_system::free, mspack_system::message, NULL, mspack_system::null_ptr, mspack_system::open, mspack_system::read, mspack_system::seek, mspack_system::tell, and mspack_system::write.
Referenced by mspack_create_cab_decompressor(), mspack_create_chm_decompressor(), mspack_create_kwaj_decompressor(), mspack_create_oab_decompressor(), and mspack_create_szdd_decompressor().
◆ mspack_version()
int mspack_version |
( |
int |
entity | ) |
|
Enquire about the binary compatibility version of a specific interface in the library. Currently, the following interfaces are defined:
The result of the function should be interpreted as follows:
- -1: this interface is completely unknown to the library
- 0: this interface is known, but non-functioning
- 1: this interface has all basic functionality
- 2, 3, ...: this interface has additional functionality, clearly marked in the documentation as "version 2", "version 3" and so on.
- Parameters
-
entity | the interface to request current version of |
- Returns
- the version of the requested interface
Definition at line 16 of file system.c.
◆ msp_system
Initial value:
Definition at line 229 of file system.c.
◆ mspack_default_system