aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/diff.c
diff options
context:
space:
mode:
authorDundar Göc <gocdundar@gmail.com>2022-08-26 23:11:25 +0200
committerdundargoc <gocdundar@gmail.com>2022-11-19 16:27:10 +0100
commit40f3f75867bf03abfd90e0389a38197a00d37af1 (patch)
treed14642161d70ef658f5b23fea1693e0be9a84804 /src/nvim/diff.c
parent6e8ed5abaa9c33d1d78ab7ff5b07dd5bac623a1d (diff)
downloadrneovim-40f3f75867bf03abfd90e0389a38197a00d37af1.tar.gz
rneovim-40f3f75867bf03abfd90e0389a38197a00d37af1.tar.bz2
rneovim-40f3f75867bf03abfd90e0389a38197a00d37af1.zip
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r--src/nvim/diff.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c
index 4b71142c11..121b98d047 100644
--- a/src/nvim/diff.c
+++ b/src/nvim/diff.c
@@ -1043,7 +1043,7 @@ static int check_external_diff(diffio_T *diffio)
for (;;) {
// For normal diff there must be a line that contains
// "1c1". For unified diff "@@ -1 +1 @@".
- if (vim_fgets((char_u *)linebuf, LBUFLEN, fd)) {
+ if (vim_fgets(linebuf, LBUFLEN, fd)) {
break;
}
@@ -1218,9 +1218,9 @@ void ex_diffpatch(exarg_T *eap)
esc_name =
(char *)vim_strsave_shellescape((char_u *)(fullname != NULL ? fullname : eap->arg), true, true);
#else
- esc_name = vim_strsave_shellescape(eap->arg, true, true);
+ esc_name = (char *)vim_strsave_shellescape(eap->arg, true, true);
#endif
- size_t buflen = STRLEN(tmp_orig) + STRLEN(esc_name) + STRLEN(tmp_new) + 16;
+ size_t buflen = strlen(tmp_orig) + strlen(esc_name) + strlen(tmp_new) + 16;
buf = xmalloc(buflen);
#ifdef UNIX
@@ -1557,7 +1557,7 @@ static bool extract_hunk(FILE *fd, diffhunk_T *hunk, diffstyle_T *diffstyle)
{
for (;;) {
char line[LBUFLEN]; // only need to hold the diff line
- if (vim_fgets((char_u *)line, LBUFLEN, fd)) {
+ if (vim_fgets(line, LBUFLEN, fd)) {
return true; // end of file
}
@@ -1577,9 +1577,9 @@ static bool extract_hunk(FILE *fd, diffhunk_T *hunk, diffstyle_T *diffstyle)
} else if ((STRNCMP(line, "@@ ", 3) == 0)) {
*diffstyle = DIFF_UNIFIED;
} else if ((STRNCMP(line, "--- ", 4) == 0) // -V501
- && (vim_fgets((char_u *)line, LBUFLEN, fd) == 0) // -V501
+ && (vim_fgets(line, LBUFLEN, fd) == 0) // -V501
&& (STRNCMP(line, "+++ ", 4) == 0)
- && (vim_fgets((char_u *)line, LBUFLEN, fd) == 0) // -V501
+ && (vim_fgets(line, LBUFLEN, fd) == 0) // -V501
&& (STRNCMP(line, "@@ ", 3) == 0)) {
*diffstyle = DIFF_UNIFIED;
} else {