usr.bin/mail/lex.c
/*
 * Incorporate any new mail that has arrived since we first
 * started reading mail.
 */
Incorporate any new mail that has arrived since we first
started reading mail.
Incorporate any new mail that has arrived since we first started reading mail .
int
incfile()
{
	int newsize;
	int omsgCount = msgCount;
	FILE *ibuf;
	ibuf = Fopen(mailname, "r");
	if (ibuf == NULL)
		return -1;
	holdsigs();
	newsize = fsize(ibuf);
	if (newsize == 0)
		return -1;		
	if (newsize < mailsize)
		return -1;		
	if (newsize == mailsize)
		return 0;		
	setptr(ibuf, mailsize);
	setmsize(msgCount);
	mailsize = ftell(ibuf);
	Fclose(ibuf);
	relsesigs();
	return(msgCount - omsgCount);
}
int incfile ( ) { int newsize ; int omsgCount = msgCount ; FILE * ibuf ; ibuf = Fopen ( mailname , " " ) ; if ( ibuf == NULL ) return -1 ; holdsigs ( ) ; newsize = fsize ( ibuf ) ; if ( newsize == 0 ) return -1 ; if ( newsize < mailsize ) return -1 ; if ( newsize == mailsize ) return 0 ; setptr ( ibuf , mailsize ) ; setmsize ( msgCount ) ; mailsize = ftell ( ibuf ) ; Fclose ( ibuf ) ; relsesigs ( ) ; return ( msgCount - omsgCount ) ; }
Incorporate any new mail that has arrived since we first
 started reading mail.
Incorporate any new mail that has arrived since we first started reading mail .
/* mail box is now empty??? */ /* mail box has shrunk??? */ /* no new mail */