Home | History | Annotate | Download | only in stdio
History log of /src/lib/libc/stdio/fgetstr.c
RevisionDateAuthorComments
 1.12  08-Jun-2017  uwe Don't use "NULL" to talk about null-terminated strings.

The C standard seems to be inconsistent about dash vs. space. Old
text uses dash, Annex K uses space. I'll let wizd(8) to sort that
out.
 1.11  11-Jan-2010  joerg Use a proper char */size_t pair in __sfileext to keep track of the line
buffer for fgetln and fgetwln. Simplifies code by dropping the INT_MAX
related logic. Drop conditionals around FREELB, free(NULL) is valid.
 1.10  02-Dec-2009  roy Reinstate __getdelim which does no locking.
Callers are now required to FLOCKFILE so they can operate on fp as well.
 1.9  01-Dec-2009  roy Remove __getdelim and just use getdelim.
fgetstr now works with strings up to SSIZE_MAX as a result, but may
reallocate buffers needlessly just like it used to when the buffer size
exceeds INT_MAX.
fgetstr converts errno EOVERFLOW to EINVAL on getdelim error.
 1.8  15-Oct-2009  roy Handle errors from getdelim better.
 1.7  14-Oct-2009  roy Store the allocated buffer against FILE, plugging a memory leak.
Fixes PR bin/42183.
 1.6  24-Sep-2009  roy __getdelim works on strings up to SIZE_MAX - 2 and returns 0 on EOF.
getdelim works on strings up to SSIZE_MAX and returns -1 on EOF.
__fgetstr is now just a wrapper around __getdelim and ensures that
the buffer doesn't overflow the one provided by FILE.
__slbexpand is now static in fgetwln as it is the only consumer of that func.
 1.5  31-Jan-2009  lukem sign-compare fix
 1.4  24-Nov-2006  christos fix spelling of accommodate; from Zapher.
 1.3  14-May-2005  christos Add the missing wide char support functions from freebsd.
XXX: long double support is missing until we get gdtoa, and add the
necessary wide functions.
 1.2  10-May-2004  drochner After discussion with christos, turn fgetstr() into an internal function.
Its API in inherently non-threadsafe (and it depends on certain properties
of the underlying stdio implementation), so it shouldn't be a first-class
function for general use, polluting the application namespace.
Also remove the FLOCKFILE() code from it - this is under control of the
calling function now.
(XXX I'm not sure whether the FLOCKFILE() should be kept in fgetln(),
this function cannot be used in multiple threads anyway. It doesn't
hurt much, and it might prevent corruption of internal FILE structures.)
 1.1  21-Apr-2004  christos Add a generalized version of fgetln that can stop at an arbitrary delimiter,
and implement fgetln on top of that.

RSS XML Feed