summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-07-30 22:29:41 +0200
committerBram Moolenaar <Bram@vim.org>2010-07-30 22:29:41 +0200
commitf878bcfb2e611d792d1acef7019ff6c40e8933d5 (patch)
treed48fad20e6ce9c91c7558c0792e2551c0b805f41
parent68392724b8be7ff25767b8fdda65da8082b8d95c (diff)
Improvements for VMS. (Zoltan Arpadffy)
-rw-r--r--src/Make_vms.mms27
-rw-r--r--src/eval.c15
-rw-r--r--src/testdir/Make_vms.mms68
3 files changed, 84 insertions, 26 deletions
diff --git a/src/Make_vms.mms b/src/Make_vms.mms
index fce6ab60b2..7cb5614b84 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: 2010 Jul 28
+# Last change: 2008 Aug 16
#
# This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
# with MMS and MMK
@@ -41,7 +41,7 @@ MODEL = HUGE
# GUI or terminal mode executable.
# Comment out if you want just the character terminal mode only.
# GUI with Motif
-GUI = YES
+# GUI = YES
# GUI with GTK
# If you have GTK installed you might want to enable this option.
@@ -84,6 +84,9 @@ CCVER = YES
# When not defined, only a TAB is allowed.
# VIM_TAG_ANYWHITE = YES
+# Allow FEATURE_MZSCHEME
+# VIM_MZSCHEME = YES
+
######################################################################
# Directory, library and include files configuration section.
# Normally you need not to change anything below. !
@@ -264,6 +267,12 @@ HANGULIN_OBJ = hangulin.obj
TAG_DEF = ,"FEAT_TAG_ANYWHITE"
.ENDIF
+.IFDEF VIM_MZSCHEME
+# MZSCHEME related setup
+MZSCH_DEF = ,"FEAT_MZSCHEME"
+MZSCH_SRC = if_mzsch.c
+MZSCH_OBJ = if_mzsch.obj
+.ENDIF
######################################################################
# End of configuration section.
@@ -279,7 +288,7 @@ 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)) -
+ $(TCL_DEF)$(SNIFF_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)) -
$(CFLAGS)$(GUI_FLAG) -
/include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC)$(PERL_INC)$(PYTHON_INC)$(TCL_INC))
@@ -288,7 +297,7 @@ ALL_CFLAGS = /def=($(MODEL_DEF)$(DEFS)$(VMS_DEF)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_
# 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)) -
+ $(TCL_DEF)$(SNIFF_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)) -
$(CFLAGS)$(GUI_FLAG) -
/include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC_VER)$(PERL_INC)$(PYTHON_INC)$(TCL_INC))
@@ -302,7 +311,7 @@ SRC = blowfish.c buffer.c charset.c diff.c digraph.c edit.c eval.c ex_cmds.c ex_
spell.c syntax.c tag.c term.c termlib.c ui.c undo.c version.c screen.c \
window.c os_unix.c os_vms.c pathdef.c \
$(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) $(SNIFF_SRC) \
- $(RUBY_SRC) $(HANGULIN_SRC)
+ $(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC)
OBJ = blowfish.obj buffer.obj charset.obj diff.obj digraph.obj edit.obj eval.obj \
ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj \
@@ -311,9 +320,9 @@ OBJ = blowfish.obj buffer.obj charset.obj diff.obj digraph.obj edit.obj eval.obj
move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj quickfix.obj \
regexp.obj search.obj sha256.obj spell.obj syntax.obj tag.obj term.obj termlib.obj \
ui.obj undo.obj screen.obj version.obj window.obj os_unix.obj \
- os_vms.obj pathdef.obj \
+ os_vms.obj pathdef.obj if_mzsch.obj\
$(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) $(SNIFF_OBJ) \
- $(RUBY_OBJ) $(HANGULIN_OBJ)
+ $(RUBY_OBJ) $(HANGULIN_OBJ) $(MZSCH_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)
@@ -554,6 +563,10 @@ if_xcmdsrv.obj : if_xcmdsrv.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 gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h version.h
+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 gui_beval.h [.proto]gui_beval.pro ex_cmds.h proto.h \
+ globals.h farsi.h arabic.h if_mzsch.h
main.obj : main.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 gui_beval.h \
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
diff --git a/src/eval.c b/src/eval.c
index f1285ca392..8a26b6690c 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -4802,9 +4802,24 @@ eval6(arg, rettv, evaluate, want_string)
f1 = f1 * f2;
else if (op == '/')
{
+# ifdef VMS
+ /* VMS crashes on divide by zero, work around it */
+ if (f2 == 0.0)
+ {
+ if (f1 == 0)
+ f1 = -0x7fffffffL - 1L; /* similar to NaN */
+ else if (f1 < 0)
+ f1 = -0x7fffffffL;
+ else
+ f1 = 0x7fffffffL;
+ }
+ else
+ f1 = f1 / f2;
+# else
/* We rely on the floating point library to handle divide
* by zero to result in "inf" and not a crash. */
f1 = f1 / f2;
+# endif
}
else
{
diff --git a/src/testdir/Make_vms.mms b/src/testdir/Make_vms.mms
index f52e8f8b0c..6ea02de1ee 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: 2010 Jul 29
+# Last change: 2010 Jul 30
#
# 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,6 +41,10 @@
# They fail because VMS does not support file names.
# WANT_SPELL = YES
+# 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 gzip on your system
# HAVE_GZIP = YES
@@ -69,8 +73,20 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
test48.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 test70.out \
- test71.out # test72.out
+ test66.out test67.out test68.out test69.out \
+ test71.out test72.out
+
+# Known problems:
+# Test 30: a problem around mac format - unknown reason
+#
+# Test 32: 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
+# with too many dots).
+#
+# Test 72: unknown reason
.IFDEF WANT_GUI
SCRIPT_GUI = test16.out
@@ -89,6 +105,10 @@ SCRIPT_WIN = test50.out test52.out
SCRIPT_SPELL = test58.out test59.out
.ENDIF
+.IFDEF WANT_MZSCH
+SCRIPT_MZSCH = test70.out
+.ENDIF
+
.IFDEF HAVE_GZIP
SCRIPT_GZIP = test11.out
.ENDIF
@@ -98,16 +118,24 @@ SCRIPT_GDIFF = test47.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.*
-@ write sys$output " "
-@ write sys$output "-----------------------------------------------"
-@ write sys$output " "$*" "
-@ write sys$output "-----------------------------------------------"
- -@ create/term/wait mcr $(VIMPROG) $(GUI_OPTION) -u vms.vim --noplugin -s dotest.in $*.in
- -@ if "''F$SEARCH("test.out.*")'" .NES. "" then differences /par test.out $*.ok;
- -@ if "''F$SEARCH("test.out.*")'" .NES. "" then rename test.out $*.out
+ -@ !run the test
+ -@ create/term/wait/nodetach mcr $(VIMPROG) $(GUI_OPTION) -u vms.vim --noplugin -s dotest.in $*.in
+ -@ !analyse the result
+ -@ directory /size/date test.out
+ -@ if "''F$SEARCH("test.out.*")'" .NES. "" then rename/nolog test.out $*.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.*.*
-all : clean nolog $(SCRIPT) $(SCRIPT_GUI) $(SCRIPT_UNIX) $(SCRIPT_WIN) $(SCRIPT_SPELL) $(SCRIPT_GZIP) $(SCRIPT_GDIFF)
+all : clean nolog $(START_WITH) $(SCRIPT) $(SCRIPT_GUI) $(SCRIPT_UNIX) $(SCRIPT_WIN) $(SCRIPT_SPELL) $(SCRIPT_GZIP) \
+ $(SCRIPT_GDIFF) $(SCRIPT_MZSCH) nolog
-@ write sys$output " "
-@ write sys$output "-----------------------------------------------"
-@ write sys$output " All done"
@@ -134,22 +162,24 @@ nolog :
-@ 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 "Default vimrc file is VMS.VIM:
+ -@ write sys$output "Default vimrc file is VMS.VIM:"
-@ write sys$output "-----------------------------------------------"
-@ type VMS.VIM
clean :
- -@ if "''F$SEARCH("*.out")'" .NES. "" then delete/noconfirm/nolog *.out.*
- -@ 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("*.*_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.*
- -@ if "''F$SEARCH("tiny.vim")'" .NES. "" then delete/noconfirm/nolog tiny.vim.*
- -@ 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("viminfo.*")'" .NES. "" then delete/noconfirm/nolog viminfo.*.*
+ -@ if "''F$SEARCH("*.out")'" .NES. "" then delete/noconfirm/nolog *.out.*
+ -@ 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("*.*_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.*
+ -@ if "''F$SEARCH("tiny.vim")'" .NES. "" then delete/noconfirm/nolog tiny.vim.*
+ -@ 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("viminfo.*")'" .NES. "" then delete/noconfirm/nolog viminfo.*.*