Fixed issue with EOF
This commit is contained in:
parent
7bf469dca2
commit
6128c79b18
|
@ -51,7 +51,7 @@ main(int argc, char **argv)
|
||||||
if(i == argc)
|
if(i == argc)
|
||||||
return system_error("usage:", "uxncli [-v] file.rom [args..]");
|
return system_error("usage:", "uxncli [-v] file.rom [args..]");
|
||||||
if(argv[i][0] == '-' && argv[i][1] == 'v')
|
if(argv[i][0] == '-' && argv[i][1] == 'v')
|
||||||
return system_error("Uxncli - Varvara Emulator(CLI)", "4 Jan 2024.");
|
return system_error("Uxncli - Varvara Emulator(CLI)", "13 Jan 2024.");
|
||||||
if(!system_init(&u, (Uint8 *)calloc(0x10000 * RAM_PAGES, sizeof(Uint8)), argv[i++]))
|
if(!system_init(&u, (Uint8 *)calloc(0x10000 * RAM_PAGES, sizeof(Uint8)), argv[i++]))
|
||||||
return system_error("Init", "Failed to initialize uxn.");
|
return system_error("Init", "Failed to initialize uxn.");
|
||||||
/* eval */
|
/* eval */
|
||||||
|
@ -59,7 +59,7 @@ main(int argc, char **argv)
|
||||||
if(uxn_eval(&u, PAGE_PROGRAM)) {
|
if(uxn_eval(&u, PAGE_PROGRAM)) {
|
||||||
console_listen(&u, i, argc, argv);
|
console_listen(&u, i, argc, argv);
|
||||||
while(!u.dev[0x0f]) {
|
while(!u.dev[0x0f]) {
|
||||||
char c = fgetc(stdin);
|
int c = fgetc(stdin);
|
||||||
if(c == EOF) {
|
if(c == EOF) {
|
||||||
console_input(&u, 0x00, CONSOLE_END);
|
console_input(&u, 0x00, CONSOLE_END);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue