aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/shell.c
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-12-16 22:14:28 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-12-18 16:22:13 +0100
commit6cb78e2d1c4c6c63c628c965076a07ce5f7adbb6 (patch)
tree20bfbe8b317fde86121fcf9af10975b2b95e5758 /src/nvim/os/shell.c
parent8c173cec295cf8c78bdbc440dc87f0473560f69a (diff)
downloadrneovim-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/shell.c')
-rw-r--r--src/nvim/os/shell.c9
1 files changed, 6 insertions, 3 deletions
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);