Prusa MINI Firmware overview
|
|
void gz_reset | OF ((gz_statep)) |
|
gzFile gz_open | OF ((const void *, int, const char *)) |
|
void | gz_reset (gz_statep state) |
|
gzFile | gz_open (void *path, int fd, const char *mode) const |
|
gzFile ZEXPORT | gzopen (char *path, const char *mode) const |
|
gzFile ZEXPORT | gzopen64 (char *path, const char *mode) const |
|
gzFile ZEXPORT | gzdopen (int fd, const char *mode) |
|
int ZEXPORT | gzbuffer (gzFile file, unsigned size) |
|
int ZEXPORT | gzrewind (gzFile file) |
|
z_off64_t ZEXPORT | gzseek64 (gzFile file, z_off64_t offset, int whence) |
|
z_off_t ZEXPORT | gzseek (gzFile file, z_off_t offset, int whence) |
|
z_off64_t ZEXPORT | gztell64 (gzFile file) |
|
z_off_t ZEXPORT | gztell (gzFile file) |
|
z_off64_t ZEXPORT | gzoffset64 (gzFile file) |
|
z_off_t ZEXPORT | gzoffset (gzFile file) |
|
int ZEXPORT | gzeof (gzFile file) |
|
const char *ZEXPORT | gzerror (gzFile file, int *errnum) |
|
void ZEXPORT | gzclearerr (gzFile file) |
|
void ZLIB_INTERNAL | gz_error (gz_statep state, int err, const char *msg) |
|
unsigned ZLIB_INTERNAL | gz_intmax () |
|
◆ LSEEK
◆ OF() [1/2]
◆ OF() [2/2]
◆ gz_reset()
87 state->strm.avail_in = 0;
◆ gz_open()
131 #ifndef NO_GZCOMPRESS
193 len = wcstombs(
NULL, path, 0);
199 len = strlen((
const char *)path);
200 state->path = (
char *)malloc(len + 1);
208 wcstombs(
state->path, path, len + 1);
213 #if !defined(NO_snprintf) && !defined(NO_vsnprintf)
214 (
void)snprintf(
state->path, len + 1,
"%s", (
const char *)path);
216 strcpy(
state->path, path);
228 (cloexec ? O_CLOEXEC : 0) |
234 (exclusive ?
O_EXCL : 0) |
241 state->fd = fd > -1 ? fd : (
243 fd == -2 ? _wopen(path, oflag, 0666) :
245 open((
const char *)path, oflag, 0666));
246 if (
state->fd == -1) {
◆ gzopen()
◆ gzopen64()
◆ gzdopen()
293 if (fd == -1 || (path = (
char *)malloc(7 + 3 *
sizeof(
int))) ==
NULL)
295 #if !defined(NO_snprintf) && !defined(NO_vsnprintf)
296 (
void)snprintf(path, 7 + 3 *
sizeof(
int),
"<fd:%d>", fd);
298 sprintf(path,
"<fd:%d>", fd);
◆ gzbuffer()
330 if (
state->size != 0)
◆ gzrewind()
◆ gzseek64()
392 offset -=
state->x.pos;
393 else if (
state->seek)
394 offset +=
state->skip;
399 state->x.pos + offset >= 0) {
408 state->strm.avail_in = 0;
409 state->x.pos += offset;
417 offset +=
state->x.pos;
427 (
unsigned)offset :
state->x.have;
437 state->skip = offset;
439 return state->x.pos + offset;
◆ gzseek()
◆ gztell64()
◆ gztell()
◆ gzoffset64()
500 offset -=
state->strm.avail_in;
◆ gzoffset()
◆ gzeof()
◆ gzerror()
547 *errnum =
state->err;
◆ gzclearerr()
◆ gz_error()
605 if ((
state->msg = (
char *)malloc(strlen(
state->path) + strlen(msg) + 3)) ==
610 #if !defined(NO_snprintf) && !defined(NO_vsnprintf)
612 "%s%s%s",
state->path,
": ", msg);
615 strcat(
state->msg,
": ");
616 strcat(
state->msg, msg);
◆ gz_intmax()
#define Z_MEM_ERROR
Definition: zlib.h:183
#define GT_OFF(x)
Definition: gzguts.h:218
const uint8_t O_APPEND
Definition: SdBaseFile.h:59
const uint8_t O_EXCL
Definition: SdBaseFile.h:64
#define SEEK_END
Definition: zconf.h:500
#define Z_BUF_ERROR
Definition: zlib.h:184
#define GZ_READ
Definition: gzguts.h:161
z_off64_t ZEXPORT gzoffset64(gzFile file)
Definition: gzlib.c:482
unsigned long z_size_t
Definition: zconf.h:250
#define GZ_NONE
Definition: gzguts.h:160
#define SEEK_CUR
Definition: zconf.h:499
const uint8_t O_RDONLY
Definition: SdBaseFile.h:54
static volatile fsensor_t state
Definition: filament_sensor.c:23
#define z_off_t
Definition: zconf.h:504
#define NULL
Definition: usbd_def.h:53
#define SEEK_SET
Definition: zconf.h:498
#define Z_HUFFMAN_ONLY
Definition: zlib.h:197
#define GZBUFSIZE
Definition: gzguts.h:157
const uint8_t O_WRONLY
Definition: SdBaseFile.h:56
#define z_off64_t
Definition: zconf.h:513
void
Definition: png.h:1083
#define Z_OK
Definition: zlib.h:177
const uint8_t O_TRUNC
Definition: SdBaseFile.h:61
#define Z_FIXED
Definition: zlib.h:199
#define Z_DEFAULT_STRATEGY
Definition: zlib.h:200
void ZLIB_INTERNAL gz_error(gz_statep state, int err, const char *msg)
Definition: gzlib.c:579
#define GZ_WRITE
Definition: gzguts.h:162
z_off64_t ZEXPORT gzseek64(gzFile file, z_off64_t offset, int whence)
Definition: gzlib.c:366
#define LOOK
Definition: gzguts.h:166
#define Z_RLE
Definition: zlib.h:198
#define Z_FILTERED
Definition: zlib.h:196
#define Z_DEFAULT_COMPRESSION
Definition: zlib.h:193
int ZEXPORT gzrewind(gzFile file)
Definition: gzlib.c:343
gz_state FAR * gz_statep
Definition: gzguts.h:203
gzFile gz_open(void *path, int fd, const char *mode) const
Definition: gzlib.c:91
png_structrp int mode
Definition: png.h:1139
#define GZ_APPEND
Definition: gzguts.h:163
z_off64_t ZEXPORT gztell64(gzFile file)
Definition: gzlib.c:455
void gz_reset(gz_statep state)
Definition: gzlib.c:75
static png_bytep size_t size
Definition: pngwrite.c:2170
#define const
Definition: zconf.h:230
#define LSEEK
Definition: gzlib.c:14
const uint8_t O_CREAT
Definition: SdBaseFile.h:63