mirror of
https://github.com/ioquake/jedi-academy.git
synced 2024-11-10 07:11:44 +00:00
directly use time_t in botlib
This commit is contained in:
parent
1660a3ca25
commit
ce76dab7de
1 changed files with 3 additions and 3 deletions
|
@ -706,7 +706,7 @@ int PC_ExpandBuiltinDefine(source_t *source, token_t *deftoken, define_t *define
|
|||
token_t **firsttoken, token_t **lasttoken)
|
||||
{
|
||||
token_t *token;
|
||||
unsigned long t; // time_t t; //to prevent LCC warning
|
||||
time_t t;
|
||||
char *curtime;
|
||||
|
||||
token = PC_CopyToken(deftoken);
|
||||
|
@ -737,7 +737,7 @@ int PC_ExpandBuiltinDefine(source_t *source, token_t *deftoken, define_t *define
|
|||
case BUILTIN_DATE:
|
||||
{
|
||||
t = time(NULL);
|
||||
curtime = ctime((const long *)&t);
|
||||
curtime = ctime(&t);
|
||||
strcpy(token->string, "\"");
|
||||
strncat(token->string, curtime+4, 7);
|
||||
strncat(token->string+7, curtime+20, 4);
|
||||
|
@ -752,7 +752,7 @@ int PC_ExpandBuiltinDefine(source_t *source, token_t *deftoken, define_t *define
|
|||
case BUILTIN_TIME:
|
||||
{
|
||||
t = time(NULL);
|
||||
curtime = ctime((const long *)&t);
|
||||
curtime = ctime(&t);
|
||||
strcpy(token->string, "\"");
|
||||
strncat(token->string, curtime+11, 8);
|
||||
strcat(token->string, "\"");
|
||||
|
|
Loading…
Reference in a new issue