Commit | Line | Data |
---|---|---|
0f5e4452 KS |
1 | /* Copyright (c) 1979 Regents of the University of California */ |
2 | # | |
3 | ||
4 | #include "rcv.h" | |
5 | ||
6 | /* | |
7 | * Mail -- a mail program | |
8 | * | |
9 | * Give names to all the temporary files that we will need. | |
10 | */ | |
11 | ||
12 | char tempMail[14]; | |
13 | char tempQuit[14]; | |
14 | char tempEdit[14]; | |
15 | char tempSet[14]; | |
16 | char tempResid[14]; | |
17 | char tempMesg[14]; | |
18 | ||
19 | tinit() | |
20 | { | |
21 | register char *cp, *cp2; | |
22 | char uname[9]; | |
23 | ||
24 | copy("/tmp/RsXXXXX", tempMail); | |
25 | copy("/tmp/RqXXXXX", tempResid); | |
26 | copy("/tmp/RmXXXXX", tempQuit); | |
27 | copy("/tmp/ReXXXXX", tempEdit); | |
28 | copy("/tmp/RxXXXXX", tempSet); | |
29 | copy("/tmp/RxXXXXX", tempMesg); | |
30 | mktemp(tempMail); | |
31 | mktemp(tempResid); | |
32 | mktemp(tempQuit); | |
33 | mktemp(tempEdit); | |
34 | mktemp(tempSet); | |
35 | mktemp(tempMesg); | |
36 | ||
37 | uid = getuid() & UIDMASK; | |
38 | if (getname(uid, uname) < 0) { | |
39 | printf("Who are you!?\n"); | |
40 | exit(1); | |
41 | } | |
42 | copy(uname, myname); | |
43 | mailname = mailspace; | |
44 | cp = value("HOME"); | |
45 | if (cp == NOSTR) | |
46 | cp = "."; | |
47 | copy(cp, homedir); | |
48 | findmail(); | |
49 | cp = copy(homedir, mbox); | |
50 | copy("/mbox", cp); | |
51 | cp = copy(homedir, mailrc); | |
52 | copy("/.mailrc", cp); | |
53 | cp = copy(homedir, deadletter); | |
54 | copy("/dead.letter", cp); | |
55 | } |