- Change input var to one char instead of array (David Benbennick).
- Move NO_CONVERT check up so chars get read in properly (DLR).
- nano.c:
- - Move the termios things in main() up to signal_init(), where
- they should probably be anyway.
do_justify()
- More fixes for indented justify (David Benbennick).
do_int_speller()
#ifdef _POSIX_VDISABLE
- tcgetattr(0, &oldterm);
-
- term = oldterm;
- term.c_cc[VINTR] = _POSIX_VDISABLE;
- term.c_cc[VQUIT] = _POSIX_VDISABLE;
- term.c_lflag &= ~IEXTEN;
+ tcgetattr(0, &term);
#ifdef VDSUSP
term.c_cc[VDSUSP] = _POSIX_VDISABLE;
toggle *t;
#endif
+#ifdef _POSIX_VDISABLE
+ struct termios term;
+#endif
+
#ifdef HAVE_GETOPT_LONG
int option_index = 0;
struct option long_options[] = {
filename = mallocstrcpy(filename, argv[optind]);
}
- signal_init();
+
+ /* First back up the old settings so they can be restored, duh */
+ tcgetattr(0, &oldterm);
+
+#ifdef _POSIX_VDISABLE
+ term = oldterm;
+ term.c_cc[VINTR] = _POSIX_VDISABLE;
+ term.c_cc[VQUIT] = _POSIX_VDISABLE;
+ term.c_lflag &= ~IEXTEN;
+ tcsetattr(0, TCSANOW, &term);
+#endif
/* now ncurses init stuff... */
initscr();
init_help_msg();
help_init();
#endif
+ signal_init();
#ifdef DEBUG
fprintf(stderr, _("Main: set up windows\n"));