w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

utiliof.h File Reference
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdint.h>
#include "utildecl.h"
#include "utilnumber.h"
Include dependency graph for utiliof.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  iof_file
 
struct  iof
 

Macros

#define IOF_MEMBERS
 
#define IOF_ALLOC   (1<<0)
 
#define IOF_HEAP   (1<<1)
 
#define IOF_BUFFER_ALLOC   (1<<2)
 
#define IOF_BUFFER_HEAP   (1<<3)
 
#define IOF_SHORT   (1<<4)
 
#define IOF_LONG   (1<<5)
 
#define IOF_TAIL   (1<<6)
 
#define IOF_READER   (1<<7)
 
#define IOF_WRITER   (1<<8)
 
#define IOF_DATA   (1<<9)
 
#define IOF_FILE_HANDLE   (1<<10)
 
#define IOF_FILE   (1<<11)
 
#define IOF_NEXT   (1<<12)
 
#define IOF_CLOSE_FILE   (1<<13)
 
#define IOF_REOPEN_FILE   (1<<14)
 
#define IOF_RECLOSE_FILE   (1<<15)
 
#define IOF_STOPPED   (1<<16)
 
#define IOF_BUFSIZ   (sizeof(iof) + BUFSIZ*sizeof(uint8_t))
 
#define IOF_READER_INIT(handler, file, buffer, size, flags)    { {{ (uint8_t *)(buffer), (uint8_t *)(buffer), (uint8_t *)(buffer) }}, size, handler, { file }, (flags)|IOF_READER, 0 }
 
#define IOF_WRITER_INIT(handler, file, buffer, size, flags)    { {{ (uint8_t *)(buffer), (uint8_t *)(buffer), (uint8_t *)(buffer) + size }}, size, handler, { file }, (flags)|IOF_WRITER, 0 }
 
#define IOF_STRING_INIT(buffer, size)    { {{ (uint8_t *)(buffer), (uint8_t *)(buffer), (uint8_t *)(buffer) + size }}, size, NULL, { NULL }, 0|IOF_READER|IOF_DATA, 0 }
 
#define IOF_STRING()   IOF_STRING_INIT(0, 0)
 
#define iof_incref(I)   (++(I)->refcount)
 
#define iof_decref(I)   ((void)(--(I)->refcount <= 0 && iof_close(I)))
 
#define iof_unref(I)   (--(I)->refcount)
 
#define iof_setup_reader(I, buffer, size)
 
#define iof_setup_writer(O, buffer, size)
 
#define iof_space(I)   ((I)->end - (I)->buf)
 
#define iof_left(I)   ((I)->end - (I)->pos)
 
#define iof_size(I)   ((I)->pos - (I)->buf)
 
#define iof_input(I)   ((I)->more ? (I)->more((I), IOFREAD) : 0lu)
 
#define iof_load(I)   ((I)->more ? (I)->more((I), IOFLOAD) : 0lu)
 
#define iof_output(O)   ((O)->more ? (O)->more((O), IOFWRITE) : 0lu)
 
#define iof_flush(O)   ((O)->more ? (O)->more(O, IOFFLUSH) : 0lu)
 
#define iof_close(O)   ((O)->more ? (O)->more(O, IOFCLOSE) : 0lu)
 
#define iof_stop(F)   ((void)(F->pos = F->end = F->buf, F->flags |= IOF_STOPPED))
 
#define iof_tail(I)   (((I)->flags & IOF_TAIL) && (I)->pos < (I)->end ? iof_save_tail(I) : 0)
 
#define iof_protect_tail(I, back, length)   ((iof_left(I) >= (length) - (back)) ? 1 : (iof_input_save_tail(I, back) >= length - back))
 
#define iof_panic(mess)   (fputs(mess, stderr), abort())
 
#define iof_fwrite_error()   iof_panic(strerror(errno))
 
#define iof_file_get_fh(iofile)   ((iofile)->iofh)
 
#define iof_file_set_fh(iofile, fh)   ((iofile)->iofh = fh)
 
#define iof_file_get_file(iofile)   (((iofile)->flags & IOF_DATA) ? NULL : iof_file_get_fh(iofile))
 
#define iof_data_free(data)   util_free(data)
 
#define iof_file_wdata_copy(data, size)   iof_file_wdata(iof_copy_data(data, size), size)
 
#define iof_file_rdata_copy(data, size)   iof_file_rdata(iof_copy_data(data, size), size)
 
#define iof_file_get_name(iofile)   ((iofile)->name)
 
#define iof_file_incref(iofile)   (++(iofile)->refcount)
 
#define iof_file_decref(iofile)   ((void)(--(iofile)->refcount <= 0 && (iof_file_free(iofile), 0)))
 
#define iof_file_reopen(iofile)   (((iofile)->flags & IOF_REOPEN_FILE) ? iof_file_reopen_input(iofile) : 1)
 
#define iof_file_reclose(iofile)   (void)(((iofile)->flags & IOF_RECLOSE_FILE) ? iof_file_reclose_input(iofile) : 0)
 
#define iof_setup_iofile(I, f)   (iof_file_incref(f), (I)->iofile = f, (I)->flags |= IOF_FILE)
 
#define iof_setup_file(I, fh)   ((I)->file = fh, (I)->flags |= IOF_FILE_HANDLE)
 
#define iof_setup_next(I, N)   ((I)->next = N, iof_incref(N), (I)->flags |= IOF_NEXT)
 
#define iof_buffer_new()   iof_buffer_create(BUFSIZ)
 
#define iof_string(I, s, bytes)    (((I)->rbuf = (I)->rpos = (const uint8_t *)s), ((I)->rend = (I)->rbuf + (bytes)), ((I)->flags |= IOF_DATA), (I))
 
#define iof_loadable(I)   ((I)->pos < (I)->end || iof_load(I))
 
#define iof_readable(I)   ((I)->pos < (I)->end || iof_input(I))
 
#define iof_writable(O)   ((O)->pos < (O)->end || iof_output(O))
 
#define iof_hloadable   iof_loadable
 
#define iof_iloadable   iof_loadable
 
#define iof_hreadable   iof_readable
 
#define iof_ireadable   iof_readable
 
#define iof_hwritable   iof_writable
 
#define iof_iwritable   iof_writable
 
#define iof_ensure(O, n)   ((O)->pos+(n)-1 < (O)->end || iof_output(O))
 
#define iof_hensure(O, n)   ((O)->hpos+(n)-1 < (O)->hend || iof_output(O))
 
#define iof_iensure(O, n)   ((O)->ipos+(n)-1 < (O)->iend || iof_output(O))
 
#define iof_hpass   iof_pass
 
#define iof_ipass   iof_pass
 
#define iof_pos(I)   (*(I)->pos++)
 
#define iof_hpos(I)   (*(I)->hpos++)
 
#define iof_ipos(I)   (*(I)->ipos++)
 
#define iof_get(I)   (iof_readable(I) ? (int)(*(I)->pos++) : IOFEOF)
 
#define iof_hget(I)   (iof_hreadable(I) ? (int)(*(I)->hpos++) : IOFEOF)
 
#define iof_iget(I)   (iof_ireadable(I) ? (int)(*(I)->ipos++) : IOFEOF)
 
#define iof_char(I)   (iof_readable(I) ? (int)(*(I)->pos) : IOFEOF)
 
#define iof_hcurr(I)   (iof_hreadable(I) ? (int)(*(I)->hpos) : IOFEOF)
 
#define iof_icurr(I)   (iof_ireadable(I) ? (int)(*(I)->ipos) : IOFEOF)
 
#define iof_next(I)   (++(I)->pos, iof_char(I))
 
#define iof_hnext(I)   (++(I)->hpos, iof_hcurr(I))
 
#define iof_inext(I)   (++(I)->ipos, iof_icurr(I))
 
#define iof_putl(O, s)   iof_write(O, "" s, sizeof(s)-1)
 
#define iof_set(O, c)   (*(O)->pos++ = (uint8_t)(c))
 
#define iof_set2(O, c1, c2)   (iof_set(O, c1), iof_set(O, c2))
 
#define iof_set3(O, c1, c2, c3)   (iof_set(O, c1), iof_set(O, c2), iof_set(O, c3))
 
#define iof_set4(O, c1, c2, c3, c4)   (iof_set(O, c1), iof_set(O, c2), iof_set(O, c3), iof_set(O, c4))
 
#define iof_set5(O, c1, c2, c3, c4, c5)   (iof_set(O, c1), iof_set(O, c2), iof_set(O, c3), iof_set(O, c4), iof_set(O, c5))
 
#define iof_hset(O, c)   (*(O)->hpos++ = (uint16_t)(c))
 
#define iof_iset(O, c)   (*(O)->ipos++ = (uint32_t)(c))
 
#define iof_put(O, c)   ((void)iof_ensure(O, 1), iof_set(O, c))
 
#define iof_put2(O, c1, c2)   ((void)iof_ensure(O, 2), iof_set2(O, c1, c2))
 
#define iof_put3(O, c1, c2, c3)   ((void)iof_ensure(O, 3), iof_set3(O, c1, c2, c3))
 
#define iof_put4(O, c1, c2, c3, c4)   ((void)iof_ensure(O, 4), iof_set4(O, c1, c2, c3, c4))
 
#define iof_put5(O, c1, c2, c3, c4, c5)   ((void)iof_ensure(O, 5), iof_set5(O, c1, c2, c3, c4, c5))
 
#define iof_hput(O, c)   ((void)iof_hensure(O, 1), iof_hset(O, c))
 
#define iof_iput(O, c)   ((void)iof_iensure(O, 1), iof_iset(O, c))
 
#define iof_put_uc_hex(O, c)   iof_put2(O, base16_uc_digit1(c), base16_uc_digit2(c))
 
#define iof_put_lc_hex(O, c)   iof_put2(O, base16_lc_digit1(c), base16_lc_digit2(c))
 
