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

@@ -864,7 +864,7 @@ void ml_recover(bool checkext)
goto theend;
}
ZeroBlock *b0p = hp->bh_data;
if (strncmp(b0p->b0_version, S_LEN("VIM 3.0")) == 0) {
if (strncmp(b0p->b0_version, "VIM 3.0", 7) == 0) {
msg_start();
msg_outtrans(mfp->mf_fname, MSG_HIST);
msg_puts_attr(_(" cannot be used with this version of Vim.\n"),
@@ -1538,7 +1538,7 @@ static time_t swapfile_info(char *fname)
int fd = os_open(fname, O_RDONLY, 0);
if (fd >= 0) {
if (read_eintr(fd, &b0, sizeof(b0)) == sizeof(b0)) {
if (strncmp(b0.b0_version, S_LEN("VIM 3.0")) == 0) {
if (strncmp(b0.b0_version, "VIM 3.0", 7) == 0) {
msg_puts(_(" [from Vim version 3.0]"));
} else if (ml_check_b0_id(&b0) == FAIL) {
msg_puts(_(" [does not look like a Vim swap file]"));