GC a historical artifact.
Back in 1993, the fgetln (then fgetline) interface was changed to not return a C string. The change was accomplished by ifdefing out the code that did the termination. Changing the interface would violate our API stability rules so remove the old implementation. Sponsored by: DARPA, AFRL
This commit is contained in:
parent
18bb746b40
commit
60835849e5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=343884
@ -50,19 +50,12 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Expand the line buffer. Return -1 on error.
|
* Expand the line buffer. Return -1 on error.
|
||||||
#ifdef notdef
|
|
||||||
* The `new size' does not account for a terminating '\0',
|
|
||||||
* so we add 1 here.
|
|
||||||
#endif
|
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
__slbexpand(FILE *fp, size_t newsize)
|
__slbexpand(FILE *fp, size_t newsize)
|
||||||
{
|
{
|
||||||
void *p;
|
void *p;
|
||||||
|
|
||||||
#ifdef notdef
|
|
||||||
++newsize;
|
|
||||||
#endif
|
|
||||||
if (fp->_lb._size >= newsize)
|
if (fp->_lb._size >= newsize)
|
||||||
return (0);
|
return (0);
|
||||||
if (newsize > INT_MAX) {
|
if (newsize > INT_MAX) {
|
||||||
@ -160,9 +153,6 @@ fgetln(FILE *fp, size_t *lenp)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
*lenp = len;
|
*lenp = len;
|
||||||
#ifdef notdef
|
|
||||||
fp->_lb._base[len] = '\0';
|
|
||||||
#endif
|
|
||||||
ret = (char *)fp->_lb._base;
|
ret = (char *)fp->_lb._base;
|
||||||
end:
|
end:
|
||||||
FUNLOCKFILE_CANCELSAFE();
|
FUNLOCKFILE_CANCELSAFE();
|
||||||
|
Loading…
Reference in New Issue
Block a user