#define iof_set_uc_hex(O, c)   iof_set2(O, base16_uc_digit1(c), base16_uc_digit2(c))
 
#define iof_set_lc_hex(O, c)   iof_set2(O, base16_lc_digit1(c), base16_lc_digit2(c))
 
#define iof_put_hex   iof_put_uc_hex
 
#define iof_set_hex   iof_set_uc_hex
 
#define iof_scan_sign(I, c, sign)   _scan_sign(c, sign, iof_next(I))
 
#define iof_scan_integer(I, c, number)   _scan_integer(c, number, iof_next(I))
 
#define iof_scan_radix(I, c, number, radix)   _scan_radix(c, number, radix, iof_next(I))
 
#define iof_read_integer(I, c, number)   _read_integer(c, number, iof_next(I))
 
#define iof_read_radix(I, c, number, radix)   _read_radix(c, number, radix, iof_next(I))
 
#define iof_scan_decimal(I, c, number)   _scan_decimal(c, number, iof_next(I))
 
#define iof_scan_fraction(I, c, number, exponent10)   _scan_fraction(c, number, exponent10, iof_next(I))
 
#define iof_scan_exponent10(I, c, exponent10)   _scan_exponent10(c, exponent10, iof_next(I))
 
#define iof_get_intlw(I, number)   iof_get_slong(I, number)
 
#define iof_get_uintlw(I, number)   iof_get_ulong(I, number)
 
#define iof_get_intlw_radix(I, number, radix)   iof_get_slong_radix(I, number, radix)
 
#define iof_get_uintlw_radix(I, number, radix)   iof_get_ulong_radix(I, number, radix)
 
#define iof_put_intlw(O, number)   iof_put_slong(O, number)
 
#define iof_put_uintlw(O, number)   iof_put_ulong(O, number)
 
#define iof_put_intlw_radix(O, number, radix, uc)   iof_put_slong_radix(O, number, radix, uc)
 
#define iof_put_uintlw_radix(O, number, radix, uc)   iof_put_ulong_radix(O, number, radix, uc)
 
#define iof_set_be_uint1(O, u)   iof_set(O, u)
 
#define iof_set_be_uint2(O, u)   iof_set2(O, (u)>>8, u)
 
#define iof_set_be_uint3(O, u)   iof_set3(O, (u)>>16, (u)>>8, u)
 
#define iof_set_be_uint4(O, u)   iof_set4(O, (u)>>24, (u)>>16, (u)>>8, u)
 
#define iof_set_le_uint1(O, u)   iof_set(O, u)
 
#define iof_set_le_uint2(O, u)   iof_set2(O, u, (u)>>8)
 
#define iof_set_le_uint3(O, u)   iof_set3(O, u, (u)>>8, (u)>>16)
 
#define iof_set_le_uint4(O, u)   iof_set4(O, u, (u)>>8, (u)>>16, (u)>>24)
 
#define iof_put_be_uint1(O, u)   iof_put(O, u)
 
#define iof_put_be_uint2(O, u)   iof_put2(O, (u)>>8, u)
 
#define iof_put_be_uint3(O, u)   iof_put3(O, (u)>>16, (u)>>8, u)
 
#define iof_put_be_uint4(O, u)   iof_put4(O, (u)>>24, (u)>>16, (u)>>8, u)
 
#define iof_put_le_uint1(O, u)   iof_put(O, u)
 
#define iof_put_le_uint2(O, u)   iof_put2(O, u, (u)>>8)
 
#define iof_put_le_uint3(O, u)   iof_put3(O, u, (u)>>8, (u)>>16)
 
#define iof_put_le_uint4(O, u)   iof_put4(O, u, (u)>>8, (u)>>16, (u)>>24)
 
#define iof_reader_result(I, size)   ((size = (size_t)iof_left(I)), (I)->pos)
 
#define iof_writer_result(I, size)   ((size = (size_t)iof_size(I)), (I)->buf)
 
#define iof_result(I, size)   (((I)->flags & IOF_READER) ? iof_reader_result(I, size) : iof_writer_result(I, size))
 
#define iof_loaded(I)   ((I)->end = (I)->pos, (I)->pos = (I)->buf, iof_left(I))
 
#define iof_data_to_file_handle(data, size, file)   fwrite(data, sizeof(uint8_t), size, file)
 
#define iof_filter_reader(handler, statesize, pstate)   iof_filter_reader_new(handler, statesize, (void **)(pstate))
 
#define iof_filter_reader_with_buffer(handler, statesize, pstate, buffer, buffersize)   iof_filter_reader_with_buffer_new(handler, statesize, (void **)(pstate), buffer, buffersize)
 
#define iof_filter_writer(handler, statesize, pstate)   iof_filter_writer_new(handler, statesize, (void **)(pstate))
 
#define iof_filter_writer_with_buffer(handler, statesize, pstate, buffer, buffersize)   iof_filter_writer_with_buffer_new(handler, statesize, (void **)(pstate), buffer, buffersize)
 
#define iof_filter_state(statetype, F)   (statetype)((void *)((F) + 1))
 
#define iof_resize_buffer(O)   iof_resize_buffer_to(O, (O)->space << 1)
 
#define iof_filter_reader_replace(P, handler, statesize, pstate)   iof_filter_reader_replacement(P, handler, statesize, (void **)(pstate))
 

Typedefs

typedef struct iof_file iof_file
 
typedef struct iof iof
 
typedef size_t(* iof_handler) (iof *I, iof_mode mode)
 
typedef void(* iof_dump_function) (const void *value, iof *O)
 

Enumerations

enum  iof_mode {
  IOFREAD = 0 , IOFLOAD = 1 , IOFWRITE = 2 , IOFFLUSH = 3 ,
  IOFCLOSE = 4 , IOFREAD = 0 , IOFLOAD = 1 , IOFWRITE = 2 ,
  IOFFLUSH = 3 , IOFCLOSE = 4
}
 
enum  iof_status {
  IOFEOF = -1 , IOFEMPTY = -2 , IOFFULL = -3 , IOFERR = -4 ,
  IOFEOF = -1 , IOFEMPTY = -2 , IOFFULL = -3 , IOFERR = -4
}
 

Functions

const char * iof_status_kind (iof_status status)
 
size_t iof_save_tail (iof *I)
 
size_t iof_input_save_tail (iof *I, size_t back)
 
uint8_tiof_copy_file_data (const char *filename, size_t *psize)
 
uint8_tiof_copy_file_handle_data (FILE *file, size_t *psize)
 
FILEiof_get_file (iof *F)
 
iof_fileiof_file_new (FILE *file)
 
iof_fileiof_file_init (iof_file *iofile, FILE *file)
 
iof_fileiof_file_rdata (const void *data, size_t size)
 
iof_fileiof_file_wdata (void *data, size_t size)
 
iof_fileiof_file_rdata_init (iof_file *iofile, const void *data, size_t size)
 
iof_fileiof_file_wdata_init (iof_file *iofile, void *data, size_t size)
 
iof_fileiof_file_reader_from_file_handle (iof_file *iofile, const char *filename, FILE *file, int preload, int closefile)
 
iof_fileiof_file_reader_from_file (iof_file *iofile, const char *filename, int preload)
 
iof_fileiof_file_reader_from_data (iof_file *iofile, const void *data, size_t size, int preload, int freedata)
 
voidiof_copy_data (const void *data, size_t size)
 
void iof_file_free (iof_file *iofile)
 
void iof_file_set_name (iof_file *iofile, const char *name)
 
int iof_file_seek (iof_file *iofile, long offset, int whence)
 
long iof_file_tell (iof_file *iofile)
 
size_t iof_file_size (iof_file *iofile)
 
int iof_file_eof (iof_file *iofile)
 
size_t iof_file_read (void *ptr, size_t size, size_t items, iof_file *iofile)
 
size_t iof_file_write (const void *ptr, size_t size, size_t items, iof_file *iofile)
 
size_t iof_file_ensure (iof_file *iofile, size_t bytes)
 
int iof_file_flush (iof_file *iofile)
 
int iof_file_getc (iof_file *iofile)
 
int iof_file_putc (iof_file *iofile, int c)
 
int iof_file_reclose_input (iof_file *iofile)
 
int iof_file_reopen_input (iof_file *iofile)
 
void iof_file_close_input (iof_file *iofile)
 
int iof_reader_seek (iof *I, long offset, int whence)
 
int iof_reader_reseek (iof *I, long offset, int whence)
 
int iof_writer_seek (iof *I, long offset, int whence)
 
int iof_writer_reseek (iof *I, long offset, int whence)
 
int iof_seek (iof *I, long offset, int whence)
 
int iof_reseek (iof *I, long offset, int whence)
 
long iof_reader_tell (iof *I)
 
long iof_writer_tell (iof *I)
 
long iof_tell (iof *I)
 
size_t iof_fsize (iof *I)
 
iofiof_setup_file_handle_reader (iof *I, void *buffer, size_t space, FILE *f)
 
iofiof_setup_file_handle_writer (iof *O, void *buffer, size_t space, FILE *f)
 
iofiof_setup_file_reader (iof *I, void *buffer, size_t space, const char *filename)
 
iofiof_setup_file_writer (iof *O, void *buffer, size_t space, const char *filename)
 
iofiof_setup_buffer (iof *O, void *buffer, size_t space)
 
iofiof_setup_buffermin (iof *O, void *buffer, size_t space, size_t min)
 
iofiof_buffer_create (size_t space)
 
iofiof_reader (iof *I, void *link, iof_handler reader, const void *s, size_t bytes)
 
iofiof_writer (iof *O, void *link, iof_handler writer, void *s, size_t bytes)
 
iofiof_string_reader (iof *I, const void *s, size_t bytes)
 
iofiof_dummy (void *buffer, size_t space)
 
iofiof_null (void *buffer, size_t space)
 
int iof_getc (iof *I)
 
int iof_hgetc (iof *I)
 
int iof_igetc (iof *I)
 
iof_status iof_pass (iof *I, iof *O)
 
