Of course there won't be a delimiter, but mail drop files are frequently
empty, though existing.
This solution is more of a hack, but it works. Improvements welcome!
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");
}