Patch 8.2.2294
Problem:    VMS: a few remaining problems.
Solution:   Add VMS specific changes. Add Lua support. (Zoltan Arpadffy)
Files:      src/fileio.c, src/os_vms_conf.h, src/Make_vms.mms, src/macros.h,
            src/os_vms.c, src/vim9execute.c, src/gui_xmebw.c, src/os_unix.h


*** ../vim-8.2.2293/src/fileio.c        2021-01-02 16:53:08.294010035 +0100
--- src/fileio.c        2021-01-04 10:30:03.968979647 +0100
***************
*** 16,25 ****
  #if defined(__TANDEM)
  # include <limits.h>          // for SSIZE_MAX
  #endif
! #if defined(UNIX) && defined(FEAT_EVAL)
  # include <pwd.h>
  # include <grp.h>
  #endif
  
  // Is there any system that doesn't have access()?
  #define USE_MCH_ACCESS
--- 16,28 ----
  #if defined(__TANDEM)
  # include <limits.h>          // for SSIZE_MAX
  #endif
! #if (defined(UNIX) || defined(VMS)) && defined(FEAT_EVAL)
  # include <pwd.h>
  # include <grp.h>
  #endif
+ #if defined(VMS) && defined(HAVE_XOS_R_H)
+ # include <x11/xos_r.h>
+ #endif
  
  // Is there any system that doesn't have access()?
  #define USE_MCH_ACCESS
