mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 21:01:24 +03:00
tweaks: rename a function plus parameter, to stay closer to what it does
This commit is contained in:
parent
f58869d072
commit
6f07f2b444
@ -1362,15 +1362,14 @@ void regenerate_screen(void)
|
||||
total_refresh();
|
||||
}
|
||||
|
||||
/* If allow is FALSE, block any SIGWINCH signal. If allow is TRUE,
|
||||
* unblock SIGWINCH so any pending ones can be dealt with. */
|
||||
void allow_sigwinch(bool allow)
|
||||
/* Block or unblock the SIGWINCH signal, depending on the blockit parameter. */
|
||||
void block_sigwinch(bool blockit)
|
||||
{
|
||||
sigset_t winch;
|
||||
|
||||
sigemptyset(&winch);
|
||||
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. */
|
||||
|
@ -427,7 +427,7 @@ RETSIGTYPE do_continue(int signal);
|
||||
#ifndef NANO_TINY
|
||||
RETSIGTYPE handle_sigwinch(int signal);
|
||||
void regenerate_screen(void);
|
||||
void allow_sigwinch(bool allow);
|
||||
void block_sigwinch(bool blockit);
|
||||
void do_toggle(int flag);
|
||||
void enable_signals(void);
|
||||
#endif
|
||||
|
@ -2655,11 +2655,11 @@ const char *do_alt_speller(char *tempfile_name)
|
||||
#ifndef NANO_TINY
|
||||
/* Block SIGWINCHes while waiting for the alternate spell checker's end,
|
||||
* so nano doesn't get pushed past the wait(). */
|
||||
allow_sigwinch(FALSE);
|
||||
block_sigwinch(TRUE);
|
||||
#endif
|
||||
wait(&alt_spell_status);
|
||||
#ifndef NANO_TINY
|
||||
allow_sigwinch(TRUE);
|
||||
block_sigwinch(FALSE);
|
||||
#endif
|
||||
|
||||
/* Reenter curses mode. */
|
||||
|
Loading…
Reference in New Issue
Block a user