document distributed with 4.2BSD
[unix-history] / usr / src / usr.bin / mail / temp.c
index bbba26e..4f9d688 100644 (file)
@@ -1,4 +1,12 @@
-#
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
+#ifndef lint
+static char *sccsid = "@(#)temp.c      5.2 (Berkeley) %G%";
+#endif not lint
 
 #include "rcv.h"
 
 
 #include "rcv.h"
 
@@ -8,8 +16,6 @@
  * Give names to all the temporary files that we will need.
  */
 
  * Give names to all the temporary files that we will need.
  */
 
-static char *SccsId = "@(#)temp.c      1.2 %G%";
-
 char   tempMail[14];
 char   tempQuit[14];
 char   tempEdit[14];
 char   tempMail[14];
 char   tempQuit[14];
 char   tempEdit[14];
@@ -34,23 +40,25 @@ tinit()
 
        if (strlen(myname) != 0) {
                uid = getuserid(myname);
 
        if (strlen(myname) != 0) {
                uid = getuserid(myname);
-               if (uid == -1)
-                       goto youlose;
+               if (uid == -1) {
+                       printf("\"%s\" is not a user of this system\n",
+                           myname);
+                       exit(1);
+               }
        }
        else {
                uid = getuid() & UIDMASK;
                if (username(uid, uname) < 0) {
                        copy("ubluit", myname);
        }
        else {
                uid = getuid() & UIDMASK;
                if (username(uid, uname) < 0) {
                        copy("ubluit", myname);
-youlose:
                        err++;
                        if (rcvmode) {
                                printf("Who are you!?\n");
                                exit(1);
                        }
                }
                        err++;
                        if (rcvmode) {
                                printf("Who are you!?\n");
                                exit(1);
                        }
                }
-               copy(uname, myname);
+               else
+                       copy(uname, myname);
        }
        }
-       mailname = mailspace;
        cp = value("HOME");
        if (cp == NOSTR)
                cp = ".";
        cp = value("HOME");
        if (cp == NOSTR)
                cp = ".";