size_t iof_read (iof *I, void *s, size_t bytes)
 
size_t iof_hread (iof *I, void *s, size_t bytes)
 
size_t iof_iread (iof *I, void *s, size_t bytes)
 
size_t iof_skip (iof *I, size_t bytes)
 
size_t iof_hskip (iof *I, size_t bytes)
 
size_t iof_iskip (iof *I, size_t bytes)
 
size_t iof_write_file_handle (iof *O, FILE *file)
 
size_t iof_write_file (iof *O, const char *filename)
 
size_t iof_write_iofile (iof *O, iof_file *iofile, int savepos)
 
int iof_putc (iof *O, int u)
 
int iof_hputc (iof *O, int u)
 
int iof_iputc (iof *O, int u)
 
size_t iof_write (iof *O, const void *data, size_t size)
 
size_t iof_hwrite (iof *O, const void *data, size_t size)
 
size_t iof_iwrite (iof *O, const void *data, size_t size)
 
iof_status iof_puts (iof *O, const void *data)
 
size_t iof_put_string (iof *O, const void *data)
 
size_t iof_putfs (iof *O, const char *format,...)
 
size_t iof_repc (iof *O, char c, size_t bytes)
 
int iof_get_int32 (iof *I, int32_t *number)
 
int iof_get_slong (iof *I, long *number)
 
int iof_get_int64 (iof *I, int64_t *number)
 
int iof_get_uint32 (iof *I, uint32_t *number)
 
int iof_get_ulong (iof *I, unsigned long *number)
 
int iof_get_usize (iof *I, size_t *number)
 
int iof_get_uint64 (iof *I, uint64_t *number)
 
int iof_get_int32_radix (iof *I, int32_t *number, int radix)
 
int iof_get_slong_radix (iof *I, long *number, int radix)
 
int iof_get_int64_radix (iof *I, int64_t *number, int radix)
 
int iof_get_uint32_radix (iof *I, uint32_t *number, int radix)
 
int iof_get_ulong_radix (iof *I, unsigned long *number, int radix)
 
int iof_get_usize_radix (iof *I, size_t *number, int radix)
 
int iof_get_uint64_radix (iof *I, uint64_t *number, int radix)
 
int iof_get_roman (iof *I, uint16_t *number)
 
int iof_get_double (iof *I, double *number)
 
int iof_get_float (iof *I, float *number)
 
int iof_conv_double (iof *I, double *number)
 
int iof_conv_float (iof *I, float *number)
 
size_t iof_put_int32 (iof *O, int32_t number)
 
size_t iof_put_slong (iof *O, long number)
 
size_t iof_put_int64 (iof *O, int64_t number)
 
size_t iof_put_uint32 (iof *O, uint32_t number)
 
size_t iof_put_ulong (iof *O, unsigned long number)
 
size_t iof_put_usize (iof *O, size_t number)
 
size_t iof_put_uint64 (iof *O, uint64_t number)
 
size_t iof_put_int32_radix (iof *O, int32_t number, int radix, int uc)
 
size_t iof_put_slong_radix (iof *O, long number, int radix, int uc)
 
size_t iof_put_int64_radix (iof *O, int64_t number, int radix, int uc)
 
size_t iof_put_uint32_radix (iof *O, uint32_t number, int radix, int uc)
 
size_t iof_put_ulong_radix (iof *O, unsigned long number, int radix, int uc)
 
size_t iof_put_usize_radix (iof *O, size_t number, int radix, int uc)
 
size_t iof_put_uint64_radix (iof *O, uint64_t number, int radix, int uc)
 
size_t iof_put_roman (iof *O, uint16_t number, int uc)
 
size_t iof_put_double (iof *O, double number, int digits)
 
size_t iof_put_float (iof *O, float number, int digits)
 
int iof_get_be_uint2 (iof *I, uint32_t *pnumber)
 
int iof_get_be_uint3 (iof *I, uint32_t *pnumber)
 
int iof_get_be_uint4 (iof *I, uint32_t *pnumber)
 
int iof_get_le_uint2 (iof *I, uint32_t *pnumber)
 
int iof_get_le_uint3 (iof *I, uint32_t *pnumber)
 
int iof_get_le_uint4 (iof *I, uint32_t *pnumber)
 
uint8_tiof_file_input_data (iof_file *iofile, size_t *psize, int *isnew)
 
uint8_tiof_reader_data (iof *I, size_t *psize)
 
uint8_tiof_writer_data (iof *O, size_t *psize)
 
size_t iof_reader_to_file_handle (iof *I, FILE *file)
 
size_t iof_reader_to_file (iof *I, const char *filename)
 
size_t iof_data_to_file (const void *data, size_t size, const char *filename)
 
size_t iof_result_to_file_handle (iof *F, FILE *file)
 
size_t iof_result_to_file (iof *F, const char *filename)
 
void iof_debug (iof *I, const char *filename)
 
void iof_filters_init (void)
 
void iof_filters_free (void)
 
iofiof_filter_reader_new (iof_handler handler, size_t statesize, void **pstate)
 
iofiof_filter_reader_with_buffer_new (iof_handler handler, size_t statesize, void **pstate, void *buffer, size_t buffersize)
 
iofiof_filter_writer_new (iof_handler handler, size_t statesize, void **pstate)
 
iofiof_filter_writer_with_buffer_new (iof_handler handler, size_t statesize, void **pstate, void *buffer, size_t buffersize)
 
void iof_free (iof *F)
 
void iof_discard (iof *F)
 
size_t iof_resize_buffer_to (iof *O, size_t space)
 
size_t iof_decoder_retval (iof *I, const char *type, iof_status status)
 
size_t iof_encoder_retval (iof *O, const char *type, iof_status status)
 
iofiof_filter_file_handle_reader (FILE *file)
 
iofiof_filter_file_handle_writer (FILE *file)
 
iofiof_filter_iofile_reader (iof_file *iofile, size_t offset)
 
iofiof_filter_iofile_writer (iof_file *iofile, size_t offset)
 
iofiof_filter_file_reader (const char *filename)
 
iofiof_filter_file_writer (const char *filename)
 
iofiof_filter_string_reader (const void *s, size_t length)
 
iofiof_filter_string_writer (const void *s, size_t length)
 
iofiof_filter_buffer_writer (size_t size)
 
iofiof_filter_stream_reader (FILE *file, size_t offset, size_t length)
 
iofiof_filter_stream_coreader (iof_file *iofile, size_t offset, size_t length)
 
iofiof_filter_stream_writer (FILE *file)
 
iofiof_filter_stream_cowriter (iof_file *iofile, size_t offset)
 
FILEiof_filter_file_reader_source (iof *I, size_t *poffset, size_t *plength)
 
iof_fileiof_filter_file_coreader_source (iof *I, size_t *poffset, size_t *plength)
 
iofiof_filter_reader_replacement (iof *P, iof_handler handler, size_t statesize, void **pstate)
 

Variables

iof iof_stdout
 
iof iof_stderr
 

Macro Definition Documentation

◆ IOF_ALLOC

#define IOF_ALLOC   (1<<0)

Definition at line 91 of file utiliof.h.

◆ IOF_BUFFER_ALLOC

#define IOF_BUFFER_ALLOC   (1<<2)

Definition at line 93 of file utiliof.h.

◆ IOF_BUFFER_HEAP

#define IOF_BUFFER_HEAP   (1<<3)

Definition at line 94 of file utiliof.h.

◆ iof_buffer_new

#define iof_buffer_new ( )    iof_buffer_create(BUFSIZ)

Definition at line 311 of file utiliof.h.

◆ IOF_BUFSIZ

#define IOF_BUFSIZ   (sizeof(iof) + BUFSIZ*sizeof(uint8_t))

Definition at line 115 of file utiliof.h.

◆ iof_char

#define iof_char (   I)    (iof_readable(I) ? (int)(*(I)->pos) : IOFEOF)

Definition at line 389 of file utiliof.h.

◆ iof_close

#define iof_close (   O)    ((O)->more ? (O)->more(O, IOFCLOSE) : 0lu)

Definition at line 179 of file utiliof.h.

◆ IOF_CLOSE_FILE

#define IOF_CLOSE_FILE   (1<<13)

Definition at line 107 of file utiliof.h.

◆ IOF_DATA

#define IOF_DATA   (1<<9)

Definition at line 103 of file utiliof.h.

◆ iof_data_free

#define iof_data_free (   data)    util_free(data)

Definition at line 243 of file utiliof.h.

◆ iof_data_to_file_handle

#define iof_data_to_file_handle (   data,
  size,
  file 
)    fwrite(data, sizeof(uint8_t), size, file)

Definition at line 614 of file utiliof.h.

◆ iof_decref

#define iof_decref (   I)    ((void)(--(I)->refcount <= 0 && iof_close(I)))

Definition at line 152 of file utiliof.h.

◆ iof_ensure

#define iof_ensure (   O,
  n 
)    ((O)->pos+(n)-1 < (O)->end || iof_output(O))

Definition at line 352 of file utiliof.h.

◆ IOF_FILE

#define IOF_FILE   (1<<11)

Definition at line 105 of file utiliof.h.

◆ iof_file_decref

#define iof_file_decref (   iofile)    ((void)(--(iofile)->refcount <= 0 && (iof_file_free(iofile), 0)))

Definition at line 253 of file utiliof.h.

◆ iof_file_get_fh

#define iof_file_get_fh (   iofile)    ((iofile)->iofh)

Definition at line 221 of file utiliof.h.

◆ iof_file_get_file

#define iof_file_get_file (   iofile)    (((iofile)->flags & IOF_DATA) ? NULL : iof_file_get_fh(iofile))

Definition at line 223 of file utiliof.h.

◆ iof_file_get_name

#define iof_file_get_name (   iofile)    ((iofile)->name)

Definition at line 249 of file utiliof.h.

◆ IOF_FILE_HANDLE

#define IOF_FILE_HANDLE   (1<<10)

Definition at line 104 of file utiliof.h.

