Rename slbexpand() to __slbexpand() and make it available outside

of fgetln.c (non-static).
This commit is contained in:
tjr 2004-07-16 05:52:51 +00:00
parent 512d638b01
commit b70b3092cc
2 changed files with 5 additions and 4 deletions

View File

@ -55,8 +55,8 @@ __FBSDID("$FreeBSD$");
* so we add 1 here.
#endif
*/
static int
slbexpand(FILE *fp, size_t newsize)
int
__slbexpand(FILE *fp, size_t newsize)
{
void *p;
@ -132,7 +132,7 @@ fgetln(FILE *fp, size_t *lenp)
* file buffer to line buffer, refill file and look for
* newline. The loop stops only when we find a newline.
*/
if (slbexpand(fp, len + OPTIMISTIC))
if (__slbexpand(fp, len + OPTIMISTIC))
goto error;
(void)memcpy((void *)(fp->_lb._base + off), (void *)fp->_p,
len - off);
@ -146,7 +146,7 @@ fgetln(FILE *fp, size_t *lenp)
p++;
diff = p - fp->_p;
len += diff;
if (slbexpand(fp, len))
if (__slbexpand(fp, len))
goto error;
(void)memcpy((void *)(fp->_lb._base + off), (void *)fp->_p,
diff);

View File

@ -57,6 +57,7 @@ extern wint_t __fgetwc(FILE *);
extern wint_t __fputwc(wchar_t, FILE *);
extern int __sflush(FILE *);
extern FILE *__sfp(void);
extern int __slbexpand(FILE *, size_t);
extern int __srefill(FILE *);
extern int __sread(void *, char *, int);
extern int __swrite(void *, char const *, int);