Patch for PR gnupg/199
Todd Vierling
tv@pobox.com
Fri Aug 22 11:14:11 2003
I replied to GNATS, but it doesn't seem that my reply made it there. Note
that I am *NOT* on this list; please include me in Cc: in responses.
In the PR, use of --search-keys in a "PGP/GPG frontend" (pgpenvelope,
GnuPG::Interface) is useless because the non-tty stdout default is
block-buffered rather than line-buffered. Thus the key list, which is
written to stdout, may never show up until entering (Q)uit.
The following patch adds a fflush(stdout) to ensure that the list of keys in
--search-keys is flushed to stdout before writing the prompt to the user.
(BTW, I'd really like to see this in 1.2.3 as well, if possible. 8-)
Index: g10/keyserver.c
===================================================================
RCS file: /cvs/gnupg/gnupg/g10/keyserver.c,v
retrieving revision 1.31
diff -u -r1.31 keyserver.c
--- g10/keyserver.c 10 Jul 2003 14:30:07 -0000 1.31
+++ g10/keyserver.c 20 Aug 2003 21:06:12 -0000
@@ -486,6 +486,9 @@
from=numdesc+1;
}
+ /* flush key list before displaying prompt */
+ fflush(stdout);
+
answer=cpr_get_no_help("keysearch.prompt",
_("Enter number(s), N)ext, or Q)uit > "));
/* control-d */
--
-- Todd Vierling <tv@pobox.com>