diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-12-05 13:46:41 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-12-05 13:46:41 +0100 |
commit | dd2c176e769c4763db2e2432aabf8b433b89f138 (patch) | |
tree | 3ab8293d32b282a9b5b8154f45fe33d7baf1cbba /src/echoes.c | |
parent | read input from passcheck (diff) | |
download | libpassphrase-dd2c176e769c4763db2e2432aabf8b433b89f138.tar.gz libpassphrase-dd2c176e769c4763db2e2432aabf8b433b89f138.tar.bz2 libpassphrase-dd2c176e769c4763db2e2432aabf8b433b89f138.tar.xz |
issue #2 on github solved, but not yet perfect
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/echoes.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/echoes.c b/src/echoes.c index e1a0e63..e0a18f4 100644 --- a/src/echoes.c +++ b/src/echoes.c @@ -58,19 +58,19 @@ void passphrase_reenable_echo(void) */ void passphrase_disable_echo1(int fdin) { -#if !defined(PASSPHRASE_ECHO) || defined(PASSPHRASE_MOVE) +#if !defined(PASSPHRASE_ECHO) || defined(PASSPHRASE_MOVE) || defined(PASSPHRASE_METER) struct termios stty; tcgetattr(fdin, &stty); saved_stty = stty; stty.c_lflag &= (tcflag_t)~ECHO; -# if defined(PASSPHRASE_STAR) || defined(PASSPHRASE_TEXT) || defined(PASSPHRASE_MOVE) +# if defined(PASSPHRASE_STAR) || defined(PASSPHRASE_TEXT) || defined(PASSPHRASE_MOVE) || defined(PASSPHRASE_METER) stty.c_lflag &= (tcflag_t)~ICANON; -# endif /* PASSPHRASE_STAR || PASSPHRASE_TEXT || PASSPHRASE_MOVE */ +# endif /* PASSPHRASE_STAR || PASSPHRASE_TEXT || PASSPHRASE_MOVE || PASSPHRASE_METER */ tcsetattr(fdin, TCSAFLUSH, &stty); -#else /* !PASSPHRASE_ECHO || PASSPHRASE_MOVE */ +#else /* !PASSPHRASE_ECHO || PASSPHRASE_MOVE || PASSPHRASE_METER */ (void) fdin; -#endif /* !PASSPHRASE_ECHO || PASSPHRASE_MOVE */ +#endif /* !PASSPHRASE_ECHO || PASSPHRASE_MOVE || PASSPHRASE_METER */ } @@ -81,10 +81,10 @@ void passphrase_disable_echo1(int fdin) */ void passphrase_reenable_echo1(int fdin) { -#if !defined(PASSPHRASE_ECHO) || defined(PASSPHRASE_MOVE) +#if !defined(PASSPHRASE_ECHO) || defined(PASSPHRASE_MOVE) || defined(PASSPHRASE_METER) tcsetattr(fdin, TCSAFLUSH, &saved_stty); -#else /* !PASSPHRASE_ECHO || !PASSPHRASE_MOVE */ +#else /* !PASSPHRASE_ECHO || !PASSPHRASE_MOVE || PASSPHRASE_METER */ (void) fdin; -#endif /* !PASSPHRASE_ECHO || !PASSPHRASE_MOVE */ +#endif /* !PASSPHRASE_ECHO || !PASSPHRASE_MOVE || PASSPHRASE_METER */ } |