mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
refactor: remove space after star
This commit is contained in:
parent
38dd53c525
commit
6059784770
@ -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;
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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)) {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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;
|
||||
|
@ -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));
|
||||
|
@ -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" :
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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++;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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));
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user