aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/optionstr.c
diff options
context:
space:
mode:
authorDundar Göc <gocdundar@gmail.com>2022-08-26 23:11:25 +0200
committerdundargoc <gocdundar@gmail.com>2022-09-09 21:02:42 +0200
commitc5322e752e9e568de907f7a1ef733bbfe342140c (patch)
tree2814462ea918c649852cc0c6f942a09f77998aad /src/nvim/optionstr.c
parent9b0e1256e25d387bf65cb9baa1edd99fbc128724 (diff)
downloadrneovim-c5322e752e9e568de907f7a1ef733bbfe342140c.tar.gz
rneovim-c5322e752e9e568de907f7a1ef733bbfe342140c.tar.bz2
rneovim-c5322e752e9e568de907f7a1ef733bbfe342140c.zip
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/optionstr.c')
-rw-r--r--src/nvim/optionstr.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c
index 8581dae7a3..9d21603754 100644
--- a/src/nvim/optionstr.c
+++ b/src/nvim/optionstr.c
@@ -683,7 +683,7 @@ char *did_set_string_option(int opt_idx, char **varp, char *oldval, char *errbuf
}
}
} else if (varp == &p_bex || varp == &p_pm) { // 'backupext' and 'patchmode'
- if (STRCMP(*p_bex == '.' ? p_bex + 1 : p_bex,
+ if (strcmp(*p_bex == '.' ? p_bex + 1 : p_bex,
*p_pm == '.' ? p_pm + 1 : p_pm) == 0) {
errmsg = e_backupext_and_patchmode_are_equal;
}
@@ -731,7 +731,7 @@ char *did_set_string_option(int opt_idx, char **varp, char *oldval, char *errbuf
}
}
} else if (varp == &p_hl) { // 'highlight'
- if (STRCMP(*varp, HIGHLIGHT_INIT) != 0) {
+ if (strcmp(*varp, HIGHLIGHT_INIT) != 0) {
errmsg = e_unsupportedoption;
}
} else if (varp == &p_jop) { // 'jumpoptions'
@@ -823,13 +823,13 @@ char *did_set_string_option(int opt_idx, char **varp, char *oldval, char *errbuf
}
if (errmsg == NULL) {
- // canonize the value, so that STRCMP() can be used on it
+ // canonize the value, so that strcmp() can be used on it
p = enc_canonize(*varp);
xfree(*varp);
*varp = p;
if (varp == &p_enc) {
// only encoding=utf-8 allowed
- if (STRCMP(p_enc, "utf-8") != 0) {
+ if (strcmp(p_enc, "utf-8") != 0) {
errmsg = e_unsupportedoption;
} else {
spell_reload();
@@ -1358,7 +1358,7 @@ char *did_set_string_option(int opt_idx, char **varp, char *oldval, char *errbuf
} else {
if (opt_strings_flags(ve, p_ve_values, flags, true) != OK) {
errmsg = e_invarg;
- } else if (STRCMP(p_ve, oldval) != 0) {
+ } else if (strcmp(p_ve, oldval) != 0) {
// Recompute cursor position in case the new 've' setting
// changes something.
validate_virtcol();
@@ -1393,7 +1393,7 @@ char *did_set_string_option(int opt_idx, char **varp, char *oldval, char *errbuf
if (!valid_filetype(*varp)) {
errmsg = e_invarg;
} else {
- value_changed = STRCMP(oldval, *varp) != 0;
+ value_changed = strcmp(oldval, *varp) != 0;
// Since we check the value, there is no need to set P_INSECURE,
// even when the value comes from a modeline.
@@ -1403,7 +1403,7 @@ char *did_set_string_option(int opt_idx, char **varp, char *oldval, char *errbuf
if (!valid_filetype(*varp)) {
errmsg = e_invarg;
} else {
- value_changed = STRCMP(oldval, *varp) != 0;
+ value_changed = strcmp(oldval, *varp) != 0;
// Since we check the value, there is no need to set P_INSECURE,
// even when the value comes from a modeline.