[svn] GnuPG - r3964 - trunk/util

svn author dshaw cvs at cvs.gnupg.org
Mon Dec 12 04:56:01 CET 2005


Author: dshaw
Date: 2005-12-12 04:56:01 +0100 (Mon, 12 Dec 2005)
New Revision: 3964

Modified:
   trunk/util/ChangeLog
   trunk/util/ttyio.c
Log:
* ttyio.c (tty_enable_completion, tty_disable_completion): Add checks
for no_terminal so we don't try to open("/dev/tty") when invoked with
--no-tty.


Modified: trunk/util/ChangeLog
===================================================================
--- trunk/util/ChangeLog	2005-12-08 23:35:47 UTC (rev 3963)
+++ trunk/util/ChangeLog	2005-12-12 03:56:01 UTC (rev 3964)
@@ -1,3 +1,9 @@
+2005-12-10  Ryan Lortie  <desrt at desrt.ca> (dshaw)
+
+	* ttyio.c (tty_enable_completion, tty_disable_completion): Add
+	checks for no_terminal so we don't try to open("/dev/tty") when
+	invoked with --no-tty.
+
 2005-12-06  David Shaw  <dshaw at jabberwocky.com>
 
 	* Makefile.am: Some cleanup so we don't build files that are

Modified: trunk/util/ttyio.c
===================================================================
--- trunk/util/ttyio.c	2005-12-08 23:35:47 UTC (rev 3963)
+++ trunk/util/ttyio.c	2005-12-12 03:56:01 UTC (rev 3964)
@@ -179,8 +179,12 @@
 void
 tty_enable_completion(rl_completion_func_t *completer)
 {
+  if( no_terminal )
+    return;
+
   if( !initialized )
     init_ttyfp();
+
   rl_attempted_completion_function=completer;
   rl_inhibit_completion=0;
 }
@@ -188,8 +192,12 @@
 void
 tty_disable_completion(void)
 {
+  if( no_terminal )
+    return;
+
   if( !initialized )
     init_ttyfp();
+
   rl_inhibit_completion=1;
 }
 #endif /*HAVE_LIBREADLINE*/




More information about the Gnupg-commits mailing list