◆ iof_file_incref

#define iof_file_incref (   iofile)    (++(iofile)->refcount)

Definition at line 252 of file utiliof.h.

◆ iof_file_rdata_copy

#define iof_file_rdata_copy (   data,
  size 
)    iof_file_rdata(iof_copy_data(data, size), size)

Definition at line 245 of file utiliof.h.

◆ iof_file_reclose

#define iof_file_reclose (   iofile)    (void)(((iofile)->flags & IOF_RECLOSE_FILE) ? iof_file_reclose_input(iofile) : 0)

Definition at line 272 of file utiliof.h.

◆ iof_file_reopen

#define iof_file_reopen (   iofile)    (((iofile)->flags & IOF_REOPEN_FILE) ? iof_file_reopen_input(iofile) : 1)

Definition at line 271 of file utiliof.h.

◆ iof_file_set_fh

#define iof_file_set_fh (   iofile,
  fh 
)    ((iofile)->iofh = fh)

Definition at line 222 of file utiliof.h.

◆ iof_file_wdata_copy

#define iof_file_wdata_copy (   data,
  size 
)    iof_file_wdata(iof_copy_data(data, size), size)

Definition at line 244 of file utiliof.h.

◆ iof_filter_reader

#define iof_filter_reader (   handler,
  statesize,
  pstate 
)    iof_filter_reader_new(handler, statesize, (void **)(pstate))

Definition at line 627 of file utiliof.h.

◆ iof_filter_reader_replace

#define iof_filter_reader_replace (   P,
  handler,
  statesize,
  pstate 
)    iof_filter_reader_replacement(P, handler, statesize, (void **)(pstate))

Definition at line 671 of file utiliof.h.

◆ iof_filter_reader_with_buffer

#define iof_filter_reader_with_buffer (   handler,
  statesize,
  pstate,
  buffer,
  buffersize 
)    iof_filter_reader_with_buffer_new(handler, statesize, (void **)(pstate), buffer, buffersize)

Definition at line 629 of file utiliof.h.

◆ iof_filter_state

#define iof_filter_state (   statetype,
  F 
)    (statetype)((void *)((F) + 1))

Definition at line 635 of file utiliof.h.

◆ iof_filter_writer

#define iof_filter_writer (   handler,
  statesize,
  pstate 
)    iof_filter_writer_new(handler, statesize, (void **)(pstate))

Definition at line 631 of file utiliof.h.

◆ iof_filter_writer_with_buffer

#define iof_filter_writer_with_buffer (   handler,
  statesize,
  pstate,
  buffer,
  buffersize 
)    iof_filter_writer_with_buffer_new(handler, statesize, (void **)(pstate), buffer, buffersize)

Definition at line 633 of file utiliof.h.

◆ iof_flush

#define iof_flush (   O)    ((O)->more ? (O)->more(O, IOFFLUSH) : 0lu)

Definition at line 178 of file utiliof.h.

◆ iof_fwrite_error

#define iof_fwrite_error ( )    iof_panic(strerror(errno))

Definition at line 212 of file utiliof.h.

◆ iof_get

#define iof_get (   I)    (iof_readable(I) ? (int)(*(I)->pos++) : IOFEOF)

Definition at line 385 of file utiliof.h.

◆ iof_get_intlw

#define iof_get_intlw (   I,
  number 
)    iof_get_slong(I, number)

Definition at line 514 of file utiliof.h.

◆ iof_get_intlw_radix

#define iof_get_intlw_radix (   I,
  number,
  radix 
)    iof_get_slong_radix(I, number, radix)

Definition at line 516 of file utiliof.h.

◆ iof_get_uintlw

#define iof_get_uintlw (   I,
  number 
)    iof_get_ulong(I, number)

Definition at line 515 of file utiliof.h.

◆ iof_get_uintlw_radix

#define iof_get_uintlw_radix (   I,
  number,
  radix 
)    iof_get_ulong_radix(I, number, radix)

Definition at line 517 of file utiliof.h.

◆ iof_hcurr

#define iof_hcurr (   I)    (iof_hreadable(I) ? (int)(*(I)->hpos) : IOFEOF)

Definition at line 390 of file utiliof.h.

◆ IOF_HEAP

#define IOF_HEAP   (1<<1)

Definition at line 92 of file utiliof.h.

◆ iof_hensure

#define iof_hensure (   O,
  n 
)    ((O)->hpos+(n)-1 < (O)->hend || iof_output(O))

Definition at line 353 of file utiliof.h.

◆ iof_hget

#define iof_hget (   I)    (iof_hreadable(I) ? (int)(*(I)->hpos++) : IOFEOF)

Definition at line 386 of file utiliof.h.

◆ iof_hloadable

#define iof_hloadable   iof_loadable

Definition at line 341 of file utiliof.h.

◆ iof_hnext

#define iof_hnext (   I)    (++(I)->hpos, iof_hcurr(I))

Definition at line 394 of file utiliof.h.

◆ iof_hpass

#define iof_hpass   iof_pass

Definition at line 366 of file utiliof.h.

◆ iof_hpos

#define iof_hpos (   I)    (*(I)->hpos++)

Definition at line 382 of file utiliof.h.

◆ iof_hput

#define iof_hput (   O,
  c 
)    ((void)iof_hensure(O, 1), iof_hset(O, c))

Definition at line 468 of file utiliof.h.

◆ iof_hreadable

#define iof_hreadable   iof_readable

Definition at line 344 of file utiliof.h.

◆ iof_hset

#define iof_hset (   O,
  c 
)    (*(O)->hpos++ = (uint16_t)(c))

Definition at line 459 of file utiliof.h.

◆ iof_hwritable

#define iof_hwritable   iof_writable

Definition at line 347 of file utiliof.h.

◆ iof_icurr

#define iof_icurr (   I)    (iof_ireadable(I) ? (int)(*(I)->ipos) : IOFEOF)

Definition at line 391 of file utiliof.h.

◆ iof_iensure

#define iof_iensure (   O,
  n 
)    ((O)->ipos+(n)-1 < (O)->iend || iof_output(O))

Definition at line 354 of file utiliof.h.

◆ iof_iget

#define iof_iget (   I)    (iof_ireadable(I) ? (int)(*(I)->ipos++) : IOFEOF)

Definition at line 387 of file utiliof.h.

◆ iof_iloadable

#define iof_iloadable   iof_loadable

Definition at line 342 of file utiliof.h.

◆ iof_incref

#define iof_incref (   I)    (++(I)->refcount)

Definition at line 151 of file utiliof.h.

◆ iof_inext

#define iof_inext (   I)    (++(I)->ipos, iof_icurr(I))

Definition at line 395 of file utiliof.h.

◆ iof_input

#define iof_input (   I)    ((I)->more ? (I)->more((I), IOFREAD) : 0lu)

Definition at line 172 of file utiliof.h.

◆ iof_ipass

#define iof_ipass   iof_pass

Definition at line 367 of file utiliof.h.

◆ iof_ipos

#define iof_ipos (   I)    (*(I)->ipos++)

Definition at line 383 of file utiliof.h.

◆ iof_iput

#define iof_iput (   O,
  c 
)    ((void)iof_iensure(O, 1), iof_iset(O, c))

Definition at line 469 of file utiliof.h.

◆ iof_ireadable

#define iof_ireadable   iof_readable

Definition at line 345 of file utiliof.h.

◆ iof_iset

#define iof_iset (   O,
  c 
)    (*(O)->ipos++ = (uint32_t)(c))

Definition at line 460 of file utiliof.h.

◆ iof_iwritable

#define iof_iwritable   iof_writable

Definition at line 348 of file utiliof.h.

◆ iof_left

#define iof_left (   I)    ((I)->end - (I)->pos)

Definition at line 169 of file utiliof.h.

◆ iof_load

#define iof_load (   I)    ((I)->more ? (I)->more((I), IOFLOAD) : 0lu)

Definition at line 173 of file utiliof.h.

◆ iof_loadable

#define iof_loadable (   I)    ((I)->pos < (I)->end || iof_load(I))

Definition at line 337 of file utiliof.h.

◆ iof_loaded

#define iof_loaded (   I)    ((I)->end = (I)->pos, (I)->pos = (I)->buf, iof_left(I))

Definition at line 612 of file utiliof.h.

◆ IOF_LONG

#define IOF_LONG   (1<<5)

Definition at line 97 of file utiliof.h.

◆ IOF_MEMBERS

#define IOF_MEMBERS
Value:
union { \
struct { uint8_t *buf, *pos, *end; }; \
struct { uint16_t *hbuf, *hpos, *hend; }; \
struct { uint32_t *ibuf, *ipos, *iend; }; \
struct { const uint8_t *rbuf, *rpos, *rend; }; \
}; \
size_t space; \
iof_handler more; \
union { void *link; iof *next; FILE *file; iof_file *iofile; }; \
int flags; \
int refcount
#define next(a)
Definition: aptex-macros.h:924
unsigned short uint16_t
Definition: stdint.h:79
unsigned int uint32_t
Definition: stdint.h:80
unsigned char uint8_t
Definition: stdint.h:78
#define buf
#define link
Definition: win32lib.h:82
const int * pos
Definition: combiners.h:905
char ibuf[32000]
Definition: ps_tiny.c:177
#define flags
Definition: utiliof.h:83
static byte rbuf[2048]
Definition: t1mac.c:66
#define FILE
Definition: t1stdio.h:34
char * file
Definition: t4ht.c:931
#define end(cp)
Definition: zic.c:71

Definition at line 58 of file utiliof.h.

◆ IOF_NEXT

#define IOF_NEXT   (1<<12)

Definition at line 106 of file utiliof.h.

◆ iof_next

#define iof_next (   I)    (++(I)->pos, iof_char(I))

Definition at line 393 of file utiliof.h.

◆ iof_output

#define iof_output (   O)    ((O)->more ? (O)->more((O), IOFWRITE) : 0lu)

Definition at line 175 of file utiliof.h.

