Annotation of 3BSD/cmd/sdb/mktemp.c, revision 1.1.1.1

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: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.