BOOTSTRAP (kutils) functions
LIBRARY ROUTINE
kfread - read from a data transport stream
LIBRARY CALL
size_t kfread(
kaddr ptr,
size_t size,
size_t nitems,
kfile *file)
INPUT
- ptr - a pointer to allocated space into which
to read the data
- size - the size, in bytes, of each item
- nitems - the number of items to be read
- file - the data transport transport to be read from;
must have been opened earlier using kfopen().
OUTPUT
none
RETURN VALUE
The number of items read on success; 0 when end-of-file
is encountered or an error occurs.
DESCRIPTION
This function is a replacement for the system "fread"
call; kfread() supports all khoros data transport
mechanisms, not just Unix files.
The routine will read 'nitem' items, each of 'size'
bytes from the data transport stream associated
with 'file' into the memory location accessed by 'ptr'.
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
none
RESTRICTIONS
none
MODIFICATION
none
FILES
$BOOTSTRAP/objects/library/kutils/src/kstdio.c
SEE ALSO
kutils(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.