geadline2 #5

Merged
starnakin merged 3 commits from kdx/IronGOLEM:master into master 2023-07-25 03:53:39 -04:00
Showing only changes of commit a432fd32c5 - Show all commits

View File

@ -12,7 +12,7 @@ geadline(prompt) {
[buf] = 0; [buf] = 0;
loop { loop {
red &c; c = getchar();
if ((c == 0xffff) | (c == 0x04)) { if ((c == 0xffff) | (c == 0x04)) {
if ((size == 0) | (c == 0xffff)) { if ((size == 0) | (c == 0xffff)) {
free(buf); free(buf);
@ -20,8 +20,8 @@ geadline(prompt) {
} }
} else if (c == 0x1b) { } else if (c == 0x1b) {
// ESC code // ESC code
red &c; // skip [ getchar(); // skip [
red &c; // value c = getchar(); // value
if ((c == 'A') & (size > 0)) { if ((c == 'A') & (size > 0)) {
loop { loop {