summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-03-12 16:51:55 +0100
committerBram Moolenaar <Bram@vim.org>2014-03-12 16:51:55 +0100
commit206f011829920e41c4d3782af7591da6e1b86655 (patch)
treee244183206e3bcf82829738bf2d0eca05c7f4baf /src
parentf7dc2b551708315a833fcb19c288759c277dcfe1 (diff)
downloadvim-git-206f011829920e41c4d3782af7591da6e1b86655.tar.gz
updated for version 7.4.197v7.4.197
Problem: Various problems on VMS. Solution: Fix several VMS problems. (Zoltan Arpadffy)
Diffstat (limited to 'src')
-rw-r--r--src/Make_vms.mms37
-rw-r--r--src/fileio.c2
-rw-r--r--src/os_unix.c21
-rw-r--r--src/os_unix.h4
-rw-r--r--src/os_vms.c67
-rw-r--r--src/os_vms_conf.h12
-rw-r--r--src/proto/os_vms.pro1
-rw-r--r--src/testdir/Make_vms.mms103
-rw-r--r--src/testdir/test72.in6
-rw-r--r--src/testdir/test77a.com8
-rw-r--r--src/testdir/test77a.in31
-rw-r--r--src/testdir/test77a.ok1
-rw-r--r--src/undo.c11
-rw-r--r--src/version.c2
14 files changed, 238 insertions, 68 deletions
diff --git a/src/Make_vms.mms b/src/Make_vms.mms
index 86b61d63f..4d19bcb2e 100644
--- a/src/Make_vms.mms
+++ b/src/Make_vms.mms
@@ -2,7 +2,7 @@
# Makefile for Vim on OpenVMS
#
# Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
-# Last change: 2008 Aug 16
+# Last change: 2014 Feb 24
#
# This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
# with MMS and MMK
@@ -21,9 +21,6 @@
######################################################################
# Configuration section.
######################################################################
-# VMS version
-# Uncomment if you use VMS version 6.2 or older
-# OLD_VMS = YES
# Compiler selection.
# Comment out if you use the VAXC compiler
@@ -60,7 +57,7 @@ CCVER = YES
# Uncomment if want a debug version. Resulting executable is DVIM.EXE
# Development purpose only! Normally, it should not be defined. !!!
-# DEBUG = YES
+# DEBUG = YES
# Languages support for Perl, Python, TCL etc.
# If you don't need it really, leave them behind the comment.
@@ -87,6 +84,9 @@ CCVER = YES
# Allow FEATURE_MZSCHEME
# VIM_MZSCHEME = YES
+# Use ICONV
+# VIM_ICONV = YES
+
######################################################################
# Directory, library and include files configuration section.
# Normally you need not to change anything below. !
@@ -99,25 +99,25 @@ CCVER = YES
.IFDEF MMSVAX
.IFDEF DECC # VAX with DECC
-CC_DEF = cc # /decc # some system requires this switch but when it is not required /ver might fail
+CC_DEF = cc # /decc # some versions require /decc switch but when it is not required /ver might fail
PREFIX = /prefix=all
+OPTIMIZE= /noopt # do not optimize on VAX. The compiler has hard time with crypto functions
.ELSE # VAX with VAXC
CC_DEF = cc
PREFIX =
+OPTIMIZE= /noopt
CCVER =
.ENDIF
-.ELSE # AXP wixh DECC
+.ELSE # AXP and IA64 with DECC
CC_DEF = cc
PREFIX = /prefix=all
+OPTIMIZE= /opt
.ENDIF
+
LD_DEF = link
C_INC = [.proto]
-.IFDEF OLD_VMS
-VMS_DEF = ,"OLD_VMS"
-.ENDIF
-
.IFDEF DEBUG
DEBUG_DEF = ,"DEBUG"
TARGET = dvim.exe
@@ -125,7 +125,7 @@ CFLAGS = /debug/noopt$(PREFIX)
LDFLAGS = /debug
.ELSE
TARGET = vim.exe
-CFLAGS = /opt$(PREFIX)
+CFLAGS = $(OPTIMIZE)$(PREFIX)
LDFLAGS =
.ENDIF
@@ -274,6 +274,11 @@ MZSCH_SRC = if_mzsch.c
MZSCH_OBJ = if_mzsch.obj
.ENDIF
+.IFDEF VIM_ICONV
+# ICONV related setup
+ICONV_DEF = ,"USE_ICONV"
+.ENDIF
+
######################################################################
# End of configuration section.
# Please, do not change anything below without programming experience.
@@ -287,8 +292,8 @@ VIMHOST = "''F$TRNLNM("SYS$NODE")'''F$TRNLNM("UCX$INET_HOST")'.''F$TRNLNM("UCX$I
.SUFFIXES : .obj .c
-ALL_CFLAGS = /def=($(MODEL_DEF)$(DEFS)$(VMS_DEF)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
- $(TCL_DEF)$(SNIFF_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)) -
+ALL_CFLAGS = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
+ $(TCL_DEF)$(SNIFF_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)$(ICONV_DEF)) -
$(CFLAGS)$(GUI_FLAG) -
/include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC)$(PERL_INC)$(PYTHON_INC)$(TCL_INC))
@@ -296,8 +301,8 @@ ALL_CFLAGS = /def=($(MODEL_DEF)$(DEFS)$(VMS_DEF)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_
# It is specially formated for correct display of unix like includes
# as $(GUI_INC) - replaced with $(GUI_INC_VER)
# Otherwise should not be any other difference.
-ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(VMS_DEF)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
- $(TCL_DEF)$(SNIFF_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)) -
+ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
+ $(TCL_DEF)$(SNIFF_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_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))
diff --git a/src/fileio.c b/src/fileio.c
index 4a35f04fe..c4c429511 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -7559,7 +7559,7 @@ vim_tempname(extra_char)
p = (char_u *)tempnam("tmp:", (char *)itmp);
if (p != NULL)
{
- /* VMS will use '.LOG' if we don't explicitly specify an extension,
+ /* VMS will use '.LIS' if we don't explicitly specify an extension,
* and VIM will then be unable to find the file later */
STRCPY(itmp, p);
STRCAT(itmp, ".txt");
diff --git a/src/os_unix.c b/src/os_unix.c
index 784c5a3b1..48f45b0eb 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -2965,7 +2965,26 @@ executable_file(name)
if (stat((char *)name, &st))
return 0;
+#ifdef VMS
+ /* Like on Unix system file can have executable rights but not necessarily
+ * be an executable, but on Unix is not a default for an ordianry file to
+ * have an executable flag - on VMS it is in most cases.
+ * Therefore, this check does not have any sense - let keep us to the
+ * conventions instead:
+ * *.COM and *.EXE files are the executables - the rest are not. This is
+ * not ideal but better then it was.
+ */
+ int vms_executable = 0;
+ if (S_ISREG(st.st_mode) && mch_access((char *)name, X_OK) == 0)
+ {
+ if (strstr(vms_tolower((char*)name),".exe") != NULL
+ || strstr(vms_tolower((char*)name),".com")!= NULL)
+ vms_executable = 1;
+ }
+ return vms_executable;
+#else
return S_ISREG(st.st_mode) && mch_access((char *)name, X_OK) == 0;
+#endif
}
/*
@@ -2983,7 +3002,9 @@ mch_can_exe(name)
/* If it's an absolute or relative path don't need to use $PATH. */
if (mch_isFullName(name) || (name[0] == '.' && (name[1] == '/'
|| (name[1] == '.' && name[2] == '/'))))
+ {
return executable_file(name);
+ }
p = (char_u *)getenv("PATH");
if (p == NULL || *p == NUL)
diff --git a/src/os_unix.h b/src/os_unix.h
index 44c331cb8..d02520018 100644
--- a/src/os_unix.h
+++ b/src/os_unix.h
@@ -302,7 +302,7 @@ typedef struct dsc$descriptor DESC;
# define USR_VIMRC_FILE2 "$HOME/vimfiles/vimrc"
# else
# ifdef VMS
-# define USR_VIMRC_FILE2 "sys$login:vimfiles:vimrc"
+# define USR_VIMRC_FILE2 "sys$login:vimfiles/vimrc"
# else
# define USR_VIMRC_FILE2 "~/.vim/vimrc"
# endif
@@ -329,7 +329,7 @@ typedef struct dsc$descriptor DESC;
# define USR_GVIMRC_FILE2 "$HOME/vimfiles/gvimrc"
# else
# ifdef VMS
-# define USR_GVIMRC_FILE2 "sys$login:vimfiles:gvimrc"
+# define USR_GVIMRC_FILE2 "sys$login:vimfiles/gvimrc"
# else
# define USR_GVIMRC_FILE2 "~/.vim/gvimrc"
# endif
diff --git a/src/os_vms.c b/src/os_vms.c
index 24ff5d07d..814b64a34 100644
--- a/src/os_vms.c
+++ b/src/os_vms.c
@@ -296,6 +296,18 @@ vms_sys(char *cmd, char *out, char *inp)
}
/*
+ * Convert string to lowercase - most often filename
+ */
+ char *
+vms_tolower( char *name )
+{
+ int i,nlen = strlen(name);
+ for (i = 0; i < nlen; i++)
+ name[i] = TOLOWER_ASC(name[i]);
+ return name;
+}
+
+/*
* Convert VMS system() or lib$spawn() return code to Unix-like exit value.
*/
int
@@ -361,13 +373,12 @@ vms_read(char *inbuf, size_t nbytes)
vms_wproc(char *name, int val)
{
int i;
- int nlen;
static int vms_match_alloced = 0;
- if (val != DECC$K_FILE) /* Directories and foreign non VMS files are not
- counting */
+ if (val == DECC$K_FOREIGN ) /* foreign non VMS files are not counting */
return 1;
+ /* accept all DECC$K_FILE and DECC$K_DIRECTORY */
if (vms_match_num == 0) {
/* first time through, setup some things */
if (NULL == vms_fmatch) {
@@ -383,12 +394,9 @@ vms_wproc(char *name, int val)
}
}
+ /* make matches look uniform */
vms_remove_version(name);
-
- /* convert filename to lowercase */
- nlen = strlen(name);
- for (i = 0; i < nlen; i++)
- name[i] = TOLOWER_ASC(name[i]);
+ name=vms_tolower(name);
/* if name already exists, don't add it */
for (i = 0; i<vms_match_num; i++) {
@@ -428,6 +436,7 @@ mch_expand_wildcards(int num_pat, char_u **pat, int *num_file, char_u ***file, i
{
int i, cnt = 0;
char_u buf[MAXPATHL];
+ char *result;
int dir;
int files_alloced, files_free;
@@ -449,8 +458,13 @@ mch_expand_wildcards(int num_pat, char_u **pat, int *num_file, char_u ***file, i
STRCPY(buf,pat[i]);
vms_match_num = 0; /* reset collection counter */
- cnt = decc$to_vms(decc$translate_vms(vms_fixfilename(buf)), vms_wproc, 1, 0);
- /* allow wild, no dir */
+ result = decc$translate_vms(vms_fixfilename(buf));
+ if ( (int) result == 0 || (int) result == -1 ) {
+ cnt = 0;
+ }
+ else {
+ cnt = decc$to_vms(result, vms_wproc, 1 /*allow wild*/ , (flags & EW_DIR ? 0:1 ) /*allow directory*/) ;
+ }
if (cnt > 0)
cnt = vms_match_num;
@@ -497,10 +511,18 @@ mch_expand_wildcards(int num_pat, char_u **pat, int *num_file, char_u ***file, i
mch_expandpath(garray_T *gap, char_u *path, int flags)
{
int i,cnt = 0;
- vms_match_num = 0;
+ char *result;
- cnt = decc$to_vms(decc$translate_vms(vms_fixfilename(path)), vms_wproc, 1, 0);
- /* allow wild, no dir */
+ vms_match_num = 0;
+ /* the result from the decc$translate_vms needs to be handled */
+ /* otherwise it might create ACCVIO error in decc$to_vms */
+ result = decc$translate_vms(vms_fixfilename(path));
+ if ( (int) result == 0 || (int) result == -1 ) {
+ cnt = 0;
+ }
+ else {
+ cnt = decc$to_vms(result, vms_wproc, 1 /*allow_wild*/, (flags & EW_DIR ? 0:1 ) /*allow directory*/);
+ }
if (cnt > 0)
cnt = vms_match_num;
for (i = 0; i < cnt; i++)
@@ -521,6 +543,7 @@ vms_unix_mixed_filespec(char *in, char *out)
char *end_of_dir;
char ch;
int len;
+ char *out_str=out;
/* copy vms filename portion up to last colon
* (node and/or disk)
@@ -602,7 +625,6 @@ vms_unix_mixed_filespec(char *in, char *out)
*end_of_dir = ']';
}
-
/*
* for decc$to_vms in vms_fixfilename
*/
@@ -710,26 +732,33 @@ RealWaitForChar(fd, msec, check_for_gpm)
struct _generic_64 time_diff;
struct _generic_64 time_out;
unsigned int convert_operation = LIB$K_DELTA_SECONDS_F;
- float sec = (float) msec / 1000;
+ float sec =(float) msec/1000;
/* make sure the iochan is set */
if (!iochan)
get_tty();
- if (msec > 0) {
+ if (sec > 0) {
/* time-out specified; convert it to absolute time */
+ /* sec>0 requirement of lib$cvtf_to_internal_time()*/
/* get current time (number of 100ns ticks since the VMS Epoch) */
status = sys$gettim(&time_curr);
if (status != SS$_NORMAL)
return 0; /* error */
-
/* construct the delta time */
- status = lib$cvtf_to_internal_time(
+#if __G_FLOAT==0
+# ifndef VAX
+ /* IEEE is default on IA64, but can be used on Alpha too - but not on VAX */
+ status = lib$cvts_to_internal_time(
&convert_operation, &sec, &time_diff);
+# endif
+#else /* default on Alpha and VAX */
+ status = lib$cvtf_to_internal_time(
+ &convert_operation, &sec, &time_diff);
+#endif
if (status != LIB$_NORMAL)
return 0; /* error */
-
/* add them up */
status = lib$add_times(
&time_curr,
diff --git a/src/os_vms_conf.h b/src/os_vms_conf.h
index 4058e4a36..41728efe2 100644
--- a/src/os_vms_conf.h
+++ b/src/os_vms_conf.h
@@ -166,8 +166,6 @@
#undef HAVE_SYS_TIME_H
#undef HAVE_LOCALE_H
#define BROKEN_LOCALE
-#undef HAVE_ICONV_H
-#undef HAVE_ICONV
#undef DYNAMIC_ICONV
#undef HAVE_STRFTIME
#else
@@ -177,12 +175,18 @@
#define HAVE_SYS_TIME_H
#define HAVE_LOCALE_H
#define BROKEN_LOCALE
-#undef HAVE_ICONV_H
-#undef HAVE_ICONV
#undef DYNAMIC_ICONV
#define HAVE_STRFTIME
#endif
+#if defined(USE_ICONV)
+#define HAVE_ICONV_H
+#define HAVE_ICONV
+#else
+#undef HAVE_ICONV_H
+#undef HAVE_ICONV
+#endif
+
/* GUI support defines */
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK)
#define HAVE_X11
diff --git a/src/proto/os_vms.pro b/src/proto/os_vms.pro
index 2ed6394eb..6408455e4 100644
--- a/src/proto/os_vms.pro
+++ b/src/proto/os_vms.pro
@@ -7,6 +7,7 @@ int mch_setenv __ARGS((char *var, char *value, int x));
int vms_sys __ARGS((char *cmd, char *out, char *inp));
int vms_sys_status __ARGS((int status));
int vms_read __ARGS((char *inbuf, size_t nbytes));
+char *vms_tolower __ARGS((char *name));
int mch_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags));
int mch_expandpath __ARGS((garray_T *gap, char_u *path, int flags));
void *vms_fixfilename __ARGS((void *instring));
diff --git a/src/testdir/Make_vms.mms b/src/testdir/Make_vms.mms
index de3fb485a..a20fa1fbc 100644
--- a/src/testdir/Make_vms.mms
+++ b/src/testdir/Make_vms.mms
@@ -4,7 +4,7 @@
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
#
-# Last change: 2014 Feb 23
+# Last change: 2014 Mar 12
#
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
# Edit the lines in the Configuration section below to select.
@@ -41,16 +41,31 @@
# They fail because VMS does not support file names.
# WANT_SPELL = YES
-# Comment out if you want to run mzschema tests.
+# Comment out if you want to run mzschema tests.
# It fails because VMS does not support this feature yet.
# WANT_MZSCH = YES
+# Comment out if you have ODS-5 file system
+# HAVE_ODS5 = YES
+
# Comment out if you have gzip on your system
# HAVE_GZIP = YES
# Comment out if you have GNU compatible diff on your system
# HAVE_GDIFF = YES
+# Comment out if you have GNU compatible cksum on your system
+# HAVE_CKSUM = YES
+
+# Comment out if you have ICONV support
+# HAVE_ICONV = YES
+
+# Comment out if you have LUA support
+# HAVE_LUA = YES
+
+# Comment out if you have PYTHON support
+# HAVE_PYTHON = YES
+
#######################################################################
# End of configuration section.
#
@@ -63,37 +78,44 @@ VIMPROG = <->vim.exe
SCRIPT = test1.out test2.out test3.out test4.out test5.out \
test6.out test7.out test8.out test9.out test10a.out\
- test13.out test14.out test15.out test17.out \
+ test13.out test14.out test15.out \
test18.out test19.out test20.out test21.out test22.out \
test23.out test24.out test26.out \
test28.out test29.out test30.out test31.out test32.out \
test33.out test34.out test35.out test36.out test37.out \
test38.out test39.out test40.out test41.out test42.out \
test43.out test44.out test45.out test46.out \
- test48.out test51.out test53.out test54.out test55.out \
- test56.out test57.out test60.out \
+ test48.out test49.out test51.out test53.out test54.out \
+ test55.out test56.out test57.out test60.out \
test61.out test62.out test63.out test64.out test65.out \
test66.out test67.out test68.out test69.out \
test71.out test72.out test74.out test75.out test76.out \
- test77.out test78.out test79.out test80.out test81.out \
- test82.out test83.out test84.out test88.out test89.out \
+ test77a.out test78.out test79.out test80.out test81.out \
+ test82.out test84.out test88.out test89.out \
test90.out test91.out test92.out test93.out test94.out \
- test95.out test96.out test97.out test98.out test99.out \
- test100.out test101.out test102.out test103.out test104.out \
+ test95.out test96.out test98.out test99.out \
+ test100.out test101.out test103.out test104.out \
test105.out
# Known problems:
-# Test 30: a problem around mac format - unknown reason
+# test17: ?
+#
+# test30: bug, most probably - a problem around mac format
#
-# Test 32: VMS is not case sensitive and all filenames are lowercase within Vim
+# test32: VMS is not case sensitive and all filenames are lowercase within Vim
# (this should be changed in order to preserve the original filename) - should
# be fixed. VMS allows just one dot in the filename
#
-# Test 58 and 59: Failed/Hangs - VMS does not support spell files (file names
+# test58, test59: Failed/Hangs - VMS does not support spell files (file names
# with too many dots).
#
-# Test 72: unknown reason
-# Test 85: no Lua interface
+# test72: bug - Vim hangs at :rename (while rename works well otherwise)
+# test78: bug - Vim dies at :recover Xtest
+# test83: ?
+# test85: no Lua interface
+# test89: bug - findfile() does not work on VMS (just in the current directory)
+# test97, test102: Just ODS-5 supports space and special chars in the filename.
+# On ODS-2 tests fail.
.IFDEF WANT_GUI
SCRIPT_GUI = test16.out
@@ -101,7 +123,7 @@ GUI_OPTION = -g
.ENDIF
.IFDEF WANT_UNIX
-SCRIPT_UNIX = test10.out test12.out test25.out test27.out test49.out test73.out
+SCRIPT_UNIX = test10.out test12.out test17.out test25.out test27.out test49.out test73.out
.ENDIF
.IFDEF WANT_WIN
@@ -116,6 +138,10 @@ SCRIPT_SPELL = test58.out test59.out
SCRIPT_MZSCH = test70.out
.ENDIF
+.IFDEF HAVE_ODS5
+SCRIPT_ODS5 = test97.out test102.out
+.ENDIF
+
.IFDEF HAVE_GZIP
SCRIPT_GZIP = test11.out
.ENDIF
@@ -124,10 +150,28 @@ SCRIPT_GZIP = test11.out
SCRIPT_GDIFF = test47.out
.ENDIF
+.IFDEF HAVE_CKSUM
+SCRIPT_CKSUM = test77.out
+.ENDIF
+
+.IFDEF HAVE_ICONV
+SCRIPT_ICONV = test83.out
+.ENDIF
+
+.IFDEF HAVE_LUA
+SCRIPT_LUA = test85.out
+.ENDIF
+
+.IFDEF HAVE_PYTHON
+SCRIPT_PYTHON = test86.out test87.out
+.ENDIF
+
.in.out :
-@ !clean up before doing the test
-@ if "''F$SEARCH("test.out.*")'" .NES. "" then delete/noconfirm/nolog test.out.*
-@ if "''F$SEARCH("$*.out.*")'" .NES. "" then delete/noconfirm/nolog $*.out.*
+ -@ ! define TMP if not set - some tests use it
+ -@ if "''F$TRNLNM("TMP")'" .EQS. "" then define/nolog TMP []
-@ write sys$output " "
-@ write sys$output "-----------------------------------------------"
-@ write sys$output " "$*" "
@@ -140,9 +184,10 @@ SCRIPT_GDIFF = test47.out
-@ if "''F$SEARCH("$*.out.*")'" .NES. "" then differences /par $*.out $*.ok;
-@ !clean up after the test
-@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.*
+ -@ if "''F$SEARCH("Xtest.*")'" .NES. "" then delete/noconfirm/nolog Xtest.*.*
-all : clean nolog $(START_WITH) $(SCRIPT) $(SCRIPT_GUI) $(SCRIPT_UNIX) $(SCRIPT_WIN) $(SCRIPT_SPELL) $(SCRIPT_GZIP) \
- $(SCRIPT_GDIFF) $(SCRIPT_MZSCH) nolog
+all : clean nolog $(START_WITH) $(SCRIPT) $(SCRIPT_GUI) $(SCRIPT_UNIX) $(SCRIPT_WIN) $(SCRIPT_SPELL) $(SCRIPT_ODS5) $(SCRIPT_GZIP) \
+ $(SCRIPT_GDIFF) $(SCRIPT_MZSCH) $(SCRIPT_CKSUM) $(SCRIPT_ICONV) $(SCRIPT_LUA) $(SCRIPT_PYTHON) nolog
-@ write sys$output " "
-@ write sys$output "-----------------------------------------------"
-@ write sys$output " All done"
@@ -165,13 +210,18 @@ nolog :
-@ write sys$output " Test results:"
-@ write sys$output "-----------------------------------------------"
-@ write sys$output "MAKE_VMS.MMS options:"
- -@ write sys$output " WANT_GUI = ""$(WANT_GUI)"" "
- -@ write sys$output " WANT_UNIX = ""$(WANT_UNIX)"" "
- -@ write sys$output " WANT_WIN = ""$(WANT_WIN)"" "
- -@ write sys$output " WANT_SPELL= ""$(WANT_SPELL)"" "
- -@ write sys$output " WANT_MZSCH= ""$(WANT_MZSCH)"" "
- -@ write sys$output " HAVE_GZIP = ""$(HAVE_GZIP)"" "
- -@ write sys$output " HAVE_GDIFF= ""$(HAVE_GDIFF)"" "
+ -@ write sys$output " WANT_GUI = ""$(WANT_GUI)"" "
+ -@ write sys$output " WANT_UNIX = ""$(WANT_UNIX)"" "
+ -@ write sys$output " WANT_WIN = ""$(WANT_WIN)"" "
+ -@ write sys$output " WANT_SPELL = ""$(WANT_SPELL)"" "
+ -@ write sys$output " WANT_MZSCH = ""$(WANT_MZSCH)"" "
+ -@ write sys$output " HAVE_ODS5 = ""$(HAVE_ODS5)"" "
+ -@ write sys$output " HAVE_GZIP = ""$(HAVE_GZIP)"" "
+ -@ write sys$output " HAVE_GDIFF = ""$(HAVE_GDIFF)"" "
+ -@ write sys$output " HAVE_CKSUM = ""$(HAVE_CKSUM)"" "
+ -@ write sys$output " HAVE_ICONV = ""$(HAVE_ICONV)"" "
+ -@ write sys$output " HAVE_LUA = ""$(HAVE_LUA)"" "
+ -@ write sys$output " HAVE_PYTHON= ""$(HAVE_PYTHON)"" "
-@ write sys$output "Default vimrc file is VMS.VIM:"
-@ write sys$output "-----------------------------------------------"
-@ type VMS.VIM
@@ -181,6 +231,9 @@ clean :
-@ if "''F$SEARCH("test.log")'" .NES. "" then delete/noconfirm/nolog test.log.*
-@ if "''F$SEARCH("test.ok")'" .NES. "" then delete/noconfirm/nolog test.ok.*
-@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.*
+ -@ if "''F$SEARCH("Xtest*.*")'" .NES. "" then delete/noconfirm/nolog Xtest*.*.*
+ -@ if "''F$SEARCH("XX*.*")'" .NES. "" then delete/noconfirm/nolog XX*.*.*
+ -@ if "''F$SEARCH("_un_*.*")'" .NES. "" then delete/noconfirm/nolog _un_*.*.*
-@ if "''F$SEARCH("*.*_sw*")'" .NES. "" then delete/noconfirm/nolog *.*_sw*.*
-@ if "''F$SEARCH("*.failed")'" .NES. "" then delete/noconfirm/nolog *.failed.*
-@ if "''F$SEARCH("*.rej")'" .NES. "" then delete/noconfirm/nolog *.rej.*
@@ -188,6 +241,6 @@ clean :
-@ if "''F$SEARCH("small.vim")'" .NES. "" then delete/noconfirm/nolog small.vim.*
-@ if "''F$SEARCH("mbyte.vim")'" .NES. "" then delete/noconfirm/nolog mbyte.vim.*
-@ if "''F$SEARCH("mzscheme.vim")'" .NES. "" then delete/noconfirm/nolog mzscheme.vim.*
- -@ if "''F$SEARCH("lua.vim")'" .NES. "" then delete/noconfirm/nolog lua.vim.*
+ -@ if "''F$SEARCH("lua.vim")'" .NES. "" then delete/noconfirm/nolog lua.vim.*
-@ if "''F$SEARCH("viminfo.*")'" .NES. "" then delete/noconfirm/nolog viminfo.*.*
diff --git a/src/testdir/test72.in b/src/testdir/test72.in
index 220adad67..3b3a6a432 100644
--- a/src/testdir/test72.in
+++ b/src/testdir/test72.in
@@ -105,7 +105,11 @@ u:.w >>test.out
u:.w >>test.out
:"
:" Rename the undo file so that it gets cleaned up.
-:call rename(".Xtestfile.un~", "Xtestundo")
+:if has("vms")
+: call rename("_un_Xtestfile", "Xtestundo")
+:else
+: call rename(".Xtestfile.un~", "Xtestundo")
+:endif
:qa!
ENDTEST
diff --git a/src/testdir/test77a.com b/src/testdir/test77a.com
new file mode 100644
index 000000000..ef74a4c18
--- /dev/null
+++ b/src/testdir/test77a.com
@@ -0,0 +1,8 @@
+$! test77a - help file creating checksum on VMS
+$! Created by Zoltan Arpadffy
+$
+$ IF P1 .NES. ""
+$ THEN
+$ checksum 'P1'
+$ show symb CHECKSUM$CHECKSUM
+$ ENDIF
diff --git a/src/testdir/test77a.in b/src/testdir/test77a.in
new file mode 100644
index 000000000..052e29a61
--- /dev/null
+++ b/src/testdir/test77a.in
@@ -0,0 +1,31 @@
+Inserts 2 million lines with consecutive integers starting from 1
+(essentially, the output of GNU's seq 1 2000000), writes them to Xtest
+and writes its cksum to test.out.
+
+We need 2 million lines to trigger a call to mf_hash_grow(). If it would mess
+up the lines the checksum would differ.
+
+cksum is part of POSIX and so should be available on most Unixes.
+If it isn't available then the test will be skipped.
+
+VMS does not have CKSUM but has a built in CHECKSUM - it should be used
+STARTTEST
+:so small.vim
+:if !has("vms")
+: e! test.ok
+: w! test.out
+: qa!
+:endif
+:set fileformat=unix undolevels=-1
+ggdG
+:let i = 1
+:while i <= 2000000 | call append(i, range(i, i + 99)) | let i += 100 | endwhile
+ggdd
+:w! Xtest.
+:r !@test77a.com Xtest.
+:s/\s/ /g
+:set fileformat&
+:.w! test.out
+:qa!
+ENDTEST
+
diff --git a/src/testdir/test77a.ok b/src/testdir/test77a.ok
new file mode 100644
index 000000000..41ec157ea
--- /dev/null
+++ b/src/testdir/test77a.ok
@@ -0,0 +1 @@
+ CHECKSUM$CHECKSUM = "844110470"
diff --git a/src/undo.c b/src/undo.c
index 9e72d1f74..94918e0f6 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -790,9 +790,20 @@ u_get_undo_file_name(buf_ffname, reading)
if (undo_file_name == NULL)
break;
p = gettail(undo_file_name);
+#ifdef VMS
+ /* VMS can not handle more than one dot in the filenames
+ * use "dir/name" -> "dir/_un_name" - add _un_
+ * at the beginning to keep the extension */
+ mch_memmove(p + 4, p, STRLEN(p) + 1);
+ mch_memmove(p, "_un_", 4);
+
+#else
+ /* Use same directory as the ffname,
+ * "dir/name" -> "dir/.name.un~" */
mch_memmove(p + 1, p, STRLEN(p) + 1);
*p = '.';
STRCAT(p, ".un~");
+#endif
}
else
{
diff --git a/src/version.c b/src/version.c
index 91e0d50fa..7af058b81 100644
--- a/src/version.c
+++ b/src/version.c
@@ -739,6 +739,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 197,
+/**/
196,
/**/
195,