Navigation Menu

Skip to content

Commit

Permalink
Improvements for VMS. (Zoltan Arpadffy)
Browse files Browse the repository at this point in the history
--HG--
branch : vim73
  • Loading branch information
brammool committed Jul 30, 2010
1 parent 2e32444 commit 7b30da4
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 26 deletions.
27 changes: 20 additions & 7 deletions src/Make_vms.mms
Expand Up @@ -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: 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 # 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
Expand Down Expand Up @@ -41,7 +41,7 @@ MODEL = HUGE
# GUI or terminal mode executable. # GUI or terminal mode executable.
# Comment out if you want just the character terminal mode only. # Comment out if you want just the character terminal mode only.
# GUI with Motif # GUI with Motif
GUI = YES # GUI = YES


# GUI with GTK # GUI with GTK
# If you have GTK installed you might want to enable this option. # If you have GTK installed you might want to enable this option.
Expand Down Expand Up @@ -84,6 +84,9 @@ CCVER = YES
# When not defined, only a TAB is allowed. # When not defined, only a TAB is allowed.
# VIM_TAG_ANYWHITE = YES # VIM_TAG_ANYWHITE = YES


# Allow FEATURE_MZSCHEME
# VIM_MZSCHEME = 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. !
Expand Down Expand Up @@ -264,6 +267,12 @@ HANGULIN_OBJ = hangulin.obj
TAG_DEF = ,"FEAT_TAG_ANYWHITE" TAG_DEF = ,"FEAT_TAG_ANYWHITE"
.ENDIF .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. # End of configuration section.
Expand All @@ -279,7 +288,7 @@ 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)$(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) - $(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))


Expand All @@ -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) # 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)$(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) - $(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))


Expand All @@ -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 \ 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 \ window.c os_unix.c os_vms.c pathdef.c \
$(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) $(SNIFF_SRC) \ $(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 \ 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 \ ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj \
Expand All @@ -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 \ 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 \ 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 \ 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) \ $(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 # 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) all : [.auto]config.h mmk_compat motif_env gtk_env perl_env python_env tcl_env ruby_env $(TARGET)
Expand Down Expand Up @@ -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 \ 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 \ gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h version.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 \ 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 \ 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 \ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
Expand Down
15 changes: 15 additions & 0 deletions src/eval.c
Expand Up @@ -4802,9 +4802,24 @@ eval6(arg, rettv, evaluate, want_string)
f1 = f1 * f2; f1 = f1 * f2;
else if (op == '/') 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 /* We rely on the floating point library to handle divide
* by zero to result in "inf" and not a crash. */ * by zero to result in "inf" and not a crash. */
f1 = f1 / f2; f1 = f1 / f2;
# endif
} }
else else
{ {
Expand Down
68 changes: 49 additions & 19 deletions src/testdir/Make_vms.mms
Expand Up @@ -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: 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. # 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.
Expand Down Expand Up @@ -41,6 +41,10 @@
# They fail because VMS does not support file names. # They fail because VMS does not support file names.
# WANT_SPELL = YES # 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 # Comment out if you have gzip on your system
# HAVE_GZIP = YES # HAVE_GZIP = YES


Expand Down Expand Up @@ -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 \ test48.out test51.out test53.out test54.out test55.out \
test56.out test57.out test60.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 test70.out \ test66.out test67.out test68.out test69.out \
test71.out # test72.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 .IFDEF WANT_GUI
SCRIPT_GUI = test16.out SCRIPT_GUI = test16.out
Expand All @@ -89,6 +105,10 @@ SCRIPT_WIN = test50.out test52.out
SCRIPT_SPELL = test58.out test59.out SCRIPT_SPELL = test58.out test59.out
.ENDIF .ENDIF


.IFDEF WANT_MZSCH
SCRIPT_MZSCH = test70.out
.ENDIF

.IFDEF HAVE_GZIP .IFDEF HAVE_GZIP
SCRIPT_GZIP = test11.out SCRIPT_GZIP = test11.out
.ENDIF .ENDIF
Expand All @@ -98,16 +118,24 @@ SCRIPT_GDIFF = test47.out
.ENDIF .ENDIF


.in.out : .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 "-----------------------------------------------"
-@ 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 -@ !run the test
-@ if "''F$SEARCH("test.out.*")'" .NES. "" then differences /par test.out $*.ok; -@ create/term/wait/nodetach mcr $(VIMPROG) $(GUI_OPTION) -u vms.vim --noplugin -s dotest.in $*.in
-@ if "''F$SEARCH("test.out.*")'" .NES. "" then rename test.out $*.out -@ !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.*.* -@ 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 "-----------------------------------------------" -@ write sys$output "-----------------------------------------------"
-@ write sys$output " All done" -@ write sys$output " All done"
Expand All @@ -134,22 +162,24 @@ nolog :
-@ 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 " 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 "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


clean : clean :
-@ if "''F$SEARCH("*.out")'" .NES. "" then delete/noconfirm/nolog *.out.* -@ 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.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("*.*_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.*
-@ if "''F$SEARCH("tiny.vim")'" .NES. "" then delete/noconfirm/nolog tiny.vim.* -@ 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("small.vim")'" .NES. "" then delete/noconfirm/nolog small.vim.*
-@ if "''F$SEARCH("mbyte.vim")'" .NES. "" then delete/noconfirm/nolog mbyte.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("mzscheme.vim")'" .NES. "" then delete/noconfirm/nolog mzscheme.vim.*
-@ if "''F$SEARCH("viminfo.*")'" .NES. "" then delete/noconfirm/nolog viminfo.*.*


0 comments on commit 7b30da4

Please sign in to comment.