# define DEFINED__FILBUF_TO_SOMETHING_SPECIFIC
#endif
-#ifdef SCO_5_STDIO
-# define _ptr __ptr
-# define _cnt __cnt
-# define _base __base
-# define _filbuf(fp) ((fp)->__cnt = 0, __filbuf(fp))
-# define DEFINED__FILBUF_TO_SOMETHING_SPECIFIC
-#endif
-
#ifndef DEFINED__FILBUF_TO_SOMETHING_SPECIFIC
extern int _filbuf(FILE*);
#endif
thisisanmbox(FILE *iob)
{
register int c;
- register long pos;
char text[10];
register char *cp;
register char *delimstr;
+ c = getc(iob);
+ if (feof(iob)) {
+ return;
+ }
+ ungetc(c, iob);
+
/*
** Figure out what the message delimitter string is for this
** maildrop. (This used to be part of m_Eom but I didn't like
** abort.
*/
- pos = ftell(iob);
if (fread(text, sizeof(*text), 5, iob) != 5) {
adios(NULL, "Read error");
}