diff options
author | David Shaw <[email protected]> | 2004-01-24 00:47:45 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2004-01-24 00:47:45 +0000 |
commit | 385a19bd7bab47da5b703fafa3ff177fbed631a4 (patch) | |
tree | 2b92d533161f9fc253261d920ddeaffffd15570b /g10/g10.c | |
parent | * g10.c (list_config): New function to dump config options to stdout. (diff) | |
download | gnupg-385a19bd7bab47da5b703fafa3ff177fbed631a4.tar.gz gnupg-385a19bd7bab47da5b703fafa3ff177fbed631a4.zip |
* mainproc.c (list_node): Show sigs with --verbose.
* options.h, g10.c (set_screen_dimensions): New function to look at
COLUMNS and LINES.
* keyserver.c (parse_keyrec, keyserver_search_prompt), keyedit.c
(print_and_check_one_sig): Use new screen dimension variables.
Diffstat (limited to '')
-rw-r--r-- | g10/g10.c | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -870,6 +870,31 @@ set_homedir (char *dir) } +/* We set the screen dimensions for UI purposes. Do not allow screens + smaller than 80x24 for the sake of simplicity. */ +static void +set_screen_dimensions(void) +{ +#ifndef _WIN32 + char *str; + + str=getenv("COLUMNS"); + if(str) + opt.screen_columns=atoi(str); + + str=getenv("LINES"); + if(str) + opt.screen_lines=atoi(str); +#endif + + if(opt.screen_columns<80 || opt.screen_columns>255) + opt.screen_columns=80; + + if(opt.screen_lines<24 || opt.screen_lines>255) + opt.screen_lines=24; +} + + static void set_cmd( enum cmd_and_opt_values *ret_cmd, enum cmd_and_opt_values new_cmd ) { @@ -1366,6 +1391,7 @@ main( int argc, char **argv ) VERIFY_SHOW_POLICY_URLS|VERIFY_SHOW_NOTATIONS|VERIFY_SHOW_KEYSERVER_URLS; opt.trust_model=TM_AUTO; opt.mangle_dos_filenames = 0; + set_screen_dimensions(); #if defined (_WIN32) set_homedir ( read_w32_registry_string( NULL, "Software\\GNU\\GnuPG", "HomeDir" )); |