diff options
author | dundargoc <gocdundar@gmail.com> | 2023-12-16 22:14:28 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-12-18 16:22:13 +0100 |
commit | 6cb78e2d1c4c6c63c628c965076a07ce5f7adbb6 (patch) | |
tree | 20bfbe8b317fde86121fcf9af10975b2b95e5758 /src/nvim/os | |
parent | 8c173cec295cf8c78bdbc440dc87f0473560f69a (diff) | |
download | rneovim-6cb78e2d1c4c6c63c628c965076a07ce5f7adbb6.tar.gz rneovim-6cb78e2d1c4c6c63c628c965076a07ce5f7adbb6.tar.bz2 rneovim-6cb78e2d1c4c6c63c628c965076a07ce5f7adbb6.zip |
docs: add style rule regarding initialization
Specifically, specify that each initialization should be done on a
separate line.
Diffstat (limited to 'src/nvim/os')
-rw-r--r-- | src/nvim/os/input.c | 3 | ||||
-rw-r--r-- | src/nvim/os/shell.c | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/nvim/os/input.c b/src/nvim/os/input.c index e096749ce3..5b759e9d1e 100644 --- a/src/nvim/os/input.c +++ b/src/nvim/os/input.c @@ -415,7 +415,8 @@ static unsigned handle_mouse_event(const char **ptr, uint8_t *buf, unsigned bufs size_t input_enqueue_mouse(int code, uint8_t modifier, int grid, int row, int col) { modifier |= check_multiclick(code, grid, row, col); - uint8_t buf[7], *p = buf; + uint8_t buf[7]; + uint8_t *p = buf; if (modifier) { p[0] = K_SPECIAL; p[1] = KS_MODIFIER; diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c index a0401f3a24..26e3171c5b 100644 --- a/src/nvim/os/shell.c +++ b/src/nvim/os/shell.c @@ -671,7 +671,8 @@ char *shell_argv_to_str(char **const argv) int os_call_shell(char *cmd, ShellOpts opts, char *extra_args) { DynamicBuffer input = DYNAMIC_BUFFER_INIT; - char *output = NULL, **output_ptr = NULL; + char *output = NULL; + char **output_ptr = NULL; int current_state = State; bool forward_output = true; @@ -1123,7 +1124,8 @@ static void out_data_ring(char *output, size_t size) static void out_data_append_to_screen(char *output, size_t *count, bool eof) FUNC_ATTR_NONNULL_ALL { - char *p = output, *end = output + *count; + char *p = output; + char *end = output + *count; while (p < end) { if (*p == '\n' || *p == '\r' || *p == TAB || *p == BELL) { msg_putchar_attr((uint8_t)(*p), 0); @@ -1236,7 +1238,8 @@ static size_t word_length(const char *str) /// before we finish writing. static void read_input(DynamicBuffer *buf) { - size_t written = 0, len = 0; + size_t written = 0; + size_t len = 0; linenr_T lnum = curbuf->b_op_start.lnum; char *lp = ml_get(lnum); |