OpenGrok
Cross Reference: getdelim.c
xref
: /
src
/
lib
/
libc
/
stdio
/
getdelim.c
Home
|
History
|
Annotate
|
Download
|
only in
stdio
History log of
/src/lib/libc/stdio/getdelim.c
Revision
Date
Author
Comments
1.14
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.13
22-Jul-2011
joerg
Set error indicator on invalid arguments. From Carsten Hey.
1.12
07-Dec-2009
roy
Test against SSIZE_MAX as pointed out by enami tsugutomo.
1.11
02-Dec-2009
roy
Pass lint.
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
Protect getdelim when used internally.
1.8
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.7
25-Oct-2009
christos
revert some of dsl's changes to make things build on i386; he can undo what
he wants when he comes back.
1.6
25-Oct-2009
dsl
Lint is differentially far too picky...
Remove some warnings that only appear on i386 (not on amd64) and that
for some reason best known to others are deemed fatal for i386.
Making this code 'pass lint' does absolutely nothing for its readability (etc).
1.5
24-Oct-2009
dsl
Remove a load of pointless casts - one that even lint doesn't bleat about.
1.4
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.3
14-Jul-2009
roy
Allow a buffer of SSIZE_MAX + 1 as the returned bytes do not include the NULL.
1.2
14-Jul-2009
christos
pass lint
1.1
13-Jul-2009
roy
Add implementations for getdelim(3) and getline(3).
Indexes created Sun Sep 21 20:09:37 GMT 2025