Improve M$-Windows compatibility
This commit is contained in:
parent
845adb0f58
commit
f47a7c9597
@ -45,7 +45,7 @@ void makeHexDump(bool base_2, uint16_t ram[])
|
|||||||
|
|
||||||
time(&timer);
|
time(&timer);
|
||||||
tm_timer=localtime(&timer);
|
tm_timer=localtime(&timer);
|
||||||
if(strftime(timestamp,sizeof(timestamp),"coredump_%d_%b_%y_%T.toy",tm_timer)==0)
|
if(strftime(timestamp,sizeof(timestamp),"coredump_%d_%b_%y_%H-%M-%S.toy",tm_timer)==0)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"Buffer for system-time fault! hexdump canceled\n");
|
fprintf(stderr,"Buffer for system-time fault! hexdump canceled\n");
|
||||||
return;
|
return;
|
||||||
|
@ -22,8 +22,8 @@ int main(int argc, char *argv[])
|
|||||||
bool run = true; //CPU halt and reset.(Nb: make a coredump beforehand)
|
bool run = true; //CPU halt and reset.(Nb: make a coredump beforehand)
|
||||||
|
|
||||||
printf("\n+++++++++++++++++++++++++++++++++++++++++++++++\n+Boot: "CPU_TYPE
|
printf("\n+++++++++++++++++++++++++++++++++++++++++++++++\n+Boot: "CPU_TYPE
|
||||||
" with %zu x %zu Bit RAM.+\n+++++++++++++++++++++++++++++++++++++++++++++++\n\n"
|
" with %lu x %lu Bit RAM.+\n+++++++++++++++++++++++++++++++++++++++++++++++\n\n"
|
||||||
,(sizeof(ram)/sizeof(ram[0])),sizeof(ram[0])*8);
|
,(unsigned long)(sizeof(ram)/sizeof(ram[0])),(unsigned long)sizeof(ram[0])*8);
|
||||||
|
|
||||||
if(initialise_ram(ram,argc,argv)==-1) return 1; /*load data from command line into RAM
|
if(initialise_ram(ram,argc,argv)==-1) return 1; /*load data from command line into RAM
|
||||||
(-1 in case of error,
|
(-1 in case of error,
|
||||||
|
Loading…
Reference in New Issue
Block a user