Attempts to read n bytes from file into abuf. If n is negative, then as many bytes are read into abuf as can be without changing its length. Returns the number of bytes actually read, (which might be less than n if a read error occurs or the end of the file is reached) or EOF if there was insufficient memory to read the desired amount. This function returns a value of zero without reading anything if n is zero.
This function attempts to write n bytes from position index in abuf to the file specified by file. Returns the number of bytes actually written; this will be n unless some error occurred, such as running out of space.
Deletes the contents of abuf, and then reads characters into it from file until an occurrence of delim. On exit, abuf does not contain delim. delim is treated as a variable of type ‘unsigned char’ unless it is negative, in which case characters are read from file until end of file. Returns the number of characters read, or ‘EOF’ on end-of-file or error conditions (including insufficient memory). If file does not have a terminating delim, one is silently supplied.