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:
John Popplewell 2007-04-28 02:52:11 +00:00
parent c43e81eb48
commit a85bc639be
3 changed files with 36 additions and 1 deletions

View file

@ -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);
}