1: /* @(#)mktemp.c 2.1 SCCS id keyword */
2: char *
3: mktemp(as)
4: char *as;
5: {
6: register char *s;
7: register unsigned pid;
8: register i;
9:
10: pid = getpid();
11: s = as;
12: while (*s++)
13: ;
14: s--;
15: while (*--s == 'X') {
16: *s = (pid%10) + '0';
17: pid /= 10;
18: }
19: s++;
20: i = 'a';
21: while (access(as, 0) != -1) {
22: if (i=='z')
23: return("/");
24: *s = i++;
25: }
26: return(as);
27: }
Defined functions
mktemp
defined in line
2; used 61 times
- in /usr/src/cmd/512dumpdir.c line
99
- in /usr/src/cmd/512restor.c line
139
- in /usr/src/cmd/ar.c line
50,
250,
318,
596
- in /usr/src/cmd/arcv.c line
21,
34
- in /usr/src/cmd/cc.c line
224
- in /usr/src/cmd/diff/diff.h line
83
- in /usr/src/cmd/diff/diffreg.c line
167
- in /usr/src/cmd/dumpdir.c line
61
- in /usr/src/cmd/ed.c line
96,
146
- in /usr/src/cmd/ld.c line
872
- in /usr/src/cmd/m4/m4.c line
104,
197,
666
- in /usr/src/cmd/mail.c line
63
- in /usr/src/cmd/pcc/code.c line
251
- in /usr/src/cmd/ptx.c line
34,
218
- in /usr/src/cmd/restor.c line
111
- in /usr/src/cmd/strip.c line
8,
36
- in /usr/src/cmd/tar.c line
19,
115,
660
- in /usr/src/cmd/troff/n1.c line
325,
331
- in /usr/src/lib/libI77/endfile.c line
53
- in /usr/src/lib/libI77/old_io.c line
281,
452
- in /usr/src/lib/libI77/open.c line
38
- in /usr/src/local/sroff/s1.c line
290-293(2)
- in /usr/src/ucb/Mail/fio.c line
327
- in /usr/src/ucb/Mail/lock.c line
45
- in /usr/src/ucb/berknet/net.c line
162
- in /usr/src/ucb/berknet/netdaemon.c line
78,
425
- in /usr/src/ucb/berknet/v6mail.c line
169-170(2),
669
- in /usr/src/ucb/delivermail/main.c line
505
- in /usr/src/ucb/delivermail/maketemp.c line
62
- in /usr/src/ucb/delivermail/v6-mail.c line
53-54(2),
454
- in /usr/src/ucb/delivermail/vax-mail.c line
80,
737
- in /usr/src/ucb/error/errortouch.c line
494
- in /usr/src/ucb/msgs/msgs.c line
698
- in /usr/src/ucb/pascal/pi/pix.c line
36
- in /usr/src/ucb/pascal/utilities/pix.c line
36
- in /usr/src/ucb/pwhash/src/cmd/chsh.c line
98
- in /usr/src/ucb/pwhash/src/cmd/passwd.c line
152
- in /usr/src/ucb/pwhash/src/libpasswd/pwlock.c line
9,
17
- in /usr/src/ucb/xstr.c line
20,
67