added version number, fixed issue with CR/LF in main loop (curses interprets ENTER as LF not CR)

This commit is contained in:
Hugh Barney 2017-03-25 21:47:17 +00:00
parent 53cf262b91
commit 16aaf4d44b
1 changed files with 2 additions and 2 deletions

4
zep.c
View File

@ -97,7 +97,7 @@ void fatal(char *msg)
refresh(); refresh();
endwin(); endwin();
noraw(); noraw();
printf("\nzep: %s\n", msg); printf("\nzep v1.1: %s\n", msg);
exit(1); exit(1);
} }
@ -739,7 +739,7 @@ int main(int argc, char **argv)
(key_return->func)(); (key_return->func)();
} else { } else {
/* allow TAB and NEWLINE, any other control char is 'Not Bound' */ /* allow TAB and NEWLINE, any other control char is 'Not Bound' */
if (*input > 31 || *input == 13 || *input == 9) if (*input > 31 || *input == 10 || *input == 9)
insert(); insert();
else { else {
fflush(stdin); fflush(stdin);