mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 06:58:35 +00:00
refactor: reformat with uncrustify #15736
* fix function parameter comments * remove space after star in function names
This commit is contained in:
@@ -5,16 +5,16 @@
|
||||
///
|
||||
/// Functions for handling growing arrays.
|
||||
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "nvim/vim.h"
|
||||
#include "nvim/ascii.h"
|
||||
#include "nvim/garray.h"
|
||||
#include "nvim/log.h"
|
||||
#include "nvim/memory.h"
|
||||
#include "nvim/path.h"
|
||||
#include "nvim/garray.h"
|
||||
#include "nvim/strings.h"
|
||||
#include "nvim/vim.h"
|
||||
|
||||
// #include "nvim/globals.h"
|
||||
#include "nvim/memline.h"
|
||||
@@ -146,11 +146,11 @@ void ga_remove_duplicate_strings(garray_T *gap)
|
||||
char_u *ga_concat_strings_sep(const garray_T *gap, const char *sep)
|
||||
FUNC_ATTR_NONNULL_RET
|
||||
{
|
||||
const size_t nelem = (size_t) gap->ga_len;
|
||||
const size_t nelem = (size_t)gap->ga_len;
|
||||
const char **strings = gap->ga_data;
|
||||
|
||||
if (nelem == 0) {
|
||||
return (char_u *) xstrdup("");
|
||||
return (char_u *)xstrdup("");
|
||||
}
|
||||
|
||||
size_t len = 0;
|
||||
@@ -169,7 +169,7 @@ char_u *ga_concat_strings_sep(const garray_T *gap, const char *sep)
|
||||
}
|
||||
strcpy(s, strings[nelem - 1]);
|
||||
|
||||
return (char_u *) ret;
|
||||
return (char_u *)ret;
|
||||
}
|
||||
|
||||
/// For a growing array that contains a list of strings: concatenate all the
|
||||
@@ -178,7 +178,7 @@ char_u *ga_concat_strings_sep(const garray_T *gap, const char *sep)
|
||||
/// @param gap
|
||||
///
|
||||
/// @returns the concatenated strings
|
||||
char_u* ga_concat_strings(const garray_T *gap) FUNC_ATTR_NONNULL_RET
|
||||
char_u *ga_concat_strings(const garray_T *gap) FUNC_ATTR_NONNULL_RET
|
||||
{
|
||||
return ga_concat_strings_sep(gap, ",");
|
||||
}
|
||||
@@ -198,7 +198,7 @@ void ga_concat(garray_T *gap, const char_u *restrict s)
|
||||
return;
|
||||
}
|
||||
|
||||
ga_concat_len(gap, (const char *restrict) s, strlen((char *) s));
|
||||
ga_concat_len(gap, (const char *restrict)s, strlen((char *)s));
|
||||
}
|
||||
|
||||
/// Concatenate a string to a growarray which contains characters
|
||||
@@ -206,15 +206,14 @@ void ga_concat(garray_T *gap, const char_u *restrict s)
|
||||
/// @param[out] gap Growarray to modify.
|
||||
/// @param[in] s String to concatenate.
|
||||
/// @param[in] len String length.
|
||||
void ga_concat_len(garray_T *const gap, const char *restrict s,
|
||||
const size_t len)
|
||||
void ga_concat_len(garray_T *const gap, const char *restrict s, const size_t len)
|
||||
FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
if (len) {
|
||||
ga_grow(gap, (int) len);
|
||||
ga_grow(gap, (int)len);
|
||||
char *data = gap->ga_data;
|
||||
memcpy(data + gap->ga_len, s, len);
|
||||
gap->ga_len += (int) len;
|
||||
gap->ga_len += (int)len;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user