nice filenames for server-stored demos
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3997 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -40,6 +40,16 @@ char *getregszvalue(HKEY root, const char *keystr, const char *query)
|
||||
}
|
||||
#endif
|
||||
|
||||
const char *filenametime()
|
||||
{
|
||||
static string asciitime;
|
||||
time_t t = time(NULL);
|
||||
struct tm * timeinfo;
|
||||
timeinfo = gmtime (&t);
|
||||
strftime(asciitime, sizeof(string) - 1, "%Y%m%d_%H.%M.%S", timeinfo);
|
||||
return asciitime;
|
||||
}
|
||||
|
||||
char *path(char *s)
|
||||
{
|
||||
for(char *t = s; (t = strpbrk(t, "/\\")); *t++ = PATHDIV);
|
||||
|
||||
Reference in New Issue
Block a user