date and time created 83/10/02 21:41:04 by sam
[unix-history] / usr / src / usr.bin / mail / v7.local.c
index 84b1c6c..c94d5b5 100644 (file)
@@ -1,4 +1,6 @@
-#
+#ifndef lint
+static char sccsid[] = "@(#)v7.local.c 2.3 (Berkeley) %G%";
+#endif
 
 /*
  * Mail -- a mail program
 
 /*
  * Mail -- a mail program
@@ -10,8 +12,6 @@
 
 #include "rcv.h"
 
 
 #include "rcv.h"
 
-static char *SccsId = "@(#)v7.local.c  1.2 %G%";
-
 /*
  * Locate the user's mailbox file (ie, the place where new, unread
  * mail is queued).  In Version 7, it is in /usr/spool/mail/name.
 /*
  * Locate the user's mailbox file (ie, the place where new, unread
  * mail is queued).  In Version 7, it is in /usr/spool/mail/name.
@@ -36,7 +36,12 @@ findmail()
 demail()
 {
 
 demail()
 {
 
-       remove(mailname);
+       if (value("keep") != NOSTR)
+               close(creat(mailname, 0666));
+       else {
+               if (remove(mailname) < 0)
+                       close(creat(mailname, 0666));
+       }
 }
 
 /*
 }
 
 /*