tweaks: rename three functions, to better fit the general scheme

This commit is contained in:
Benno Schulenberg 2021-11-09 10:39:31 +01:00
parent 69b2467a9a
commit e4a247f7c9
4 changed files with 15 additions and 15 deletions

View File

@ -982,7 +982,7 @@ void shortcut_init(void)
N_("Refresh"), WITHORSANS(refresh_gist), TOGETHER, VIEW);
#endif
add_to_funcs(suspend_nano, MMAIN,
add_to_funcs(do_suspend, MMAIN,
N_("Suspend"), WITHORSANS(suspend_gist), BLANKAFTER, VIEW);
#ifndef NANO_TINY
@ -1106,7 +1106,7 @@ void shortcut_init(void)
add_to_funcs(cut_till_eof, MEXECUTE,
N_("Cut Till End"), WITHORSANS(cuttilleof_gist), BLANKAFTER, NOVIEW);
add_to_funcs(suspend_nano, MEXECUTE,
add_to_funcs(do_suspend, MEXECUTE,
N_("Suspend"), WITHORSANS(suspend_gist), BLANKAFTER, VIEW);
}
#endif /* !NANO_TINY */
@ -1335,7 +1335,7 @@ void shortcut_init(void)
#ifndef NANO_TINY
add_to_sclist(MMAIN, "M-T", 0, cut_till_eof, 0);
add_to_sclist(MEXECUTE, "^V", 0, cut_till_eof, 0);
add_to_sclist(MEXECUTE, "^Z", 0, suspend_nano, 0);
add_to_sclist(MEXECUTE, "^Z", 0, do_suspend, 0);
add_to_sclist(MMAIN, "^Z", 0, suggest_ctrlT_ctrlZ, 0);
add_to_sclist(MMAIN, "M-D", 0, count_lines_words_and_characters, 0);
#else
@ -1484,7 +1484,7 @@ void shortcut_init(void)
#endif
#if defined(KEY_CANCEL) && defined(KEY_SUSPEND) && defined(KEY_SIC)
add_to_sclist((MMOST & ~MMAIN) | MYESNO, "", KEY_CANCEL, do_cancel, 0);
add_to_sclist(MMAIN|MEXECUTE, "", KEY_SUSPEND, suspend_nano, 0);
add_to_sclist(MMAIN|MEXECUTE, "", KEY_SUSPEND, do_suspend, 0);
add_to_sclist(MMAIN, "", KEY_SIC, do_insertfile, 0);
#endif
#ifndef NANO_TINY

View File

@ -218,7 +218,7 @@ void suggest_ctrlT_ctrlZ(void)
{
#ifdef ENABLE_NANORC
if (first_sc_for(MMAIN, do_execute) && first_sc_for(MMAIN, do_execute)->keycode == 0x14 &&
first_sc_for(MEXECUTE, suspend_nano) && first_sc_for(MEXECUTE, suspend_nano)->keycode == 0x1A)
first_sc_for(MEXECUTE, do_suspend) && first_sc_for(MEXECUTE, do_suspend)->keycode == 0x1A)
#endif
statusline(AHEM, _("To suspend, type ^T^Z"));
}
@ -902,11 +902,11 @@ void signal_init(void)
* If we don't do this, other stuff interrupts them! */
sigfillset(&deed.sa_mask);
#ifdef SIGTSTP
deed.sa_handler = do_suspend;
deed.sa_handler = suspend_nano;
sigaction(SIGTSTP, &deed, NULL);
#endif
#ifdef SIGCONT
deed.sa_handler = do_continue;
deed.sa_handler = continue_nano;
sigaction(SIGCONT, &deed, NULL);
#endif
@ -938,7 +938,7 @@ void handle_crash(int signal)
#endif
/* Handler for SIGTSTP (suspend). */
void do_suspend(int signal)
void suspend_nano(int signal)
{
#ifdef ENABLE_MOUSE
disable_mouse_support();
@ -961,18 +961,18 @@ void do_suspend(int signal)
}
/* When permitted, put nano to sleep. */
void suspend_nano(void)
void do_suspend(void)
{
if (in_restricted_mode())
return;
do_suspend(0);
suspend_nano(0);
ran_a_tool = TRUE;
}
/* Handler for SIGCONT (continue after suspend). */
void do_continue(int signal)
void continue_nano(int signal)
{
#ifdef ENABLE_MOUSE
if (ISSET(USE_MOUSE))

View File

@ -403,9 +403,9 @@ void handle_hupterm(int signal);
#ifndef DEBUG
void handle_crash(int signal);
#endif
void do_suspend(int signal);
void suspend_nano(void);
void do_continue(int signal);
void suspend_nano(int signal);
void do_suspend(void);
void continue_nano(int signal);
#if !defined(NANO_TINY) || defined(ENABLE_SPELLER) || defined(ENABLE_COLOR)
void block_sigwinch(bool blockit);
#endif

View File

@ -396,7 +396,7 @@ keystruct *strtosc(const char *input)
else if (!strcmp(input, "refresh"))
s->func = full_refresh;
else if (!strcmp(input, "suspend"))
s->func = suspend_nano;
s->func = do_suspend;
else if (!strcmp(input, "casesens"))
s->func = case_sens_void;
else if (!strcmp(input, "regexp"))