Patch 8.2.4639
Problem:    Not sufficient parenthesis in preprocessor macros.
Solution:   Add more parenthesis. (closes #10031)
Files:      src/globals.h, src/gui.h, src/if_py_both.h, src/macros.h,
            src/option.h, src/regexp.h, src/spell.h, src/structs.h, src/vim.h,
            src/vim9.h


*** ../vim-8.2.4638/src/globals.h       2022-03-24 15:15:05.352816711 +0000
--- src/globals.h       2022-03-27 19:58:48.487951863 +0100
***************
*** 702,711 ****
  EXTERN win_T  *prevwin INIT(= NULL);  // previous window
  #define ONE_WINDOW (firstwin == lastwin)
  #define W_NEXT(wp) ((wp)->w_next)
! #define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
  #define FOR_ALL_FRAMES(frp, first_frame) \
!     for (frp = first_frame; frp != NULL; frp = frp->fr_next)
! #define FOR_ALL_TABPAGES(tp) for (tp = first_tabpage; tp != NULL; tp = 
tp->tp_next)
  #define FOR_ALL_WINDOWS_IN_TAB(tp, wp) \
      for ((wp) = ((tp) == NULL || (tp) == curtab) \
            ? firstwin : (tp)->tp_firstwin; (wp); (wp) = (wp)->w_next)
--- 702,711 ----
  EXTERN win_T  *prevwin INIT(= NULL);  // previous window
  #define ONE_WINDOW (firstwin == lastwin)
  #define W_NEXT(wp) ((wp)->w_next)
! #define FOR_ALL_WINDOWS(wp) for ((wp) = firstwin; (wp) != NULL; (wp) = 
(wp)->w_next)
  #define FOR_ALL_FRAMES(frp, first_frame) \
!     for ((frp) = first_frame; (frp) != NULL; (frp) = (frp)->fr_next)
! #define FOR_ALL_TABPAGES(tp) for ((tp) = first_tabpage; (tp) != NULL; (tp) = 
(tp)->tp_next)
  #define FOR_ALL_WINDOWS_IN_TAB(tp, wp) \
      for ((wp) = ((tp) == NULL || (tp) == curtab) \
            ? firstwin : (tp)->tp_firstwin; (wp); (wp) = (wp)->w_next)
***************
*** 778,784 ****
  
  // Iterate through all the signs placed in a buffer
  #define FOR_ALL_SIGNS_IN_BUF(buf, sign) \
!       for (sign = buf->b_signlist; sign != NULL; sign = sign->se_next)
  
  // Flag that is set when switching off 'swapfile'.  It means that all blocks
  // are to be loaded into memory.  Shouldn't be global...
--- 778,784 ----
  
  // Iterate through all the signs placed in a buffer
  #define FOR_ALL_SIGNS_IN_BUF(buf, sign) \
!       for ((sign) = (buf)->b_signlist; (sign) != NULL; (sign) = 
(sign)->se_next)
  
  // Flag that is set when switching off 'swapfile'.  It means that all blocks
  // are to be loaded into memory.  Shouldn't be global...
***************
*** 1000,1006 ****
  #define DBCS_CHT      950     // taiwan
  #define DBCS_CHTU     9950    // euc-tw
  #define DBCS_2BYTE    1       // 2byte-
! #define DBCS_DEBUG    -1
  
  EXTERN int    enc_dbcs INIT(= 0);             // One of DBCS_xxx values if
                                                // DBCS encoding
--- 1000,1006 ----
  #define DBCS_CHT      950     // taiwan
  #define DBCS_CHTU     9950    // euc-tw
  #define DBCS_2BYTE    1       // 2byte-
! #define DBCS_DEBUG    (-1)
  
  EXTERN int    enc_dbcs INIT(= 0);             // One of DBCS_xxx values if
                                                // DBCS encoding
