revert: "refactor: use S_LEN macro" (#29319)

revert: "refactor: use S_LEN(s) instead of s, n (#29219)"

This reverts commit c37695a5d5.
This commit is contained in:
Lewis Russell
2024-06-13 22:20:06 +01:00
committed by GitHub
parent 6589d05894
commit 43d8435cf8
42 changed files with 258 additions and 263 deletions

View File

@@ -288,15 +288,15 @@ int check_signcolumn(win_T *wp)
}
if (check_opt_strings(val, p_scl_values, false) == OK) {
if (!strncmp(val, S_LEN("no"))) { // no
if (!strncmp(val, "no", 2)) { // no
wp->w_minscwidth = wp->w_maxscwidth = SCL_NO;
} else if (!strncmp(val, S_LEN("nu")) && (wp->w_p_nu || wp->w_p_rnu)) { // number
} else if (!strncmp(val, "nu", 2) && (wp->w_p_nu || wp->w_p_rnu)) { // number
wp->w_minscwidth = wp->w_maxscwidth = SCL_NUM;
} else if (!strncmp(val, S_LEN("yes:"))) { // yes:<NUM>
} else if (!strncmp(val, "yes:", 4)) { // yes:<NUM>
wp->w_minscwidth = wp->w_maxscwidth = val[4] - '0';
} else if (*val == 'y') { // yes
wp->w_minscwidth = wp->w_maxscwidth = 1;
} else if (!strncmp(val, S_LEN("auto:"))) { // auto:<NUM>
} else if (!strncmp(val, "auto:", 5)) { // auto:<NUM>
wp->w_minscwidth = 0;
wp->w_maxscwidth = val[5] - '0';
} else { // auto
@@ -306,7 +306,7 @@ int check_signcolumn(win_T *wp)
return OK;
}
if (strncmp(val, S_LEN("auto:")) != 0
if (strncmp(val, "auto:", 5) != 0
|| strlen(val) != 8
|| !ascii_isdigit(val[5])
|| val[6] != '-'
@@ -1732,9 +1732,9 @@ const char *did_set_mousescroll(optset_T *args FUNC_ATTR_UNUSED)
OptInt *direction;
if (memcmp(string, S_LEN("ver:")) == 0) {
if (memcmp(string, "ver:", 4) == 0) {
direction = &vertical;
} else if (memcmp(string, S_LEN("hor:")) == 0) {
} else if (memcmp(string, "hor:", 4) == 0) {
direction = &horizontal;
} else {
return e_invarg;