mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-02-09 04:30:37 +00:00
Replace gets() with fgets()
This commit is contained in:
parent
abb89438ef
commit
49188358af
@ -502,7 +502,7 @@ void call(uword pc)
|
|||||||
case 8: // LIBRARY STDLIB::GETS
|
case 8: // LIBRARY STDLIB::GETS
|
||||||
c = POP;
|
c = POP;
|
||||||
putchar(c);
|
putchar(c);
|
||||||
gets(sz);
|
fgets(sz, 63, stdin);
|
||||||
for (i = 0; sz[i]; i++)
|
for (i = 0; sz[i]; i++)
|
||||||
mem_data[0x200 + i] = sz[i];
|
mem_data[0x200 + i] = sz[i];
|
||||||
mem_data[0x200 + i] = 0;
|
mem_data[0x200 + i] = 0;
|
||||||
@ -561,7 +561,7 @@ void interp(code *ip)
|
|||||||
while (dsp >= esp)
|
while (dsp >= esp)
|
||||||
printf("$%04X ", (*dsp--) & 0xFFFF);
|
printf("$%04X ", (*dsp--) & 0xFFFF);
|
||||||
printf("]\n");
|
printf("]\n");
|
||||||
gets(cmdline);
|
fgets(cmdline, 15, stdin);
|
||||||
}
|
}
|
||||||
previp = ip;
|
previp = ip;
|
||||||
switch (*ip++)
|
switch (*ip++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user