◆ iof_panic

#define iof_panic (   mess)    (fputs(mess, stderr), abort())

Definition at line 209 of file utiliof.h.

◆ iof_pos

#define iof_pos (   I)    (*(I)->pos++)

Definition at line 381 of file utiliof.h.

◆ iof_protect_tail

#define iof_protect_tail (   I,
  back,
  length 
)    ((iof_left(I) >= (length) - (back)) ? 1 : (iof_input_save_tail(I, back) >= length - back))

Definition at line 200 of file utiliof.h.

◆ iof_put

#define iof_put (   O,
  c 
)    ((void)iof_ensure(O, 1), iof_set(O, c))

Definition at line 462 of file utiliof.h.

◆ iof_put2

#define iof_put2 (   O,
  c1,
  c2 
)    ((void)iof_ensure(O, 2), iof_set2(O, c1, c2))

Definition at line 463 of file utiliof.h.

◆ iof_put3

#define iof_put3 (   O,
  c1,
  c2,
  c3 
)    ((void)iof_ensure(O, 3), iof_set3(O, c1, c2, c3))

Definition at line 464 of file utiliof.h.

◆ iof_put4

#define iof_put4 (   O,
  c1,
  c2,
  c3,
  c4 
)    ((void)iof_ensure(O, 4), iof_set4(O, c1, c2, c3, c4))

Definition at line 465 of file utiliof.h.

◆ iof_put5

#define iof_put5 (   O,
  c1,
  c2,
  c3,
  c4,
  c5 
)    ((void)iof_ensure(O, 5), iof_set5(O, c1, c2, c3, c4, c5))

Definition at line 466 of file utiliof.h.

◆ iof_put_be_uint1

#define iof_put_be_uint1 (   O,
  u 
)    iof_put(O, u)

Definition at line 587 of file utiliof.h.

◆ iof_put_be_uint2

#define iof_put_be_uint2 (   O,
  u 
)    iof_put2(O, (u)>>8, u)

Definition at line 588 of file utiliof.h.

◆ iof_put_be_uint3

#define iof_put_be_uint3 (   O,
  u 
)    iof_put3(O, (u)>>16, (u)>>8, u)

Definition at line 589 of file utiliof.h.

◆ iof_put_be_uint4

#define iof_put_be_uint4 (   O,
  u 
)    iof_put4(O, (u)>>24, (u)>>16, (u)>>8, u)

Definition at line 590 of file utiliof.h.

◆ iof_put_hex

#define iof_put_hex   iof_put_uc_hex

Definition at line 475 of file utiliof.h.

◆ iof_put_intlw

#define iof_put_intlw (   O,
  number 
)    iof_put_slong(O, number)

Definition at line 554 of file utiliof.h.

◆ iof_put_intlw_radix

#define iof_put_intlw_radix (   O,
  number,
  radix,
  uc 
)    iof_put_slong_radix(O, number, radix, uc)

Definition at line 556 of file utiliof.h.

◆ iof_put_lc_hex

#define iof_put_lc_hex (   O,
  c 
)    iof_put2(O, base16_lc_digit1(c), base16_lc_digit2(c))

Definition at line 472 of file utiliof.h.

◆ iof_put_le_uint1

#define iof_put_le_uint1 (   O,
  u 
)    iof_put(O, u)

Definition at line 592 of file utiliof.h.

◆ iof_put_le_uint2

#define iof_put_le_uint2 (   O,
  u 
)    iof_put2(O, u, (u)>>8)

Definition at line 593 of file utiliof.h.

◆ iof_put_le_uint3

#define iof_put_le_uint3 (   O,
  u 
)    iof_put3(O, u, (u)>>8, (u)>>16)

Definition at line 594 of file utiliof.h.

◆ iof_put_le_uint4

#define iof_put_le_uint4 (   O,
  u 
)    iof_put4(O, u, (u)>>8, (u)>>16, (u)>>24)

Definition at line 595 of file utiliof.h.

◆ iof_put_uc_hex

#define iof_put_uc_hex (   O,
  c 
)    iof_put2(O, base16_uc_digit1(c), base16_uc_digit2(c))

Definition at line 471 of file utiliof.h.

◆ iof_put_uintlw

#define iof_put_uintlw (   O,
  number 
)    iof_put_ulong(O, number)

Definition at line 555 of file utiliof.h.

◆ iof_put_uintlw_radix

#define iof_put_uintlw_radix (   O,
  number,
  radix,
  uc 
)    iof_put_ulong_radix(O, number, radix, uc)

Definition at line 557 of file utiliof.h.

◆ iof_putl

#define iof_putl (   O,
  s 
)    iof_write(O, "" s, sizeof(s)-1)

Definition at line 450 of file utiliof.h.

◆ iof_read_integer

#define iof_read_integer (   I,
  c,
  number 
)    _read_integer(c, number, iof_next(I))

Definition at line 483 of file utiliof.h.

◆ iof_read_radix

#define iof_read_radix (   I,
  c,
  number,
  radix 
)    _read_radix(c, number, radix, iof_next(I))

Definition at line 484 of file utiliof.h.

◆ iof_readable

#define iof_readable (   I)    ((I)->pos < (I)->end || iof_input(I))

Definition at line 338 of file utiliof.h.

◆ IOF_READER

#define IOF_READER   (1<<7)

Definition at line 100 of file utiliof.h.

◆ IOF_READER_INIT

#define IOF_READER_INIT (   handler,
  file,
  buffer,
  size,
  flags 
)     { {{ (uint8_t *)(buffer), (uint8_t *)(buffer), (uint8_t *)(buffer) }}, size, handler, { file }, (flags)|IOF_READER, 0 }

Definition at line 138 of file utiliof.h.

◆ iof_reader_result

#define iof_reader_result (   I,
  size 
)    ((size = (size_t)iof_left(I)), (I)->pos)

Definition at line 599 of file utiliof.h.

◆ IOF_RECLOSE_FILE

#define IOF_RECLOSE_FILE   (1<<15)

Definition at line 109 of file utiliof.h.

◆ IOF_REOPEN_FILE

#define IOF_REOPEN_FILE   (1<<14)

Definition at line 108 of file utiliof.h.

◆ iof_resize_buffer

#define iof_resize_buffer (   O)    iof_resize_buffer_to(O, (O)->space << 1)

Definition at line 641 of file utiliof.h.

◆ iof_result

#define iof_result (   I,
  size 
)    (((I)->flags & IOF_READER) ? iof_reader_result(I, size) : iof_writer_result(I, size))

Definition at line 601 of file utiliof.h.

◆ iof_scan_decimal

#define iof_scan_decimal (   I,
  c,
  number 
)    _scan_decimal(c, number, iof_next(I))

Definition at line 486 of file utiliof.h.

◆ iof_scan_exponent10

#define iof_scan_exponent10 (   I,
  c,
  exponent10 
)    _scan_exponent10(c, exponent10, iof_next(I))

Definition at line 488 of file utiliof.h.

◆ iof_scan_fraction

#define iof_scan_fraction (   I,
  c,
  number,
  exponent10 
)    _scan_fraction(c, number, exponent10, iof_next(I))

Definition at line 487 of file utiliof.h.

◆ iof_scan_integer

#define iof_scan_integer (   I,
  c,
  number 
)    _scan_integer(c, number, iof_next(I))

Definition at line 481 of file utiliof.h.

◆ iof_scan_radix

#define iof_scan_radix (   I,
  c,
  number,
  radix 
)    _scan_radix(c, number, radix, iof_next(I))

Definition at line 482 of file utiliof.h.

◆ iof_scan_sign

#define iof_scan_sign (   I,
  c,
  sign 
)    _scan_sign(c, sign, iof_next(I))

Definition at line 480 of file utiliof.h.

◆ iof_set

#define iof_set (   O,
  c 
)    (*(O)->pos++ = (uint8_t)(c))

Definition at line 453 of file utiliof.h.

◆ iof_set2

#define iof_set2 (   O,
  c1,
  c2 
)    (iof_set(O, c1), iof_set(O, c2))

Definition at line 454 of file utiliof.h.

◆ iof_set3

#define iof_set3 (   O,
  c1,
  c2,
  c3 
)    (iof_set(O, c1), iof_set(O, c2), iof_set(O, c3))

Definition at line 455 of file utiliof.h.

◆ iof_set4

#define iof_set4 (   O,
  c1,
  c2,
  c3,
  c4 
)    (iof_set(O, c1), iof_set(O, c2), iof_set(O, c3), iof_set(O, c4))

Definition at line 456 of file utiliof.h.

◆ iof_set5

#define iof_set5 (   O,
  c1,
  c2,
  c3,
  c4,
  c5 
)    (iof_set(O, c1), iof_set(O, c2), iof_set(O, c3), iof_set(O, c4), iof_set(O, c5))

Definition at line 457 of file utiliof.h.

◆ iof_set_be_uint1

#define iof_set_be_uint1 (   O,
  u 
)    iof_set(O, u)

Definition at line 577 of file utiliof.h.

◆ iof_set_be_uint2

#define iof_set_be_uint2 (   O,
  u 
)    iof_set2(O, (u)>>8, u)

Definition at line 578 of file utiliof.h.

◆ iof_set_be_uint3

#define iof_set_be_uint3 (   O,
  u 
)    iof_set3(O, (u)>>16, (u)>>8, u)

Definition at line 579 of file utiliof.h.

◆ iof_set_be_uint4

#define iof_set_be_uint4 (   O,
  u 
)    iof_set4(O, (u)>>24, (u)>>16, (u)>>8, u)

Definition at line 580 of file utiliof.h.

◆ iof_set_hex

#define iof_set_hex   iof_set_uc_hex

Definition at line 476 of file utiliof.h.

◆ iof_set_lc_hex

#define iof_set_lc_hex (   O,
  c 
)    iof_set2(O, base16_lc_digit1(c), base16_lc_digit2(c))

Definition at line 474 of file utiliof.h.

◆ iof_set_le_uint1

