HTML automatically generated with rman
Table of Contents

Name

memopen, memclose, memseek, memfread, memdread, memiread - memory operations to aid casting/parsing misaligned data

Synopsis


#include <stdinc.h>#include <memio.h>mem    *memopen(char *buf, int buflen)
void   memclose(mem *mp)
float  memfread(mem *mp)
double memdread(mem *mp)
int    memiread(mem *mp)
void   memseek(mem *mp, int loc, int mode)


Descriptionmemio are a set of routines that allow you to handle misaligned
data. A arbitrarely sized buffer, pointed to by buf, in memory is  used.
From this location seqeantial access using the memXread()  routines can
be done, although the usual kind of memseek() operations (see also fseek(3)
or seek(2))  allow flexible (re)location within this buffer. memclose()
free’s up the memory allocated by memopen(). 
BugsSome forms of out-of-memory
are not detected. Others cause  error(3NEMO) to be called, that generally
abort the  program. LimitationsThe buffer buf that was opened by memopen
 should not be free’d or modified, otherwise unpredictable things may happen.
See Alsounfio(3NEMO) AuthorPeter Teuben Files
~/src/kernel/io      memio.c

Update History


10-may-94    V1.0 Created           PJT


Table of Contents