aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/hardcopy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/hardcopy.c')
-rw-r--r--src/nvim/hardcopy.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/nvim/hardcopy.c b/src/nvim/hardcopy.c
index ff59536e8d..b769f6215c 100644
--- a/src/nvim/hardcopy.c
+++ b/src/nvim/hardcopy.c
@@ -526,7 +526,6 @@ static void prt_header(prt_settings_T *const psettings, const int pagenum, const
if (*p_header != NUL) {
linenr_T tmp_lnum, tmp_topline, tmp_botline;
- int use_sandbox = false;
// Need to (temporarily) set current line number and first/last line
// number on the 'window'. Since we don't know how long the page is,
@@ -540,9 +539,8 @@ static void prt_header(prt_settings_T *const psettings, const int pagenum, const
curwin->w_botline = lnum + 63;
printer_page_num = pagenum;
- use_sandbox = was_set_insecurely(curwin, "printheader", 0);
build_stl_str_hl(curwin, (char *)tbuf, (size_t)width + IOSIZE,
- (char *)p_header, use_sandbox,
+ (char *)p_header, "printheader", 0,
' ', width, NULL, NULL);
// Reset line numbers
@@ -733,7 +731,7 @@ void ex_hardcopy(exarg_T *eap)
}
assert(prtpos.bytes_printed <= SIZE_MAX / 100);
- sprintf((char *)IObuff, _("Printing page %d (%zu%%)"),
+ sprintf((char *)IObuff, _("Printing page %d (%zu%%)"), // NOLINT(runtime/printf)
page_count + 1 + side,
prtpos.bytes_printed * 100 / bytes_to_print);
if (!mch_print_begin_page((char_u *)IObuff)) {
@@ -754,8 +752,7 @@ void ex_hardcopy(exarg_T *eap)
prtpos.file_line);
}
- for (page_line = 0; page_line < settings.lines_per_page;
- ++page_line) {
+ for (page_line = 0; page_line < settings.lines_per_page; page_line++) {
prtpos.column = hardcopy_line(&settings,
page_line, &prtpos);
if (prtpos.column == 0) {
@@ -2458,8 +2455,7 @@ bool mch_print_begin(prt_settings_T *psettings)
prt_dsc_font_resource("DocumentNeededResources", &prt_ps_courier_font);
}
if (prt_out_mbyte) {
- prt_dsc_font_resource((prt_use_courier ? NULL
- : "DocumentNeededResources"), &prt_ps_mb_font);
+ prt_dsc_font_resource((prt_use_courier ? NULL : "DocumentNeededResources"), &prt_ps_mb_font);
if (!prt_custom_cmap) {
prt_dsc_resources(NULL, "cmap", prt_cmap);
}
@@ -3008,7 +3004,7 @@ int mch_print_text_out(char_u *const textp, size_t len)
ga_append(&prt_ps_buffer, '\\'); break;
default:
- sprintf((char *)ch_buff, "%03o", (unsigned int)ch);
+ sprintf((char *)ch_buff, "%03o", (unsigned int)ch); // NOLINT(runtime/printf)
ga_append(&prt_ps_buffer, (char)ch_buff[0]);
ga_append(&prt_ps_buffer, (char)ch_buff[1]);
ga_append(&prt_ps_buffer, (char)ch_buff[2]);