summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/less/less.h2
-rw-r--r--usr.bin/less/lsystem.c4
-rw-r--r--usr.bin/less/signal.c24
3 files changed, 14 insertions, 16 deletions
diff --git a/usr.bin/less/less.h b/usr.bin/less/less.h
index afca33b123b..983b8552a79 100644
--- a/usr.bin/less/less.h
+++ b/usr.bin/less/less.h
@@ -198,8 +198,6 @@ struct textlist
#define ESC CONTROL('[')
#define CSI ((unsigned char)'\233')
-#define LSIGNAL(sig, func) lsignal(sig, func)
-
#define S_INTERRUPT 01
#define S_STOP 02
#define S_WINCH 04
diff --git a/usr.bin/less/lsystem.c b/usr.bin/less/lsystem.c
index 4cc9d54f117..cff5ad88289 100644
--- a/usr.bin/less/lsystem.c
+++ b/usr.bin/less/lsystem.c
@@ -212,7 +212,7 @@ pipe_data(char *cmd, off_t spos, off_t epos)
flush();
raw_mode(0);
init_signals(0);
- LSIGNAL(SIGPIPE, SIG_IGN);
+ lsignal(SIGPIPE, SIG_IGN);
c = EOI;
while (epos == -1 || spos++ <= epos) {
@@ -239,7 +239,7 @@ pipe_data(char *cmd, off_t spos, off_t epos)
(void) pclose(f);
- LSIGNAL(SIGPIPE, SIG_DFL);
+ lsignal(SIGPIPE, SIG_DFL);
init_signals(1);
raw_mode(1);
init();
diff --git a/usr.bin/less/signal.c b/usr.bin/less/signal.c
index b58ec1fcdfa..ccb8f24cc21 100644
--- a/usr.bin/less/signal.c
+++ b/usr.bin/less/signal.c
@@ -74,18 +74,18 @@ init_signals(int on)
/*
* Set signal handlers.
*/
- (void) LSIGNAL(SIGINT, u_interrupt);
- (void) LSIGNAL(SIGTSTP, stop);
- (void) LSIGNAL(SIGWINCH, sigwinch);
- (void) LSIGNAL(SIGQUIT, SIG_IGN);
+ (void) lsignal(SIGINT, u_interrupt);
+ (void) lsignal(SIGTSTP, stop);
+ (void) lsignal(SIGWINCH, sigwinch);
+ (void) lsignal(SIGQUIT, SIG_IGN);
} else {
/*
* Restore signals to defaults.
*/
- (void) LSIGNAL(SIGINT, SIG_DFL);
- (void) LSIGNAL(SIGTSTP, SIG_DFL);
- (void) LSIGNAL(SIGWINCH, SIG_IGN);
- (void) LSIGNAL(SIGQUIT, SIG_DFL);
+ (void) lsignal(SIGINT, SIG_DFL);
+ (void) lsignal(SIGTSTP, SIG_DFL);
+ (void) lsignal(SIGWINCH, SIG_IGN);
+ (void) lsignal(SIGQUIT, SIG_DFL);
}
}
@@ -106,13 +106,13 @@ psignals(void)
/*
* Clean up the terminal.
*/
- LSIGNAL(SIGTTOU, SIG_IGN);
+ lsignal(SIGTTOU, SIG_IGN);
clear_bot();
deinit();
flush();
raw_mode(0);
- LSIGNAL(SIGTTOU, SIG_DFL);
- LSIGNAL(SIGTSTP, SIG_DFL);
+ lsignal(SIGTTOU, SIG_DFL);
+ lsignal(SIGTSTP, SIG_DFL);
kill(getpid(), SIGTSTP);
/*
* ... Bye bye. ...
@@ -120,7 +120,7 @@ psignals(void)
* Reset the terminal and arrange to repaint the
* screen when we get back to the main command loop.
*/
- LSIGNAL(SIGTSTP, stop);
+ lsignal(SIGTSTP, stop);
raw_mode(1);
init();
screen_trashed = 1;