mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
added some stuff for signing keys
This commit is contained in:
parent
68ea0f4353
commit
15426c6d96
27 changed files with 750 additions and 267 deletions
22
util/ttyio.c
22
util/ttyio.c
|
@ -60,6 +60,28 @@ tty_printf( const char *fmt, ... )
|
|||
}
|
||||
|
||||
|
||||
/****************
|
||||
* Print a string, but filter all control characters out.
|
||||
*/
|
||||
void
|
||||
tty_print_string( byte *p, size_t n )
|
||||
{
|
||||
for( ; n; n--, p++ )
|
||||
if( iscntrl( *p ) ) {
|
||||
putc('\\', stderr);
|
||||
if( *p == '\n' )
|
||||
putc('n', stderr);
|
||||
else if( !*p )
|
||||
putc('0', stderr);
|
||||
else
|
||||
fprintf(stderr, "x%02x", *p );
|
||||
}
|
||||
else
|
||||
putc(*p, stderr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
char *
|
||||
tty_get( const char *prompt )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue