gnupg/g10 (ChangeLog gpgv.c openfile.c plaintext.c)
cvs user dshaw
cvs at cvs.gnupg.org
Mon Mar 21 21:33:31 CET 2005
Date: Monday, March 21, 2005 @ 21:47:28
Author: dshaw
Path: /cvs/gnupg/gnupg/g10
Modified: ChangeLog gpgv.c openfile.c plaintext.c
* gpgv.c: Stubs for tty_enable_completion() & tty_disable_completion().
* openfile.c (ask_outfile_name): Enable readline completion when prompting
for an output filename.
* plaintext.c (ask_for_detached_datafile): Enable readline completion when
prompting for a detached sig datafile.
-------------+
ChangeLog | 11 +++++++++++
gpgv.c | 8 ++++++++
openfile.c | 5 ++++-
plaintext.c | 6 ++++--
4 files changed, 27 insertions(+), 3 deletions(-)
Index: gnupg/g10/ChangeLog
diff -u gnupg/g10/ChangeLog:1.712 gnupg/g10/ChangeLog:1.713
--- gnupg/g10/ChangeLog:1.712 Mon Mar 21 16:24:48 2005
+++ gnupg/g10/ChangeLog Mon Mar 21 21:47:28 2005
@@ -1,3 +1,14 @@
+2005-03-21 David Shaw <dshaw at jabberwocky.com>
+
+ * gpgv.c: Stubs for tty_enable_completion() &
+ tty_disable_completion().
+
+ * openfile.c (ask_outfile_name): Enable readline completion when
+ prompting for an output filename.
+
+ * plaintext.c (ask_for_detached_datafile): Enable readline
+ completion when prompting for a detached sig datafile.
+
2005-03-21 Werner Koch <wk at g10code.com>
* keyedit.c (command_generator, keyedit_completion): Changed
Index: gnupg/g10/gpgv.c
diff -u gnupg/g10/gpgv.c:1.27 gnupg/g10/gpgv.c:1.28
--- gnupg/g10/gpgv.c:1.27 Thu Jan 20 18:21:40 2005
+++ gnupg/g10/gpgv.c Mon Mar 21 21:47:28 2005
@@ -29,6 +29,10 @@
#ifdef HAVE_DOSISH_SYSTEM
#include <fcntl.h> /* for setmode() */
#endif
+#ifdef HAVE_LIBREADLINE
+#include <stdio.h>
+#include <readline/readline.h>
+#endif
#define INCLUDED_BY_MAIN_MODULE 1
#include "packet.h"
@@ -389,6 +393,10 @@
void tty_kill_prompt(void) {}
int tty_get_answer_is_yes( const char *prompt ) {return 0;}
int tty_no_terminal(int onoff) {return 0;}
+#ifdef HAVE_LIBREADLINE
+void tty_enable_completion(rl_completion_func_t *completer) {}
+void tty_disable_completion(void) {}
+#endif
/* We do not do any locking, so use these stubs here */
void disable_dotlock(void) {}
Index: gnupg/g10/openfile.c
diff -u gnupg/g10/openfile.c:1.41 gnupg/g10/openfile.c:1.42
--- gnupg/g10/openfile.c:1.41 Thu Oct 14 09:11:56 2004
+++ gnupg/g10/openfile.c Mon Mar 21 21:47:28 2005
@@ -1,5 +1,6 @@
/* openfile.c
- * Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ * 2005 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -147,8 +148,10 @@
sprintf(prompt, "%s [%s]: ", s, defname );
else
sprintf(prompt, "%s: ", s );
+ tty_enable_completion(NULL);
fname = cpr_get("openfile.askoutname", prompt );
cpr_kill_prompt();
+ tty_disable_completion();
m_free(prompt);
if( !*fname ) {
m_free( fname ); fname = NULL;
Index: gnupg/g10/plaintext.c
diff -u gnupg/g10/plaintext.c:1.59 gnupg/g10/plaintext.c:1.60
--- gnupg/g10/plaintext.c:1.59 Thu Nov 4 23:28:39 2004
+++ gnupg/g10/plaintext.c Mon Mar 21 21:47:28 2005
@@ -1,6 +1,6 @@
/* plaintext.c - process plaintext packets
- * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003,
- * 2004 Free Software Foundation, Inc.
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ * 2005 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -446,8 +446,10 @@
tty_printf(_("Detached signature.\n"));
do {
m_free(answer);
+ tty_enable_completion(NULL);
answer = cpr_get("detached_signature.filename",
_("Please enter name of data file: "));
+ tty_disable_completion();
cpr_kill_prompt();
if( any && !*answer ) {
rc = G10ERR_READ_FILE;
More information about the Gnupg-commits
mailing list