diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2021-09-14 18:13:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-14 09:13:34 -0700 |
commit | 0a83017fe95df0290adb98ec6bf457b96a3fab17 (patch) | |
tree | 41362f11095eff22795474e035c5d91d3fb4a7d8 /src/nvim/os/signal.c | |
parent | 516775e9d84c5eda9c1d014ff052132737361d90 (diff) | |
download | rneovim-0a83017fe95df0290adb98ec6bf457b96a3fab17.tar.gz rneovim-0a83017fe95df0290adb98ec6bf457b96a3fab17.tar.bz2 rneovim-0a83017fe95df0290adb98ec6bf457b96a3fab17.zip |
refactor: format files with uncrustify #15663
Diffstat (limited to 'src/nvim/os/signal.c')
-rw-r--r-- | src/nvim/os/signal.c | 87 |
1 files changed, 43 insertions, 44 deletions
diff --git a/src/nvim/os/signal.c b/src/nvim/os/signal.c index bc774b8ebc..65b1845d01 100644 --- a/src/nvim/os/signal.c +++ b/src/nvim/os/signal.c @@ -3,25 +3,24 @@ #include <assert.h> #include <stdbool.h> - #include <uv.h> #ifndef WIN32 # include <signal.h> // for sigset_t #endif #include "nvim/ascii.h" -#include "nvim/log.h" -#include "nvim/vim.h" -#include "nvim/globals.h" -#include "nvim/memline.h" #include "nvim/eval.h" +#include "nvim/event/loop.h" +#include "nvim/event/signal.h" #include "nvim/fileio.h" +#include "nvim/globals.h" +#include "nvim/log.h" #include "nvim/main.h" +#include "nvim/memline.h" #include "nvim/memory.h" #include "nvim/misc1.h" -#include "nvim/event/signal.h" #include "nvim/os/signal.h" -#include "nvim/event/loop.h" +#include "nvim/vim.h" static SignalWatcher spipe, shup, squit, sterm, susr1; #ifdef SIGPWR @@ -124,27 +123,27 @@ static char * signal_name(int signum) { switch (signum) { #ifdef SIGPWR - case SIGPWR: - return "SIGPWR"; + case SIGPWR: + return "SIGPWR"; #endif #ifdef SIGPIPE - case SIGPIPE: - return "SIGPIPE"; + case SIGPIPE: + return "SIGPIPE"; #endif - case SIGTERM: - return "SIGTERM"; + case SIGTERM: + return "SIGTERM"; #ifdef SIGQUIT - case SIGQUIT: - return "SIGQUIT"; + case SIGQUIT: + return "SIGQUIT"; #endif - case SIGHUP: - return "SIGHUP"; + case SIGHUP: + return "SIGHUP"; #ifdef SIGUSR1 - case SIGUSR1: - return "SIGUSR1"; + case SIGUSR1: + return "SIGUSR1"; #endif - default: - return "Unknown"; + default: + return "Unknown"; } } @@ -173,34 +172,34 @@ static void on_signal(SignalWatcher *handle, int signum, void *data) assert(signum >= 0); switch (signum) { #ifdef SIGPWR - case SIGPWR: - // Signal of a power failure(eg batteries low), flush the swap files to - // be safe - ml_sync_all(false, false, true); - break; + case SIGPWR: + // Signal of a power failure(eg batteries low), flush the swap files to + // be safe + ml_sync_all(false, false, true); + break; #endif #ifdef SIGPIPE - case SIGPIPE: - // Ignore - break; + case SIGPIPE: + // Ignore + break; #endif - case SIGTERM: + case SIGTERM: #ifdef SIGQUIT - case SIGQUIT: + case SIGQUIT: #endif - case SIGHUP: - if (!rejecting_deadly) { - deadly_signal(signum); - } - break; + case SIGHUP: + if (!rejecting_deadly) { + deadly_signal(signum); + } + break; #ifdef SIGUSR1 - case SIGUSR1: - apply_autocmds(EVENT_SIGNAL, (char_u *)"SIGUSR1", curbuf->b_fname, true, - curbuf); - break; -#endif - default: - ELOG("invalid signal: %d", signum); - break; + case SIGUSR1: + apply_autocmds(EVENT_SIGNAL, (char_u *)"SIGUSR1", curbuf->b_fname, true, + curbuf); + break; +#endif + default: + ELOG("invalid signal: %d", signum); + break; } } |