mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
See ChangeLog: Tue Aug 31 17:20:44 CEST 1999 Werner Koch
This commit is contained in:
parent
c2c397bedf
commit
88a916cdd4
27 changed files with 365 additions and 160 deletions
23
util/ttyio.c
23
util/ttyio.c
|
@ -235,6 +235,29 @@ tty_print_string( byte *p, size_t n )
|
|||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
tty_print_utf8_string( byte *p, size_t n )
|
||||
{
|
||||
size_t i;
|
||||
char *buf;
|
||||
|
||||
if (no_terminal)
|
||||
return;
|
||||
|
||||
/* we can handle plain ascii simpler, so check for it first */
|
||||
for(i=0; i < n; i++ ) {
|
||||
if( p[i] & 0x80 )
|
||||
break;
|
||||
}
|
||||
if( i < n ) {
|
||||
buf = utf8_to_native( p, n );
|
||||
tty_printf("%s", buf );
|
||||
m_free( buf );
|
||||
}
|
||||
else
|
||||
tty_print_string( p, n );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue