aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-11-28 18:11:41 +0100
committerGitHub <noreply@github.com>2022-11-28 18:11:41 +0100
commitccd17543f32a892814c3d32eb5e979722b843da9 (patch)
treef4768eb7d7be52402ccd55e3e4e04aecceab3e42 /src/nvim/syntax.c
parentb2bb3973d9c7f25acfead2718d74fcf5b1e4551e (diff)
parent3b96ccf7d35be90e49029dec76344d3d92ad91dc (diff)
downloadrneovim-ccd17543f32a892814c3d32eb5e979722b843da9.tar.gz
rneovim-ccd17543f32a892814c3d32eb5e979722b843da9.tar.bz2
rneovim-ccd17543f32a892814c3d32eb5e979722b843da9.zip
Merge pull request #21200 from dundargoc/refactor/char_u/15
refactor: replace char_u with char 15 - remove STRNLEN and STRNCPY
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r--src/nvim/syntax.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c
index 6af39d06d3..0b92757fd9 100644
--- a/src/nvim/syntax.c
+++ b/src/nvim/syntax.c
@@ -4328,7 +4328,7 @@ static void syn_cmd_region(exarg_T *eap, int syncing)
if (item == ITEM_MATCHGROUP) {
p = skiptowhite(rest);
- if ((p - rest == 4 && STRNCMP(rest, "NONE", 4) == 0) || eap->skip) {
+ if ((p - rest == 4 && strncmp(rest, "NONE", 4) == 0) || eap->skip) {
matchgroup_id = 0;
} else {
matchgroup_id = syn_check_group(rest, (size_t)(p - rest));
@@ -4765,7 +4765,7 @@ static char *get_syn_pattern(char *arg, synpat_T *ci)
end++;
do {
for (idx = SPO_COUNT; --idx >= 0;) {
- if (STRNCMP(end, spo_name_tab[idx], 3) == 0) {
+ if (strncmp(end, spo_name_tab[idx], 3) == 0) {
break;
}
}
@@ -4854,10 +4854,10 @@ static void syn_cmd_sync(exarg_T *eap, int syncing)
} else if (!eap->skip) {
curwin->w_s->b_syn_sync_id = (int16_t)syn_name2id("Comment");
}
- } else if (STRNCMP(key, "LINES", 5) == 0
- || STRNCMP(key, "MINLINES", 8) == 0
- || STRNCMP(key, "MAXLINES", 8) == 0
- || STRNCMP(key, "LINEBREAKS", 10) == 0) {
+ } else if (strncmp(key, "LINES", 5) == 0
+ || strncmp(key, "MINLINES", 8) == 0
+ || strncmp(key, "MAXLINES", 8) == 0
+ || strncmp(key, "LINEBREAKS", 10) == 0) {
if (key[4] == 'S') {
arg_end = key + 6;
} else if (key[0] == 'L') {