tweaks: rename a function plus parameter, to stay closer to what it does
parent
f58869d072
commit
6f07f2b444
|
@ -1362,15 +1362,14 @@ void regenerate_screen(void)
|
||||||
total_refresh();
|
total_refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If allow is FALSE, block any SIGWINCH signal. If allow is TRUE,
|
/* Block or unblock the SIGWINCH signal, depending on the blockit parameter. */
|
||||||
* unblock SIGWINCH so any pending ones can be dealt with. */
|
void block_sigwinch(bool blockit)
|
||||||
void allow_sigwinch(bool allow)
|
|
||||||
{
|
{
|
||||||
sigset_t winch;
|
sigset_t winch;
|
||||||
|
|
||||||
sigemptyset(&winch);
|
sigemptyset(&winch);
|
||||||
sigaddset(&winch, SIGWINCH);
|
sigaddset(&winch, SIGWINCH);
|
||||||
sigprocmask(allow ? SIG_UNBLOCK : SIG_BLOCK, &winch, NULL);
|
sigprocmask(blockit ? SIG_BLOCK : SIG_UNBLOCK, &winch, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle the global toggle specified in flag. */
|
/* Handle the global toggle specified in flag. */
|
||||||
|
|
|
@ -427,7 +427,7 @@ RETSIGTYPE do_continue(int signal);
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
RETSIGTYPE handle_sigwinch(int signal);
|
RETSIGTYPE handle_sigwinch(int signal);
|
||||||
void regenerate_screen(void);
|
void regenerate_screen(void);
|
||||||
void allow_sigwinch(bool allow);
|
void block_sigwinch(bool blockit);
|
||||||
void do_toggle(int flag);
|
void do_toggle(int flag);
|
||||||
void enable_signals(void);
|
void enable_signals(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2655,11 +2655,11 @@ const char *do_alt_speller(char *tempfile_name)
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
/* Block SIGWINCHes while waiting for the alternate spell checker's end,
|
/* Block SIGWINCHes while waiting for the alternate spell checker's end,
|
||||||
* so nano doesn't get pushed past the wait(). */
|
* so nano doesn't get pushed past the wait(). */
|
||||||
allow_sigwinch(FALSE);
|
block_sigwinch(TRUE);
|
||||||
#endif
|
#endif
|
||||||
wait(&alt_spell_status);
|
wait(&alt_spell_status);
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
allow_sigwinch(TRUE);
|
block_sigwinch(FALSE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Reenter curses mode. */
|
/* Reenter curses mode. */
|
||||||
|
|
Loading…
Reference in New Issue