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/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>
* src/global.c (strtosc, strtomenu): Constify the input parameter.
total_refresh();
}
-/* If allow is FALSE, block any SIGWINCH signals that we get, so that
- * we can deal with them later. If allow is TRUE, unblock any SIGWINCH
- * signals that we have, so that we can deal with them now. */
-void allow_pending_sigwinch(bool allow)
+/* 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)
{
sigset_t winch;
#ifndef NANO_TINY
RETSIGTYPE handle_sigwinch(int signal);
void regenerate_screen(void);
-void allow_pending_sigwinch(bool allow);
+void allow_sigwinch(bool allow);
void do_toggle(int flag);
#endif
void do_toggle_void(void);
return _("Could not fork");
#ifndef NANO_TINY
- /* Don't handle a pending SIGWINCH until the alternate spell checker
- * is finished and we've loaded the spell-checked file back in. */
- allow_pending_sigwinch(FALSE);
+ /* Block SIGWINCHes so the spell checker doesn't get any. */
+ allow_sigwinch(FALSE);
#endif
/* Wait for the alternate spell checker to finish. */
set_modified();
#ifndef NANO_TINY
- /* Handle a pending SIGWINCH again. */
- allow_pending_sigwinch(TRUE);
+ /* Unblock SIGWINCHes again. */
+ allow_sigwinch(TRUE);
#endif
return NULL;
}
#ifndef NANO_TINY
- /* Don't handle any SIGWINCHes until the formatter has finished and
- * we've loaded the reformatted file back in. */
- allow_pending_sigwinch(FALSE);
+ /* Block SIGWINCHes so the formatter doesn't get any. */
+ allow_sigwinch(FALSE);
#endif
/* Wait for the formatter to finish. */
free(temp);
#ifndef NANO_TINY
- /* Handle SIGWINCHes again. */
- allow_pending_sigwinch(TRUE);
+ /* Unblock SIGWINCHes again. */
+ allow_sigwinch(TRUE);
#endif
/* If the formatter printed any error messages onscreen, make