From 511a83e5060686651fa4ea233d3ddfa778577023 Mon Sep 17 00:00:00 2001 From: Edward Emelianov Date: Tue, 8 Nov 2022 22:39:07 +0300 Subject: [PATCH] fixed bug in term.c with c_iflag --- TODO | 1 + term.c | 1 + usefull_macros.h | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/TODO b/TODO index f11464f..0fdfeb5 100644 --- a/TODO +++ b/TODO @@ -1 +1,2 @@ +BUG in commandline options: '?' don't work! Add prefixes sl_ to every function for solving further problems diff --git a/term.c b/term.c index f403f2c..f0adda3 100644 --- a/term.c +++ b/term.c @@ -112,6 +112,7 @@ static int tty_init(TTY_descr *descr){ } descr->tty = descr->oldtty; descr->tty.c_lflag = 0; // ~(ICANON | ECHO | ECHOE | ISIG) + descr->tty.c_iflag = 0; descr->tty.c_oflag = 0; descr->tty.c_cflag = descr->baudrate|CS8|CREAD|CLOCAL; // 9.6k, 8N1, RW, ignore line ctrl descr->tty.c_cc[VMIN] = 0; // non-canonical mode diff --git a/usefull_macros.h b/usefull_macros.h index 06ebf4e..8df2d8f 100644 --- a/usefull_macros.h +++ b/usefull_macros.h @@ -298,6 +298,10 @@ extern const char *__progname; void showhelp(int oindex, myoption *options); void parseargs(int *argc, char ***argv, myoption *options); +/** + * @brief change_helpstring - change standard help header + * @param str (i) - new format (MAY consist ONE "%s" for progname) + */ void change_helpstring(char *s); bool get_suboption(char *str, mysuboption *opt);