*** ../vim-8.2.4638/src/gui.h   2022-03-13 14:44:59.396422421 +0000
--- src/gui.h   2022-03-27 19:58:48.487951863 +0100
***************
*** 100,106 ****
  #endif
  
  // Indices for arrays of scrollbars
! #define SBAR_NONE         -1
  #define SBAR_LEFT         0
  #define SBAR_RIGHT        1
  #define SBAR_BOTTOM       2
--- 100,106 ----
  #endif
  
  // Indices for arrays of scrollbars
! #define SBAR_NONE         (-1)
  #define SBAR_LEFT         0
  #define SBAR_RIGHT        1
  #define SBAR_BOTTOM       2
***************
*** 198,207 ****
  typedef long      guicolor_T; // handle for a GUI color; for X11 this should
                                // be "Pixel", but that's an unsigned and we
                                // need a signed value
! #define INVALCOLOR (guicolor_T)-11111 // number for invalid color; on 32 bit
                                   // displays there is a tiny chance this is an
                                   // actual color
! #define CTERMCOLOR (guicolor_T)-11110 // only used for cterm.bg_rgb and
                                        // cterm.fg_rgb: use cterm color
  
  #ifdef FEAT_GUI_GTK
--- 198,207 ----
  typedef long      guicolor_T; // handle for a GUI color; for X11 this should
                                // be "Pixel", but that's an unsigned and we
                                // need a signed value
! #define INVALCOLOR ((guicolor_T)-11111)       // number for invalid color; on 
32 bit
                                   // displays there is a tiny chance this is an
                                   // actual color
! #define CTERMCOLOR ((guicolor_T)-11110)       // only used for cterm.bg_rgb 
and
                                        // cterm.fg_rgb: use cterm color
  
  #ifdef FEAT_GUI_GTK
*** ../vim-8.2.4638/src/if_py_both.h    2022-01-09 12:57:45.118669470 +0000
--- src/if_py_both.h    2022-03-27 19:58:48.487951863 +0100
***************
*** 30,38 ****
  #define PyErr_FORMAT2(exc, str, arg1, arg2) PyErr_Format(exc, _(str), 
arg1,arg2)
  #define PyErr_VIM_FORMAT(str, arg) PyErr_FORMAT(VimError, str, arg)
  
! #define Py_TYPE_NAME(obj) (obj->ob_type->tp_name == NULL \
        ? "(NULL)" \
!       : obj->ob_type->tp_name)
  
  #define RAISE_NO_EMPTY_KEYS PyErr_SET_STRING(PyExc_ValueError, \
                                            N_("empty keys are not allowed"))
--- 30,38 ----
  #define PyErr_FORMAT2(exc, str, arg1, arg2) PyErr_Format(exc, _(str), 
arg1,arg2)
  #define PyErr_VIM_FORMAT(str, arg) PyErr_FORMAT(VimError, str, arg)
  
! #define Py_TYPE_NAME(obj) ((obj)->ob_type->tp_name == NULL \
        ? "(NULL)" \
!       : (obj)->ob_type->tp_name)
  
  #define RAISE_NO_EMPTY_KEYS PyErr_SET_STRING(PyExc_ValueError, \
                                            N_("empty keys are not allowed"))
***************
*** 6686,6692 ****
  }
  
  #define PYTYPE_READY(type) \
!     if (PyType_Ready(&type)) \
        return -1;
  
      static int
--- 6686,6692 ----
  }
  
  #define PYTYPE_READY(type) \
!     if (PyType_Ready(&(type))) \
        return -1;
  
      static int
*** ../vim-8.2.4638/src/macros.h        2022-01-31 14:59:33.518943700 +0000
--- src/macros.h        2022-03-27 19:58:48.487951863 +0100
***************
*** 232,242 ****
  // Advance multi-byte pointer, do not skip over composing chars.
  #define MB_CPTR_ADV(p)            p += enc_utf8 ? utf_ptr2len(p) : 
