0
0
mirror of https://github.com/vim/vim.git synced 2025-09-30 04:44:14 -04:00

updated for version 7.4.197

Problem:    Various problems on VMS.
Solution:   Fix several VMS problems. (Zoltan Arpadffy)
This commit is contained in:
Bram Moolenaar
2014-03-12 16:51:55 +01:00
parent f7dc2b5517
commit 206f011829
15 changed files with 254 additions and 68 deletions

View File

@@ -764,6 +764,22 @@ GNU_TOOLS.ZIP package downloadable from http://www.polarhome.com/vim/
9. VMS related changes *vms-changes* 9. VMS related changes *vms-changes*
Version 7.4
- Undo: 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
- correct swap file name wildcard handling
- handle iconv usage correctly
- do not optimize on vax - otherwise it hangs compiling crypto files
- fileio.c fix the comment
- correct RealWaitForChar
- after 7.4-119 use different functions lib$cvtf_to_internal_time because Alpha and VAX have
G_FLOAT but IA64 uses IEEE float otherwise Vim crashes
- guard agains crashes that are caused by mixed filenames
- [TESTDIR]make_vms.mms changed to see the output files
- Improve tests, update known issues
- minor compiler warnings fixed
- CTAGS 5.8 +regex included
Version 7.3 Version 7.3
- CTAGS 5.8 included - CTAGS 5.8 included
- VMS compile warnings fixed - floating-point overflow warning corrected on VAX - VMS compile warnings fixed - floating-point overflow warning corrected on VAX

View File

@@ -2,7 +2,7 @@
# Makefile for Vim on OpenVMS # Makefile for Vim on OpenVMS
# #
# Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com> # 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 # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
# with MMS and MMK # with MMS and MMK
@@ -21,9 +21,6 @@
###################################################################### ######################################################################
# Configuration section. # Configuration section.
###################################################################### ######################################################################
# VMS version
# Uncomment if you use VMS version 6.2 or older
# OLD_VMS = YES
# Compiler selection. # Compiler selection.
# Comment out if you use the VAXC compiler # Comment out if you use the VAXC compiler
@@ -87,6 +84,9 @@ CCVER = YES
# Allow FEATURE_MZSCHEME # Allow FEATURE_MZSCHEME
# VIM_MZSCHEME = YES # VIM_MZSCHEME = YES
# Use ICONV
# VIM_ICONV = YES
###################################################################### ######################################################################
# Directory, library and include files configuration section. # Directory, library and include files configuration section.
# Normally you need not to change anything below. ! # Normally you need not to change anything below. !
@@ -99,25 +99,25 @@ CCVER = YES
.IFDEF MMSVAX .IFDEF MMSVAX
.IFDEF DECC # VAX with DECC .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 PREFIX = /prefix=all
OPTIMIZE= /noopt # do not optimize on VAX. The compiler has hard time with crypto functions
.ELSE # VAX with VAXC .ELSE # VAX with VAXC
CC_DEF = cc CC_DEF = cc
PREFIX = PREFIX =
OPTIMIZE= /noopt
CCVER = CCVER =
.ENDIF .ENDIF
.ELSE # AXP wixh DECC .ELSE # AXP and IA64 with DECC
CC_DEF = cc CC_DEF = cc
PREFIX = /prefix=all PREFIX = /prefix=all
OPTIMIZE= /opt
.ENDIF .ENDIF
LD_DEF = link LD_DEF = link
C_INC = [.proto] C_INC = [.proto]
.IFDEF OLD_VMS
VMS_DEF = ,"OLD_VMS"
.ENDIF
.IFDEF DEBUG .IFDEF DEBUG
DEBUG_DEF = ,"DEBUG" DEBUG_DEF = ,"DEBUG"
TARGET = dvim.exe TARGET = dvim.exe
@@ -125,7 +125,7 @@ CFLAGS = /debug/noopt$(PREFIX)
LDFLAGS = /debug LDFLAGS = /debug
.ELSE .ELSE
TARGET = vim.exe TARGET = vim.exe
CFLAGS = /opt$(PREFIX) CFLAGS = $(OPTIMIZE)$(PREFIX)
LDFLAGS = LDFLAGS =
.ENDIF .ENDIF
@@ -274,6 +274,11 @@ MZSCH_SRC = if_mzsch.c
MZSCH_OBJ = if_mzsch.obj MZSCH_OBJ = if_mzsch.obj
.ENDIF .ENDIF
.IFDEF VIM_ICONV
# ICONV related setup
ICONV_DEF = ,"USE_ICONV"
.ENDIF
###################################################################### ######################################################################
# End of configuration section. # End of configuration section.
# Please, do not change anything below without programming experience. # 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 .SUFFIXES : .obj .c
ALL_CFLAGS = /def=($(MODEL_DEF)$(DEFS)$(VMS_DEF)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_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)) - $(TCL_DEF)$(SNIFF_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)$(ICONV_DEF)) -
$(CFLAGS)$(GUI_FLAG) - $(CFLAGS)$(GUI_FLAG) -
/include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC)$(PERL_INC)$(PYTHON_INC)$(TCL_INC)) /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 # It is specially formated for correct display of unix like includes
# as $(GUI_INC) - replaced with $(GUI_INC_VER) # as $(GUI_INC) - replaced with $(GUI_INC_VER)
# Otherwise should not be any other difference. # Otherwise should not be any other difference.
ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(VMS_DEF)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_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)) - $(TCL_DEF)$(SNIFF_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)$(ICONV_DEF)) -
$(CFLAGS)$(GUI_FLAG) - $(CFLAGS)$(GUI_FLAG) -
/include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC_VER)$(PERL_INC)$(PYTHON_INC)$(TCL_INC)) /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC_VER)$(PERL_INC)$(PYTHON_INC)$(TCL_INC))

