nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 6dcfcd11ce219fd79c6065d95a7c571fbbd52b40
parent f21b094dad87bddcb5c04feaa77cf78ae2726a43
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 27 May 2019 17:24:35 +0200

tweaks: rename two functions, to better describe what they do

Diffstat:
Msrc/nano.c | 10+++++-----
Msrc/proto.h | 4++--
Msrc/text.c | 2+-
3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/nano.c b/src/nano.c @@ -1054,7 +1054,7 @@ RETSIGTYPE make_a_note(int signal) void install_handler_for_Ctrl_C(void) { /* Enable the generation of a SIGINT when ^C is pressed. */ - enable_signals(); + enable_kb_interrupt(); /* Set up a signal handler so that pressing ^C will set a flag. */ newaction.sa_handler = make_a_note; @@ -1066,7 +1066,7 @@ void install_handler_for_Ctrl_C(void) void restore_handler_for_Ctrl_C(void) { sigaction(SIGINT, &oldaction, NULL); - disable_signals(); + disable_kb_interrupt(); } /* Read whatever comes from standard input into a new buffer. */ @@ -1396,7 +1396,7 @@ void disable_extended_io(void) } /* Stop ^C from generating a SIGINT. */ -void disable_signals(void) +void disable_kb_interrupt(void) { #ifdef HAVE_TERMIOS_H struct termios term = {0}; @@ -1408,7 +1408,7 @@ void disable_signals(void) } /* Make ^C generate a SIGINT. */ -void enable_signals(void) +void enable_kb_interrupt(void) { #ifdef HAVE_TERMIOS_H struct termios term = {0}; @@ -1472,7 +1472,7 @@ void terminal_init(void) if (ISSET(PRESERVE)) enable_flow_control(); - disable_signals(); + disable_kb_interrupt(); #ifdef USE_SLANG if (!ISSET(PRESERVE)) disable_flow_control(); diff --git a/src/proto.h b/src/proto.h @@ -430,8 +430,8 @@ RETSIGTYPE handle_sigwinch(int signal); void regenerate_screen(void); void do_toggle(int flag); #endif -void disable_signals(void); -void enable_signals(void); +void disable_kb_interrupt(void); +void enable_kb_interrupt(void); void disable_flow_control(void); void enable_flow_control(void); void terminal_init(void); diff --git a/src/text.c b/src/text.c @@ -1036,7 +1036,7 @@ bool execute_command(const char *command) /* Re-enable interpretation of the special control keys so that we get * SIGINT when Ctrl-C is pressed. */ - enable_signals(); + enable_kb_interrupt(); /* Set up a signal handler so that ^C will terminate the forked process. */ newaction.sa_handler = cancel_the_command;