***************
*** 338,344 ****
  
      if (!read_stdin && !read_buffer && !read_fifo)
      {
! #ifdef UNIX
        /*
         * On Unix it is possible to read a directory, so we have to
         * check for it before the mch_open().
--- 341,347 ----
  
      if (!read_stdin && !read_buffer && !read_fifo)
      {
! #if defined(UNIX) || defined(VMS)
        /*
         * On Unix it is possible to read a directory, so we have to
         * check for it before the mch_open().
***************
*** 4623,4633 ****
--- 4626,4638 ----
            q = (char_u*)pw->pw_name;
        if (dict_add_string(item, "user", q) == FAIL)
            goto theend;
+ #  if !defined(VMS) || (defined(VMS) && defined(HAVE_XOS_R_H))
        gr = getgrgid(st.st_gid);
        if (gr == NULL)
            q = (char_u*)"";
        else
            q = (char_u*)gr->gr_name;
+ #  endif
        if (dict_add_string(item, "group", q) == FAIL)
            goto theend;
      }
*** ../vim-8.2.2293/src/os_vms_conf.h   2020-12-30 13:14:41.950441890 +0100
--- src/os_vms_conf.h   2021-01-04 10:33:01.068669118 +0100
***************
*** 147,153 ****
  #undef  HAVE_FCHDIR
  #undef  HAVE_LSTAT
  #undef  HAVE_STDINT_H
- #undef  HAVE_XOS_R_H
  
  // Hardware specific
  #ifdef  VAX
--- 147,152 ----
***************
*** 157,168 ****
  #undef  HAVE_STRINGS_H
  #undef  HAVE_SIGSETJMP
  #undef  HAVE_ISNAN
  #define HAVE_NO_LONG_LONG
  #define VIM_SIZEOF_LONG 4
! #define LONG_LONG_MIN  (-2147483647-1)                                        
                                                            
! #define LONG_LONG_MAX  (2147483647)                                           
                                                          
  #define ULONG_LONG_MAX (4294967295U)
- #undef  XTHREADS
  #else // AXP and IA64
  #define HAVE_GETTIMEOFDAY
  #define HAVE_USLEEP
--- 156,167 ----
  #undef  HAVE_STRINGS_H
  #undef  HAVE_SIGSETJMP
  #undef  HAVE_ISNAN
+ #undef  HAVE_XOS_R_H
  #define HAVE_NO_LONG_LONG
  #define VIM_SIZEOF_LONG 4
! #define LONG_LONG_MIN  (-2147483647-1)
! #define LONG_LONG_MAX  (2147483647)
  #define ULONG_LONG_MAX (4294967295U)
  #else // AXP and IA64
  #define HAVE_GETTIMEOFDAY
  #define HAVE_USLEEP
***************
*** 170,181 ****
  #define HAVE_STRINGS_H
  #define HAVE_SIGSETJMP
  #define HAVE_ISNAN
  #define HAVE_NO_LONG_LONG
  #define VIM_SIZEOF_LONG 8
! #define LONG_LONG_MIN  (-9223372036854775807-1)                               
                                                                     
! #define LONG_LONG_MAX  (9223372036854775807)                                  
                                                                   
  #define ULONG_LONG_MAX (18446744073709551615U)
- #define XTHREADS
  #endif
  
  // Compiler specific
--- 169,180 ----
  #define HAVE_STRINGS_H
  #define HAVE_SIGSETJMP
  #define HAVE_ISNAN
+ #define HAVE_XOS_R_H
  #define HAVE_NO_LONG_LONG
  #define VIM_SIZEOF_LONG 8
! #define LONG_LONG_MIN  (-9223372036854775807-1)
! #define LONG_LONG_MAX  (9223372036854775807)
  #define ULONG_LONG_MAX (18446744073709551615U)
  #endif
  
  // Compiler specific
*** ../vim-8.2.2293/src/Make_vms.mms    2020-12-30 13:14:41.950441890 +0100
--- src/Make_vms.mms    2021-01-04 10:34:58.992403821 +0100
***************
*** 2,8 ****
  # Makefile for Vim on OpenVMS
  #
  # Maintainer:   Zoltan Arpadffy <[email protected]>
! # Last change:  2020 Dec 30
  #
  # This script has been tested on VMS 6.2 to 8.4 on DEC Alpha, VAX and IA64
  # with MMS and MMK
--- 2,8 ----
  # Makefile for Vim on OpenVMS
  #
  # Maintainer:   Zoltan Arpadffy <[email protected]>
! # Last change:  2021 Jan 04
  #
  # This script has been tested on VMS 6.2 to 8.4 on DEC Alpha, VAX and IA64
  # with MMS and MMK
***************
*** 38,55 ****
  # GUI or terminal mode executable.
  # Comment out if you want just the character terminal mode only.
  # GUI with Motif
! GUI = YES
  
  # GUI with GTK
  # If you have GTK installed you might want to enable this option.
  # NOTE: you will need to properly define GTK_DIR below
! # NOTE: since Vim 7.3 GTK 2+ is used that is not ported to VMS, 
! #       therefore this option should not be used  
  # GTK = YES
  
  # GUI/Motif with XPM
  # If you have XPM installed you might want to build Motif version with toolbar
! XPM = YES
  
  # Comment out if you want the compiler version with :ver command.
  # NOTE: This part can make some complications if you're using some
--- 38,55 ----
  # GUI or terminal mode executable.
  # Comment out if you want just the character terminal mode only.
  # GUI with Motif
! # GUI = YES
  
  # GUI with GTK
  # If you have GTK installed you might want to enable this option.
  # NOTE: you will need to properly define GTK_DIR below
! # NOTE: since Vim 7.3 GTK 2+ is used that is not ported to VMS,
! #       therefore this option should not be used
  # GTK = YES
  
  # GUI/Motif with XPM
  # If you have XPM installed you might want to build Motif version with toolbar
! # XPM = YES
  
  # Comment out if you want the compiler version with :ver command.
  # NOTE: This part can make some complications if you're using some
***************
*** 59,65 ****
  
  # Uncomment if want a debug version. Resulting executable is DVIM.EXE
  # Development purpose only! Normally, it should not be defined. !!!
! # DEBUG = YES 
  
  # Languages support for Perl, Python, TCL etc.
  # If you don't need it really, leave them behind the comment.
--- 59,65 ----
  
  # Uncomment if want a debug version. Resulting executable is DVIM.EXE
  # Development purpose only! Normally, it should not be defined. !!!
! # DEBUG = YES
  
  # Languages support for Perl, Python, TCL etc.
  # If you don't need it really, leave them behind the comment.
***************
*** 68,73 ****
--- 68,74 ----
  # VIM_PERL   = YES
  # VIM_PYTHON = YES
  # VIM_RUBY   = YES
+ # VIM_LUA    = YES
  
  # X Input Method.  For entering special languages like chinese and
  # Japanese.
***************
*** 180,186 ****
  XPM_LIB  = ,OS_VMS_XPM.OPT/OPT
  .ELSE
  DEFS     = "HAVE_CONFIG_H","FEAT_GUI_MOTIF"
! XPM_INC  = 
  .ENDIF
  LIBS     = ,OS_VMS_MOTIF.OPT/OPT
  GUI_FLAG =
--- 181,187 ----
  XPM_LIB  = ,OS_VMS_XPM.OPT/OPT
  .ELSE
  DEFS     = "HAVE_CONFIG_H","FEAT_GUI_MOTIF"
! XPM_INC  =
  .ENDIF
  LIBS     = ,OS_VMS_MOTIF.OPT/OPT
  GUI_FLAG =
***************
*** 237,242 ****
--- 238,252 ----
  RUBY_INC =
  .ENDIF
  
+ .IFDEF VIM_LUA
+ # LUA related setup.
+ LUA_DEF = ,"FEAT_LUA"
+ LUA_SRC = if_lua.c
+ LUA_OBJ = if_lua.obj
+ LUA_LIB = ,OS_VMS_LUA.OPT/OPT
+ LUA_INC = ,LUA$ROOT:[INCLUDE]
+ .ENDIF
+ 
  .IFDEF VIM_XIM
  # XIM related setup.
  .IFDEF GUI
***************
*** 247,253 ****
  .IFDEF VIM_MZSCHEME
  # MZSCHEME related setup
  MZSCH_DEF = ,"FEAT_MZSCHEME"
! MZSCH_SRC = if_mzsch.c 
  MZSCH_OBJ = if_mzsch.obj
  .ENDIF
  
--- 257,263 ----
  .IFDEF VIM_MZSCHEME
  # MZSCHEME related setup
  MZSCH_DEF = ,"FEAT_MZSCHEME"
! MZSCH_SRC = if_mzsch.c
  MZSCH_OBJ = if_mzsch.obj
  .ENDIF
  
***************
*** 258,264 ****
  
  # XDIFF related setup.
  XDIFF_SRC = xdiffi.c,xemit.c,xprepare.c,xutils.c,xhistogram.c,xpatience.c
! XDIFF_OBJ = 
xdiffi.obj,xemit.obj,xprepare.obj,xutils.obj,xhistogram.obj,xpatience.obj 
  XDIFF_INC = ,[.xdiff]
  
  ######################################################################
--- 268,274 ----
  
  # XDIFF related setup.
  XDIFF_SRC = xdiffi.c,xemit.c,xprepare.c,xutils.c,xhistogram.c,xpatience.c
! XDIFF_OBJ = 
xdiffi.obj,xemit.obj,xprepare.obj,xutils.obj,xhistogram.obj,xpatience.obj
  XDIFF_INC = ,[.xdiff]
  
  ######################################################################
***************
*** 275,281 ****
  .SUFFIXES : .obj .c
  
  ALL_CFLAGS = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
!  $(TCL_DEF)$(RUBY_DEF)$(XIM_DEF)$(TAG_DEF)$(MZSCH_DEF) -
   $(ICONV_DEF)) -
   $(CFLAGS)$(GUI_FLAG) -
   /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC)$(PERL_INC)$(PYTHON_INC) -
--- 285,291 ----
  .SUFFIXES : .obj .c
  
  ALL_CFLAGS = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
!  $(TCL_DEF)$(RUBY_DEF)$(LUA_DEF)$(XIM_DEF)$(TAG_DEF)$(MZSCH_DEF) -
   $(ICONV_DEF)) -
   $(CFLAGS)$(GUI_FLAG) -
   /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC)$(PERL_INC)$(PYTHON_INC) -
***************
*** 286,299 ****
  # as $(GUI_INC) - replaced with $(GUI_INC_VER)
  # Otherwise should not be any other difference.
  ALL_CFLAGS_VER = 
/def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
!  $(TCL_DEF)$(RUBY_DEF)$(XIM_DEF)$(TAG_DEF)$(MZSCH_DEF) - 
   $(ICONV_DEF)) -
   $(CFLAGS)$(GUI_FLAG) -
   /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC_VER)$(PERL_INC)$(PYTHON_INC) -
   $(TCL_INC)$(XDIFF_INC)$(XPM_INC))
  
  ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) $(XPM_LIB)\
!          $(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
  
  SRC = \
        arabic.c \
--- 296,309 ----
  # as $(GUI_INC) - replaced with $(GUI_INC_VER)
  # Otherwise should not be any other difference.
  ALL_CFLAGS_VER = 
/def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
!  $(TCL_DEF)$(RUBY_DEF)$(LUA_DEF)$(XIM_DEF)$(TAG_DEF)$(MZSCH_DEF) -
   $(ICONV_DEF)) -
   $(CFLAGS)$(GUI_FLAG) -
   /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC_VER)$(PERL_INC)$(PYTHON_INC) -
   $(TCL_INC)$(XDIFF_INC)$(XPM_INC))
  
  ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) $(XPM_LIB)\
!          $(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB) $(LUA_LIB)
  
  SRC = \
        arabic.c \
***************
*** 408,413 ****
--- 418,424 ----
        $(PYTHON_SRC) \
        $(TCL_SRC) \
        $(RUBY_SRC) \
+       $(LUA_SRC) \
        $(MZSCH_SRC) \
        $(XDIFF_SRC)
  
***************
*** 525,535 ****
        $(PYTHON_OBJ) \
        $(TCL_OBJ) \
        $(RUBY_OBJ) \
        $(MZSCH_OBJ) \
        $(XDIFF_OBJ)
  
  # Default target is making the executable
! all : [.auto]config.h mmk_compat motif_env gtk_env perl_env python_env 
tcl_env ruby_env $(TARGET)
        ! $@
  
  [.auto]config.h : $(CONFIG_H)
--- 536,547 ----
        $(PYTHON_OBJ) \
        $(TCL_OBJ) \
        $(RUBY_OBJ) \
+       $(LUA_OBJ) \
        $(MZSCH_OBJ) \
        $(XDIFF_OBJ)
  
  # Default target is making the executable
! all : [.auto]config.h mmk_compat motif_env gtk_env perl_env python_env 
tcl_env ruby_env lua_env $(TARGET)
        ! $@
  
  [.auto]config.h : $(CONFIG_H)
***************
*** 611,617 ****
  .ENDIF
  .IFDEF MMSIA64
        -@ write opt_file "[.xpm.vms.ia64]libxpm.olb/lib"
! .ENDIF 
        -@ close opt_file
  .ELSE
        -@ write sys$output "using DECW/Motif environment."
--- 623,629 ----
  .ENDIF
  .IFDEF MMSIA64
        -@ write opt_file "[.xpm.vms.ia64]libxpm.olb/lib"
! .ENDIF
        -@ close opt_file
  .ELSE
        -@ write sys$output "using DECW/Motif environment."
***************
*** 709,719 ****
        -@ !
  .ENDIF
  
  arabic.obj : arabic.c vim.h
  arglist.obj : arglist.c vim.h [.auto]config.h feature.h os_unix.h
  autocmd.obj : autocmd.c vim.h [.auto]config.h feature.h os_unix.h
  blowfish.obj : blowfish.c vim.h [.auto]config.h feature.h os_unix.h
! blob.obj : blob.c vim.h [.auto]config.h feature.h os_unix.h   
  buffer.obj : buffer.c vim.h [.auto]config.h feature.h os_unix.h \
   ascii.h keymap.h term.h macros.h structs.h regexp.h \
   gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
--- 721,744 ----
        -@ !
  .ENDIF
  
+ .IFDEF VIM_LUA
+ lua_env :
+       -@ write sys$output "using LUA environment:"
+       -@ write sys$output "    include path: ""$(LUA_INC)"""
+       -@ write sys$output "creating OS_VMS_LUA.OPT file."
+       -@ open/write opt_file OS_VMS_LUA.OPT
+       -@ write opt_file "LUA$ROOT:[LIB]LUA$SHR.EXE /share"
+       -@ close opt_file
+ .ELSE
+ lua_env :
+       -@ !
+ .ENDIF
+ 
  arabic.obj : arabic.c vim.h
  arglist.obj : arglist.c vim.h [.auto]config.h feature.h os_unix.h
  autocmd.obj : autocmd.c vim.h [.auto]config.h feature.h os_unix.h
  blowfish.obj : blowfish.c vim.h [.auto]config.h feature.h os_unix.h
! blob.obj : blob.c vim.h [.auto]config.h feature.h os_unix.h
  buffer.obj : buffer.c vim.h [.auto]config.h feature.h os_unix.h \
   ascii.h keymap.h term.h macros.h structs.h regexp.h \
   gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
***************
*** 873,879 ****
  if_mzsch.obj : if_mzsch.c vim.h [.auto]config.h feature.h os_unix.h \
   ascii.h keymap.h term.h macros.h option.h structs.h \
   regexp.h gui.h beval.h [.proto]gui_beval.pro ex_cmds.h proto.h \
!  errors.h globals.h if_mzsch.h 
  indent.obj : indent.c vim.h [.auto]config.h feature.h os_unix.h
  insexpand.obj : insexpand.c vim.h [.auto]config.h feature.h os_unix.h
  json.obj : json.c vim.h [.auto]config.h feature.h os_unix.h   \
--- 898,904 ----
  if_mzsch.obj : if_mzsch.c vim.h [.auto]config.h feature.h os_unix.h \
   ascii.h keymap.h term.h macros.h option.h structs.h \
   regexp.h gui.h beval.h [.proto]gui_beval.pro ex_cmds.h proto.h \
!  errors.h globals.h if_mzsch.h
  indent.obj : indent.c vim.h [.auto]config.h feature.h os_unix.h
  insexpand.obj : insexpand.c vim.h [.auto]config.h feature.h os_unix.h
  json.obj : json.c vim.h [.auto]config.h feature.h os_unix.h   \
***************
*** 1167,1172 ****
--- 1192,1199 ----
   ascii.h keymap.h term.h macros.h structs.h regexp.h \
   gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
   errors.h globals.h version.h
+ if_lua.obj : if_lua.c vim.h [.auto]config.h feature.h os_unix.h \
+  errors.h globals.h version.h
  beval.obj : beval.c vim.h [.auto]config.h feature.h os_unix.h \
   ascii.h keymap.h term.h macros.h structs.h regexp.h \
   gui.h beval.h option.h ex_cmds.h proto.h \
***************
*** 1186,1189 ****
  xprepare.obj : [.xdiff]xprepare.c [.xdiff]xinclude.h [.auto]config.h vim.h 
feature.h os_unix.h
  xutils.obj : [.xdiff]xutils.c [.xdiff]xinclude.h [.auto]config.h vim.h 
feature.h os_unix.h
  xhistogram.obj : [.xdiff]xhistogram.c [.xdiff]xinclude.h [.auto]config.h 
vim.h feature.h os_unix.h
! xpatience.obj : [.xdiff]xpatience.c [.xdiff]xinclude.h [.auto]config.h vim.h 
feature.h os_unix.h      
--- 1213,1216 ----
  xprepare.obj : [.xdiff]xprepare.c [.xdiff]xinclude.h [.auto]config.h vim.h 
feature.h os_unix.h
  xutils.obj : [.xdiff]xutils.c [.xdiff]xinclude.h [.auto]config.h vim.h 
feature.h os_unix.h
  xhistogram.obj : [.xdiff]xhistogram.c [.xdiff]xinclude.h [.auto]config.h 
vim.h feature.h os_unix.h
! xpatience.obj : [.xdiff]xpatience.c [.xdiff]xinclude.h [.auto]config.h vim.h 
feature.h os_unix.h
*** ../vim-8.2.2293/src/macros.h        2020-12-30 13:14:41.950441890 +0100
--- src/macros.h        2021-01-04 10:35:38.332307003 +0100
***************
*** 161,167 ****
  # define mch_fstat(n, p)      fstat((n), (p))
  # undef HAVE_LSTAT            // VMS does not have lstat()
  # define mch_stat(n, p)               stat(vms_fixfilename(n), (p))
- # define mch_rmdir(n)         rmdir(vms_fixfilename(n))
  #else
  # ifndef MSWIN
  #   define mch_access(n, p)   access((n), (p))
--- 161,166 ----
*** ../vim-8.2.2293/src/os_vms.c        2020-05-17 14:06:07.313201564 +0200
--- src/os_vms.c        2021-01-04 10:36:50.948118893 +0100
***************
*** 672,680 ****
      else if (strchr(instring,'"') == NULL)    // password in the path?
      {
        // Seems it is a regular file, let guess that it is pure Unix fspec
!       if (decc$to_vms(instring, vms_fspec_proc, 0, 0) <= 0)
!           // No... it must be mixed
            vms_unix_mixed_filespec(instring, buf);
      }
      else
        // we have a password in the path
--- 672,689 ----
      else if (strchr(instring,'"') == NULL)    // password in the path?
      {
        // Seems it is a regular file, let guess that it is pure Unix fspec
!         if ( (strchr(instring,'[') == NULL) && (strchr(instring,'<') == NULL) 
&&
!            (strchr(instring,']') == NULL) && (strchr(instring,'>') == NULL) &&
!            (strchr(instring,':') == NULL) )
!       {
!           // It must be a truly unix fspec
!           decc$to_vms(instring, vms_fspec_proc, 0, 0);
!       }
!       else
!       {
!           // It is a mixed fspec
            vms_unix_mixed_filespec(instring, buf);
+       }
      }
      else
        // we have a password in the path
*** ../vim-8.2.2293/src/vim9execute.c   2021-01-02 15:41:00.193079024 +0100
--- src/vim9execute.c   2021-01-04 10:38:40.515814831 +0100
***************
*** 3389,3395 ****
                break;
            case ISN_EXECCONCAT:
                smsg("%4d EXECCONCAT %lld", current,
!                                             (long long)iptr->isn_arg.number);
                break;
            case ISN_ECHO:
                {
--- 3389,3395 ----
                break;
            case ISN_EXECCONCAT:
                smsg("%4d EXECCONCAT %lld", current,
!                                             
(varnumber_T)iptr->isn_arg.number);
                break;
            case ISN_ECHO:
                {
***************
*** 3402,3416 ****
                break;
            case ISN_EXECUTE:
                smsg("%4d EXECUTE %lld", current,
!                                           (long long)(iptr->isn_arg.number));
                break;
            case ISN_ECHOMSG:
                smsg("%4d ECHOMSG %lld", current,
!                                           (long long)(iptr->isn_arg.number));
                break;
            case ISN_ECHOERR:
                smsg("%4d ECHOERR %lld", current,
!                                           (long long)(iptr->isn_arg.number));
                break;
            case ISN_LOAD:
            case ISN_LOADOUTER:
--- 3402,3416 ----
                break;
            case ISN_EXECUTE:
                smsg("%4d EXECUTE %lld", current,
!                                           
(varnumber_T)(iptr->isn_arg.number));
                break;
            case ISN_ECHOMSG:
                smsg("%4d ECHOMSG %lld", current,
!                                           
(varnumber_T)(iptr->isn_arg.number));
                break;
            case ISN_ECHOERR:
                smsg("%4d ECHOERR %lld", current,
!                                           
(varnumber_T)(iptr->isn_arg.number));
                break;
            case ISN_LOAD:
            case ISN_LOADOUTER:
***************
*** 3419,3429 ****
  
                    if (iptr->isn_arg.number < 0)
                        smsg("%4d LOAD%s arg[%lld]", current, add,
!                               (long long)(iptr->isn_arg.number
                                                          + STACK_FRAME_SIZE));
                    else
                        smsg("%4d LOAD%s $%lld", current, add,
!                                           (long long)(iptr->isn_arg.number));
                }
                break;
            case ISN_LOADV:
--- 3419,3429 ----
  
                    if (iptr->isn_arg.number < 0)
                        smsg("%4d LOAD%s arg[%lld]", current, add,
!                               (varnumber_T)(iptr->isn_arg.number
                                                          + STACK_FRAME_SIZE));
                    else
                        smsg("%4d LOAD%s $%lld", current, add,
!                                           
(varnumber_T)(iptr->isn_arg.number));
                }
                break;
            case ISN_LOADV:
***************
*** 3496,3505 ****
  
                if (iptr->isn_arg.number < 0)
                    smsg("%4d STORE%s arg[%lld]", current, add,
!                        (long long)(iptr->isn_arg.number + STACK_FRAME_SIZE));
                else
                    smsg("%4d STORE%s $%lld", current, add,
!                                           (long long)(iptr->isn_arg.number));
                }
                break;
            case ISN_STOREV:
--- 3496,3505 ----
  
                if (iptr->isn_arg.number < 0)
                    smsg("%4d STORE%s arg[%lld]", current, add,
!                        (varnumber_T)(iptr->isn_arg.number + 
STACK_FRAME_SIZE));
                else
                    smsg("%4d STORE%s $%lld", current, add,
!                                           
(varnumber_T)(iptr->isn_arg.number));
                }
                break;
            case ISN_STOREV:
***************
*** 3578,3584 ****
            // constants
            case ISN_PUSHNR:
                smsg("%4d PUSHNR %lld", current,
!                                           (long long)(iptr->isn_arg.number));
                break;
            case ISN_PUSHBOOL:
            case ISN_PUSHSPEC:
--- 3578,3584 ----
            // constants
            case ISN_PUSHNR:
                smsg("%4d PUSHNR %lld", current,
!                                           
(varnumber_T)(iptr->isn_arg.number));
                break;
            case ISN_PUSHBOOL:
            case ISN_PUSHSPEC:
***************
*** 3653,3663 ****
                break;
            case ISN_NEWLIST:
                smsg("%4d NEWLIST size %lld", current,
!                                           (long long)(iptr->isn_arg.number));
                break;
            case ISN_NEWDICT:
                smsg("%4d NEWDICT size %lld", current,
!                                           (long long)(iptr->isn_arg.number));
                break;
  
            // function call
--- 3653,3663 ----
                break;
            case ISN_NEWLIST:
                smsg("%4d NEWLIST size %lld", current,
!                                           
(varnumber_T)(iptr->isn_arg.number));
                break;
            case ISN_NEWDICT:
                smsg("%4d NEWDICT size %lld", current,
!                                           
(varnumber_T)(iptr->isn_arg.number));
                break;
  
            // function call
***************
*** 3924,3933 ****
                                smsg("%4d 2BOOL (!!val)", current);
                            break;
            case ISN_2STRING: smsg("%4d 2STRING stack[%lld]", current,
!                                        (long long)(iptr->isn_arg.number));
                              break;
            case ISN_2STRING_ANY: smsg("%4d 2STRING_ANY stack[%lld]", current,
!                                        (long long)(iptr->isn_arg.number));
                              break;
            case ISN_RANGE: smsg("%4d RANGE %s", current, iptr->isn_arg.string);
                            break;
--- 3924,3933 ----
                                smsg("%4d 2BOOL (!!val)", current);
                            break;
            case ISN_2STRING: smsg("%4d 2STRING stack[%lld]", current,
!                                        (varnumber_T)(iptr->isn_arg.number));
                              break;
            case ISN_2STRING_ANY: smsg("%4d 2STRING_ANY stack[%lld]", current,
!                                        (varnumber_T)(iptr->isn_arg.number));
                              break;
            case ISN_RANGE: smsg("%4d RANGE %s", current, iptr->isn_arg.string);
                            break;
*** ../vim-8.2.2293/src/gui_xmebw.c     2019-12-02 22:48:55.000000000 +0100
--- src/gui_xmebw.c     2021-01-04 10:40:58.203405277 +0100
***************
*** 69,74 ****
--- 69,88 ----
      _XmDrawHighlight(a, b, c, d, e, f, g, h, LineSolid)
  #endif
  
+ // Older VMS systems do not have xos_r.h and cannot haldle XtProcessLocking
+ #if defined(VMS)
+ # if defined(HAVE_XOS_R_H)
+ #  define XTPROCESS_LOCK XtProcessLock()
+ #  define XTPROCESS_UNLOCK XtProcessUnlock()
+ # else
+ #  define XTPROCESS_LOCK
+ #  define XTPROCESS_UNLOCK
+ # endif
+ #else
+ # define XTPROCESS_LOCK XtProcessLock()
+ # define XTPROCESS_UNLOCK XtProcessUnlock()
+ #endif
+ 
  /*
   * Motif internals we have to cheat around with.
   */
***************
*** 714,722 ****
      {
        XtExposeProc expose;
  
!       XtProcessLock();
        expose = xmLabelClassRec.core_class.expose;
!       XtProcessUnlock();
        (*expose)((Widget) eb, event, region);
      }
  
--- 728,736 ----
      {
        XtExposeProc expose;
  
!       XTPROCESS_LOCK;
        expose = xmLabelClassRec.core_class.expose;
!       XTPROCESS_UNLOCK;
        (*expose)((Widget) eb, event, region);
      }
  
***************
*** 809,817 ****
        _XmPrimitiveEnter((Widget) eb, event, NULL, NULL);
        if (eb->pushbutton.armed == TRUE)
        {
!           XtProcessLock();
            expose = XtClass(eb)->core_class.expose;
!           XtProcessUnlock();
            (*expose) (wid, event, (Region) NULL);
        }
  
--- 823,831 ----
        _XmPrimitiveEnter((Widget) eb, event, NULL, NULL);
        if (eb->pushbutton.armed == TRUE)
        {
!           XTPROCESS_LOCK;
            expose = XtClass(eb)->core_class.expose;
!           XTPROCESS_UNLOCK;
            (*expose) (wid, event, (Region) NULL);
        }
  
***************
*** 887,895 ****
        {
            XtExposeProc expose;
            eb->pushbutton.armed = FALSE;
!           XtProcessLock();
            expose = XtClass(eb)->core_class.expose;
!           XtProcessUnlock();
            (*expose) (wid, event, (Region)NULL);
            draw_unhighlight(eb);
            draw_pixmap(eb, event, NULL);
--- 901,909 ----
        {
            XtExposeProc expose;
            eb->pushbutton.armed = FALSE;
!           XTPROCESS_LOCK;
            expose = XtClass(eb)->core_class.expose;
!           XTPROCESS_UNLOCK;
            (*expose) (wid, event, (Region)NULL);
            draw_unhighlight(eb);
            draw_pixmap(eb, event, NULL);
***************
*** 973,981 ****
      // Invoke Label's Resize procedure.
      {
        XtWidgetProc resize;
!       XtProcessLock();
        resize = xmLabelClassRec.core_class.resize;
!       XtProcessUnlock();
  
        (* resize) ((Widget) newtb);
      }
--- 987,995 ----
      // Invoke Label's Resize procedure.
      {
        XtWidgetProc resize;
!       XTPROCESS_LOCK;
        resize = xmLabelClassRec.core_class.resize;
!       XTPROCESS_UNLOCK;
  
        (* resize) ((Widget) newtb);
      }
***************
*** 988,996 ****
      XmEnhancedButtonWidget  eb = (XmEnhancedButtonWidget)ebw;
      XtWidgetProc          resize;
  
!     XtProcessLock();
      resize = xmLabelClassRec.core_class.resize;
!     XtProcessUnlock();
  
      // Create a bitmap for stippling (Drawable resources are cheap).
      if (STIPPLE_BITMAP == None)
--- 1002,1010 ----
      XmEnhancedButtonWidget  eb = (XmEnhancedButtonWidget)ebw;
      XtWidgetProc          resize;
  
!     XTPROCESS_LOCK;
      resize = xmLabelClassRec.core_class.resize;
!     XTPROCESS_UNLOCK;
  
      // Create a bitmap for stippling (Drawable resources are cheap).
      if (STIPPLE_BITMAP == None)
*** ../vim-8.2.2293/src/os_unix.h       2020-12-30 13:14:41.950441890 +0100
--- src/os_unix.h       2021-01-04 10:41:35.183290867 +0100
***************
*** 73,80 ****
  // always use unlink() to remove files
  #ifndef PROTO
  # ifdef VMS
! #  define mch_remove(x) delete((char *)(x))
! #  define vim_mkdir(x, y) mkdir((char *)(x), y)
  # else
  #  define vim_mkdir(x, y) mkdir((char *)(x), y)
  #  define mch_rmdir(x) rmdir((char *)(x))
--- 73,81 ----
  // always use unlink() to remove files
  #ifndef PROTO
  # ifdef VMS
! #  define vim_mkdir(x, y) mkdir((char *)vms_fixfilename(x), y)
! #  define mch_rmdir(x)  delete((char *)vms_fixfilename(x))
! #  define mch_remove(x) delete((char *)vms_fixfilename(x))
  # else
  #  define vim_mkdir(x, y) mkdir((char *)(x), y)
  #  define mch_rmdir(x) rmdir((char *)(x))
*** ../vim-8.2.2293/src/version.c       2021-01-03 22:12:11.966284913 +0100
--- src/version.c       2021-01-04 10:46:31.490324524 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     2294,
  /**/

-- 
>From "know your smileys":
 @:-()  Elvis Presley

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            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/202101040948.1049mSEY2380184%40masaka.moolenaar.net.

Raspunde prin e-mail lui