diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-23 01:25:38 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-23 01:25:38 +0000 |
commit | 33196372bed41405ff240f13fe63ca5587912ed2 (patch) | |
tree | 8e19c7f3323c17dd3f57186b5f2bd61eafb24f9d /include | |
parent | 86620756d2143bd8728c3160db4096169f7c6fc0 (diff) | |
download | busybox-w32-33196372bed41405ff240f13fe63ca5587912ed2.tar.gz busybox-w32-33196372bed41405ff240f13fe63ca5587912ed2.tar.bz2 busybox-w32-33196372bed41405ff240f13fe63ca5587912ed2.zip |
less: update line input so that it doesn't interfere with
screen update. Makes "man bash", [enter], [/],
<enter search pattern>, [enter] more usable - manpage
draws as you enter the pattern! Yay!!
less: fix bug where backspace wasn't actually deleting chars
less: "examine file with empty name" doesn't abort anymore.
libbb: add "all fatal signals" mask.
getch_nowait - 207 +207
status_print - 105 +105
examine_file 64 87 +23
move_cursor - 16 +16
m_status_print 185 195 +10
less_main 1656 1663 +7
decode_format_string 790 795 +5
test_main 403 405 +2
process0_stdin 247 249 +2
passwd_main 1070 1072 +2
less_gets 196 178 -18
buffer_print 169 71 -98
less_getch 362 138 -224
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 7/3 up/down: 379/-340) Total: 39 bytes
text data bss dec hex filename
798329 740 7484 806553 c4e99 busybox_old
798368 740 7484 806592 c4ec0 busybox_unstripped
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/include/libbb.h b/include/libbb.h index eb8b2f620..873ab8798 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -274,9 +274,32 @@ char *xrealloc_getcwd_or_warn(char *cwd); | |||
274 | 274 | ||
275 | char *xmalloc_follow_symlinks(const char *path); | 275 | char *xmalloc_follow_symlinks(const char *path); |
276 | 276 | ||
277 | //enum { | 277 | enum { |
278 | // BB_SIGS_FATAL = , | 278 | /* bb_signals(BB_SIGS_FATAL, handler) catches all signals which |
279 | //}; | 279 | * otherwise would kill us, except for those resulting from bugs: |
280 | * SIGSEGV, SIGILL, SIGFPE. | ||
281 | * Other fatal signals not included (TODO?): | ||
282 | * SIGBUS Bus error (bad memory access) | ||
283 | * SIGPOLL Pollable event. Synonym of SIGIO | ||
284 | * SIGPROF Profiling timer expired | ||
285 | * SIGSYS Bad argument to routine | ||
286 | * SIGTRAP Trace/breakpoint trap | ||
287 | */ | ||
288 | BB_SIGS_FATAL = 0 | ||
289 | + (1 << SIGHUP) | ||
290 | + (1 << SIGINT) | ||
291 | + (1 << SIGTERM) | ||
292 | + (1 << SIGPIPE) // Write to pipe with no readers | ||
293 | + (1 << SIGQUIT) // Quit from keyboard | ||
294 | + (1 << SIGABRT) // Abort signal from abort(3) | ||
295 | + (1 << SIGALRM) // Timer signal from alarm(2) | ||
296 | + (1 << SIGVTALRM) // Virtual alarm clock | ||
297 | + (1 << SIGXCPU) // CPU time limit exceeded | ||
298 | + (1 << SIGXFSZ) // File size limit exceeded | ||
299 | + (1 << SIGUSR1) // Yes kids, these are also fatal! | ||
300 | + (1 << SIGUSR2) | ||
301 | + 0, | ||
302 | }; | ||
280 | void bb_signals(int sigs, void (*f)(int)); | 303 | void bb_signals(int sigs, void (*f)(int)); |
281 | /* Unlike signal() and bb_signals, sets handler with sigaction() | 304 | /* Unlike signal() and bb_signals, sets handler with sigaction() |
282 | * and in a way that while signal handler is run, no other signals | 305 | * and in a way that while signal handler is run, no other signals |