osdFileRead

osdFileRead

osd

1998 12-05


NAME

osdFileRead - read data from a file


SYNOPSIS

long osdFileRead(OSD_File *file, char *buffer,unsigned long len)

osdFileRead() reads data from file and places it into buffer. Data is read from the file starting from the current file pointer location ( see osdFileSetPointer() ).


The memory pointed to by buffer should be large enough to hold len bytes.


After the osdFileRead() the file pointer location is incremented by the actual number of bytes read.


Returns the actual number of bytes read. This may be less than len if the end of the file has been reached, and any subsequent calls will return 0. On failure -1 is returned.


ARGUMENTS


file the file to be read
buffer a pointer where read data will be placed
len the number of bytes to read