mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
* 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.
This commit is contained in:
parent
81f64252c0
commit
b12d50dccd
@ -1,3 +1,9 @@
|
|||||||
|
2005-12-10 Ryan Lortie <desrt@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@jabberwocky.com>
|
2005-12-06 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* Makefile.am: Some cleanup so we don't build files that are
|
* Makefile.am: Some cleanup so we don't build files that are
|
||||||
|
@ -179,8 +179,12 @@ init_ttyfp(void)
|
|||||||
void
|
void
|
||||||
tty_enable_completion(rl_completion_func_t *completer)
|
tty_enable_completion(rl_completion_func_t *completer)
|
||||||
{
|
{
|
||||||
|
if( no_terminal )
|
||||||
|
return;
|
||||||
|
|
||||||
if( !initialized )
|
if( !initialized )
|
||||||
init_ttyfp();
|
init_ttyfp();
|
||||||
|
|
||||||
rl_attempted_completion_function=completer;
|
rl_attempted_completion_function=completer;
|
||||||
rl_inhibit_completion=0;
|
rl_inhibit_completion=0;
|
||||||
}
|
}
|
||||||
@ -188,8 +192,12 @@ tty_enable_completion(rl_completion_func_t *completer)
|
|||||||
void
|
void
|
||||||
tty_disable_completion(void)
|
tty_disable_completion(void)
|
||||||
{
|
{
|
||||||
|
if( no_terminal )
|
||||||
|
return;
|
||||||
|
|
||||||
if( !initialized )
|
if( !initialized )
|
||||||
init_ttyfp();
|
init_ttyfp();
|
||||||
|
|
||||||
rl_inhibit_completion=1;
|
rl_inhibit_completion=1;
|
||||||
}
|
}
|
||||||
#endif /*HAVE_LIBREADLINE*/
|
#endif /*HAVE_LIBREADLINE*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user