/* MKTEMP.C using TMP environment variable */ #include #include #include #include void Mktemp(char *file) { char fname[32], *tmp; tmp = getenv("TMP"); if ( tmp != NULL ) { strcpy(fname, file); strcpy(file, tmp); if ( file[strlen(file) - 1] != '\\' ) strcat(file, "\\"); strcat(file, fname); } mktemp(file); } /* End of MKTEMP.C */