improve docs also for related functions

This commit is contained in:
Axel Kohlmeyer
2021-04-24 22:08:28 -04:00
parent 7e7a448a08
commit b0cd6b3ef7
3 changed files with 16 additions and 9 deletions

View File

@ -15,8 +15,10 @@ I/O with status check
The the first two functions are wrappers around the corresponding C
library calls ``fgets()`` or ``fread()``. They will check if there
were errors on reading or an unexpected end-of-file state was reached.
In that case, the functions will stop the calculation with an error
message, indicating the name of the problematic file, if possible.
In that case, the functions will stop with an error message, indicating
the name of the problematic file, if possible unless the *error* argument
is a NULL pointer.
The :cpp:func:`read_lines_from_file` function will read the requested
number of lines of a maximum length into a buffer and will return 0
if successful or 1 if not. It also guarantees that all lines are