View File

@@ -7559,7 +7559,7 @@ vim_tempname(extra_char)
p = (char_u *)tempnam("tmp:", (char *)itmp); p = (char_u *)tempnam("tmp:", (char *)itmp);
if (p != NULL) 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 */ * and VIM will then be unable to find the file later */
STRCPY(itmp, p); STRCPY(itmp, p);
STRCAT(itmp, ".txt"); STRCAT(itmp, ".txt");

View File

@@ -2965,7 +2965,26 @@ executable_file(name)
if (stat((char *)name, &st)) if (stat((char *)name, &st))
return 0; 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; 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 it's an absolute or relative path don't need to use $PATH. */
if (mch_isFullName(name) || (name[0] == '.' && (name[1] == '/' if (mch_isFullName(name) || (name[0] == '.' && (name[1] == '/'
|| (name[1] == '.' && name[2] == '/')))) || (name[1] == '.' && name[2] == '/'))))
{
return executable_file(name); return executable_file(name);
}
p = (char_u *)getenv("PATH"); p = (char_u *)getenv("PATH");
if (p == NULL || *p == NUL) if (p == NULL || *p == NUL)

View File

@@ -302,7 +302,7 @@ typedef struct dsc$descriptor DESC;
# define USR_VIMRC_FILE2 "$HOME/vimfiles/vimrc" # define USR_VIMRC_FILE2 "$HOME/vimfiles/vimrc"
# else # else
# ifdef VMS # ifdef VMS
# define USR_VIMRC_FILE2 "sys$login:vimfiles:vimrc" # define USR_VIMRC_FILE2 "sys$login:vimfiles/vimrc"
# else # else
# define USR_VIMRC_FILE2 "~/.vim/vimrc" # define USR_VIMRC_FILE2 "~/.vim/vimrc"
# endif # endif
@@ -329,7 +329,7 @@ typedef struct dsc$descriptor DESC;
# define USR_GVIMRC_FILE2 "$HOME/vimfiles/gvimrc" # define USR_GVIMRC_FILE2 "$HOME/vimfiles/gvimrc"
# else # else
# ifdef VMS # ifdef VMS
# define USR_GVIMRC_FILE2 "sys$login:vimfiles:gvimrc" # define USR_GVIMRC_FILE2 "sys$login:vimfiles/gvimrc"
# else # else
# define USR_GVIMRC_FILE2 "~/.vim/gvimrc" # define USR_GVIMRC_FILE2 "~/.vim/gvimrc"
# endif # endif

View File

