aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/spell.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-06-11 19:21:50 +0200
committerGitHub <noreply@github.com>2024-06-11 19:21:50 +0200
commit39d8651283c0458c20b755d2140c8a3cb7b581c5 (patch)
treee023eb5f914c1928bc885093db9fd6d952c65d7d /src/nvim/spell.c
parentc37695a5d5f2e8914fff86f3581bed70b4c85d3c (diff)
parentbbd2f340a2895ed59785f952b2585e6590602cad (diff)
downloadrneovim-39d8651283c0458c20b755d2140c8a3cb7b581c5.tar.gz
rneovim-39d8651283c0458c20b755d2140c8a3cb7b581c5.tar.bz2
rneovim-39d8651283c0458c20b755d2140c8a3cb7b581c5.zip
Merge pull request #29278 from bfredl/strcat
refactor(memory): use builtin strcat() instead of STRCAT()
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r--src/nvim/spell.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c
index 39145d73ed..8ec28c7f61 100644
--- a/src/nvim/spell.c
+++ b/src/nvim/spell.c
@@ -2092,7 +2092,7 @@ char *parse_spelllang(win_T *wp)
} else {
// One entry in 'spellfile'.
copy_option_part(&spf, spf_name, MAXPATHL - 5, ",");
- STRCAT(spf_name, ".spl");
+ strcat(spf_name, ".spl");
int c;
// If it was already found above then skip it.
@@ -2677,7 +2677,7 @@ void ex_spellrepall(exarg_T *eap)
char *p = xmalloc((size_t)get_cursor_line_len() + (size_t)addlen + 1);
memmove(p, line, (size_t)curwin->w_cursor.col);
STRCPY(p + curwin->w_cursor.col, repl_to);
- STRCAT(p, line + curwin->w_cursor.col + repl_from_len);
+ strcat(p, line + curwin->w_cursor.col + repl_from_len);
ml_replace(curwin->w_cursor.lnum, p, false);
inserted_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col,
(int)repl_from_len, (int)repl_to_len);
@@ -3444,14 +3444,14 @@ static void dump_word(slang_T *slang, char *word, char *pat, Direction *dir, int
// Add flags and regions after a slash.
if ((flags & (WF_BANNED | WF_RARE | WF_REGION)) || keepcap) {
STRCPY(badword, p);
- STRCAT(badword, "/");
+ strcat(badword, "/");
if (keepcap) {
- STRCAT(badword, "=");
+ strcat(badword, "=");
}
if (flags & WF_BANNED) {
- STRCAT(badword, "!");
+ strcat(badword, "!");
} else if (flags & WF_RARE) {
- STRCAT(badword, "?");
+ strcat(badword, "?");
}
if (flags & WF_REGION) {
for (int i = 0; i < 7; i++) {