WIN32 only:
Change use_print_config (printcfg) default to be yes. Create the 'lockfile.dat' in the users local temporary directory, usually: 'C:\Documents and Settings\<USER NAME>\Local Settings\Temp\'. This allows the use of a shared 'savedir' without messing up the lockfile.
This commit is contained in:
parent
c43e81eb48
commit
a85bc639be
3 changed files with 36 additions and 1 deletions
|
|
@ -576,3 +576,29 @@ char *GetSystemFontDir(void)
|
|||
}
|
||||
return strdup("C:\\WINDOWS\\FONTS");
|
||||
}
|
||||
|
||||
/*
|
||||
Returns heap string containing user temp directory.
|
||||
E.g. C:\Documents and Settings\jfp\Local Settings\Temp
|
||||
*/
|
||||
static char *GetUserTempDir(void)
|
||||
{
|
||||
char *temp = getenv("TEMP");
|
||||
|
||||
if (!temp)
|
||||
{
|
||||
temp = "userdata";
|
||||
}
|
||||
return strdup(temp);
|
||||
}
|
||||
|
||||
char *get_temp_fname(const char *const name)
|
||||
{
|
||||
char f[512];
|
||||
char *tempdir = GetUserTempDir();
|
||||
|
||||
snprintf(f, sizeof(f), "%s/%s", tempdir, name);
|
||||
free(tempdir);
|
||||
return strdup(f);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue