[comp.mail.sendmail] Patch for 4.3BSD Mail for MIPS

bin@primate.wisc.edu (Brain in Neutral) (10/12/89)

Here's a patch you can apply to head.c in the 4.3BSD distribution of
/usr/ucb/[Mm]ail (available in ~ftp/bsd-sources/ucb/Mail on uunet.uu.net).
This will make mail recognize from lines that don't have seconds digits
in the date (MIPS /bin/mail doesn't put 'em in, so standard ucbmail doesn't
find any From_ lines!).  That is, it will recognize From_ lines either
with or without seconds digits.

This is useful when you pull mail archives off of other machines and try
to aim mail -f at them to read them...

Paul DuBois
dubois@primate.wisc.edu

*** head.c~	Mon Jul 10 14:01:38 1989
--- head.c	Wed Oct 11 16:47:46 1989
***************
*** 138,148 ****
--- 138,155 ----
  
  char ctypes[] = { U,L,L,S,U,L,L,S,O,D,S,D,D,C,D,D,C,D,D,S,D,D,D,D,0 };
  char tmztypes[] = { U,L,L,S,U,L,L,S,O,D,S,D,D,C,D,D,C,D,D,S,U,U,U,S,D,D,D,D,0 };
+ /* same but with no seconds indicator in time */
+ char nsctypes[] = { U,L,L,S,U,L,L,S,O,D,S,D,D,C,D,D,S,D,D,D,D,0 };
+ char nstmztypes[] = { U,L,L,S,U,L,L,S,O,D,S,D,D,C,D,D,S,U,U,U,S,D,D,D,D,0 };
  
  isdate(date)
  	char date[];
  {
  
+ 	if (cmatch(date, nsctypes))
+ 		return (1);
+ 	if (cmatch(date, nstmztypes))
+ 		return (1);
  	if (cmatch(date, ctypes))
  		return (1);
  	return (cmatch(date, tmztypes));