#define iof_set_le_uint1 (   O,
  u 
)    iof_set(O, u)

Definition at line 582 of file utiliof.h.

◆ iof_set_le_uint2

#define iof_set_le_uint2 (   O,
  u 
)    iof_set2(O, u, (u)>>8)

Definition at line 583 of file utiliof.h.

◆ iof_set_le_uint3

#define iof_set_le_uint3 (   O,
  u 
)    iof_set3(O, u, (u)>>8, (u)>>16)

Definition at line 584 of file utiliof.h.

◆ iof_set_le_uint4

#define iof_set_le_uint4 (   O,
  u 
)    iof_set4(O, u, (u)>>8, (u)>>16, (u)>>24)

Definition at line 585 of file utiliof.h.

◆ iof_set_uc_hex

#define iof_set_uc_hex (   O,
  c 
)    iof_set2(O, base16_uc_digit1(c), base16_uc_digit2(c))

Definition at line 473 of file utiliof.h.

◆ iof_setup_file

#define iof_setup_file (   I,
  fh 
)    ((I)->file = fh, (I)->flags |= IOF_FILE_HANDLE)

Definition at line 292 of file utiliof.h.

◆ iof_setup_iofile

#define iof_setup_iofile (   I,
  f 
)    (iof_file_incref(f), (I)->iofile = f, (I)->flags |= IOF_FILE)

Definition at line 291 of file utiliof.h.

◆ iof_setup_next

#define iof_setup_next (   I,
  N 
)    ((I)->next = N, iof_incref(N), (I)->flags |= IOF_NEXT)

Definition at line 293 of file utiliof.h.

◆ iof_setup_reader

#define iof_setup_reader (   I,
  buffer,
  size 
)
Value:
((I)->buf = (I)->pos = (I)->end = (uint8_t *)(buffer), \
(I)->space = size, (I)->flags = 0|IOF_READER, (I)->refcount = 0)
#define I(x, y, z)
Definition: md5.c:55
static int size
Definition: ppmlabel.c:24
#define IOF_READER
Definition: utiliof.h:100
#define buffer
Definition: xmlparse.c:611

Definition at line 157 of file utiliof.h.

◆ iof_setup_writer

#define iof_setup_writer (   O,
  buffer,
  size 
)
Value:
((O)->buf = (O)->pos = (uint8_t *)(buffer), \
(O)->end = (uint8_t *)(buffer) + size, \
(O)->space = size, (O)->flags = 0|IOF_WRITER, (O)->refcount = 0)
#define O(_t, _a, _f)
Definition: makeint.h:501
#define IOF_WRITER
Definition: utiliof.h:101
Definition: utils.c:300

Definition at line 161 of file utiliof.h.

◆ IOF_SHORT

#define IOF_SHORT   (1<<4)

Definition at line 96 of file utiliof.h.

◆ iof_size

#define iof_size (   I)    ((I)->pos - (I)->buf)

Definition at line 170 of file utiliof.h.

◆ iof_space

#define iof_space (   I)    ((I)->end - (I)->buf)

Definition at line 168 of file utiliof.h.

◆ iof_stop

#define iof_stop (   F)    ((void)(F->pos = F->end = F->buf, F->flags |= IOF_STOPPED))

Definition at line 181 of file utiliof.h.

◆ IOF_STOPPED

#define IOF_STOPPED   (1<<16)

Definition at line 111 of file utiliof.h.

◆ IOF_STRING

#define IOF_STRING ( )    IOF_STRING_INIT(0, 0)

Definition at line 147 of file utiliof.h.

◆ iof_string

#define iof_string (   I,
  s,
  bytes 
)     (((I)->rbuf = (I)->rpos = (const uint8_t *)s), ((I)->rend = (I)->rbuf + (bytes)), ((I)->flags |= IOF_DATA), (I))

Definition at line 327 of file utiliof.h.

◆ IOF_STRING_INIT

#define IOF_STRING_INIT (   buffer,
  size 
)     { {{ (uint8_t *)(buffer), (uint8_t *)(buffer), (uint8_t *)(buffer) + size }}, size, NULL, { NULL }, 0|IOF_READER|IOF_DATA, 0 }

Definition at line 144 of file utiliof.h.

◆ IOF_TAIL

#define IOF_TAIL   (1<<6)

Definition at line 99 of file utiliof.h.

◆ iof_tail

#define iof_tail (   I)    (((I)->flags & IOF_TAIL) && (I)->pos < (I)->end ? iof_save_tail(I) : 0)

Definition at line 197 of file utiliof.h.

◆ iof_unref

#define iof_unref (   I)    (--(I)->refcount)

Definition at line 153 of file utiliof.h.

◆ iof_writable

#define iof_writable (   O)    ((O)->pos < (O)->end || iof_output(O))

Definition at line 339 of file utiliof.h.

◆ IOF_WRITER

#define IOF_WRITER   (1<<8)

Definition at line 101 of file utiliof.h.

◆ IOF_WRITER_INIT

#define IOF_WRITER_INIT (   handler,
  file,
  buffer,
  size,
  flags 
)     { {{ (uint8_t *)(buffer), (uint8_t *)(buffer), (uint8_t *)(buffer) + size }}, size, handler, { file }, (flags)|IOF_WRITER, 0 }

Definition at line 141 of file utiliof.h.

◆ iof_writer_result

#define iof_writer_result (   I,
  size 
)    ((size = (size_t)iof_size(I)), (I)->buf)

Definition at line 600 of file utiliof.h.

Typedef Documentation

◆ iof

typedef struct iof iof

Definition at line 32 of file utiliof.h.

◆ iof_dump_function

typedef void(* iof_dump_function) (const void *value, iof *O)

Definition at line 87 of file utiliof.h.

◆ iof_file

typedef struct iof_file iof_file

◆ iof_handler

typedef size_t(* iof_handler) (iof *I, iof_mode mode)

Definition at line 54 of file utiliof.h.

Enumeration Type Documentation

◆ iof_mode

enum iof_mode
Enumerator
IOFREAD 
IOFLOAD 
IOFWRITE 
IOFFLUSH 
IOFCLOSE 
IOFREAD 
IOFLOAD 
IOFWRITE 
IOFFLUSH 
IOFCLOSE 

Definition at line 15 of file utiliof.h.

◆ iof_status

enum iof_status
Enumerator
IOFEOF 
IOFEMPTY 
IOFFULL 
IOFERR 
IOFEOF 
IOFEMPTY 
IOFFULL 
IOFERR 

Definition at line 25 of file utiliof.h.

Function Documentation

◆ iof_buffer_create()

iof* iof_buffer_create ( size_t  space)

Definition at line 1045 of file utiliof.c.

◆ iof_conv_double()

int iof_conv_double ( iof I,
double *  number 
)

Definition at line 1571 of file utiliof.c.

◆ iof_conv_float()

int iof_conv_float ( iof I,
float *  number 
)

Definition at line 1587 of file utiliof.c.

◆ iof_copy_data()

void* iof_copy_data ( const void data,
size_t  size 
)

Definition at line 18 of file utiliof.c.

◆ iof_copy_file_data()

uint8_t* iof_copy_file_data ( const char *  filename,
size_t psize 
)

Definition at line 23 of file utiliof.c.

◆ iof_copy_file_handle_data()

uint8_t* iof_copy_file_handle_data ( FILE file,
size_t psize 
)

Definition at line 43 of file utiliof.c.

◆ iof_data_to_file()

size_t iof_data_to_file ( const void data,
size_t  size,
const char *  filename 
)

Definition at line 1920 of file utiliof.c.

◆ iof_debug()

void iof_debug ( iof I,
const char *  filename 
)

Definition at line 1947 of file utiliof.c.

◆ iof_decoder_retval()

size_t iof_decoder_retval ( iof I,
const char *  type,
iof_status  status 
)

Definition at line 2322 of file utiliof.c.

◆ iof_discard()

void iof_discard ( iof F)

Definition at line 2276 of file utiliof.c.

◆ iof_dummy()

iof* iof_dummy ( void buffer,
size_t  space 
)

◆ iof_encoder_retval()

size_t iof_encoder_retval ( iof O,
const char *  type,
iof_status  status 
)

Definition at line 2343 of file utiliof.c.

◆ iof_file_close_input()

void iof_file_close_input ( iof_file iofile)

Definition at line 316 of file utiliof.c.

◆ iof_file_ensure()

size_t iof_file_ensure ( iof_file iofile,
size_t  bytes 
)

Definition at line 484 of file utiliof.c.

◆ iof_file_eof()

int iof_file_eof ( iof_file iofile)

Definition at line 410 of file utiliof.c.

◆ iof_file_flush()

int iof_file_flush ( iof_file iofile)

Definition at line 417 of file utiliof.c.

◆ iof_file_free()

void iof_file_free ( iof_file iofile)

Definition at line 280 of file utiliof.c.

◆ iof_file_getc()

int iof_file_getc ( iof_file iofile)

Definition at line 502 of file utiliof.c.

◆ iof_file_init()

iof_file* iof_file_init ( iof_file iofile,
FILE file 
)

Definition at line 104 of file utiliof.c.

◆ iof_file_input_data()

uint8_t* iof_file_input_data ( iof_file iofile,
size_t psize,
int isnew 
)

Definition at line 1803 of file utiliof.c.

◆ iof_file_new()

iof_file* iof_file_new ( FILE file)

Definition at line 92 of file utiliof.c.

◆ iof_file_putc()

int iof_file_putc ( iof_file iofile,
int  c 
)

Definition at line 509 of file utiliof.c.

◆ iof_file_rdata()

iof_file* iof_file_rdata ( const void data,
size_t  size 
)

Definition at line 115 of file utiliof.c.

◆ iof_file_rdata_init()

iof_file* iof_file_rdata_init ( iof_file iofile,
const void data,
size_t  size 
)

Definition at line 128 of file utiliof.c.

◆ iof_file_read()

