1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-21 01:02:46 +02:00

* keyedit.c (print_and_check_one_sig, keyedit_menu): Use the COLUMNS

environment variable (if any) to hint how wide the terminal is.  Disabled
on _WIN32.  Suggested by Janusz A. Urbanowicz.
This commit is contained in:
David Shaw 2004-01-21 21:25:43 +00:00
parent 97efb85f51
commit 01d0c54f05
2 changed files with 18 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2004-01-21 David Shaw <dshaw@jabberwocky.com>
* keyedit.c (print_and_check_one_sig, keyedit_menu): Use the
COLUMNS environment variable (if any) to hint how wide the
terminal is. Disabled on _WIN32. Suggested by Janusz
A. Urbanowicz.
2004-01-20 David Shaw <dshaw@jabberwocky.com>
* keylist.c (set_attrib_fd): Open attribute fd in binary

View File

@ -71,6 +71,7 @@ static int enable_disable_key( KBNODE keyblock, int disable );
static void menu_showphoto( KBNODE keyblock );
static int update_trust=0;
static int columns=80;
#define CONTROL_D ('D' - 'A' + 1)
@ -164,7 +165,7 @@ print_and_check_one_sig( KBNODE keyblock, KBNODE node,
else {
size_t n;
char *p = get_user_id( sig->keyid, &n );
tty_print_utf8_string2( p, n, 40 );
tty_print_utf8_string2( p, n, columns-37 );
m_free(p);
}
tty_printf("\n");
@ -1188,6 +1189,15 @@ keyedit_menu( const char *username, STRLIST locusr, STRLIST commands,
goto leave;
}
#ifndef _WIN32
if(getenv("COLUMNS"))
{
columns=atoi(getenv("COLUMNS"));
if(columns<80 || columns>255)
columns=80;
}
#endif
if( sign_mode ) {
commands = NULL;
append_to_strlist( &commands, sign_mode == 1? "sign":