@@ -295,6 +295,18 @@ vms_sys(char *cmd, char *out, char *inp)
return status; return status;
} }
/*
* 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. * Convert VMS system() or lib$spawn() return code to Unix-like exit value.
*/ */
@@ -361,13 +373,12 @@ vms_read(char *inbuf, size_t nbytes)
vms_wproc(char *name, int val) vms_wproc(char *name, int val)
{ {
int i; int i;
int nlen;
static int vms_match_alloced = 0; static int vms_match_alloced = 0;
if (val != DECC$K_FILE) /* Directories and foreign non VMS files are not if (val == DECC$K_FOREIGN ) /* foreign non VMS files are not counting */
counting */
return 1; return 1;
/* accept all DECC$K_FILE and DECC$K_DIRECTORY */
if (vms_match_num == 0) { if (vms_match_num == 0) {
/* first time through, setup some things */ /* first time through, setup some things */
if (NULL == vms_fmatch) { if (NULL == vms_fmatch) {
@@ -383,12 +394,9 @@ vms_wproc(char *name, int val)
} }
} }
/* make matches look uniform */
vms_remove_version(name); vms_remove_version(name);
name=vms_tolower(name);
/* convert filename to lowercase */
nlen = strlen(name);
for (i = 0; i < nlen; i++)
name[i] = TOLOWER_ASC(name[i]);
/* if name already exists, don't add it */ /* if name already exists, don't add it */
for (i = 0; i<vms_match_num; i++) { 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; int i, cnt = 0;
char_u buf[MAXPATHL]; char_u buf[MAXPATHL];
char *result;
int dir; int dir;
int files_alloced, files_free; 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]); STRCPY(buf,pat[i]);
vms_match_num = 0; /* reset collection counter */ vms_match_num = 0; /* reset collection counter */
cnt = decc$to_vms(decc$translate_vms(vms_fixfilename(buf)), vms_wproc, 1, 0); result = decc$translate_vms(vms_fixfilename(buf));
/* allow wild, no dir */ 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) if (cnt > 0)
cnt = vms_match_num; 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) mch_expandpath(garray_T *gap, char_u *path, int flags)
{ {
int i,cnt = 0; int i,cnt = 0;
vms_match_num = 0; char *result;
cnt = decc$to_vms(decc$translate_vms(vms_fixfilename(path)), vms_wproc, 1, 0); vms_match_num = 0;
/* allow wild, no dir */ /* 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) if (cnt > 0)
cnt = vms_match_num; cnt = vms_match_num;
for (i = 0; i < cnt; i++) for (i = 0; i < cnt; i++)
@@ -521,6 +543,7 @@ vms_unix_mixed_filespec(char *in, char *out)
char *end_of_dir; char *end_of_dir;
char ch; char ch;
int len; int len;
char *out_str=out;
/* copy vms filename portion up to last colon /* copy vms filename portion up to last colon
* (node and/or disk) * (node and/or disk)
@@ -602,7 +625,6 @@ vms_unix_mixed_filespec(char *in, char *out)
*end_of_dir = ']'; *end_of_dir = ']';
} }
/* /*
* for decc$to_vms in vms_fixfilename * 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_diff;
struct _generic_64 time_out; struct _generic_64 time_out;
unsigned int convert_operation = LIB$K_DELTA_SECONDS_F; 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 */ /* make sure the iochan is set */
if (!iochan) if (!iochan)
get_tty(); get_tty();
if (msec > 0) { if (sec > 0) {
/* time-out specified; convert it to absolute time */ /* 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) */ /* get current time (number of 100ns ticks since the VMS Epoch) */
status = sys$gettim(&time_curr); status = sys$gettim(&time_curr);
if (status != SS$_NORMAL) if (status != SS$_NORMAL)
return 0; /* error */ return 0; /* error */
/* construct the delta time */ /* construct the delta 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( status = lib$cvtf_to_internal_time(
&convert_operation, &sec, &time_diff); &convert_operation, &sec, &time_diff);
#endif
if (status != LIB$_NORMAL) if (status != LIB$_NORMAL)
return 0; /* error */ return 0; /* error */
/* add them up */ /* add them up */
status = lib$add_times( status = lib$add_times(
&time_curr, &time_curr,

View File

@@ -166,8 +166,6 @@
#undef HAVE_SYS_TIME_H #undef HAVE_SYS_TIME_H
#undef HAVE_LOCALE_H #undef HAVE_LOCALE_H
#define BROKEN_LOCALE #define BROKEN_LOCALE
#undef HAVE_ICONV_H
#undef HAVE_ICONV
#undef DYNAMIC_ICONV #undef DYNAMIC_ICONV
#undef HAVE_STRFTIME #undef HAVE_STRFTIME
#else #else
@@ -177,12 +175,18 @@
#define HAVE_SYS_TIME_H #define HAVE_SYS_TIME_H
#define HAVE_LOCALE_H #define HAVE_LOCALE_H
#define BROKEN_LOCALE #define BROKEN_LOCALE
#undef HAVE_ICONV_H
#undef HAVE_ICONV
#undef DYNAMIC_ICONV #undef DYNAMIC_ICONV
#define HAVE_STRFTIME #define HAVE_STRFTIME
#endif #endif
#if defined(USE_ICONV)
#define HAVE_ICONV_H
#define HAVE_ICONV
#else
#undef HAVE_ICONV_H
#undef HAVE_ICONV
#endif
/* GUI support defines */ /* GUI support defines */
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) #if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK)
#define HAVE_X11 #define HAVE_X11

View File

@@ -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 __ARGS((char *cmd, char *out, char *inp));
int vms_sys_status __ARGS((int status)); int vms_sys_status __ARGS((int status));
int vms_read __ARGS((char *inbuf, size_t nbytes)); 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_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)); int mch_expandpath __ARGS((garray_T *gap, char_u *path, int flags));
void *vms_fixfilename __ARGS((void *instring)); void *vms_fixfilename __ARGS((void *instring));

View File

@@ -4,7 +4,7 @@
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com> # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> # 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. # 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. # Edit the lines in the Configuration section below to select.
@@ -45,12 +45,27 @@
# It fails because VMS does not support this feature yet. # It fails because VMS does not support this feature yet.
# WANT_MZSCH = YES # WANT_MZSCH = YES
# Comment out if you have ODS-5 file system
# HAVE_ODS5 = YES
# Comment out if you have gzip on your system # Comment out if you have gzip on your system
# HAVE_GZIP = YES # HAVE_GZIP = YES
# Comment out if you have GNU compatible diff on your system # Comment out if you have GNU compatible diff on your system
# HAVE_GDIFF = YES # 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. # End of configuration section.
# #
@@ -63,37 +78,44 @@ VIMPROG = <->vim.exe
SCRIPT = test1.out test2.out test3.out test4.out test5.out \ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
test6.out test7.out test8.out test9.out test10a.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 \ test18.out test19.out test20.out test21.out test22.out \
test23.out test24.out test26.out \ test23.out test24.out test26.out \
test28.out test29.out test30.out test31.out test32.out \ test28.out test29.out test30.out test31.out test32.out \
test33.out test34.out test35.out test36.out test37.out \ test33.out test34.out test35.out test36.out test37.out \
test38.out test39.out test40.out test41.out test42.out \ test38.out test39.out test40.out test41.out test42.out \
test43.out test44.out test45.out test46.out \ test43.out test44.out test45.out test46.out \
test48.out test51.out test53.out test54.out test55.out \ test48.out test49.out test51.out test53.out test54.out \
test56.out test57.out test60.out \ test55.out test56.out test57.out test60.out \
test61.out test62.out test63.out test64.out test65.out \ test61.out test62.out test63.out test64.out test65.out \
test66.out test67.out test68.out test69.out \ test66.out test67.out test68.out test69.out \
test71.out test72.out test74.out test75.out test76.out \ test71.out test72.out test74.out test75.out test76.out \
test77.out test78.out test79.out test80.out test81.out \ test77a.out test78.out test79.out test80.out test81.out \
test82.out test83.out test84.out test88.out test89.out \ test82.out test84.out test88.out test89.out \
test90.out test91.out test92.out test93.out test94.out \ test90.out test91.out test92.out test93.out test94.out \
test95.out test96.out test97.out test98.out test99.out \ test95.out test96.out test98.out test99.out \
test100.out test101.out test102.out test103.out test104.out \ test100.out test101.out test103.out test104.out \
test105.out test105.out
# Known problems: # Known problems:
# Test 30: a problem around mac format - unknown reason # test17: ?
# #
# Test 32: VMS is not case sensitive and all filenames are lowercase within Vim # test30: bug, most probably - a problem around mac format
#
# 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 # (this should be changed in order to preserve the original filename) - should
# be fixed. VMS allows just one dot in the filename # 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). # with too many dots).
# #
# Test 72: unknown reason # test72: bug - Vim hangs at :rename (while rename works well otherwise)
# Test 85: no Lua interface # 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 .IFDEF WANT_GUI
SCRIPT_GUI = test16.out SCRIPT_GUI = test16.out
@@ -101,7 +123,7 @@ GUI_OPTION = -g
.ENDIF .ENDIF
.IFDEF WANT_UNIX .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 .ENDIF
.IFDEF WANT_WIN .IFDEF WANT_WIN
@@ -116,6 +138,10 @@ SCRIPT_SPELL = test58.out test59.out
SCRIPT_MZSCH = test70.out SCRIPT_MZSCH = test70.out
.ENDIF .ENDIF
.IFDEF HAVE_ODS5
SCRIPT_ODS5 = test97.out test102.out
.ENDIF
.IFDEF HAVE_GZIP .IFDEF HAVE_GZIP
SCRIPT_GZIP = test11.out SCRIPT_GZIP = test11.out
.ENDIF .ENDIF
@@ -124,10 +150,28 @@ SCRIPT_GZIP = test11.out
SCRIPT_GDIFF = test47.out SCRIPT_GDIFF = test47.out
.ENDIF .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 : .in.out :
-@ !clean up before doing the test -@ !clean up before doing the test
-@ if "''F$SEARCH("test.out.*")'" .NES. "" then delete/noconfirm/nolog test.out.* -@ if "''F$SEARCH("test.out.*")'" .NES. "" then delete/noconfirm/nolog test.out.*
-@ if "''F$SEARCH("$*.out.*")'" .NES. "" then delete/noconfirm/nolog $*.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 "-----------------------------------------------" -@ 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; -@ if "''F$SEARCH("$*.out.*")'" .NES. "" then differences /par $*.out $*.ok;
-@ !clean up after the test -@ !clean up after the test
-@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.* -@ 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) \ all : clean nolog $(START_WITH) $(SCRIPT) $(SCRIPT_GUI) $(SCRIPT_UNIX) $(SCRIPT_WIN) $(SCRIPT_SPELL) $(SCRIPT_ODS5) $(SCRIPT_GZIP) \
$(SCRIPT_GDIFF) $(SCRIPT_MZSCH) nolog $(SCRIPT_GDIFF) $(SCRIPT_MZSCH) $(SCRIPT_CKSUM) $(SCRIPT_ICONV) $(SCRIPT_LUA) $(SCRIPT_PYTHON) nolog
-@ write sys$output " " -@ write sys$output " "
-@ write sys$output "-----------------------------------------------" -@ write sys$output "-----------------------------------------------"
-@ write sys$output " All done" -@ write sys$output " All done"
@@ -168,10 +213,15 @@ nolog :
-@ write sys$output " WANT_GUI = ""$(WANT_GUI)"" " -@ write sys$output " WANT_GUI = ""$(WANT_GUI)"" "
-@ write sys$output " WANT_UNIX = ""$(WANT_UNIX)"" " -@ write sys$output " WANT_UNIX = ""$(WANT_UNIX)"" "
-@ write sys$output " WANT_WIN = ""$(WANT_WIN)"" " -@ write sys$output " WANT_WIN = ""$(WANT_WIN)"" "
-@ write sys$output " WANT_SPELL= ""$(WANT_SPELL)"" " -@ write sys$output " WANT_SPELL = ""$(WANT_SPELL)"" "
-@ write sys$output " WANT_MZSCH= ""$(WANT_MZSCH)"" " -@ 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_GZIP = ""$(HAVE_GZIP)"" "
-@ write sys$output " HAVE_GDIFF= ""$(HAVE_GDIFF)"" " -@ 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 "Default vimrc file is VMS.VIM:"
-@ write sys$output "-----------------------------------------------" -@ write sys$output "-----------------------------------------------"
-@ type VMS.VIM -@ type VMS.VIM
@@ -181,6 +231,9 @@ clean :
-@ if "''F$SEARCH("test.log")'" .NES. "" then delete/noconfirm/nolog test.log.* -@ 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("test.ok")'" .NES. "" then delete/noconfirm/nolog test.ok.*
-@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.* -@ 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("*.*_sw*")'" .NES. "" then delete/noconfirm/nolog *.*_sw*.*
-@ if "''F$SEARCH("*.failed")'" .NES. "" then delete/noconfirm/nolog *.failed.* -@ if "''F$SEARCH("*.failed")'" .NES. "" then delete/noconfirm/nolog *.failed.*
-@ if "''F$SEARCH("*.rej")'" .NES. "" then delete/noconfirm/nolog *.rej.* -@ if "''F$SEARCH("*.rej")'" .NES. "" then delete/noconfirm/nolog *.rej.*

View File

@@ -105,7 +105,11 @@ u:.w >>test.out
u:.w >>test.out u:.w >>test.out
:" :"
:" Rename the undo file so that it gets cleaned up. :" 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! :qa!
ENDTEST ENDTEST

8
src/testdir/test77a.com Normal file
View File

@@ -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

31
src/testdir/test77a.in Normal file
View File

@@ -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

1
src/testdir/test77a.ok Normal file
View File

@@ -0,0 +1 @@
CHECKSUM$CHECKSUM = "844110470"

View File

@@ -790,9 +790,20 @@ u_get_undo_file_name(buf_ffname, reading)
if (undo_file_name == NULL) if (undo_file_name == NULL)
break; break;
p = gettail(undo_file_name); 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); mch_memmove(p + 1, p, STRLEN(p) + 1);
*p = '.'; *p = '.';
STRCAT(p, ".un~"); STRCAT(p, ".un~");
#endif
} }
else else
{ {

View File

@@ -738,6 +738,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
197,
/**/ /**/
196, 196,
/**/ /**/