History log of /netbsd-src/lib/libc/stdio/fgetstr.c (Results 1 – 12 of 12)
Revision Date Author Comments
# 555c7784 08-Jun-2017 uwe <uwe@NetBSD.org>

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.


# 00711901 11-Jan-2010 joerg <joerg@NetBSD.org>

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(NUL

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.

show more ...


# 7cfa0468 02-Dec-2009 roy <roy@NetBSD.org>

Reinstate __getdelim which does no locking.
Callers are now required to FLOCKFILE so they can operate on fp as well.


# 755657be 01-Dec-2009 roy <roy@NetBSD.org>

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.
f

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.

show more ...


# 5f969269 15-Oct-2009 roy <roy@NetBSD.org>

Handle errors from getdelim better.


# 6e80fcc9 14-Oct-2009 roy <roy@NetBSD.org>

Store the allocated buffer against FILE, plugging a memory leak.
Fixes PR bin/42183.


# 86eafd3e 24-Sep-2009 roy <roy@NetBSD.org>

__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 tha

__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.

show more ...


# bc395719 31-Jan-2009 lukem <lukem@NetBSD.org>

sign-compare fix


# 1665d5e9 24-Nov-2006 christos <christos@NetBSD.org>

fix spelling of accommodate; from Zapher.


# f432bbb6 14-May-2005 christos <christos@NetBSD.org>

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.


# db594c65 10-May-2004 drochner <drochner@NetBSD.org>

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 sho

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.)

show more ...


# 6321f42f 21-Apr-2004 christos <christos@NetBSD.org>

Add a generalized version of fgetln that can stop at an arbitrary delimiter,
and implement fgetln on top of that.