Utah Raster Toolkit  9999-git
URT Development version (post-3.1b)
Functions
mktemp.c File Reference
#include <string.h>
Include dependency graph for mktemp.c:

Go to the source code of this file.

Functions

char * mktemp (char *buf)
 

Function Documentation

char* mktemp ( char *  buf)

Definition at line 7 of file mktemp.c.

Referenced by main().

8 {
9  long pid = (long)FindTask(0L);
10  char *c;
11 
12  c = buf + strlen(buf);
13 
14  while (*--c == 'X') {
15  *c = pid % 10 + '0';
16  pid /= 10;
17  }
18  c++;
19  if (*c) {
20  for(*c='A'; *c <= 'Z'; (*c)++) {
21  if (access(buf, 0)) {
22  return buf;
23  }
24  }
25  *c = 0;
26  return buf;
27  }else{
28  return buf;
29  }
30 }
static char buf[4096 +1]
Definition: into.c:46

Here is the caller graph for this function: