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/keyserver.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 'g10/keyserver.c')
-rw-r--r-- | g10/keyserver.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/g10/keyserver.c b/g10/keyserver.c index 3c8a769d2..63287042c 100644 --- a/g10/keyserver.c +++ b/g10/keyserver.c @@ -532,6 +532,8 @@ parse_keyrec(char *keystring) does this for us. */ decoded=utf8_to_native(userid,i,0); + if(strlen(decoded)>opt.screen_columns-10) + decoded[opt.screen_columns-10]='\0'; iobuf_writestr(work->uidbuf,decoded); m_free(decoded); iobuf_writestr(work->uidbuf,"\n\t"); @@ -595,12 +597,10 @@ show_prompt(KEYDB_SEARCH_DESC *desc,int numdesc,int count,const char *search) static void keyserver_search_prompt(IOBUF buffer,const char *searchstr) { - int i=0,validcount=0,started=0,header=0,count=1; + int i=0,validcount=0,started=0,header=0,count=1,numlines=0; unsigned int maxlen,buflen; KEYDB_SEARCH_DESC *desc; byte *line=NULL; - /* TODO: Something other than 23? That's 24-1 (the prompt). */ - int maxlines=23,numlines=0; desc=m_alloc(count*sizeof(KEYDB_SEARCH_DESC)); @@ -707,7 +707,8 @@ keyserver_search_prompt(IOBUF buffer,const char *searchstr) if(!opt.with_colons) { - if(numlines+keyrec->lines>maxlines) + /* screen_lines - 1 for the prompt. */ + if(numlines+keyrec->lines>opt.screen_lines-1) { if(show_prompt(desc,i,validcount?count:0,searchstr)) break; |