1: #if defined(LIBC_SCCS) && !defined(lint)
2: static char sccsid[] = "@(#)mktemp.c 5.2 (Berkeley) 3/9/86";
3: #endif LIBC_SCCS and not lint
4:
5: char *
6: mktemp(as)
7: char *as;
8: {
9: register char *s;
10: register unsigned pid;
11: register i;
12:
13: pid = getpid();
14: s = as;
15: while (*s++)
16: ;
17: s--;
18: while (*--s == 'X') {
19: *s = (pid%10) + '0';
20: pid /= 10;
21: }
22: s++;
23: i = 'a';
24: while (access(as, 0) != -1) {
25: if (i=='z')
26: return("/");
27: *s = i++;
28: }
29: return(as);
30: }
Defined functions
mktemp
defined in line
5; used 172 times
- in /usr/src/bin/ar.c line
80,
287,
355,
655
- in /usr/src/bin/diff/diff.h line
82
- in /usr/src/bin/diff/diffreg.c line
275
- in /usr/src/bin/ed.c line
101,
151
- in /usr/src/bin/tar.c line
109,
158
- in /usr/src/etc/dump/dumptape.c line
340
- in /usr/src/etc/edquota.c line
49
- in /usr/src/etc/restore/restore.h line
120
- in /usr/src/new/X/uwm/uwm.c line
570,
578
- in /usr/src/new/X/ximpv/impv.c line
292
- in /usr/src/new/ansi/vmsprep.c line
43
- in /usr/src/new/bib/src/bib.c line
79,
85
- in /usr/src/new/bib/src/invert.c line
57
- in /usr/src/new/bib/src/listrefs.c line
58
- in /usr/src/new/dipress/src/bin/maha/maha.c line
291
- in /usr/src/new/emacs/etc/movemail.c line
72
- in /usr/src/new/emacs/man/texindex.c line
141,
174
- in /usr/src/new/emacs/src/callproc.c line
275
- in /usr/src/new/emacs/src/fileio.c line
119
- in /usr/src/new/jove/io.c line
658
- in /usr/src/new/jove/jove.h line
505
- in /usr/src/new/jove/proc.c line
573
- in /usr/src/new/jove/rec.c line
28
- in /usr/src/new/mh/conf/config/mts.c line
43
- in /usr/src/new/mh/h/strings.h line
12
- in /usr/src/new/mh/miscellany/patch/patch.c line
187
- in /usr/src/new/mh/sbr/m_scratch.c line
16
- in /usr/src/new/mh/sbr/m_tmpfil.c line
13
- in /usr/src/new/mh/support/bboards/bbexp.c line
97
- in /usr/src/new/mh/support/bboards/mmdfI/bboards/bb_wtmail.c line
556
- in /usr/src/new/mh/support/bboards/mmdfII/bboards/bb_wtmail.c line
696
- in /usr/src/new/mh/support/bboards/mmdfII/bboards/lock.c line
152
- in /usr/src/new/mh/support/bboards/mmdfII/bboards/strings.h line
12
- in /usr/src/new/mh/support/pop/mmdfII/pop/lock.c line
152
- in /usr/src/new/mh/support/pop/mmdfII/pop/po_wtmail.c line
696
- in /usr/src/new/mh/support/pop/mmdfII/pop/strings.h line
12
- in /usr/src/new/mh/uip/mshcmds.c line
950
- in /usr/src/new/mh/uip/rcvtty.c line
126
- in /usr/src/new/mh/uip/rmail.c line
101-110(3),
249,
276,
483,
526,
566,
591
- in /usr/src/new/mh/uip/spost.c line
346,
715
- in /usr/src/new/mh/zotnet/mf/mmdfI/src/uucp/qu2uu_send.c line
257
- in /usr/src/new/mh/zotnet/mf/mmdfI/src/uucp/rmail.c line
123,
133,
142,
647,
672
- in /usr/src/new/mh/zotnet/mf/mmuu.c line
144,
202
- in /usr/src/new/mh/zotnet/mf/muinc.c line
149
- in /usr/src/new/mh/zotnet/mf/uminc.c line
191
- in /usr/src/new/mh/zotnet/mf/uumm.c line
149
- in /usr/src/new/mh/zotnet/mts/lock.c line
152
- in /usr/src/new/mh/zotnet/mts/mts.c line
43
- in /usr/src/new/mkmf/src/editmf.c line
38,
56
- in /usr/src/new/news/src/control.c line
599
- in /usr/src/new/news/src/ifuncs.c line
347,
639,
996
- in /usr/src/new/news/src/inews.c line
593,
701
- in /usr/src/new/news/src/params.h line
87
- in /usr/src/new/news/src/postnews.c line
438,
905,
1118-1119(2)
- in /usr/src/new/news/src/readr.c line
119,
760
- in /usr/src/new/news/src/recmail.c line
48-53(3)
- in /usr/src/new/news/src/rfuncs.c line
250,
311,
611
- in /usr/src/new/news/src/rfuncs2.c line
348
- in /usr/src/new/news/src/unbatch.c line
41-44(2)
- in /usr/src/new/news/src/visual.c line
192,
931,
2456
- in /usr/src/new/nntp/server/common.h line
40
- in /usr/src/new/nntp/server/misc.c line
425
- in /usr/src/new/patch/patch.c line
189
- in /usr/src/new/rcs/src/rcsfnms.c line
71,
242
- in /usr/src/new/rcs/src/rcsgen.c line
49
- in /usr/src/new/spms/src/bin/rmproject/savepld.c line
41-46(2)
- in /usr/src/new/tac/tac.c line
44,
115
- in /usr/src/new/xns/examples/filing/cmds.c line
384
- in /usr/src/old/512restor.c line
135
- in /usr/src/old/arcv.c line
21,
31-35(2)
- in /usr/src/old/berknet/net.c line
216
- in /usr/src/old/berknet/netdaemon.c line
93,
482
- in /usr/src/old/berknet/v6mail.c line
187-188(2),
728
- in /usr/src/old/vpr/vpd.c line
103
- in /usr/src/ucb/Mail/fio.c line
278
- in /usr/src/ucb/dbx/main.c line
205-207(2)
- in /usr/src/ucb/dbx/makedefs.c line
52,
78
- in /usr/src/ucb/error/errortouch.c line
505
- in /usr/src/ucb/ftp/cmds.c line
606
- in /usr/src/ucb/ftp/ftp_var.h line
99
- in /usr/src/ucb/msgs/msgs.c line
720
- in /usr/src/ucb/pascal/pdx/command/remake.c line
37
- in /usr/src/ucb/pascal/pdx/defs.h line
48
- in /usr/src/ucb/pascal/pdx/library.c line
40
- in /usr/src/ucb/pascal/src/savenl.c line
80-83(4)
- in /usr/src/ucb/pascal/utilities/pc.c line
37,
265-267(2)
- in /usr/src/ucb/pascal/utilities/pix.c line
56
- in /usr/src/ucb/pascal/utilities/pmerge.c line
41,
82-88(7)
- in /usr/src/ucb/rdist/main.c line
155
- in /usr/src/ucb/sccs.c line
1151
- in /usr/src/ucb/sendbug/bugfiler.c line
226,
608,
740
- in /usr/src/ucb/xstr.c line
34,
81
- in /usr/src/undoc/v6mail.c line
16,
47-48(2),
420
- in /usr/src/usr.bin/ar11.c line
72,
263,
302,
551
- in /usr/src/usr.bin/m4/m4.c line
111,
204,
687
- in /usr/src/usr.bin/ptx.c line
35,
219
- in /usr/src/usr.bin/refer/sortbib.c line
21,
45
- in /usr/src/usr.bin/troff/n1.c line
343,
349
- in /usr/src/usr.lib/libI77/open.c line
49
Defined variables
sccsid
defined in line
2;
never used