diff options
Diffstat (limited to 'src/nvim/hardcopy.c')
-rw-r--r-- | src/nvim/hardcopy.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/hardcopy.c b/src/nvim/hardcopy.c index ab3f63c93e..93fcdc55a6 100644 --- a/src/nvim/hardcopy.c +++ b/src/nvim/hardcopy.c @@ -571,7 +571,7 @@ static void prt_header(prt_settings_T *const psettings, const int pagenum, const // Use a negative line number to indicate printing in the top margin. int page_line = 0 - prt_header_height(); mch_print_start_line(true, page_line); - for (char_u *p = tbuf; *p != NUL; ) { + for (char_u *p = tbuf; *p != NUL;) { const int l = utfc_ptr2len(p); assert(l >= 0); if (mch_print_text_out(p, (size_t)l)) { @@ -986,8 +986,7 @@ static colnr_T hardcopy_line(prt_settings_T *psettings, int page_line, prt_pos_T #define PRT_PS_DEFAULT_DPI (72) // Default user space resolution #define PRT_PS_DEFAULT_FONTSIZE (10) -#define PRT_MEDIASIZE_LEN (sizeof(prt_mediasize) / \ - sizeof(struct prt_mediasize_S)) +#define PRT_MEDIASIZE_LEN ARRAY_SIZE(prt_mediasize) static struct prt_mediasize_S prt_mediasize[] = { @@ -2455,7 +2454,7 @@ static int prt_add_resource(struct prt_ps_resource_S *resource) prt_dsc_textline("BeginDocument", (char *)resource->filename); - for (;; ) { + for (;;) { bytes_read = fread((char *)resource_buffer, sizeof(char_u), sizeof(resource_buffer), fd_resource); if (ferror(fd_resource)) { |