mirror of
https://github.com/CPunch/Cosmo.git
synced 2024-11-22 15:30:06 +00:00
fixed formatting
This commit is contained in:
parent
10c9f92a06
commit
861607d6a8
25
src/_time.h
25
src/_time.h
@ -3,14 +3,14 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#include <windows.h>
|
||||
#include <time.h>
|
||||
# include <time.h>
|
||||
# include <windows.h>
|
||||
|
||||
#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)
|
||||
#define DELTA_EPOCH_IN_MICROSECS 116444736000000000Ui64
|
||||
#else
|
||||
#define DELTA_EPOCH_IN_MICROSECS 116444736000000000ULL
|
||||
#endif
|
||||
# if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)
|
||||
# define DELTA_EPOCH_IN_MICROSECS 116444736000000000Ui64
|
||||
# else
|
||||
# define DELTA_EPOCH_IN_MICROSECS 116444736000000000ULL
|
||||
# endif
|
||||
|
||||
struct timezone
|
||||
{
|
||||
@ -24,8 +24,7 @@ int gettimeofday(struct timeval *tv, struct timezone *tz)
|
||||
unsigned __int64 tmpres = 0;
|
||||
static int tzflag;
|
||||
|
||||
if (NULL != tv)
|
||||
{
|
||||
if (NULL != tv) {
|
||||
GetSystemTimeAsFileTime(&ft);
|
||||
|
||||
tmpres |= ft.dwHighDateTime;
|
||||
@ -39,10 +38,8 @@ int gettimeofday(struct timeval *tv, struct timezone *tz)
|
||||
tv->tv_usec = (long)(tmpres % 1000000UL);
|
||||
}
|
||||
|
||||
if (NULL != tz)
|
||||
{
|
||||
if (!tzflag)
|
||||
{
|
||||
if (NULL != tz) {
|
||||
if (!tzflag) {
|
||||
_tzset();
|
||||
tzflag++;
|
||||
}
|
||||
@ -53,7 +50,7 @@ int gettimeofday(struct timeval *tv, struct timezone *tz)
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,13 +1,13 @@
|
||||
#include "cbaselib.h"
|
||||
|
||||
#include "_time.h"
|
||||
#include "cdebug.h"
|
||||
#include "cmem.h"
|
||||
#include "cobj.h"
|
||||
#include "cvalue.h"
|
||||
#include "cdebug.h"
|
||||
#include "cvm.h"
|
||||
|
||||
#include <math.h>
|
||||
#include "_time.h"
|
||||
|
||||
// ================================================================ [BASELIB]
|
||||
|
||||
@ -891,7 +891,8 @@ int cosmoB_vdisassemble(CState *state, int nargs, CValue *args)
|
||||
closure = cosmoV_readClosure(args[0]);
|
||||
|
||||
// print the disasembly
|
||||
disasmChunk(&closure->function->chunk, closure->function->name ? closure->function->name->str : UNNAMEDCHUNK, 0);
|
||||
disasmChunk(&closure->function->chunk,
|
||||
closure->function->name ? closure->function->name->str : UNNAMEDCHUNK, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -42,9 +42,9 @@ COSMO_API bool cosmoV_undump(CState *state, cosmo_Reader reader, const void *ud)
|
||||
return false;
|
||||
};
|
||||
|
||||
#ifdef VM_DEBUG
|
||||
// #ifdef VM_DEBUG
|
||||
disasmChunk(&func->chunk, func->name ? func->name->str : UNNAMEDCHUNK, 0);
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
// push function onto the stack so it doesn't it cleaned up by the GC, at the same stack
|
||||
// location put our closure
|
||||
|
Loading…
Reference in New Issue
Block a user