-

Functions HI-TECH C READ

From HI-TECH C for CP/M Fan WIKI(EN)
Revision as of 23:05, 31 July 2017 by Kumokosi (talk | contribs) (Created page with "<strong>READ</strong> ==SYNOPSIS== #include <unixio.h> int read(int fd, void * buf, size_t cnt) ==DESCRIPTION== <strong>Read</strong>() will read from the file associa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

READ

SYNOPSIS

#include  <unixio.h>

int read(int fd, void * buf, size_t cnt)


DESCRIPTION

Read() will read from the file associated with fd up to cnt bytes into a buffer located at buf. It returns the number of bytes actually read. A zero return indicates end-of-file. A negative return indicates error. Fd should have been obtained from a previous call to open(). It is possible for read() to return less bytes than requested, e.g. when reading from the console, in which case read() will read one line of input.

SEE ALSO

open, close, write