formatting
This commit is contained in:
parent
b17156c9cc
commit
f9ffd4e6e8
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -7,3 +7,4 @@
|
|||
*.exp
|
||||
picoc
|
||||
build/*
|
||||
archives/
|
||||
|
|
|
@ -65,7 +65,7 @@ void StdStrftime(struct ParseState *Parser, struct Value *ReturnValue, struct Va
|
|||
void StdStrptime(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs)
|
||||
{
|
||||
extern char *strptime(const char *s, const char *format, struct tm *tm);
|
||||
|
||||
|
||||
ReturnValue->Val->Pointer = strptime(Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer);
|
||||
}
|
||||
|
||||
|
@ -89,23 +89,23 @@ typedef int clock_t;\
|
|||
/* all string.h functions */
|
||||
struct LibraryFunction StdTimeFunctions[] =
|
||||
{
|
||||
{ StdAsctime, "char *asctime(struct tm *);" },
|
||||
{ StdClock, "time_t clock();" },
|
||||
{ StdCtime, "char *ctime(int *);" },
|
||||
{StdAsctime, "char *asctime(struct tm *);"},
|
||||
{StdClock, "time_t clock();"},
|
||||
{StdCtime, "char *ctime(int *);"},
|
||||
#ifndef NO_FP
|
||||
{ StdDifftime, "double difftime(int, int);" },
|
||||
{StdDifftime, "double difftime(int, int);"},
|
||||
#endif
|
||||
{ StdGmtime, "struct tm *gmtime(int *);" },
|
||||
{ StdLocaltime, "struct tm *localtime(int *);" },
|
||||
{ StdMktime, "int mktime(struct tm *ptm);" },
|
||||
{ StdTime, "int time(int *);" },
|
||||
{ StdStrftime, "int strftime(char *, int, char *, struct tm *);" },
|
||||
{StdGmtime, "struct tm *gmtime(int *);"},
|
||||
{StdLocaltime, "struct tm *localtime(int *);"},
|
||||
{StdMktime, "int mktime(struct tm *ptm);"},
|
||||
{StdTime, "int time(int *);"},
|
||||
{StdStrftime, "int strftime(char *, int, char *, struct tm *);"},
|
||||
#ifndef WIN32
|
||||
{ StdStrptime, "char *strptime(char *, char *, struct tm *);" },
|
||||
{ StdGmtime_r, "struct tm *gmtime_r(int *, struct tm *);" },
|
||||
{ StdTimegm, "int timegm(struct tm *);" },
|
||||
{StdStrptime, "char *strptime(char *, char *, struct tm *);"},
|
||||
{StdGmtime_r, "struct tm *gmtime_r(int *, struct tm *);"},
|
||||
{StdTimegm, "int timegm(struct tm *);"},
|
||||
#endif
|
||||
{ NULL, NULL }
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
|
||||
|
@ -114,7 +114,7 @@ void StdTimeSetupFunc(Picoc *pc)
|
|||
{
|
||||
/* make a "struct tm" which is the same size as a native tm structure */
|
||||
TypeCreateOpaqueStruct(pc, NULL, TableStrRegister(pc, "tm"), sizeof(struct tm));
|
||||
|
||||
|
||||
/* define CLK_PER_SEC etc. */
|
||||
VariableDefinePlatformVar(pc, NULL, "CLOCKS_PER_SEC", &pc->IntType, (union AnyValue *)&CLOCKS_PER_SECValue, FALSE);
|
||||
#ifdef CLK_PER_SEC
|
||||
|
|
Loading…
Reference in a new issue