Improving the name of allow_pending_sigwinch() to allow_sigwinch(),

and improving its comments too.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5532 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2016-01-04 10:37:11 +00:00
parent 0dd351a5c1
commit 9e6b9a29a5
4 changed files with 13 additions and 15 deletions

View File

@ -3,6 +3,7 @@
only once, so there is no longer any need to free existing ones. only once, so there is no longer any need to free existing ones.
* src/global.c (sctofunc): Rewrite the loop, and constify the input. * src/global.c (sctofunc): Rewrite the loop, and constify the input.
* src/text.c (do_linter): Condense the exit code. * src/text.c (do_linter): Condense the exit code.
* src/nano.c (allow_sigwinch): Improve its name and its comments.
2016-01-04 Mike Frysinger <vapier@gentoo.org> 2016-01-04 Mike Frysinger <vapier@gentoo.org>
* src/global.c (strtosc, strtomenu): Constify the input parameter. * src/global.c (strtosc, strtomenu): Constify the input parameter.

View File

@ -1419,10 +1419,9 @@ void regenerate_screen(void)
total_refresh(); total_refresh();
} }
/* If allow is FALSE, block any SIGWINCH signals that we get, so that /* If allow is FALSE, block any SIGWINCH signal. If allow is TRUE,
* we can deal with them later. If allow is TRUE, unblock any SIGWINCH * unblock SIGWINCH so any pending ones can be dealt with. */
* signals that we have, so that we can deal with them now. */ void allow_sigwinch(bool allow)
void allow_pending_sigwinch(bool allow)
{ {
sigset_t winch; sigset_t winch;

View File

@ -491,7 +491,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_pending_sigwinch(bool allow); void allow_sigwinch(bool allow);
void do_toggle(int flag); void do_toggle(int flag);
#endif #endif
void do_toggle_void(void); void do_toggle_void(void);

View File

@ -2740,9 +2740,8 @@ const char *do_alt_speller(char *tempfile_name)
return _("Could not fork"); return _("Could not fork");
#ifndef NANO_TINY #ifndef NANO_TINY
/* Don't handle a pending SIGWINCH until the alternate spell checker /* Block SIGWINCHes so the spell checker doesn't get any. */
* is finished and we've loaded the spell-checked file back in. */ allow_sigwinch(FALSE);
allow_pending_sigwinch(FALSE);
#endif #endif
/* Wait for the alternate spell checker to finish. */ /* Wait for the alternate spell checker to finish. */
@ -2830,8 +2829,8 @@ const char *do_alt_speller(char *tempfile_name)
set_modified(); set_modified();
#ifndef NANO_TINY #ifndef NANO_TINY
/* Handle a pending SIGWINCH again. */ /* Unblock SIGWINCHes again. */
allow_pending_sigwinch(TRUE); allow_sigwinch(TRUE);
#endif #endif
return NULL; return NULL;
@ -3289,9 +3288,8 @@ void do_formatter(void)
} }
#ifndef NANO_TINY #ifndef NANO_TINY
/* Don't handle any SIGWINCHes until the formatter has finished and /* Block SIGWINCHes so the formatter doesn't get any. */
* we've loaded the reformatted file back in. */ allow_sigwinch(FALSE);
allow_pending_sigwinch(FALSE);
#endif #endif
/* Wait for the formatter to finish. */ /* Wait for the formatter to finish. */
@ -3327,8 +3325,8 @@ void do_formatter(void)
free(temp); free(temp);
#ifndef NANO_TINY #ifndef NANO_TINY
/* Handle SIGWINCHes again. */ /* Unblock SIGWINCHes again. */
allow_pending_sigwinch(TRUE); allow_sigwinch(TRUE);
#endif #endif
/* If the formatter printed any error messages onscreen, make /* If the formatter printed any error messages onscreen, make