1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

* tdbio.c (open_db): Check for EROFS. Suggested by Bryce Nichols.

* ttyio.c (do_get): Move printing of the prompt after disabling
echo.  Suggested by Scott Worley.
This commit is contained in:
Werner Koch 2005-07-18 17:58:25 +00:00
parent 8238e7698b
commit 6dc5a11997
6 changed files with 26 additions and 10 deletions

View file

@ -1,3 +1,8 @@
2005-07-18 Werner Koch <wk@g10code.com>
* ttyio.c (do_get): Move printing of the prompt after disabling
echo. Suggested by Scott Worley.
2005-06-23 David Shaw <dshaw@jabberwocky.com>
* http.c (make_radix64_string): Add '=' padding as per standard.

View file

@ -397,7 +397,6 @@ do_get( const char *prompt, int hidden )
init_ttyfp();
last_prompt_len = 0;
tty_printf( "%s", prompt );
buf = m_alloc(n=50);
i = 0;
@ -405,6 +404,8 @@ do_get( const char *prompt, int hidden )
if( hidden )
SetConsoleMode(con.in, HID_INPMODE );
tty_printf( "%s", prompt );
for(;;) {
DWORD nread;
@ -436,6 +437,7 @@ do_get( const char *prompt, int hidden )
SetConsoleMode(con.in, DEF_INPMODE );
#elif defined(__riscos__)
tty_printf( "%s", prompt );
do {
c = riscos_getchar();
if (c == 0xa || c == 0xd) { /* Return || Enter */
@ -490,6 +492,8 @@ do_get( const char *prompt, int hidden )
#endif
}
tty_printf( "%s", prompt );
/* fixme: How can we avoid that the \n is echoed w/o disabling
* canonical mode - w/o this kill_prompt can't work */
while( read(fileno(ttyfp), cbuf, 1) == 1 && *cbuf != '\n' ) {
@ -503,6 +507,11 @@ do_get( const char *prompt, int hidden )
else if( c > 0xa0 )
; /* we don't allow 0xa0, as this is a protected blank which may
* confuse the user */
/* Fixme: The above assumption is not bad. We assum a certain
character set and even worse, the W32 version behaves
differently. It is not clear how we can hix this. When
used for passphrases this code path strips off certain
characters so changing this might invalidate passphrases. */
else if( iscntrl(c) )
continue;
if( !(i < n-1) ) {