diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2021-09-18 18:34:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-18 09:34:23 -0700 |
commit | 51a98aa0c2fe3231a0ffc8a78189bc6fafd6abf6 (patch) | |
tree | b0a582d67883864eda3231bce45dc7c159cbe97f /src/nvim/api/private/dispatch.c | |
parent | 6cad86fffdb91d3997a707ff6adb0b5991587b3e (diff) | |
download | rneovim-51a98aa0c2fe3231a0ffc8a78189bc6fafd6abf6.tar.gz rneovim-51a98aa0c2fe3231a0ffc8a78189bc6fafd6abf6.tar.bz2 rneovim-51a98aa0c2fe3231a0ffc8a78189bc6fafd6abf6.zip |
refactor: format #15702
Diffstat (limited to 'src/nvim/api/private/dispatch.c')
-rw-r--r-- | src/nvim/api/private/dispatch.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/nvim/api/private/dispatch.c b/src/nvim/api/private/dispatch.c index 9f16da4078..38ce7ca78c 100644 --- a/src/nvim/api/private/dispatch.c +++ b/src/nvim/api/private/dispatch.c @@ -1,38 +1,35 @@ // This is an open source non-commercial project. Dear PVS-Studio, please check // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com -#include <inttypes.h> -#include <stdbool.h> #include <assert.h> +#include <inttypes.h> #include <msgpack.h> +#include <stdbool.h> -#include "nvim/map.h" -#include "nvim/log.h" -#include "nvim/vim.h" -#include "nvim/msgpack_rpc/helpers.h" +#include "nvim/api/buffer.h" +#include "nvim/api/deprecated.h" +#include "nvim/api/private/defs.h" #include "nvim/api/private/dispatch.h" #include "nvim/api/private/helpers.h" -#include "nvim/api/private/defs.h" - -#include "nvim/api/buffer.h" #include "nvim/api/tabpage.h" #include "nvim/api/ui.h" #include "nvim/api/vim.h" #include "nvim/api/window.h" -#include "nvim/api/deprecated.h" +#include "nvim/log.h" +#include "nvim/map.h" +#include "nvim/msgpack_rpc/helpers.h" +#include "nvim/vim.h" static Map(String, MsgpackRpcRequestHandler) methods = MAP_INIT; -static void msgpack_rpc_add_method_handler(String method, - MsgpackRpcRequestHandler handler) +static void msgpack_rpc_add_method_handler(String method, MsgpackRpcRequestHandler handler) { map_put(String, MsgpackRpcRequestHandler)(&methods, method, handler); } /// @param name API method name /// @param name_len name size (includes terminating NUL) -MsgpackRpcRequestHandler msgpack_rpc_get_handler_for(const char *name, - size_t name_len, +MsgpackRpcRequestHandler msgpack_rpc_get_handler_for(const char *name, size_t name_len, Error *error) { String m = { .data = (char *)name, .size = name_len }; |