diff options
author | 2016-05-03 13:02:26 -0700 | |
---|---|---|
committer | 2016-05-03 13:06:45 -0700 | |
commit | 0aa7fd95b82187e08caba461e7a5f4da7fc908e1 (patch) | |
tree | 0e87b8d06b87c149103c143247d87ce41f8abf78 /src/signal.h | |
parent | fa5356373377a5792e260468b04c8344f0e3448e (diff) |
restyle signal module to match project style
Reduces lint errors from 15 to 15 (-0%). Line count from 754 to 438 (-42%).
Another step in resolving issue #2902.
Diffstat (limited to 'src/signal.h')
-rw-r--r-- | src/signal.h | 53 |
1 files changed, 15 insertions, 38 deletions
diff --git a/src/signal.h b/src/signal.h index 4a22520a..fa24cc2b 100644 --- a/src/signal.h +++ b/src/signal.h @@ -1,65 +1,42 @@ -/** \file signal.h - -The library for various signal related issues -*/ +// The library for various signal related issues. #ifndef FISH_SIGNALH #define FISH_SIGNALH #include <signal.h> #include <stdbool.h> -/** - Get the integer signal value representing the specified signal, or - -1 of no signal was found -*/ +/// Get the integer signal value representing the specified signal, or -1 of no signal was found. int wcs2sig(const wchar_t *str); -/** - Get string representation of a signal -*/ +/// Get string representation of a signal. const wchar_t *sig2wcs(int sig); -/** - Returns a description of the specified signal. -*/ +/// Returns a description of the specified signal. const wchar_t *signal_get_desc(int sig); -/** - Set all signal handlers to SIG_DFL -*/ +/// Set all signal handlers to SIG_DFL. void signal_reset_handlers(); -/** - Set signal handlers to fish default handlers -*/ +/// Set signal handlers to fish default handlers. void signal_set_handlers(); -/** - Tell fish what to do on the specified signal. - - \param sig The signal to specify the action of - \param do_handle If true fish will catch the specified signal and fire an event, otherwise the default action (SIG_DFL) will be set -*/ +/// Tell fish what to do on the specified signal. +/// +/// \param sig The signal to specify the action of +/// \param do_handle If true fish will catch the specified signal and fire an event, otherwise the +/// default action (SIG_DFL) will be set void signal_handle(int sig, int do_handle); -/** - Block all signals -*/ +/// Block all signals. void signal_block(); -/** - Unblock all signals -*/ +/// Unblock all signals. void signal_unblock(); -/** - Returns true if signals are being blocked -*/ +/// Returns true if signals are being blocked. bool signal_is_blocked(); -/** - Returns signals with non-default handlers -*/ +/// Returns signals with non-default handlers. void get_signals_with_handlers(sigset_t *set); #endif |