OpenGrok
Cross Reference: fgets.c
xref
: /
src
/
lib
/
libc
/
stdio
/
fgets.c
Home
|
History
|
Annotate
|
Download
|
only in
stdio
History log of
/src/lib/libc/stdio/fgets.c
Revision
Date
Author
Comments
1.28
15-Mar-2012
christos
- ansify, knf.
- no functional changes
1.27
25-Oct-2009
christos
branches: 1.27.6;
revert some of dsl's changes to make things build on i386; he can undo what
he wants when he comes back.
1.26
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.25
24-Oct-2009
dsl
Remove a load of pointless casts - one that even lint doesn't bleat about.
1.24
24-Oct-2009
dsl
Check for EOF before erroring fgets() with length <= 0.
If length is invalid, set errno = EINVAL and __SERR as well returning NULL.
Should let me close PR/41992.
1.23
14-Oct-2009
dsl
Change a while () {} into a do {} while() so that fgets(buf, 1, file)
detects EOF on an empty file.
Fixes most of PR/41992
1.22
05-Feb-2009
lukem
sign-compare fix
1.21
03-Jun-2007
christos
Make these work with _FORTIFY_SOURCE, by overriding the fortified definitions
1.20
14-Dec-2003
lukem
remove superfluous assignment
1.19
10-Oct-2003
simonb
Remove another unneeded cast to size_t.
Pointed out by Anil Madhavapeddy in private email.
1.18
09-Oct-2003
simonb
No need to cast "len" to a size_t now that "len" is a size_t.
1.17
08-Oct-2003
itojun
avoid signed->unsigned assignment. openbsd PR 1709
1.16
07-Aug-2003
agc
Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22280, verified by myself.
1.15
18-Jan-2003
thorpej
Merge the nathanw_sa branch.
1.14
07-Dec-2001
yamt
- make FILE structure extensible without breaking binary-compatibility.
- add fputwc, fgetwc, fwide and related functions.
- add hooks needed to maintain the orientation of file stream.
1.13
14-Nov-1999
explorer
branches: 1.13.6;
missing ;
1.12
20-Sep-1999
lukem
branches: 1.12.4;
back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
1.11
16-Sep-1999
lukem
* use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.
the first two items result in the addition of code similar to the
following in various functions:
_DIAGASSERT(path != NULL)
#ifdef _DIAGNOSTIC
if (path == NULL) {
errno = EFAULT;
return (-1);
}
#endif
1.10
15-Nov-1998
christos
change len from size_t to int so that len = fp->_r does not get promoted
to unsigned. cast len appropriately to size_t later.
1.9
07-Sep-1998
kleink
Sloppy stdio stream lock tracking.
1.8
03-Feb-1998
perry
remove obsolete register declarations
1.7
19-Jan-1998
jtc
Use FLOCKFILE() and FUNLOCKFILE() macros from reentrant.h so that stdio
can be made thread-safe.
1.6
13-Jul-1997
christos
Fix RCSID's
Fix gcc warnings.
Add prototypes for functions that were declared in more than one place
to local.h or extern.h and use that instead.
1.5
25-Mar-1995
jtc
change second arg of fgets() from size_t to int
1.4
02-Feb-1995
jtc
branches: 1.4.2;
Merged with 4.4lite.
Changed to conform to NetBSD's new RCS Id convention.
1.3
26-Aug-1993
jtc
Declare rcsid strings so they are stored in text segment.
1.2
01-Aug-1993
mycroft
Add RCS identifiers.
1.1
21-Mar-1993
cgd
branches: 1.1.1;
Initial revision
1.1.1.2
02-Feb-1995
jtc
imported from 44lite
1.1.1.1
21-Mar-1993
cgd
initial import of 386bsd-0.1 sources
1.4.2.1
02-May-1995
jtc
#include "namespace.h"
1.12.4.1
27-Dec-1999
wrstuden
Pull up to last week's -current.
1.13.6.2
06-Feb-2002
nathanw
#include "reentrant.h" before "local.h" so that the thread types used
in fileext.h are avaliable.
1.13.6.1
28-Jan-2002
nathanw
Catch up to -current.
1.27.6.1
17-Apr-2012
yamt
sync with head
Indexes created Sat Sep 20 22:09:52 GMT 2025