diff options
author | Lewis Russell <lewis6991@gmail.com> | 2022-08-24 22:49:25 +0100 |
---|---|---|
committer | Lewis Russell <lewis6991@gmail.com> | 2022-08-25 13:10:41 +0100 |
commit | 93f24403f8cc760ff47979c596976b53a8b16358 (patch) | |
tree | 93d2d2879aba8d563fde484d1fae5864b18134bc /src/nvim/hardcopy.c | |
parent | 1b29288709e75064b9188420d46e1028d7ee341e (diff) | |
download | rneovim-93f24403f8cc760ff47979c596976b53a8b16358.tar.gz rneovim-93f24403f8cc760ff47979c596976b53a8b16358.tar.bz2 rneovim-93f24403f8cc760ff47979c596976b53a8b16358.zip |
refactor: pre-incr to post-incr
Diffstat (limited to 'src/nvim/hardcopy.c')
-rw-r--r-- | src/nvim/hardcopy.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/nvim/hardcopy.c b/src/nvim/hardcopy.c index e8410d1ee7..6f45b4a03d 100644 --- a/src/nvim/hardcopy.c +++ b/src/nvim/hardcopy.c @@ -324,7 +324,7 @@ static char *parse_list_options(char_u *option_str, option_table_T *table, size_ len = (int)(colonp - stringp); - for (idx = 0; idx < table_size; ++idx) { + for (idx = 0; idx < table_size; idx++) { if (STRNICMP(stringp, table[idx].name, len) == 0) { break; } @@ -526,7 +526,7 @@ int prt_get_unit(int idx) static char *(units[4]) = PRT_UNIT_NAMES; if (printer_opts[idx].present) { - for (i = 0; i < 4; ++i) { + for (i = 0; i < 4; i++) { if (STRNICMP(printer_opts[idx].string, units[i], 2) == 0) { u = i; break; @@ -751,11 +751,9 @@ void ex_hardcopy(exarg_T *eap) /* * Loop over all pages in the print job: 1 2 3 ... */ - for (page_count = 0; prtpos.file_line <= eap->line2; ++page_count) { - /* - * Loop over uncollated copies: 1 1 1, 2 2 2, 3 3 3, ... - * For duplex: 12 12 12 34 34 34, ... - */ + for (page_count = 0; prtpos.file_line <= eap->line2; page_count++) { + // Loop over uncollated copies: 1 1 1, 2 2 2, 3 3 3, ... + // For duplex: 12 12 12 34 34 34, ... for (uncollated_copies = 0; uncollated_copies < settings.n_uncollated_copies; uncollated_copies++) { @@ -765,10 +763,8 @@ void ex_hardcopy(exarg_T *eap) /* * Do front and rear side of a page. */ - for (side = 0; side <= settings.duplex; ++side) { - /* - * Print one page. - */ + for (side = 0; side <= settings.duplex; side++) { + // Print one page. // Check for interrupt character every page. os_breakcheck(); @@ -2298,7 +2294,7 @@ int mch_print_init(prt_settings_T *psettings, char_u *jobname, int forceit) paper_name = "A4"; paper_strlen = 2; } - for (i = 0; i < (int)PRT_MEDIASIZE_LEN; ++i) { + for (i = 0; i < (int)PRT_MEDIASIZE_LEN; i++) { if (STRLEN(prt_mediasize[i].name) == (unsigned)paper_strlen && STRNICMP(prt_mediasize[i].name, paper_name, paper_strlen) == 0) { |