![]() |
![]()
| ![]() |
![]()
NAMExt_ff_read() - Read a fixed number of bytes from a fast file stream LIBRARY#include <xtend/fast-file.h> -lxtend SYNOPSISsize_t xt_ff_read(xt_ff_t *stream, void * restrict ptr, size_t size, size_t nmemb) ARGUMENTSstream Pointer to an xt_ff_t structure ptr Memory location where data read from stream will be stored size Size of one object being read nmemb Number of objects to read DESCRIPTIONxt_ff_read(3) reads a fixed number of bytes (size * nmemb) from stream, storing them at address ptr, which should point to an object (if nmemb == 1) or array of "nmemb" objects of size "size". RETURN VALUESThe number of objects (not bytes) successfully read EXAMPLESmy_type_t list[NUM_OBJECTS]; xt_ff_t *stream; stream = xt_ff_open("myfile", O_RDONLY); xt_ff_read(stream, list, sizeof(my_type_t), NUM_OBJECTS); SEE ALSOxf_ff_write(3), xt_ff_open(3), read(2)
|