aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/stdio/ungetc.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2001-09-01 01:56:54 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2001-09-01 01:56:54 +0000
commit65efd8129012d7371cc67e0cb0de9845140c977c (patch)
tree7df1c1e8cadd1748528a154d73547f9a81702dae /lib/libc/stdio/ungetc.c
parent8c8a7645c79a3a5b0fd72d8307991fb6e8f506fe (diff)
downloadsrc-65efd8129012d7371cc67e0cb0de9845140c977c.tar.gz
src-65efd8129012d7371cc67e0cb0de9845140c977c.zip
Back out disabling ungetc() at 0, use different solution:
keep negative offset internally, but return 0 externally in ftell*() I.e. use 0 now as 'unspecified value' per POSIX ungetc() description.
Notes
Notes: svn path=/head/; revision=82709
Diffstat (limited to 'lib/libc/stdio/ungetc.c')
-rw-r--r--lib/libc/stdio/ungetc.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/libc/stdio/ungetc.c b/lib/libc/stdio/ungetc.c
index 092debd5b4e6..f70fb425bb17 100644
--- a/lib/libc/stdio/ungetc.c
+++ b/lib/libc/stdio/ungetc.c
@@ -132,10 +132,6 @@ __ungetc(int c, FILE *fp)
}
fp->_flags |= __SRD;
}
-
- if (!(fp->_flags & __SSTR) && _ftello(fp) == 0)
- return (EOF);
-
c = (unsigned char)c;
/*