21 #include "gis_local_proto.h" 24 static int initialized;
87 sprintf(name,
"%d.%d", pid, uniq);
90 while (access(path, F_OK) == 0);
92 G_debug(2,
"G_tempfile_pid(): %s", path);
117 strcpy(element,
".tmp");
119 if (machine !=
NULL && *machine != 0) {
120 strcat(element,
"/");
121 strcat(element, machine);
129 G_debug(2,
"G__temp_element(): %s (tmp=%d)", element, tmp);
char * G_file_name(char *, const char *, const char *, const char *)
Builds full path names to GIS data files.
char * G_tempfile_pid(int pid)
Create tempfile from process id.
void G_temp_element(char *element)
Populates element with a path string.
char * G_tempfile(void)
Returns a temporary file name.
int G_counter_next(struct Counter *)
int G_make_mapset_element_tmp(const char *)
Create element in the temporary directory.
void G_initialize_done(int *)
void G__temp_element(char *element, int tmp)
Populates element with a path string (internal use only!)
const char * G__machine_name(void)
void G_init_counter(struct Counter *, int)
void G_init_tempfile(void)
Initialize environment for creating tempfiles.
int G_is_initialized(int *)
const char * G_mapset(void)
Get current mapset name.
int G_make_mapset_element(const char *)
Create element in the current mapset.
char * G_store(const char *)
Copy string to allocated memory.
int G_debug(int, const char *,...) __attribute__((format(printf