diff options
Diffstat (limited to 'dynstr.h')
-rw-r--r-- | dynstr.h | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -147,12 +147,10 @@ size_t dynstr_fwrite(FILE *file, Dynstr *dynstr); ssize_t dynstr_write(int file, Dynstr *dynstr); /* Read a number of bytes from an open file, either FILE or a Unix file - * handle. Return value is number of bytes read, just like for fread(3). - * A value less than the requested may indicate an error or end-of-file. - * Use ferror(3) and feof(3) to determine which. If it was an error, errno - * has been set by fread(3). */ -Dynstr *dynstr_read(int file, size_t size); + * handle. Return value is the string that was read. The string is empty + * to indicate EOF, or NULL for error. */ Dynstr *dynstr_fread(FILE *file, size_t size); +Dynstr *dynstr_read(int file, size_t size); /* Read a line from an open file, either a FILE or a Unix file handle. * The line ends with the first newline byte, or at the end of the file. |