|
|
1.1 root 1: /* make temporary file with given prefix. */
2: char *
3: mktemp(as)
4: char *as;
5: {
6: register char *s;
7: register unsigned pid;
8:
9: pid = getpid();
10: s = as;
11: while (*s++)
12: ;
13: s--;
14: while (*--s == 'X') {
15: *s = (pid%10) + '0';
16: pid /= 10;
17: }
18: s++;
19: *s = 'a';
20: return(as);
21: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.