size_t iof_file_read ( void ptr,
size_t  size,
size_t  items,
iof_file iofile 
)

Definition at line 424 of file utiliof.c.

◆ iof_file_reader_from_data()

iof_file* iof_file_reader_from_data ( iof_file iofile,
const void data,
size_t  size,
int  preload,
int  freedata 
)

Definition at line 195 of file utiliof.c.

◆ iof_file_reader_from_file()

iof_file* iof_file_reader_from_file ( iof_file iofile,
const char *  filename,
int  preload 
)

Definition at line 187 of file utiliof.c.

◆ iof_file_reader_from_file_handle()

iof_file* iof_file_reader_from_file_handle ( iof_file iofile,
const char *  filename,
FILE file,
int  preload,
int  closefile 
)

Definition at line 152 of file utiliof.c.

◆ iof_file_reclose_input()

int iof_file_reclose_input ( iof_file iofile)

Definition at line 248 of file utiliof.c.

◆ iof_file_reopen_input()

int iof_file_reopen_input ( iof_file iofile)

Definition at line 262 of file utiliof.c.

◆ iof_file_seek()

int iof_file_seek ( iof_file iofile,
long  offset,
int  whence 
)

Definition at line 356 of file utiliof.c.

◆ iof_file_set_name()

void iof_file_set_name ( iof_file iofile,
const char *  name 
)

Definition at line 344 of file utiliof.c.

◆ iof_file_size()

size_t iof_file_size ( iof_file iofile)

Definition at line 396 of file utiliof.c.

◆ iof_file_tell()

long iof_file_tell ( iof_file iofile)

Definition at line 391 of file utiliof.c.

◆ iof_file_wdata()

iof_file* iof_file_wdata ( void data,
size_t  size 
)

Definition at line 140 of file utiliof.c.

◆ iof_file_wdata_init()

iof_file* iof_file_wdata_init ( iof_file iofile,
void data,
size_t  size 
)

Definition at line 145 of file utiliof.c.

◆ iof_file_write()

size_t iof_file_write ( const void ptr,
size_t  size,
size_t  items,
iof_file iofile 
)

Definition at line 462 of file utiliof.c.

◆ iof_filter_buffer_writer()

iof* iof_filter_buffer_writer ( size_t  size)

Definition at line 2668 of file utiliof.c.

◆ iof_filter_file_coreader_source()

iof_file* iof_filter_file_coreader_source ( iof I,
size_t poffset,
size_t plength 
)

Definition at line 2946 of file utiliof.c.

◆ iof_filter_file_handle_reader()

iof* iof_filter_file_handle_reader ( FILE file)

Definition at line 2554 of file utiliof.c.

◆ iof_filter_file_handle_writer()

iof* iof_filter_file_handle_writer ( FILE file)

Definition at line 2566 of file utiliof.c.

◆ iof_filter_file_reader()

iof* iof_filter_file_reader ( const char *  filename)

Definition at line 2604 of file utiliof.c.

◆ iof_filter_file_reader_source()

FILE* iof_filter_file_reader_source ( iof I,
size_t poffset,
size_t plength 
)

Definition at line 2926 of file utiliof.c.

◆ iof_filter_file_writer()

iof* iof_filter_file_writer ( const char *  filename)

Definition at line 2618 of file utiliof.c.

◆ iof_filter_iofile_reader()

iof* iof_filter_iofile_reader ( iof_file iofile,
size_t  offset 
)

Definition at line 2580 of file utiliof.c.

◆ iof_filter_iofile_writer()

iof* iof_filter_iofile_writer ( iof_file iofile,
size_t  offset 
)

Definition at line 2592 of file utiliof.c.

◆ iof_filter_reader_new()

iof* iof_filter_reader_new ( iof_handler  handler,
size_t  statesize,
void **  pstate 
)

Definition at line 2141 of file utiliof.c.

◆ iof_filter_reader_replacement()

iof* iof_filter_reader_replacement ( iof P,
iof_handler  handler,
size_t  statesize,
void **  pstate 
)

Definition at line 2966 of file utiliof.c.

◆ iof_filter_reader_with_buffer_new()

iof* iof_filter_reader_with_buffer_new ( iof_handler  handler,
size_t  statesize,
void **  pstate,
void buffer,
size_t  buffersize 
)

Definition at line 2160 of file utiliof.c.

◆ iof_filter_stream_coreader()

iof* iof_filter_stream_coreader ( iof_file iofile,
size_t  offset,
size_t  length 
)

Definition at line 2814 of file utiliof.c.

◆ iof_filter_stream_cowriter()

iof* iof_filter_stream_cowriter ( iof_file iofile,
size_t  offset 
)

Definition at line 2914 of file utiliof.c.

◆ iof_filter_stream_reader()

iof* iof_filter_stream_reader ( FILE file,
size_t  offset,
size_t  length 
)

Definition at line 2803 of file utiliof.c.

◆ iof_filter_stream_writer()

iof* iof_filter_stream_writer ( FILE file)

Definition at line 2904 of file utiliof.c.

◆ iof_filter_string_reader()

iof* iof_filter_string_reader ( const void s,
size_t  length 
)

Definition at line 2646 of file utiliof.c.

◆ iof_filter_string_writer()

iof* iof_filter_string_writer ( const void s,
size_t  length 
)

Definition at line 2657 of file utiliof.c.

◆ iof_filter_writer_new()

iof* iof_filter_writer_new ( iof_handler  handler,
size_t  statesize,
void **  pstate 
)

Definition at line 2175 of file utiliof.c.

◆ iof_filter_writer_with_buffer_new()

iof* iof_filter_writer_with_buffer_new ( iof_handler  handler,
size_t  statesize,
void **  pstate,
void buffer,
size_t  buffersize 
)

Definition at line 2194 of file utiliof.c.

◆ iof_filters_free()

void iof_filters_free ( void  )

Definition at line 2037 of file utiliof.c.

◆ iof_filters_init()

void iof_filters_init ( void  )

Definition at line 2029 of file utiliof.c.

◆ iof_free()

void iof_free ( iof F)

Definition at line 2261 of file utiliof.c.

◆ iof_fsize()

size_t iof_fsize ( iof I)

Definition at line 777 of file utiliof.c.

◆ iof_get_be_uint2()

int iof_get_be_uint2 ( iof I,
uint32_t pnumber 
)

Definition at line 1747 of file utiliof.c.

◆ iof_get_be_uint3()

int iof_get_be_uint3 ( iof I,
uint32_t pnumber 
)

Definition at line 1756 of file utiliof.c.

◆ iof_get_be_uint4()

int iof_get_be_uint4 ( iof I,
uint32_t pnumber 
)

Definition at line 1765 of file utiliof.c.

◆ iof_get_double()

int iof_get_double ( iof I,
double *  number 
)

Definition at line 1527 of file utiliof.c.

◆ iof_get_file()

FILE* iof_get_file ( iof F)

Definition at line 61 of file utiliof.c.

◆ iof_get_float()

int iof_get_float ( iof I,
float *  number 
)

Definition at line 1549 of file utiliof.c.

◆ iof_get_int32()

int iof_get_int32 ( iof I,
int32_t number 
)

Definition at line 1307 of file utiliof.c.

◆ iof_get_int32_radix()

int iof_get_int32_radix ( iof I,
int32_t number,
int  radix 
)

Definition at line 1369 of file utiliof.c.

◆ iof_get_int64()

int iof_get_int64 ( iof I,
int64_t number 
)

Definition at line 1327 of file utiliof.c.

◆ iof_get_int64_radix()

int iof_get_int64_radix ( iof I,
int64_t number,
int  radix 
)

Definition at line 1390 of file utiliof.c.

◆ iof_get_le_uint2()

int iof_get_le_uint2 ( iof I,
uint32_t pnumber 
)

Definition at line 1774 of file utiliof.c.

◆ iof_get_le_uint3()

int iof_get_le_uint3 ( iof I,
uint32_t pnumber 
)

Definition at line 1783 of file utiliof.c.

◆ iof_get_le_uint4()

int iof_get_le_uint4 ( iof I,
uint32_t pnumber 
)

Definition at line 1792 of file utiliof.c.

◆ iof_get_roman()

int iof_get_roman ( iof I,
uint16_t number 
)

Definition at line 1451 of file utiliof.c.

◆ iof_get_slong()

int iof_get_slong ( iof I,
long *  number 
)

Definition at line 1317 of file utiliof.c.

◆ iof_get_slong_radix()

int iof_get_slong_radix ( iof I,
long *  number,
int  radix 
)

Definition at line 1380 of file utiliof.c.

◆ iof_get_uint32()

int iof_get_uint32 ( iof I,
uint32_t number 
)

Definition at line 1337 of file utiliof.c.

◆ iof_get_uint32_radix()

int iof_get_uint32_radix ( iof I,
uint32_t number,
int  radix 
)

Definition at line 1400 of file utiliof.c.

◆ iof_get_uint64()

int iof_get_uint64 ( iof I,
uint64_t number 
)

Definition at line 1361 of file utiliof.c.

◆ iof_get_uint64_radix()

int iof_get_uint64_radix ( iof I,
uint64_t number,
int  radix 
)

Definition at line 1424 of file utiliof.c.

◆ iof_get_ulong()

int iof_get_ulong ( iof I,
unsigned long *  number 
)

Definition at line 1345 of file utiliof.c.

◆ iof_get_ulong_radix()

int iof_get_ulong_radix ( iof I,
unsigned long *  number,
int  radix 
)

Definition at line 1408 of file utiliof.c.

◆ iof_get_usize()

int iof_get_usize ( iof I,
size_t number 
)

Definition at line 1353 of file utiliof.c.

◆ iof_get_usize_radix()

int iof_get_usize_radix ( iof I,
size_t number,
int  radix 
)

Definition at line 1416 of file utiliof.c.

◆ iof_getc()

int iof_getc ( iof I)

Definition at line 1058 of file utiliof.c.

◆ iof_hgetc()

int iof_hgetc ( iof I)

