From: Chris Allegretta Date: Fri, 14 Dec 2001 05:57:10 +0000 (+0000) Subject: - nano.c:signal_init() - Unconditionally disable VDSUSP if it exists, stops ^Y suspen... X-Git-Tag: v1.0.7~1 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=7af96613f007b4170170377d3db4365f77c28f91;p=nano.git - nano.c:signal_init() - Unconditionally disable VDSUSP if it exists, stops ^Y suspending nano on the Hurd git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_1_0_branch/nano@930 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index e9fa07af..dafe1f80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,17 +1,26 @@ CVS code - -- po/de.po: - - Updated German translation (Karl Eichwalder). +- General + - Backported 1.1's m4/ dirs to nano so nano has its own + self-contained checks for gettext, etc. This was basically + ripped verbatim out of mutt. - nano.c: + do_cont() + - Run signal_init() after doupdate() so ^Y wont suddenly + start suspending after returning from ^Z suspend in Hurd. do_spell() - Dont prompt for replace if we don't change the word in question (Rocco Corsi). main() - Added better Hurd support for function keys (Alt-V,U,9,@,F). signal_init() - - do SIG_IGN for the SIGTSTP sigaction regardless of whether - we have _POSIX_VDISABLE or not (more Hurd fixes) + - Unconditionally disable VDSUSP if it exists, stops ^Y + suspending nano on the Hurd. +- po/Makefile.in.in: + - Change datadir to @datadir@ for Cygwin (Gareth Pearce). - po/fr.po: - French translation update, by Michel Robitaille. +- po/de.po: + - Updated German translation (Karl Eichwalder). nano-1.0.6 - 10/29/2001 - General diff --git a/nano.c b/nano.c index 36785f2d..34e3b66f 100644 --- a/nano.c +++ b/nano.c @@ -1698,6 +1698,9 @@ RETSIGTYPE do_cont(int signal) SIGTSTP handler */ doupdate(); + /* The Hurd seems to need this, otherwise a ^Y after a ^Z will + start suspending again */ + signal_init(); } void handle_sigwinch(int s) @@ -1792,18 +1795,25 @@ void signal_init(void) act.sa_handler = handle_sigwinch; sigaction(SIGWINCH, &act, NULL); + +#ifdef _POSIX_VDISABLE + tcgetattr(0, &term); + +#ifdef VDSUSP + term.c_cc[VDSUSP] = _POSIX_VDISABLE; +#endif /* VDSUSP */ + +#endif /* _POSIX_VDISABLE */ + if (!ISSET(SUSPEND)) { /* Insane! */ #ifdef _POSIX_VDISABLE - tcgetattr(0, &term); term.c_cc[VSUSP] = _POSIX_VDISABLE; - tcsetattr(0, TCSANOW, &term); -#endif - - /* The HURD seems to need this anyway! */ +#else act.sa_handler = SIG_IGN; sigaction(SIGTSTP, &act, NULL); +#endif } else { /* if we don't do this, it seems other stuff interrupts the @@ -1817,6 +1827,12 @@ void signal_init(void) sigaction(SIGCONT, &act, NULL); } + +#ifdef _POSIX_VDISABLE + tcsetattr(0, TCSANOW, &term); +#endif + + } void window_init(void) diff --git a/proto.h b/proto.h index 5420deef..2dc44312 100644 --- a/proto.h +++ b/proto.h @@ -96,6 +96,7 @@ char *input_tab(char *buf, int place, int *lastWasTab, int *newplace); char *real_dir_from_tilde(char *buf); void shortcut_init(int unjustify); +void signal_init(void); void lowercase(char *src); void blank_bottombars(void); void check_wrap(filestruct * inptr, char ch);