home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Distributions / ucb / 2bsd.tar.gz / 2bsd.tar / upgrade / src / from.c next >
C/C++ Source or Header  |  1979-04-19  |  328b  |  17 lines

  1. #include <retrofit.h>
  2. #include <stdio.h>
  3.  
  4. main()
  5. {
  6.     char lbuf[BUFSIZ];
  7.  
  8.     if (chdir(getenv("HOME")) < 0)
  9.         exit(1);
  10.     if (freopen(".mail", "r", stdin) == NULL)
  11.         exit(0);
  12.     while(fgets(lbuf, sizeof lbuf, stdin) != NULL)
  13.         if (lbuf[0] == 'F' && lbuf[1] == 'r' && lbuf[2] == 'o' && lbuf[3] == 'm')
  14.             printf("%s", lbuf);
  15.     exit(0);
  16. }
  17.