diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-06-11 19:21:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 19:21:50 +0200 |
commit | 39d8651283c0458c20b755d2140c8a3cb7b581c5 (patch) | |
tree | e023eb5f914c1928bc885093db9fd6d952c65d7d /src/nvim/spellfile.c | |
parent | c37695a5d5f2e8914fff86f3581bed70b4c85d3c (diff) | |
parent | bbd2f340a2895ed59785f952b2585e6590602cad (diff) | |
download | rneovim-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/spellfile.c')
-rw-r--r-- | src/nvim/spellfile.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/nvim/spellfile.c b/src/nvim/spellfile.c index aa7f9ba3d7..3feae980c5 100644 --- a/src/nvim/spellfile.c +++ b/src/nvim/spellfile.c @@ -2140,11 +2140,11 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname) + strlen(items[1]) + 3, false); if (spin->si_info != NULL) { STRCPY(p, spin->si_info); - STRCAT(p, "\n"); + strcat(p, "\n"); } - STRCAT(p, items[0]); - STRCAT(p, " "); - STRCAT(p, items[1]); + strcat(p, items[0]); + strcat(p, " "); + strcat(p, items[1]); spin->si_info = p; } else if (is_aff_rule(items, itemcnt, "MIDWORD", 2) && midword == NULL) { midword = getroom_save(spin, items[1]); @@ -2200,7 +2200,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname) // "Na" into "Na+", "1234" into "1234+". p = getroom(spin, strlen(items[1]) + 2, false); STRCPY(p, items[1]); - STRCAT(p, "+"); + strcat(p, "+"); compflags = p; } else if (is_aff_rule(items, itemcnt, "COMPOUNDRULES", 2)) { // We don't use the count, but do check that it's a number and @@ -2221,9 +2221,9 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname) p = getroom(spin, (size_t)l, false); if (compflags != NULL) { STRCPY(p, compflags); - STRCAT(p, "/"); + strcat(p, "/"); } - STRCAT(p, items[1]); + strcat(p, items[1]); compflags = p; } } else if (is_aff_rule(items, itemcnt, "COMPOUNDWORDMAX", 2) @@ -2844,7 +2844,7 @@ static void process_compflags(spellinfo_T *spin, afffile_T *aff, char *compflags char *p = getroom(spin, (size_t)len, false); if (spin->si_compflags != NULL) { STRCPY(p, spin->si_compflags); - STRCAT(p, "/"); + strcat(p, "/"); } spin->si_compflags = p; uint8_t *tp = (uint8_t *)p + strlen(p); @@ -3386,7 +3386,7 @@ static int store_aff_word(spellinfo_T *spin, char *word, char *afflist, afffile_ MB_PTR_ADV(p); } } - STRCAT(newword, p); + strcat(newword, p); } else { // suffix: chop/add at the end of the word xstrlcpy(newword, word, MAXWLEN); @@ -3400,7 +3400,7 @@ static int store_aff_word(spellinfo_T *spin, char *word, char *afflist, afffile_ *p = NUL; } if (ae->ae_add != NULL) { - STRCAT(newword, ae->ae_add); + strcat(newword, ae->ae_add); } } |