[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
al_fgets has a major problem in the implementation If you pass too
short of a buffer it will read in a whole line from the file but return
a partial string, discarding the rest. We should of course stop reading
at max-1 bytes, but we need a way to tell if there is more of the line
remaining. We could:
- do like fgets() and return the line terminator
- explicitly return whether a whole line was read
Any preferences? I think the former is a bit irritating to work with in
practice.
It would be nice to have a version of al_fgets() that returns an
ALLEGRO_USTR.
Peter