diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-09-12 21:50:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-12 21:50:31 +0200 |
commit | f6232e160b96e2607edcd5afa7207a1e4aadf805 (patch) | |
tree | 41fa053ec7eff6b7edd278ec892392896f984722 /src/nvim/sign.c | |
parent | fd70e2bff2440181f63fe124738cf2a025d1e6a5 (diff) | |
parent | 3ff46544c9872b4161fd098569c30b55fe3abd36 (diff) | |
download | rneovim-f6232e160b96e2607edcd5afa7207a1e4aadf805.tar.gz rneovim-f6232e160b96e2607edcd5afa7207a1e4aadf805.tar.bz2 rneovim-f6232e160b96e2607edcd5afa7207a1e4aadf805.zip |
Merge pull request #20077 from dundargoc/refactor/char_u/11
refactor: replace char_u with char 11: remove `STRLEN` part 1
Diffstat (limited to 'src/nvim/sign.c')
-rw-r--r-- | src/nvim/sign.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/sign.c b/src/nvim/sign.c index ed546cf303..5ce9ee4546 100644 --- a/src/nvim/sign.c +++ b/src/nvim/sign.c @@ -78,10 +78,10 @@ static signgroup_T *sign_group_ref(const char *groupname) signgroup_T *group; hash = hash_hash((char_u *)groupname); - hi = hash_lookup(&sg_table, (char *)groupname, STRLEN(groupname), hash); + hi = hash_lookup(&sg_table, (char *)groupname, strlen(groupname), hash); if (HASHITEM_EMPTY(hi)) { // new group - group = xmalloc(sizeof(signgroup_T) + STRLEN(groupname)); + group = xmalloc(sizeof(signgroup_T) + strlen(groupname)); STRCPY(group->sg_name, groupname); group->sg_refcount = 1; @@ -868,7 +868,7 @@ static int sign_define_init_text(sign_T *sp, char *text) int cells; size_t len; - endp = text + (int)STRLEN(text); + endp = text + (int)strlen(text); for (s = text; s + 1 < endp; s++) { if (*s == '\\') { // Remove a backslash, so that it is possible @@ -951,7 +951,7 @@ static int sign_define_by_name(char *name, char *icon, char *linehl, char *text, if (*linehl == NUL) { sp->sn_line_hl = 0; } else { - sp->sn_line_hl = syn_check_group(linehl, STRLEN(linehl)); + sp->sn_line_hl = syn_check_group(linehl, strlen(linehl)); } } @@ -959,7 +959,7 @@ static int sign_define_by_name(char *name, char *icon, char *linehl, char *text, if (*texthl == NUL) { sp->sn_text_hl = 0; } else { - sp->sn_text_hl = syn_check_group(texthl, STRLEN(texthl)); + sp->sn_text_hl = syn_check_group(texthl, strlen(texthl)); } } @@ -967,7 +967,7 @@ static int sign_define_by_name(char *name, char *icon, char *linehl, char *text, if (*culhl == NUL) { sp->sn_cul_hl = 0; } else { - sp->sn_cul_hl = syn_check_group(culhl, STRLEN(culhl)); + sp->sn_cul_hl = syn_check_group(culhl, strlen(culhl)); } } @@ -975,7 +975,7 @@ static int sign_define_by_name(char *name, char *icon, char *linehl, char *text, if (*numhl == NUL) { sp->sn_num_hl = 0; } else { - sp->sn_num_hl = syn_check_group(numhl, STRLEN(numhl)); + sp->sn_num_hl = syn_check_group(numhl, strlen(numhl)); } } @@ -1139,7 +1139,7 @@ static linenr_T sign_jump(int sign_id, char *sign_group, buf_T *buf) emsg(_("E934: Cannot jump to a buffer that does not have a name")); return -1; } - size_t cmdlen = STRLEN(buf->b_fname) + 24; + size_t cmdlen = strlen(buf->b_fname) + 24; char *cmd = xmallocz(cmdlen); snprintf(cmd, cmdlen, "e +%" PRId64 " %s", (int64_t)lnum, buf->b_fname); |