(*mb_ptr2len)(p)
  // Backup multi-byte pointer. Only use with "p" > "s" !
! #define MB_PTR_BACK(s, p)  p -= has_mbyte ? ((*mb_head_off)(s, p - 1) + 1) : 1
  // get length of multi-byte char, not including composing chars
  #define MB_CPTR2LEN(p)            (enc_utf8 ? utf_ptr2len(p) : 
(*mb_ptr2len)(p))
  
! #define MB_COPY_CHAR(f, t) do { if (has_mbyte) mb_copy_char(&f, &t); else 
*t++ = *f++; } while (0)
  #define MB_CHARLEN(p)     (has_mbyte ? mb_charlen(p) : (int)STRLEN(p))
  #define MB_CHAR2LEN(c)            (has_mbyte ? mb_char2len(c) : 1)
  #define PTR2CHAR(p)       (has_mbyte ? mb_ptr2char(p) : (int)*(p))
--- 232,242 ----
  // Advance multi-byte pointer, do not skip over composing chars.
  #define MB_CPTR_ADV(p)            p += enc_utf8 ? utf_ptr2len(p) : 
(*mb_ptr2len)(p)
  // Backup multi-byte pointer. Only use with "p" > "s" !
! #define MB_PTR_BACK(s, p)  p -= has_mbyte ? ((*mb_head_off)(s, (p) - 1) + 1) 
: 1
  // get length of multi-byte char, not including composing chars
  #define MB_CPTR2LEN(p)            (enc_utf8 ? utf_ptr2len(p) : 
(*mb_ptr2len)(p))
  
! #define MB_COPY_CHAR(f, t) do { if (has_mbyte) mb_copy_char(&(f), &(t)); else 
*(t)++ = *(f)++; } while (0)
  #define MB_CHARLEN(p)     (has_mbyte ? mb_charlen(p) : (int)STRLEN(p))
  #define MB_CHAR2LEN(c)            (has_mbyte ? mb_char2len(c) : 1)
  #define PTR2CHAR(p)       (has_mbyte ? mb_ptr2char(p) : (int)*(p))
***************
*** 313,319 ****
   * HI2DI() converts a hashitem pointer to a dictitem pointer.
   */
  #define DI2HIKEY(di) ((di)->di_key)
! #define HIKEY2DI(p)  ((dictitem_T *)(p - offsetof(dictitem_T, di_key)))
  #define HI2DI(hi)     HIKEY2DI((hi)->hi_key)
  
  /*
--- 313,319 ----
   * HI2DI() converts a hashitem pointer to a dictitem pointer.
   */
  #define DI2HIKEY(di) ((di)->di_key)
