#include "stock.h" int fdgetc(int fd) int fdgets(int fd, char *buf, int maxbytes) int fdread(int fd, char *buf, int nbytes) off_t fdseek(int fd, off_t offset, int whence) int fdtell(int fd) int fdclose(int fd) int fdwrite(int fd, char *buf, int nbytes) int fdflush(int fd)
fdgetc returns a single character, or -1 if an error or end of file is found.
fdgets returns a maximum of maxbytes-1 of a single line of input into buf. The trailing linefeed is eliminated and the string is terminated with a null character. Any characters beyond maxbytes-1 in a line are lost.
fdread attempts to return the specified number of bytes, and returns a count of the actual number returned, or -1 if an error occurred.
fdseek positions the file at the specified offset.
fdtell returns the current position of the file.
fdclose closes an input stream.
fdwrite copies nbytes bytes from buf to a buffer associated with the specified file descriptor fd.
fdflush flushes the internal buffer, writing it to disk.
fgets(3)