◆ iof_hputc()

int iof_hputc ( iof O,
int  u 
)

◆ iof_hread()

size_t iof_hread ( iof I,
void s,
size_t  bytes 
)

◆ iof_hskip()

size_t iof_hskip ( iof I,
size_t  bytes 
)

◆ iof_hwrite()

size_t iof_hwrite ( iof O,
const void data,
size_t  size 
)

◆ iof_igetc()

int iof_igetc ( iof I)

◆ iof_input_save_tail()

size_t iof_input_save_tail ( iof I,
size_t  back 
)

Definition at line 808 of file utiliof.c.

◆ iof_iputc()

int iof_iputc ( iof O,
int  u 
)

◆ iof_iread()

size_t iof_iread ( iof I,
void s,
size_t  bytes 
)

◆ iof_iskip()

size_t iof_iskip ( iof I,
size_t  bytes 
)

◆ iof_iwrite()

size_t iof_iwrite ( iof O,
const void data,
size_t  size 
)

◆ iof_null()

iof* iof_null ( void buffer,
size_t  space 
)

◆ iof_pass()

iof_status iof_pass ( iof I,
iof O 
)

Definition at line 1090 of file utiliof.c.

◆ iof_put_double()

size_t iof_put_double ( iof O,
double  number,
int  digits 
)

Definition at line 1729 of file utiliof.c.

◆ iof_put_float()

size_t iof_put_float ( iof O,
float  number,
int  digits 
)

Definition at line 1737 of file utiliof.c.

◆ iof_put_int32()

size_t iof_put_int32 ( iof O,
int32_t  number 
)

Definition at line 1605 of file utiliof.c.

◆ iof_put_int32_radix()

size_t iof_put_int32_radix ( iof O,
int32_t  number,
int  radix,
int  uc 
)

Definition at line 1661 of file utiliof.c.

◆ iof_put_int64()

size_t iof_put_int64 ( iof O,
int64_t  number 
)

Definition at line 1621 of file utiliof.c.

◆ iof_put_int64_radix()

size_t iof_put_int64_radix ( iof O,
int64_t  number,
int  radix,
int  uc 
)

Definition at line 1677 of file utiliof.c.

◆ iof_put_roman()

size_t iof_put_roman ( iof O,
uint16_t  number,
int  uc 
)

Definition at line 1719 of file utiliof.c.

◆ iof_put_slong()

size_t iof_put_slong ( iof O,
long  number 
)

Definition at line 1613 of file utiliof.c.

◆ iof_put_slong_radix()

size_t iof_put_slong_radix ( iof O,
long  number,
int  radix,
int  uc 
)

Definition at line 1669 of file utiliof.c.

◆ iof_put_string()

size_t iof_put_string ( iof O,
const void data 
)

Definition at line 1238 of file utiliof.c.

◆ iof_put_uint32()

size_t iof_put_uint32 ( iof O,
uint32_t  number 
)

Definition at line 1629 of file utiliof.c.

◆ iof_put_uint32_radix()

size_t iof_put_uint32_radix ( iof O,
uint32_t  number,
int  radix,
int  uc 
)

Definition at line 1685 of file utiliof.c.

◆ iof_put_uint64()

size_t iof_put_uint64 ( iof O,
uint64_t  number 
)

Definition at line 1653 of file utiliof.c.

◆ iof_put_uint64_radix()

size_t iof_put_uint64_radix ( iof O,
uint64_t  number,
int  radix,
int  uc 
)

Definition at line 1709 of file utiliof.c.

◆ iof_put_ulong()

size_t iof_put_ulong ( iof O,
unsigned long  number 
)

Definition at line 1637 of file utiliof.c.

◆ iof_put_ulong_radix()

size_t iof_put_ulong_radix ( iof O,
unsigned long  number,
int  radix,
int  uc 
)

Definition at line 1693 of file utiliof.c.

◆ iof_put_usize()

size_t iof_put_usize ( iof O,
size_t  number 
)

Definition at line 1645 of file utiliof.c.

◆ iof_put_usize_radix()

size_t iof_put_usize_radix ( iof O,
size_t  number,
int  radix,
int  uc 
)

Definition at line 1701 of file utiliof.c.

◆ iof_putc()

int iof_putc ( iof O,
int  u 
)

Definition at line 1065 of file utiliof.c.

◆ iof_putfs()

size_t iof_putfs ( iof O,
const char *  format,
  ... 
)

Definition at line 1288 of file utiliof.c.

◆ iof_puts()

iof_status iof_puts ( iof O,
const void data 
)

Definition at line 1225 of file utiliof.c.

◆ iof_read()

size_t iof_read ( iof I,
void s,
size_t  bytes 
)

Definition at line 1122 of file utiliof.c.

◆ iof_reader()

iof* iof_reader ( iof I,
void link,
iof_handler  reader,
const void s,
size_t  bytes 
)

Definition at line 961 of file utiliof.c.

◆ iof_reader_data()

uint8_t* iof_reader_data ( iof I,
size_t psize 
)

Definition at line 1859 of file utiliof.c.

◆ iof_reader_reseek()

int iof_reader_reseek ( iof I,
long  offset,
int  whence 
)

Definition at line 641 of file utiliof.c.

◆ iof_reader_seek()

int iof_reader_seek ( iof I,
long  offset,
int  whence 
)

Definition at line 629 of file utiliof.c.

◆ iof_reader_tell()

long iof_reader_tell ( iof I)

Definition at line 752 of file utiliof.c.

◆ iof_reader_to_file()

size_t iof_reader_to_file ( iof I,
const char *  filename 
)

Definition at line 1906 of file utiliof.c.

◆ iof_reader_to_file_handle()

size_t iof_reader_to_file_handle ( iof I,
FILE file 
)

Definition at line 1898 of file utiliof.c.

◆ iof_repc()

size_t iof_repc ( iof O,
char  c,
size_t  bytes 
)

Definition at line 1262 of file utiliof.c.

◆ iof_reseek()

int iof_reseek ( iof I,
long  offset,
int  whence 
)

Definition at line 745 of file utiliof.c.

◆ iof_resize_buffer_to()

size_t iof_resize_buffer_to ( iof O,
size_t  space 
)

Definition at line 2293 of file utiliof.c.

◆ iof_result_to_file()

size_t iof_result_to_file ( iof F,
const char *  filename 
)

Definition at line 1939 of file utiliof.c.

◆ iof_result_to_file_handle()

size_t iof_result_to_file_handle ( iof F,
FILE file 
)

Definition at line 1931 of file utiliof.c.

◆ iof_save_tail()

size_t iof_save_tail ( iof I)

Definition at line 796 of file utiliof.c.

◆ iof_seek()

int iof_seek ( iof I,
long  offset,
int  whence 
)

Definition at line 740 of file utiliof.c.

◆ iof_setup_buffer()

iof* iof_setup_buffer ( iof O,
void buffer,
size_t  space 
)

Definition at line 1024 of file utiliof.c.

◆ iof_setup_buffermin()

iof* iof_setup_buffermin ( iof O,
void buffer,
size_t  space,
size_t  min 
)

Definition at line 1033 of file utiliof.c.

◆ iof_setup_file_handle_reader()

iof* iof_setup_file_handle_reader ( iof I,
void buffer,
size_t  space,
FILE f 
)

Definition at line 842 of file utiliof.c.

◆ iof_setup_file_handle_writer()

iof* iof_setup_file_handle_writer ( iof O,
void buffer,
size_t  space,
FILE f 
)

Definition at line 883 of file utiliof.c.

◆ iof_setup_file_reader()

iof* iof_setup_file_reader ( iof I,
void buffer,
size_t  space,
const char *  filename 
)

Definition at line 850 of file utiliof.c.

◆ iof_setup_file_writer()

iof* iof_setup_file_writer ( iof O,
void buffer,
size_t  space,
const char *  filename 
)

Definition at line 891 of file utiliof.c.

◆ iof_skip()

size_t iof_skip ( iof I,
size_t  bytes 
)

Definition at line 1075 of file utiliof.c.

◆ iof_status_kind()

const char* iof_status_kind ( iof_status  status)

Definition at line 70 of file utiliof.c.

◆ iof_string_reader()

iof* iof_string_reader ( iof I,
const void s,
size_t  bytes 
)

Definition at line 977 of file utiliof.c.

◆ iof_tell()

long iof_tell ( iof I)

Definition at line 772 of file utiliof.c.

◆ iof_write()

size_t iof_write ( iof O,
const void data,
size_t  size 
)

Definition at line 1197 of file utiliof.c.

◆ iof_write_file()

size_t iof_write_file ( iof O,
const char *  filename 
)

Definition at line 1166 of file utiliof.c.

◆ iof_write_file_handle()

size_t iof_write_file_handle ( iof O,
FILE file 
)

Definition at line 1151 of file utiliof.c.

◆ iof_write_iofile()

size_t iof_write_iofile ( iof O,
iof_file iofile,
int  savepos 
)

Definition at line 1177 of file utiliof.c.

◆ iof_writer()

iof* iof_writer ( iof O,
void link,
iof_handler  writer,
void s,
size_t  bytes 
)

Definition at line 991 of file utiliof.c.

◆ iof_writer_data()

uint8_t* iof_writer_data ( iof O,
size_t psize 
)

Definition at line 1879 of file utiliof.c.

◆ iof_writer_reseek()

int iof_writer_reseek ( iof I,
long  offset,
int  whence 
)

Definition at line 728 of file utiliof.c.

◆ iof_writer_seek()

int iof_writer_seek ( iof I,
long  offset,
int  whence 
)

Definition at line 716 of file utiliof.c.

◆ iof_writer_tell()

long iof_writer_tell ( iof I)

Definition at line 762 of file utiliof.c.

Variable Documentation

◆ iof_stderr

iof iof_stderr
extern

Definition at line 957 of file utiliof.c.

◆ iof_stdout

iof iof_stdout
extern

Definition at line 954 of file utiliof.c.