diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-09-10 14:33:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-10 14:33:43 +0200 |
commit | 4638fcf4fb688fa548b8ce337ec3b7c1327fbfe9 (patch) | |
tree | b62862e24e506e0010852d23b68c79103637500c /src/nvim/hardcopy.c | |
parent | 40f9f479b746d0f76fbdd4bc0567d593ca7a6070 (diff) | |
parent | 684bc749efef0fa31395d349f4495d79ec5f3fd5 (diff) | |
download | rneovim-4638fcf4fb688fa548b8ce337ec3b7c1327fbfe9.tar.gz rneovim-4638fcf4fb688fa548b8ce337ec3b7c1327fbfe9.tar.bz2 rneovim-4638fcf4fb688fa548b8ce337ec3b7c1327fbfe9.zip |
Merge pull request #20068 from dundargoc/refactor/char_u/10
refactor: replace char_u with char 10: remove `FNAMECMP`, `FNAMENCMP` and `STRLCAT`
Diffstat (limited to 'src/nvim/hardcopy.c')
-rw-r--r-- | src/nvim/hardcopy.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/hardcopy.c b/src/nvim/hardcopy.c index 903349dcae..b530e2c5ec 100644 --- a/src/nvim/hardcopy.c +++ b/src/nvim/hardcopy.c @@ -734,7 +734,7 @@ void ex_hardcopy(exarg_T *eap) sprintf((char *)IObuff, _("Printing page %d (%zu%%)"), page_count + 1 + side, prtpos.bytes_printed * 100 / bytes_to_print); - if (!mch_print_begin_page(IObuff)) { + if (!mch_print_begin_page((char_u *)IObuff)) { goto print_fail; } @@ -744,7 +744,7 @@ void ex_hardcopy(exarg_T *eap) collated_copies + 1, settings.n_collated_copies); } - prt_message(IObuff); + prt_message((char_u *)IObuff); // Output header if required if (prt_header_height() > 0) { @@ -798,13 +798,13 @@ void ex_hardcopy(exarg_T *eap) vim_snprintf((char *)IObuff, IOSIZE, _("Printed: %s"), settings.jobname); - prt_message(IObuff); + prt_message((char_u *)IObuff); } print_fail: if (got_int || settings.user_abort) { - sprintf((char *)IObuff, "%s", _("Printing aborted")); - prt_message(IObuff); + snprintf(IObuff, IOSIZE, "%s", _("Printing aborted")); + prt_message((char_u *)IObuff); } mch_print_end(&settings); @@ -1493,8 +1493,8 @@ static int prt_find_resource(char *name, struct prt_ps_resource_S *resource) // Look for named resource file in runtimepath STRCPY(buffer, "print"); add_pathsep(buffer); - STRLCAT(buffer, name, MAXPATHL); - STRLCAT(buffer, ".ps", MAXPATHL); + xstrlcat(buffer, name, MAXPATHL); + xstrlcat(buffer, ".ps", MAXPATHL); resource->filename[0] = NUL; retval = (do_in_runtimepath(buffer, 0, prt_resource_name, resource->filename) && resource->filename[0] != NUL); |