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
Last modified: 1981-07-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 710
Valid CSS Valid XHTML 1.0 Strict