To: vim_dev@googlegroups.com Subject: Patch 8.2.4288 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4288 Problem: Preprocessor indents are inconsistent. Solution: Fix preprocessor indents. (Ken Takata, closes #9691) Files: src/arglist.c, src/change.c, src/ex_cmds.c, src/gui.c, src/hashtab.c, src/indent.c, src/ops.c, src/os_win32.c *** ../vim-8.2.4287/src/arglist.c 2022-01-08 16:19:18.497639954 +0000 --- src/arglist.c 2022-02-03 13:02:32.281327357 +0000 *************** *** 969,977 **** old_curwin = curwin; old_curtab = curtab; ! # ifdef FEAT_GUI need_mouse_correct = TRUE; ! # endif // Try closing all windows that are not in the argument list. // Also close windows that are not full width; --- 969,977 ---- old_curwin = curwin; old_curtab = curtab; ! #ifdef FEAT_GUI need_mouse_correct = TRUE; ! #endif // Try closing all windows that are not in the argument list. // Also close windows that are not full width; *** ../vim-8.2.4287/src/change.c 2022-01-01 21:59:11.030521935 +0000 --- src/change.c 2022-02-03 13:02:32.281327357 +0000 *************** *** 1638,1646 **** #ifdef FEAT_CINDENT // May do indenting after opening a new line. do_cindent = !p_paste && (curbuf->b_p_cin ! # ifdef FEAT_EVAL || *curbuf->b_p_inde != NUL ! # endif ) && in_cinkeys(dir == FORWARD ? KEY_OPEN_FORW --- 1638,1646 ---- #ifdef FEAT_CINDENT // May do indenting after opening a new line. do_cindent = !p_paste && (curbuf->b_p_cin ! # ifdef FEAT_EVAL || *curbuf->b_p_inde != NUL ! # endif ) && in_cinkeys(dir == FORWARD ? KEY_OPEN_FORW *** ../vim-8.2.4287/src/ex_cmds.c 2022-01-31 14:59:33.514943760 +0000 --- src/ex_cmds.c 2022-02-03 13:02:32.281327357 +0000 *************** *** 99,107 **** IObuff[len++] = ' '; IObuff[len++] = '<'; if (enc_utf8 && utf_iscomposing(c) ! # ifdef USE_GUI && !gui.in_use ! # endif ) IObuff[len++] = ' '; // draw composing char on top of a space len += (*mb_char2bytes)(c, IObuff + len); --- 99,107 ---- IObuff[len++] = ' '; IObuff[len++] = '<'; if (enc_utf8 && utf_iscomposing(c) ! #ifdef USE_GUI && !gui.in_use ! #endif ) IObuff[len++] = ' '; // draw composing char on top of a space len += (*mb_char2bytes)(c, IObuff + len); *** ../vim-8.2.4287/src/gui.c 2022-01-31 14:59:33.514943760 +0000 --- src/gui.c 2022-02-03 13:02:32.281327357 +0000 *************** *** 292,302 **** } // Child ! #ifdef FEAT_GUI_GTK // Call gtk_init_check() here after fork(). See gui_init_check(). if (gui_mch_init_check() != OK) getout_preserve_modified(1); ! #endif # if defined(HAVE_SETSID) || defined(HAVE_SETPGID) /* --- 292,302 ---- } // Child ! # ifdef FEAT_GUI_GTK // Call gtk_init_check() here after fork(). See gui_init_check(). if (gui_mch_init_check() != OK) getout_preserve_modified(1); ! # endif # if defined(HAVE_SETSID) || defined(HAVE_SETPGID) /* *************** *** 348,358 **** gui_read_child_pipe(int fd) { long bytes_read; ! #define READ_BUFFER_SIZE 10 char buffer[READ_BUFFER_SIZE]; bytes_read = read_eintr(fd, buffer, READ_BUFFER_SIZE - 1); ! #undef READ_BUFFER_SIZE close(fd); if (bytes_read < 0) return GUI_CHILD_IO_ERROR; --- 348,358 ---- gui_read_child_pipe(int fd) { long bytes_read; ! # define READ_BUFFER_SIZE 10 char buffer[READ_BUFFER_SIZE]; bytes_read = read_eintr(fd, buffer, READ_BUFFER_SIZE - 1); ! # undef READ_BUFFER_SIZE close(fd); if (bytes_read < 0) return GUI_CHILD_IO_ERROR; *************** *** 459,465 **** gui.scrollbar_width = gui.scrollbar_height = SB_DEFAULT_WIDTH; gui.prev_wrap = -1; ! # ifdef FEAT_GUI_GTK CLEAR_FIELD(gui.ligatures_map); #endif --- 459,465 ---- gui.scrollbar_width = gui.scrollbar_height = SB_DEFAULT_WIDTH; gui.prev_wrap = -1; ! #ifdef FEAT_GUI_GTK CLEAR_FIELD(gui.ligatures_map); #endif *************** *** 1435,1441 **** text_area_y += gui.menu_height; #endif ! # if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \ || defined(FEAT_GUI_MOTIF)) if (gui_has_tabline()) text_area_y += gui.tabline_height; --- 1435,1441 ---- text_area_y += gui.menu_height; #endif ! #if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \ || defined(FEAT_GUI_MOTIF)) if (gui_has_tabline()) text_area_y += gui.tabline_height; *************** *** 1453,1459 **** } #endif ! # if defined(FEAT_GUI_TABLINE) && defined(FEAT_GUI_HAIKU) gui_mch_set_tabline_pos(0, text_area_y, gui.menu_width, gui.tabline_height); if (gui_has_tabline()) --- 1453,1459 ---- } #endif ! #if defined(FEAT_GUI_TABLINE) && defined(FEAT_GUI_HAIKU) gui_mch_set_tabline_pos(0, text_area_y, gui.menu_width, gui.tabline_height); if (gui_has_tabline()) *************** *** 5235,5244 **** { if (has_cursormoved()) apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf); ! #ifdef FEAT_PROP_POPUP if (popup_visible) popup_check_cursor_pos(); ! #endif # ifdef FEAT_CONCEAL if (curwin->w_p_cole > 0) { --- 5235,5244 ---- { if (has_cursormoved()) apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf); ! # ifdef FEAT_PROP_POPUP if (popup_visible) popup_check_cursor_pos(); ! # endif # ifdef FEAT_CONCEAL if (curwin->w_p_cole > 0) { *** ../vim-8.2.4287/src/hashtab.c 2022-01-08 12:41:12.204795554 +0000 --- src/hashtab.c 2022-02-03 13:02:32.281327357 +0000 *************** *** 189,201 **** void hash_debug_results(void) { ! #ifdef HT_DEBUG fprintf(stderr, "\r\n\r\n\r\n\r\n"); fprintf(stderr, "Number of hashtable lookups: %ld\r\n", hash_count_lookup); fprintf(stderr, "Number of perturb loops: %ld\r\n", hash_count_perturb); fprintf(stderr, "Percentage of perturb loops: %ld%%\r\n", hash_count_perturb * 100 / hash_count_lookup); ! #endif } #endif --- 189,201 ---- void hash_debug_results(void) { ! # ifdef HT_DEBUG fprintf(stderr, "\r\n\r\n\r\n\r\n"); fprintf(stderr, "Number of hashtable lookups: %ld\r\n", hash_count_lookup); fprintf(stderr, "Number of perturb loops: %ld\r\n", hash_count_perturb); fprintf(stderr, "Percentage of perturb loops: %ld%%\r\n", hash_count_perturb * 100 / hash_count_lookup); ! # endif } #endif *** ../vim-8.2.4287/src/indent.c 2022-01-28 20:47:44.103611022 +0000 --- src/indent.c 2022-02-03 13:02:32.281327357 +0000 *************** *** 2173,2179 **** void f_lispindent(typval_T *argvars UNUSED, typval_T *rettv) { ! #ifdef FEAT_LISP pos_T pos; linenr_T lnum; --- 2173,2179 ---- void f_lispindent(typval_T *argvars UNUSED, typval_T *rettv) { ! # ifdef FEAT_LISP pos_T pos; linenr_T lnum; *************** *** 2191,2197 **** else if (in_vim9script()) semsg(_(e_invalid_line_number_nr), lnum); else ! #endif rettv->vval.v_number = -1; } #endif --- 2191,2197 ---- else if (in_vim9script()) semsg(_(e_invalid_line_number_nr), lnum); else ! # endif rettv->vval.v_number = -1; } #endif *** ../vim-8.2.4287/src/ops.c 2022-01-31 14:59:33.518943700 +0000 --- src/ops.c 2022-02-03 13:02:32.281327357 +0000 *************** *** 3667,3675 **** curbuf->b_visual.vi_mode = VIsual_mode; restore_visual_mode(); curbuf->b_visual.vi_curswant = curwin->w_curswant; ! # ifdef FEAT_EVAL curbuf->b_visual_mode_eval = VIsual_mode; ! # endif } // In Select mode, a linewise selection is operated upon like a --- 3667,3675 ---- curbuf->b_visual.vi_mode = VIsual_mode; restore_visual_mode(); curbuf->b_visual.vi_curswant = curwin->w_curswant; ! #ifdef FEAT_EVAL curbuf->b_visual_mode_eval = VIsual_mode; ! #endif } // In Select mode, a linewise selection is operated upon like a *** ../vim-8.2.4287/src/os_win32.c 2022-01-29 15:27:55.026578292 +0000 --- src/os_win32.c 2022-02-03 13:02:32.285327354 +0000 *************** *** 241,251 **** static BOOL win8_or_later = FALSE; ! # if defined(__GNUC__) && !defined(__MINGW32__) && !defined(__CYGWIN__) ! # define UChar UnicodeChar ! # else ! # define UChar uChar.UnicodeChar ! # endif #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL) // Dynamic loading for portability --- 241,251 ---- static BOOL win8_or_later = FALSE; ! #if defined(__GNUC__) && !defined(__MINGW32__) && !defined(__CYGWIN__) ! # define UChar UnicodeChar ! #else ! # define UChar uChar.UnicodeChar ! #endif #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL) // Dynamic loading for portability *************** *** 2077,2089 **** buf[len++] = typeahead[0]; mch_memmove(typeahead, typeahead + 1, --typeaheadlen); } ! # ifdef FEAT_JOB_CHANNEL if (len > 0) { buf[len] = NUL; ch_log(NULL, "raw key input: \"%s\"", buf); } ! # endif return len; #else // FEAT_GUI_MSWIN --- 2077,2089 ---- buf[len++] = typeahead[0]; mch_memmove(typeahead, typeahead + 1, --typeaheadlen); } ! # ifdef FEAT_JOB_CHANNEL if (len > 0) { buf[len] = NUL; ch_log(NULL, "raw key input: \"%s\"", buf); } ! # endif return len; #else // FEAT_GUI_MSWIN *************** *** 7874,7885 **** vtp_sgr_bulks(1, args); } ! #define FAST256(x) \ if ((*p-- = "0123456789"[(n = x % 10)]) \ && x >= 10 && (*p-- = "0123456789"[((m = x % 100) - n) / 10]) \ && x >= 100 && (*p-- = "012"[((x & 0xff) - m) / 100])); ! #define FAST256CASE(x) \ case x: \ FAST256(newargs[x - 1]); --- 7874,7885 ---- vtp_sgr_bulks(1, args); } ! # define FAST256(x) \ if ((*p-- = "0123456789"[(n = x % 10)]) \ && x >= 10 && (*p-- = "0123456789"[((m = x % 100) - n) / 10]) \ && x >= 100 && (*p-- = "012"[((x & 0xff) - m) / 100])); ! # define FAST256CASE(x) \ case x: \ FAST256(newargs[x - 1]); *************** *** 7888,7895 **** int argc, int *args) { ! #define MAXSGR 16 ! #define SGRBUFSIZE 2 + 4 * MAXSGR + 1 // '\033[' + SGR + 'm' char_u buf[SGRBUFSIZE]; char_u *p; int in, out; --- 7888,7895 ---- int argc, int *args) { ! # define MAXSGR 16 ! # define SGRBUFSIZE 2 + 4 * MAXSGR + 1 // '\033[' + SGR + 'm' char_u buf[SGRBUFSIZE]; char_u *p; int in, out; *** ../vim-8.2.4287/src/version.c 2022-02-03 12:34:00.665140482 +0000 --- src/version.c 2022-02-03 13:03:42.593309597 +0000 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 4288, /**/ -- An alien life briefly visits earth. Just before departing it leaves a message in the dust on the back of a white van. The world is shocked and wants to know what it means. After months of studies the worlds best linguistic scientists are able to decipher the message: "Wash me!". /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///