diff options
author | Theodore Ts'o <tytso@mit.edu> | 2002-05-13 07:53:11 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2002-05-13 07:53:11 -0400 |
commit | 5e941d2979aeab97929de6c0682425dead3bae74 (patch) | |
tree | 4463eb9ba0b0d31475b88b2953327610ef885f64 /ext2ed/init.c | |
parent | 7c36779aebf962d44ce9f320efd40658a44ff063 (diff) | |
download | e2fsprogs-5e941d2979aeab97929de6c0682425dead3bae74.tar.gz |
Fix up ncurses interface so that it handles resizes correctly.
Removed the readline library (still available using if HAVE_READLINE is defined)
since it really doesn't play well with ncurses. The only real feature it added
was command completion, and it didn't really handle it completely correctly anyway.
(If readline printed a completion list, it completely screwed up the screen.)
We now use the wgetch ncurses interface to get input; this allows the PGDN and PGUP
keys to work correctly, and also helped fix up the resizing logic.
Diffstat (limited to 'ext2ed/init.c')
-rw-r--r-- | ext2ed/init.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ext2ed/init.c b/ext2ed/init.c index 6ee1d372..de504b41 100644 --- a/ext2ed/init.c +++ b/ext2ed/init.c @@ -17,7 +17,9 @@ Copyright (C) 1995 Gadi Oxman #include <stdio.h> #include <stdlib.h> #include <string.h> +#ifdef HAVE_READLINE #include <readline.h> +#endif #include <signal.h> #include <unistd.h> @@ -438,7 +440,9 @@ int set_file_system_info (void) void init_readline (void) { +#ifdef HAVE_READLINE rl_completion_entry_function=(Function *) complete_command; +#endif } void init_signals (void) @@ -453,7 +457,11 @@ void init_signals (void) void signal_SIGWINCH_handler (int sig_num) { - redraw_request=1; /* We will handle it in main.c */ + redraw_request=1; /* We will handle it in main.c */ + + /* Reset signal handler */ + signal (SIGWINCH, signal_SIGWINCH_handler); + } void signal_SIGTERM_handler (int sig_num) |