diff options
author | Ron Yorston <rmy@pobox.com> | 2016-05-19 09:55:31 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2016-05-19 09:55:31 +0100 |
commit | f4c43d4a23c0581f13da63db89d571476269a31f (patch) | |
tree | d68a0f3683d35198607ed7a3fbac01062b8df6c3 /miscutils | |
parent | ee8fdaa48da144585aacdf2a34a82f4cbc5dab02 (diff) | |
download | busybox-w32-f4c43d4a23c0581f13da63db89d571476269a31f.tar.gz busybox-w32-f4c43d4a23c0581f13da63db89d571476269a31f.tar.bz2 busybox-w32-f4c43d4a23c0581f13da63db89d571476269a31f.zip |
less: hide unsupported signal handling in include file
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/less.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/miscutils/less.c b/miscutils/less.c index 248f3e3f5..f9f6f62d9 100644 --- a/miscutils/less.c +++ b/miscutils/less.c | |||
@@ -309,10 +309,8 @@ static void less_exit(int code) | |||
309 | { | 309 | { |
310 | set_tty_cooked(); | 310 | set_tty_cooked(); |
311 | clear_line(); | 311 | clear_line(); |
312 | #if !ENABLE_PLATFORM_MINGW32 | ||
313 | if (code < 0) | 312 | if (code < 0) |
314 | kill_myself_with_sig(- code); /* does not return */ | 313 | kill_myself_with_sig(- code); /* does not return */ |
315 | #endif | ||
316 | exit(code); | 314 | exit(code); |
317 | } | 315 | } |
318 | 316 | ||
@@ -1805,12 +1803,10 @@ static void keypress_process(int keypress) | |||
1805 | number_process(keypress); | 1803 | number_process(keypress); |
1806 | } | 1804 | } |
1807 | 1805 | ||
1808 | #if !ENABLE_PLATFORM_MINGW32 | ||
1809 | static void sig_catcher(int sig) | 1806 | static void sig_catcher(int sig) |
1810 | { | 1807 | { |
1811 | less_exit(- sig); | 1808 | less_exit(- sig); |
1812 | } | 1809 | } |
1813 | #endif | ||
1814 | 1810 | ||
1815 | #if ENABLE_FEATURE_LESS_WINCH | 1811 | #if ENABLE_FEATURE_LESS_WINCH |
1816 | static void sigwinch_handler(int sig UNUSED_PARAM) | 1812 | static void sigwinch_handler(int sig UNUSED_PARAM) |
@@ -1901,9 +1897,7 @@ int less_main(int argc, char **argv) | |||
1901 | max_displayed_line -= 2; | 1897 | max_displayed_line -= 2; |
1902 | 1898 | ||
1903 | /* We want to restore term_orig on exit */ | 1899 | /* We want to restore term_orig on exit */ |
1904 | #if !ENABLE_PLATFORM_MINGW32 | ||
1905 | bb_signals(BB_FATAL_SIGS, sig_catcher); | 1900 | bb_signals(BB_FATAL_SIGS, sig_catcher); |
1906 | #endif | ||
1907 | #if ENABLE_FEATURE_LESS_WINCH | 1901 | #if ENABLE_FEATURE_LESS_WINCH |
1908 | signal(SIGWINCH, sigwinch_handler); | 1902 | signal(SIGWINCH, sigwinch_handler); |
1909 | #endif | 1903 | #endif |