! #define HIKEY2DI(p)  ((dictitem_T *)((p) - offsetof(dictitem_T, di_key)))
  #define HI2DI(hi)     HIKEY2DI((hi)->hi_key)
  
  /*
***************
*** 376,384 ****
  #define CHECK_LIST_MATERIALIZE(l) if ((l)->lv_first == &range_list_item) 
range_list_materialize(l)
  
  // Inlined version of ga_grow() with optimized condition that it fails.
! #define GA_GROW_FAILS(gap, n) unlikely((((gap)->ga_maxlen - (gap)->ga_len < 
n) ? ga_grow_inner((gap), (n)) : OK) == FAIL)
  // Inlined version of ga_grow() with optimized condition that it succeeds.
! #define GA_GROW_OK(gap, n) likely((((gap)->ga_maxlen - (gap)->ga_len < n) ? 
ga_grow_inner((gap), (n)) : OK) == OK)
  
  #ifndef MIN
  # define MIN(a, b) ((a) < (b) ? (a) : (b))
--- 376,384 ----
  #define CHECK_LIST_MATERIALIZE(l) if ((l)->lv_first == &range_list_item) 
range_list_materialize(l)
  
  // Inlined version of ga_grow() with optimized condition that it fails.
! #define GA_GROW_FAILS(gap, n) unlikely((((gap)->ga_maxlen - (gap)->ga_len < 
(n)) ? ga_grow_inner((gap), (n)) : OK) == FAIL)
  // Inlined version of ga_grow() with optimized condition that it succeeds.
! #define GA_GROW_OK(gap, n) likely((((gap)->ga_maxlen - (gap)->ga_len < (n)) ? 
ga_grow_inner((gap), (n)) : OK) == OK)
  
  #ifndef MIN
  # define MIN(a, b) ((a) < (b) ? (a) : (b))
*** ../vim-8.2.4638/src/option.h        2022-02-24 13:28:36.570222354 +0000
--- src/option.h        2022-03-27 19:58:48.487951863 +0100
***************
*** 131,137 ****
  #endif
  
  // end-of-line style
! #define EOL_UNKNOWN   -1      // not defined yet
  #define EOL_UNIX      0       // NL
  #define EOL_DOS               1       // CR NL
  #define EOL_MAC               2       // CR
--- 131,137 ----
  #endif
  
  // end-of-line style
! #define EOL_UNKNOWN   (-1)    // not defined yet
  #define EOL_UNIX      0       // NL
  #define EOL_DOS               1       // CR NL
  #define EOL_MAC               2       // CR
***************
*** 1328,1333 ****
  };
  
  // Value for b_p_ul indicating the global value must be used.
! #define NO_LOCAL_UNDOLEVEL -123456
  
  #endif // _OPTION_H_
--- 1328,1333 ----
  };
  
  // Value for b_p_ul indicating the global value must be used.
! #define NO_LOCAL_UNDOLEVEL (-123456)
  
  #endif // _OPTION_H_
*** ../vim-8.2.4638/src/regexp.h        2019-11-30 17:54:35.000000000 +0000
--- src/regexp.h        2022-03-27 19:58:48.487951863 +0100
***************
*** 31,37 ****
   * In the NFA engine: how many states are allowed
   */
  #define NFA_MAX_STATES 100000
! #define NFA_TOO_EXPENSIVE -1
  
  // Which regexp engine to use? Needed for vim_regcomp().
  // Must match with 'regexpengine'.
--- 31,37 ----
   * In the NFA engine: how many states are allowed
   */
  #define NFA_MAX_STATES 100000
! #define NFA_TOO_EXPENSIVE (-1)
  
  // Which regexp engine to use? Needed for vim_regcomp().
  // Must match with 'regexpengine'.
*** ../vim-8.2.4638/src/spell.h 2022-01-05 16:08:59.524426437 +0000
--- src/spell.h 2022-03-27 19:58:48.487951863 +0100
***************
*** 211,219 ****
  
  // Values for SP_*ERROR are negative, positive values are used by
  // read_cnt_string().
