diff options
author | tjr <tjr@FreeBSD.org> | 2004-07-16 05:52:51 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2004-07-16 05:52:51 +0000 |
commit | b70b3092cc3d42ee415228c5c299658e2b290f84 (patch) | |
tree | 30f7ad5ee4d609afc324cd7c920ccd738ca733f7 /lib | |
parent | 512d638b0144d892c6a381fc8b6688b30b4795ad (diff) | |
download | FreeBSD-src-b70b3092cc3d42ee415228c5c299658e2b290f84.zip FreeBSD-src-b70b3092cc3d42ee415228c5c299658e2b290f84.tar.gz |
Rename slbexpand() to __slbexpand() and make it available outside
of fgetln.c (non-static).
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/stdio/fgetln.c | 8 | ||||
-rw-r--r-- | lib/libc/stdio/local.h | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/libc/stdio/fgetln.c b/lib/libc/stdio/fgetln.c index df2282f..d2efe09 100644 --- a/lib/libc/stdio/fgetln.c +++ b/lib/libc/stdio/fgetln.c @@ -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); diff --git a/lib/libc/stdio/local.h b/lib/libc/stdio/local.h index b1d92d9..16a9e78 100644 --- a/lib/libc/stdio/local.h +++ b/lib/libc/stdio/local.h @@ -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); |