diff options
author | Dundar Göc <gocdundar@gmail.com> | 2021-10-12 18:21:12 +0200 |
---|---|---|
committer | Dundar Göc <gocdundar@gmail.com> | 2021-10-19 15:20:33 +0200 |
commit | 6059784770c4c88fb6fe528b9f7634192fa1164e (patch) | |
tree | cc91a6759c739044a5a338bc938cfa033d7273ac | |
parent | 38dd53c525054daf83dba27d7d46e90e8b41fa50 (diff) | |
download | rneovim-6059784770c4c88fb6fe528b9f7634192fa1164e.tar.gz rneovim-6059784770c4c88fb6fe528b9f7634192fa1164e.tar.bz2 rneovim-6059784770c4c88fb6fe528b9f7634192fa1164e.zip |
refactor: remove space after star
-rw-r--r-- | src/nvim/eval/funcs.c | 8 | ||||
-rw-r--r-- | src/nvim/event/loop.h | 2 | ||||
-rw-r--r-- | src/nvim/ex_docmd.c | 2 | ||||
-rw-r--r-- | src/nvim/fileio.c | 2 | ||||
-rw-r--r-- | src/nvim/hardcopy.c | 2 | ||||
-rw-r--r-- | src/nvim/if_cscope.c | 2 | ||||
-rw-r--r-- | src/nvim/if_cscope_defs.h | 16 | ||||
-rw-r--r-- | src/nvim/lua/treesitter.c | 2 | ||||
-rw-r--r-- | src/nvim/lua/xdiff.c | 6 | ||||
-rw-r--r-- | src/nvim/map_defs.h | 4 | ||||
-rw-r--r-- | src/nvim/menu.c | 4 | ||||
-rw-r--r-- | src/nvim/move.c | 2 | ||||
-rw-r--r-- | src/nvim/ops.c | 2 | ||||
-rw-r--r-- | src/nvim/screen.c | 4 | ||||
-rw-r--r-- | src/nvim/syntax.c | 2 | ||||
-rw-r--r-- | src/nvim/tui/tui.c | 6 | ||||
-rw-r--r-- | src/nvim/undo.c | 2 | ||||
-rw-r--r-- | src/nvim/version.h | 4 | ||||
-rw-r--r-- | src/uncrustify.cfg | 4 |
19 files changed, 38 insertions, 38 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index 5c22bf0f8f..946bde060d 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -1963,13 +1963,13 @@ static void f_environ(typval_T *argvars, typval_T *rettv, FunPtr fptr) os_copy_fullenv(env, env_size); for (ssize_t i = env_size - 1; i >= 0; i--) { - const char * str = env[i]; + const char *str = env[i]; const char * const end = strchr(str + (str[0] == '=' ? 1 : 0), '='); assert(end != NULL); ptrdiff_t len = end - str; assert(len > 0); - const char * value = str + len + 1; + const char *value = str + len + 1; char c = env[i][len]; env[i][len] = NUL; @@ -5345,7 +5345,7 @@ static const char *required_env_vars[] = { static dict_T *create_environment(const dictitem_T *job_env, const bool clear_env, const bool pty, const char * const pty_term_name) { - dict_T * env = tv_dict_alloc(); + dict_T *env = tv_dict_alloc(); if (!clear_env) { typval_T temp_env = TV_INITIAL_VALUE; @@ -9644,7 +9644,7 @@ static void f_sign_jump(typval_T *argvars, typval_T *rettv, FunPtr fptr) } // Sign group - const char * sign_group_chk = tv_get_string_chk(&argvars[1]); + const char *sign_group_chk = tv_get_string_chk(&argvars[1]); if (sign_group_chk == NULL) { return; } diff --git a/src/nvim/event/loop.h b/src/nvim/event/loop.h index 03cf7e489a..acd1d1a334 100644 --- a/src/nvim/event/loop.h +++ b/src/nvim/event/loop.h @@ -8,7 +8,7 @@ #include "nvim/lib/klist.h" #include "nvim/os/time.h" -typedef void * WatcherPtr; +typedef void *WatcherPtr; #define _noop(x) KLIST_INIT(WatcherPtr, WatcherPtr, _noop) diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index b2e60c76d2..4524026e3f 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -5697,7 +5697,7 @@ void ex_comclear(exarg_T *eap) uc_clear(&curbuf->b_ucmds); } -static void free_ucmd(ucmd_T * cmd) { +static void free_ucmd(ucmd_T *cmd) { xfree(cmd->uc_name); xfree(cmd->uc_rep); xfree(cmd->uc_compl_arg); diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index e4b4232337..4a33d74011 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -4684,7 +4684,7 @@ int vim_rename(const char_u *from, const char_u *to) } STRCPY(tempname, from); for (n = 123; n < 99999; n++) { - char * tail = (char *)path_tail(tempname); + char *tail = (char *)path_tail(tempname); snprintf(tail, (MAXPATHL + 1) - (tail - (char *)tempname - 1), "%d", n); if (!os_path_exists(tempname)) { diff --git a/src/nvim/hardcopy.c b/src/nvim/hardcopy.c index 07bf03944d..0b828777f4 100644 --- a/src/nvim/hardcopy.c +++ b/src/nvim/hardcopy.c @@ -2438,7 +2438,7 @@ int mch_print_init(prt_settings_T *psettings, char_u *jobname, int forceit) static int prt_add_resource(struct prt_ps_resource_S *resource) { - FILE * fd_resource; + FILE *fd_resource; char_u resource_buffer[512]; size_t bytes_read; diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c index f236b966ca..d731e79473 100644 --- a/src/nvim/if_cscope.c +++ b/src/nvim/if_cscope.c @@ -41,7 +41,7 @@ # include "if_cscope.c.generated.h" #endif -static csinfo_T * csinfo = NULL; +static csinfo_T *csinfo = NULL; static size_t csinfo_size = 0; // number of items allocated in csinfo[] static int eap_arg_len; // length of eap->arg, set in cs_lookup_cmd() diff --git a/src/nvim/if_cscope_defs.h b/src/nvim/if_cscope_defs.h index 39cfd807f9..182cbc28e1 100644 --- a/src/nvim/if_cscope_defs.h +++ b/src/nvim/if_cscope_defs.h @@ -26,17 +26,17 @@ // See ":help cscope-find" for the possible queries. typedef struct { - char * name; + char *name; int (*func)(exarg_T *eap); - char * help; - char * usage; + char *help; + char *usage; int cansplit; // if supports splitting window } cscmd_T; typedef struct csi { - char * fname; // cscope db name - char * ppath; // path to prepend (the -P option) - char * flags; // additional cscope flags/options (e.g, -p2) + char *fname; // cscope db name + char *ppath; // path to prepend (the -P option) + char *flags; // additional cscope flags/options (e.g, -p2) #if defined(UNIX) pid_t pid; // PID of the connected cscope process #else @@ -48,8 +48,8 @@ typedef struct csi { #endif FileID file_id; - FILE * fr_fp; // from cscope: FILE. - FILE * to_fp; // to cscope: FILE. + FILE *fr_fp; // from cscope: FILE. + FILE *to_fp; // to cscope: FILE. } csinfo_T; typedef enum { Add, Find, Help, Kill, Reset, Show } csid_e; diff --git a/src/nvim/lua/treesitter.c b/src/nvim/lua/treesitter.c index bd978cc8ab..02bd612149 100644 --- a/src/nvim/lua/treesitter.c +++ b/src/nvim/lua/treesitter.c @@ -934,7 +934,7 @@ push: ts_tree_cursor_current_node(ud), lua_upvalueindex(2)); // [node] - const char * field = ts_tree_cursor_current_field_name(ud); + const char *field = ts_tree_cursor_current_field_name(ud); if (field != NULL) { lua_pushstring(L, ts_tree_cursor_current_field_name(ud)); diff --git a/src/nvim/lua/xdiff.c b/src/nvim/lua/xdiff.c index 3955fbe72c..7eda9b6270 100644 --- a/src/nvim/lua/xdiff.c +++ b/src/nvim/lua/xdiff.c @@ -62,7 +62,7 @@ static int hunk_locations_cb(long start_a, long count_a, long start_b, long coun start_b += 1; } - lua_State * lstate = (lua_State *)cb_data; + lua_State *lstate = (lua_State *)cb_data; lua_createtable(lstate, 0, 0); lua_pushinteger(lstate, start_a); @@ -93,7 +93,7 @@ static int call_on_hunk_cb(long start_a, long count_a, long start_b, long count_ } hunkpriv_t *priv = (hunkpriv_t *)cb_data; - lua_State * lstate = priv->lstate; + lua_State *lstate = priv->lstate; Error *err = priv->err; const int fidx = lua_gettop(lstate); lua_pushvalue(lstate, fidx); @@ -133,7 +133,7 @@ static mmfile_t get_string_arg(lua_State *lstate, int idx) static bool check_xdiff_opt(ObjectType actType, ObjectType expType, const char *name, Error *err) { if (actType != expType) { - const char * type_str = + const char *type_str = expType == kObjectTypeString ? "string" : expType == kObjectTypeInteger ? "integer" : expType == kObjectTypeBoolean ? "boolean" : diff --git a/src/nvim/map_defs.h b/src/nvim/map_defs.h index d5a302362f..7b4596ce2e 100644 --- a/src/nvim/map_defs.h +++ b/src/nvim/map_defs.h @@ -3,8 +3,8 @@ #include "nvim/lib/khash.h" -typedef const char * cstr_t; -typedef void * ptr_t; +typedef const char *cstr_t; +typedef void *ptr_t; #define Map(T, U) Map_##T##_##U #define PMap(T) Map(T, ptr_t) diff --git a/src/nvim/menu.c b/src/nvim/menu.c index d89f58163f..2250002f86 100644 --- a/src/nvim/menu.c +++ b/src/nvim/menu.c @@ -1523,7 +1523,7 @@ typedef struct { static garray_T menutrans_ga = GA_EMPTY_INIT_VALUE; #define FREE_MENUTRANS(mt) \ - menutrans_T * _mt = (mt); \ + menutrans_T *_mt = (mt); \ xfree(_mt->from); \ xfree(_mt->from_noamp); \ xfree(_mt->to) @@ -1568,7 +1568,7 @@ void ex_menutranslate(exarg_T *eap) menu_translate_tab_and_shift(to); menu_unescape_name(from); menu_unescape_name(to); - menutrans_T * tp = GA_APPEND_VIA_PTR(menutrans_T, &menutrans_ga); + menutrans_T *tp = GA_APPEND_VIA_PTR(menutrans_T, &menutrans_ga); tp->from = from; tp->from_noamp = from_noamp; tp->to = to; diff --git a/src/nvim/move.c b/src/nvim/move.c index 918e0a5c4f..64ba02064f 100644 --- a/src/nvim/move.c +++ b/src/nvim/move.c @@ -344,7 +344,7 @@ void update_topline(win_T *wp) /* * Update win->w_topline to move the cursor onto the screen. */ -void update_topline_win(win_T * win) +void update_topline_win(win_T *win) { win_T *save_curwin; switch_win(&save_curwin, NULL, win, NULL, true); diff --git a/src/nvim/ops.c b/src/nvim/ops.c index bd8991e5f2..3a8f7c42a5 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -376,7 +376,7 @@ static void shift_block(oparg_T *oap, int amount) */ total += bd.pre_whitesp; // all virtual WS up to & incl a split TAB colnr_T ws_vcol = bd.start_vcol - bd.pre_whitesp; - char_u * old_textstart = bd.textstart; + char_u *old_textstart = bd.textstart; if (bd.startspaces) { if (utfc_ptr2len(bd.textstart) == 1) { bd.textstart++; diff --git a/src/nvim/screen.c b/src/nvim/screen.c index c65fd3a90b..32eb28e761 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -166,7 +166,7 @@ static bool resizing = false; #endif #define SEARCH_HL_PRIORITY 0 -static char * provider_err = NULL; +static char *provider_err = NULL; static bool provider_invoke(NS ns_id, const char *name, LuaRef ref, Array args, bool default_true) { @@ -2418,7 +2418,7 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool noc // If this line has a sign with line highlighting set line_attr. // TODO(bfredl, vigoux): this should not take priority over decoration! - sign_attrs_T * sattr = sign_get_attr(SIGN_LINEHL, sattrs, 0, 1); + sign_attrs_T *sattr = sign_get_attr(SIGN_LINEHL, sattrs, 0, 1); if (sattr != NULL) { line_attr = sattr->sat_linehl; } diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index 3afc2aff52..1e14f988f1 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -7728,7 +7728,7 @@ static int syn_add_group(char_u *name) char *const name_up = (char *)vim_strsave_up(name); // Append another syntax_highlight entry. - struct hl_group * hlgp = GA_APPEND_VIA_PTR(struct hl_group, &highlight_ga); + struct hl_group *hlgp = GA_APPEND_VIA_PTR(struct hl_group, &highlight_ga); memset(hlgp, 0, sizeof(*hlgp)); hlgp->sg_name = name; hlgp->sg_rgb_bg = -1; diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index 612eaf6667..fcfe862044 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -178,7 +178,7 @@ UI *tui_start(void) return ui_bridge_attach(ui, tui_main, tui_scheduler); } -static size_t unibi_pre_fmt_str(TUIData *data, unsigned int unibi_index, char * buf, size_t len) +static size_t unibi_pre_fmt_str(TUIData *data, unsigned int unibi_index, char *buf, size_t len) { const char *str = unibi_get_str(data->ut, unibi_index); if (!str) { @@ -1541,7 +1541,7 @@ static int unibi_find_ext_str(unibi_term *ut, const char *name) { size_t max = unibi_count_ext_str(ut); for (size_t i = 0; i < max; i++) { - const char * n = unibi_get_ext_str_name(ut, i); + const char *n = unibi_get_ext_str_name(ut, i); if (n && 0 == strcmp(n, name)) { return (int)i; } @@ -1553,7 +1553,7 @@ static int unibi_find_ext_bool(unibi_term *ut, const char *name) { size_t max = unibi_count_ext_bool(ut); for (size_t i = 0; i < max; i++) { - const char * n = unibi_get_ext_bool_name(ut, i); + const char *n = unibi_get_ext_bool_name(ut, i); if (n && 0 == strcmp(n, name)) { return (int)i; } diff --git a/src/nvim/undo.c b/src/nvim/undo.c index 43e6325aa5..5261f9e2ec 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -1078,7 +1078,7 @@ static bool serialize_uep(bufinfo_T *bi, u_entry_T *uep) return true; } -static u_entry_T *unserialize_uep(bufinfo_T * bi, bool *error, const char *file_name) +static u_entry_T *unserialize_uep(bufinfo_T *bi, bool *error, const char *file_name) { u_entry_T *uep = xmalloc(sizeof(u_entry_T)); memset(uep, 0, sizeof(u_entry_T)); diff --git a/src/nvim/version.h b/src/nvim/version.h index c3c884a078..a19e863152 100644 --- a/src/nvim/version.h +++ b/src/nvim/version.h @@ -5,8 +5,8 @@ #include "nvim/macros.h" // defined in version.c -extern char * Version; -extern char * longVersion; +extern char *Version; +extern char *longVersion; // // Vim version number, name, etc. Patchlevel is defined in version.c. diff --git a/src/uncrustify.cfg b/src/uncrustify.cfg index bb2d675cb5..13d1f472ed 100644 --- a/src/uncrustify.cfg +++ b/src/uncrustify.cfg @@ -196,7 +196,7 @@ sp_between_ptr_star = ignore # ignore/add/remove/force/not_defined # Add or remove space after pointer star '*', if followed by a word. # # Overrides sp_type_func. -sp_after_ptr_star = ignore # ignore/add/remove/force/not_defined +sp_after_ptr_star = remove # ignore/add/remove/force/not_defined # Add or remove space after pointer caret '^', if followed by a word. sp_after_ptr_block_caret = ignore # ignore/add/remove/force/not_defined @@ -3307,5 +3307,5 @@ set QUESTION REAL_FATTR_CONST set QUESTION REAL_FATTR_NONNULL_ALL set QUESTION REAL_FATTR_PURE set QUESTION REAL_FATTR_WARN_UNUSED_RESULT -# option(s) with 'not default' value: 65 +# option(s) with 'not default' value: 66 # |