summaryrefslogtreecommitdiff
path: root/do/eof
diff options
context:
space:
mode:
Diffstat (limited to 'do/eof')
-rw-r--r--do/eof45
1 files changed, 0 insertions, 45 deletions
diff --git a/do/eof b/do/eof
deleted file mode 100644
index a1512cd2b0..0000000000
--- a/do/eof
+++ /dev/null
@@ -1,45 +0,0 @@
-bool
-do_eof(stab)
-STAB *stab;
-{
- register STIO *stio;
- int ch;
-
- if (!stab) { /* eof() */
- if (argvstab)
- stio = stab_io(argvstab);
- else
- return TRUE;
- }
- else
- stio = stab_io(stab);
-
- if (!stio)
- return TRUE;
-
- while (stio->ifp) {
-
-#ifdef STDSTDIO /* (the code works without this) */
- if (stio->ifp->_cnt > 0) /* cheat a little, since */
- return FALSE; /* this is the most usual case */
-#endif
-
- ch = getc(stio->ifp);
- if (ch != EOF) {
- (void)ungetc(ch, stio->ifp);
- return FALSE;
- }
-#ifdef STDSTDIO
- if (stio->ifp->_cnt < -1)
- stio->ifp->_cnt = -1;
-#endif
- if (!stab) { /* not necessarily a real EOF yet? */
- if (!nextargv(argvstab)) /* get another fp handy */
- return TRUE;
- }
- else
- return TRUE; /* normal fp, definitely end of file */
- }
- return TRUE;
-}
-