! #define       SP_TRUNCERROR   -1      // spell file truncated error
! #define       SP_FORMERROR    -2      // format error in spell file
! #define SP_OTHERERROR -3      // other error while reading spell file
  
  /*
   * Structure used in "b_langp", filled from 'spelllang'.
--- 211,219 ----
  
  // Values for SP_*ERROR are negative, positive values are used by
  // read_cnt_string().
! #define       SP_TRUNCERROR   (-1)    // spell file truncated error
! #define       SP_FORMERROR    (-2)    // format error in spell file
! #define SP_OTHERERROR (-3)    // other error while reading spell file
  
  /*
   * Structure used in "b_langp", filled from 'spelllang'.
*** ../vim-8.2.4638/src/structs.h       2022-03-21 19:45:13.200420997 +0000
--- src/structs.h       2022-03-27 19:58:48.487951863 +0100
***************
*** 2830,2836 ****
      // flags for use of ":lmap" and IM control
      long      b_p_iminsert;   // input mode for insert
      long      b_p_imsearch;   // input mode for search
! #define B_IMODE_USE_INSERT -1 //      Use b_p_iminsert value for search
  #define B_IMODE_NONE 0                //      Input via none
  #define B_IMODE_LMAP 1                //      Input via langmap
  #define B_IMODE_IM 2          //      Input via input method
--- 2830,2836 ----
      // flags for use of ":lmap" and IM control
      long      b_p_iminsert;   // input mode for insert
      long      b_p_imsearch;   // input mode for search
! #define B_IMODE_USE_INSERT (-1)       //      Use b_p_iminsert value for 
search
  #define B_IMODE_NONE 0                //      Input via none
  #define B_IMODE_LMAP 1                //      Input via langmap
  #define B_IMODE_IM 2          //      Input via input method
***************
*** 3698,3704 ****
      winopt_T  w_onebuf_opt;
      winopt_T  w_allbuf_opt;
      // transform a pointer to a "onebuf" option into a "allbuf" option
! #define GLOBAL_WO(p)  ((char *)p + sizeof(winopt_T))
  
      // A few options have local flags for P_INSECURE.
  #ifdef FEAT_STL_OPT
--- 3698,3704 ----
      winopt_T  w_onebuf_opt;
      winopt_T  w_allbuf_opt;
      // transform a pointer to a "onebuf" option into a "allbuf" option
! #define GLOBAL_WO(p)  ((char *)(p) + sizeof(winopt_T))
  
      // A few options have local flags for P_INSECURE.
  #ifdef FEAT_STL_OPT
***************
*** 4462,4468 ****
  #define FIO_ENCRYPTED 0x1000  // encrypt written bytes
  #define FIO_NOCONVERT 0x2000  // skip encoding conversion
  #define FIO_UCSBOM    0x4000  // check for BOM at start of file
! #define FIO_ALL       -1      // allow all formats
  
  // When converting, a read() or write() may leave some bytes to be converted
  // for the next call.  The value is guessed...
--- 4462,4468 ----
  #define FIO_ENCRYPTED 0x1000  // encrypt written bytes
  #define FIO_NOCONVERT 0x2000  // skip encoding conversion
  #define FIO_UCSBOM    0x4000  // check for BOM at start of file
! #define FIO_ALL       (-1)    // allow all formats
  
  // When converting, a read() or write() may leave some bytes to be converted
  // for the next call.  The value is guessed...
*** ../vim-8.2.4638/src/vim.h   2022-03-24 11:22:07.215294108 +0000
--- src/vim.h   2022-03-27 19:58:48.491951885 +0100
***************
*** 864,872 ****
  #define FINDFILE_DIR  1       // only directories
  #define FINDFILE_BOTH 2       // files and directories
  
! #define W_ENDCOL(wp)  (wp->w_wincol + wp->w_width)
  #ifdef FEAT_MENU
! # define W_WINROW(wp) (wp->w_winrow + wp->w_winbar_height)
  #else
  # define W_WINROW(wp) (wp->w_winrow)
  #endif
--- 864,872 ----
  #define FINDFILE_DIR  1       // only directories
  #define FINDFILE_BOTH 2       // files and directories
  
! #define W_ENDCOL(wp)  ((wp)->w_wincol + (wp)->w_width)
  #ifdef FEAT_MENU
! # define W_WINROW(wp) ((wp)->w_winrow + (wp)->w_winbar_height)
  #else
  # define W_WINROW(wp) (wp->w_winrow)
  #endif
***************
*** 887,893 ****
  # define SST_MAX_ENTRIES 1000 // maximal size for state stack array
  # define SST_FIX_STATES        7      // size of sst_stack[].
  # define SST_DIST      16     // normal distance between entries
! # define SST_INVALID  (synstate_T *)-1        // invalid syn_state pointer
  
  # define HL_CONTAINED 0x01    // not used on toplevel
  # define HL_TRANSP    0x02    // has no highlighting
--- 887,893 ----
  # define SST_MAX_ENTRIES 1000 // maximal size for state stack array
  # define SST_FIX_STATES        7      // size of sst_stack[].
  # define SST_DIST      16     // normal distance between entries
! # define SST_INVALID  ((synstate_T *)-1)      // invalid syn_state pointer
  
  # define HL_CONTAINED 0x01    // not used on toplevel
  # define HL_TRANSP    0x02    // has no highlighting
***************
*** 949,955 ****
  #define GETFILE_ERROR     1   // normal error
  #define GETFILE_NOT_WRITTEN 2 // "not written" error
  #define GETFILE_SAME_FILE   0 // success, same file
! #define GETFILE_OPEN_OTHER -1 // success, opened another file
  #define GETFILE_UNUSED            8
  #define GETFILE_SUCCESS(x)  ((x) <= 0)
  
--- 949,955 ----
  #define GETFILE_ERROR     1   // normal error
  #define GETFILE_NOT_WRITTEN 2 // "not written" error
  #define GETFILE_SAME_FILE   0 // success, same file
! #define GETFILE_OPEN_OTHER (-1)       // success, opened another file
  #define GETFILE_UNUSED            8
  #define GETFILE_SUCCESS(x)  ((x) <= 0)
  
***************
*** 971,979 ****
  // Values for "noremap" argument of ins_typebuf().  Also used for
  // map->m_noremap and menu->noremap[].
  #define REMAP_YES     0       // allow remapping
! #define REMAP_NONE    -1      // no remapping
! #define REMAP_SCRIPT  -2      // remap script-local mappings only
! #define REMAP_SKIP    -3      // no remapping for first char
  
  // Values for mch_call_shell() second argument
  #define SHELL_FILTER  1       // filtering text
--- 971,979 ----
  // Values for "noremap" argument of ins_typebuf().  Also used for
  // map->m_noremap and menu->noremap[].
  #define REMAP_YES     0       // allow remapping
! #define REMAP_NONE    (-1)    // no remapping
! #define REMAP_SCRIPT  (-2)    // remap script-local mappings only
! #define REMAP_SKIP    (-3)    // no remapping for first char
  
  // Values for mch_call_shell() second argument
  #define SHELL_FILTER  1       // filtering text
***************
*** 1069,1075 ****
  
  // for lnum argument in do_ecmd()
  #define ECMD_LASTL    (linenr_T)0     // use last position in loaded file
! #define ECMD_LAST     (linenr_T)-1    // use last position in all files
  #define ECMD_ONE      (linenr_T)1     // use first line
  
  // flags for do_cmdline()
--- 1069,1075 ----
  
  // for lnum argument in do_ecmd()
  #define ECMD_LASTL    (linenr_T)0     // use last position in loaded file
! #define ECMD_LAST     ((linenr_T)-1)  // use last position in all files
  #define ECMD_ONE      (linenr_T)1     // use first line
  
  // flags for do_cmdline()
***************
*** 1265,1277 ****
  #define MAX_SWAP_PAGE_SIZE 50000
  
  // Special values for current_sctx.sc_sid.
! #define SID_MODELINE  -1      // when using a modeline
! #define SID_CMDARG    -2      // for "--cmd" argument
! #define SID_CARG      -3      // for "-c" argument
! #define SID_ENV               -4      // for sourcing environment variable
! #define SID_ERROR     -5      // option was reset because of an error
! #define SID_NONE      -6      // don't set scriptID
! #define SID_WINLAYOUT -7      // changing window size
  
  /*
   * Events for autocommands.
--- 1265,1277 ----
  #define MAX_SWAP_PAGE_SIZE 50000
  
  // Special values for current_sctx.sc_sid.
! #define SID_MODELINE  (-1)    // when using a modeline
! #define SID_CMDARG    (-2)    // for "--cmd" argument
! #define SID_CARG      (-3)    // for "-c" argument
! #define SID_ENV               (-4)    // for sourcing environment variable
! #define SID_ERROR     (-5)    // option was reset because of an error
! #define SID_NONE      (-6)    // don't set scriptID
! #define SID_WINLAYOUT (-7)    // changing window size
  
  /*
   * Events for autocommands.
***************
*** 1723,1729 ****
  // Prefer using emsgf(), because perror() may send the output to the wrong
  // destination and mess up the screen.
  #ifdef HAVE_STRERROR
! # define PERROR(msg)              (void)semsg("%s: %s", (char *)msg, 
strerror(errno))
  #else
  # define PERROR(msg)              do_perror(msg)
  #endif
--- 1723,1729 ----
  // Prefer using emsgf(), because perror() may send the output to the wrong
  // destination and mess up the screen.
  #ifdef HAVE_STRERROR
! # define PERROR(msg)              (void)semsg("%s: %s", (char *)(msg), 
strerror(errno))
  #else
  # define PERROR(msg)              do_perror(msg)
  #endif
***************
*** 1921,1927 ****
      (((unsigned)((code) & 0xC0) >> 6) + 1)
  
  #define SET_NUM_MOUSE_CLICKS(code, num) \
!     (code) = ((code) & 0x3f) | ((((num) - 1) & 3) << 6)
  
  // Added to mouse column for GUI when 'mousefocus' wants to give focus to a
  // window by simulating a click on its status line.  We could use up to 128 *
--- 1921,1927 ----
      (((unsigned)((code) & 0xC0) >> 6) + 1)
  
  #define SET_NUM_MOUSE_CLICKS(code, num) \
!     ((code) = ((code) & 0x3f) | ((((num) - 1) & 3) << 6))
  
  // Added to mouse column for GUI when 'mousefocus' wants to give focus to a
  // window by simulating a click on its status line.  We could use up to 128 *
***************
*** 2515,2522 ****
  #endif
  
  // values for vim_handle_signal() that are not a signal
! #define SIGNAL_BLOCK  -1
! #define SIGNAL_UNBLOCK  -2
  #if !defined(UNIX) && !defined(VMS)
  # define vim_handle_signal(x) 0
  #endif
--- 2515,2522 ----
  #endif
  
  // values for vim_handle_signal() that are not a signal
! #define SIGNAL_BLOCK  (-1)
! #define SIGNAL_UNBLOCK  (-2)
  #if !defined(UNIX) && !defined(VMS)
  # define vim_handle_signal(x) 0
  #endif
***************
*** 2528,2535 ****
  
  // behavior for bad character, "++bad=" argument
  #define BAD_REPLACE   '?'     // replace it with '?' (default)
! #define BAD_KEEP      -1      // leave it
! #define BAD_DROP      -2      // erase it
  
  // last argument for do_source()
  #define DOSO_NONE     0
--- 2528,2535 ----
  
  // behavior for bad character, "++bad=" argument
  #define BAD_REPLACE   '?'     // replace it with '?' (default)
! #define BAD_KEEP      (-1)    // leave it
! #define BAD_DROP      (-2)    // erase it
  
  // last argument for do_source()
  #define DOSO_NONE     0
***************
*** 2552,2562 ****
  // direction for nv_mousescroll() and ins_mousescroll()
  #define MSCR_DOWN     0       // DOWN must be FALSE
  #define MSCR_UP               1
! #define MSCR_LEFT     -1
! #define MSCR_RIGHT    -2
  
! #define KEYLEN_PART_KEY -1    // keylen value for incomplete key-code
! #define KEYLEN_PART_MAP -2    // keylen value for incomplete mapping
  #define KEYLEN_REMOVED  9999  // keylen value for removed sequence
  
  // Return values from win32_fileinfo().
--- 2552,2562 ----
  // direction for nv_mousescroll() and ins_mousescroll()
  #define MSCR_DOWN     0       // DOWN must be FALSE
  #define MSCR_UP               1
! #define MSCR_LEFT     (-1)
! #define MSCR_RIGHT    (-2)
  
! #define KEYLEN_PART_KEY (-1)  // keylen value for incomplete key-code
! #define KEYLEN_PART_MAP (-2)  // keylen value for incomplete mapping
  #define KEYLEN_REMOVED  9999  // keylen value for removed sequence
  
  // Return values from win32_fileinfo().
***************
*** 2716,2723 ****
  
  #if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
  # define ELAPSED_TIMEVAL
! # define ELAPSED_INIT(v) gettimeofday(&v, NULL)
! # define ELAPSED_FUNC(v) elapsed(&v)
  typedef struct timeval elapsed_T;
  long elapsed(struct timeval *start_tv);
  #elif defined(MSWIN)
--- 2716,2723 ----
  
  #if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
  # define ELAPSED_TIMEVAL
! # define ELAPSED_INIT(v) gettimeofday(&(v), NULL)
! # define ELAPSED_FUNC(v) elapsed(&(v))
  typedef struct timeval elapsed_T;
  long elapsed(struct timeval *start_tv);
  #elif defined(MSWIN)
***************
*** 2734,2741 ****
  #endif
  
  // Replacement for nchar used by nv_replace().
! #define REPLACE_CR_NCHAR    -1
! #define REPLACE_NL_NCHAR    -2
  
  // flags for term_start()
  #define TERM_START_NOJOB      1
--- 2734,2741 ----
  #endif
  
  // Replacement for nchar used by nv_replace().
! #define REPLACE_CR_NCHAR    (-1)
! #define REPLACE_NL_NCHAR    (-2)
  
  // flags for term_start()
  #define TERM_START_NOJOB      1
*** ../vim-8.2.4638/src/vim9.h  2022-03-27 16:29:49.876153380 +0100
--- src/vim9.h  2022-03-27 19:58:48.491951885 +0100
***************
*** 515,524 ****
  extern garray_T def_functions;
  
  // Used for "lnum" when a range is to be taken from the stack.
! #define LNUM_VARIABLE_RANGE -999
  
  // Used for "lnum" when a range is to be taken from the stack and "!" is used.
! #define LNUM_VARIABLE_RANGE_ABOVE -888
  
  // Keep in sync with get_compile_type()
  #ifdef FEAT_PROFILE
--- 515,524 ----
  extern garray_T def_functions;
  
  // Used for "lnum" when a range is to be taken from the stack.
! #define LNUM_VARIABLE_RANGE (-999)
  
  // Used for "lnum" when a range is to be taken from the stack and "!" is used.
! #define LNUM_VARIABLE_RANGE_ABOVE (-888)
  
  // Keep in sync with get_compile_type()
  #ifdef FEAT_PROFILE
***************
*** 530,536 ****
                : (dfunc)->df_instr))
  #else
  # define INSTRUCTIONS(dfunc) \
!       (debug_break_level > 0 || may_break_in_function(dfunc->df_ufunc) \
                ? (dfunc)->df_instr_debug \
                : (dfunc)->df_instr)
  #endif
--- 530,536 ----
                : (dfunc)->df_instr))
  #else
  # define INSTRUCTIONS(dfunc) \
!       (debug_break_level > 0 || may_break_in_function((dfunc)->df_ufunc) \
                ? (dfunc)->df_instr_debug \
                : (dfunc)->df_instr)
  #endif
*** ../vim-8.2.4638/src/version.c       2022-03-27 19:26:29.334889006 +0100
--- src/version.c       2022-03-27 20:00:22.444403403 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     4639,
  /**/

-- 
ARTHUR:        I command you as King of the Britons to stand aside!
BLACK KNIGHT:  I move for no man.
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220327190630.D496B1C0C20%40moolenaar.net.

Raspunde prin e-mail lui