diff options
author | scuri <scuri> | 2010-12-06 19:24:50 +0000 |
---|---|---|
committer | scuri <scuri> | 2010-12-06 19:24:50 +0000 |
commit | 5ea68c05f28050068fec17d82be7ebca97feeba7 (patch) | |
tree | 77fab9a36212409ca9045eae9f00906df2dee38e /src/cd_util.c | |
parent | 38c6855890e912c9ff9ba64db53295df96d8f345 (diff) |
*** empty log message ***
Diffstat (limited to 'src/cd_util.c')
-rw-r--r-- | src/cd_util.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cd_util.c b/src/cd_util.c index 20e9a46..e58900a 100644 --- a/src/cd_util.c +++ b/src/cd_util.c @@ -493,3 +493,17 @@ int cdGetFontFileName(const char* font, char* filename) return 1; } + +int cdStrTmpFileName(char* filename) +{ +#ifdef WIN32 + char tmpPath[10240]; + if (GetTempPath(10240, tmpPath)==0) + return 0; + if (GetTempFileName(tmpPath, "~cd", 0, filename)==0) + return 0; + return 1; +#else + return tmpnam(filename)!=NULL; +#endif +} |