1
0
forked from aniani/vim

updated for version 7.0-171

This commit is contained in:
Bram Moolenaar
2006-11-28 16:43:58 +00:00
parent 85f868c3ae
commit 3d20ca1ad1
4 changed files with 74 additions and 36 deletions

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: 2006 Apr 30 # Last change: 2006 Sep 04
# #
# 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
@@ -13,7 +13,7 @@
# #
# Edit the lines in the Configuration section below for fine tuning. # Edit the lines in the Configuration section below for fine tuning.
# #
# To build: mms/descrip=Make_vms.mms # To build: mms/descrip=Make_vms.mms /ignore=warning
# To clean up: mms/descrip=Make_vms.mms clean # To clean up: mms/descrip=Make_vms.mms clean
# #
# Hints and detailed description could be found in INSTALLVMS.TXT file. # Hints and detailed description could be found in INSTALLVMS.TXT file.
@@ -21,10 +21,6 @@
###################################################################### ######################################################################
# Configuration section. # Configuration section.
###################################################################### ######################################################################
# Platform selection
# Define this if you will use the VAX platform to build.
# VAX = YES
# VMS version # VMS version
# Uncomment if you use VMS version 6.2 or older # Uncomment if you use VMS version 6.2 or older
# OLD_VMS = YES # OLD_VMS = YES
@@ -49,6 +45,7 @@ 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.
# NOTE: you will need to properly define GTK_DIR below
# GTK = YES # GTK = YES
# GUI/Motif with XPM # GUI/Motif with XPM
@@ -97,7 +94,7 @@ CCVER = YES
# Compiler setup # Compiler setup
.IFDEF VAX .IFDEF MMSVAX
.IFDEF DECC # VAX with DECC .IFDEF DECC # VAX with DECC
CC_DEF = cc # /decc # some system requires this switch CC_DEF = cc # /decc # some system requires this switch
# but when it is not required /ver might fail # but when it is not required /ver might fail
@@ -165,8 +162,8 @@ GTK = ""
# NOTE: you need to set up your GTK_DIR (GTK root directory), because it is # NOTE: you need to set up your GTK_DIR (GTK root directory), because it is
# unique on every system - logicals are not accepted # unique on every system - logicals are not accepted
# please note: directory should end with . in order to /trans=conc work # please note: directory should end with . in order to /trans=conc work
# Example: GTK_DIR = $1$DGA104:[USERS.ZAY.WORK.GTK1210.] # This value for GTK_DIR is an example.
GTK_DIR = DKA0:[GTK1210.] GTK_DIR = $1$DGA104:[USERS.ZAY.WORK.GTK1210.]
DEFS = "HAVE_CONFIG_H","FEAT_GUI_GTK" DEFS = "HAVE_CONFIG_H","FEAT_GUI_GTK"
LIBS = ,OS_VMS_GTK.OPT/OPT LIBS = ,OS_VMS_GTK.OPT/OPT
GUI_FLAG = /name=(as_is,short)/float=ieee/ieee=denorm GUI_FLAG = /name=(as_is,short)/float=ieee/ieee=denorm
@@ -274,7 +271,6 @@ TAG_DEF = ,"FEAT_TAG_ANYWHITE"
# Please, do not change anything below without programming experience. # Please, do not change anything below without programming experience.
###################################################################### ######################################################################
MODEL_DEF = "FEAT_$(MODEL)", MODEL_DEF = "FEAT_$(MODEL)",
# These go into pathdef.c # These go into pathdef.c
@@ -361,6 +357,7 @@ pathdef.c : check_ccver $(CONFIG_H)
-@ write pd "char_u *compiler_version = (char_u *) ""''CC_VER'"";" -@ write pd "char_u *compiler_version = (char_u *) ""''CC_VER'"";"
-@ write pd "char_u *compiled_user = (char_u *) "$(VIMUSER)";" -@ write pd "char_u *compiled_user = (char_u *) "$(VIMUSER)";"
-@ write pd "char_u *compiled_sys = (char_u *) "$(VIMHOST)";" -@ write pd "char_u *compiled_sys = (char_u *) "$(VIMHOST)";"
-@ write pd "char_u *compiled_arch = (char_u *) ""$(MMSARCH_NAME)"";"
-@ close pd -@ close pd
if_perl.c : if_perl.xs if_perl.c : if_perl.xs

View File

@@ -4145,11 +4145,13 @@ fix_fname(fname)
/* /*
* Force expanding the path always for Unix, because symbolic links may * Force expanding the path always for Unix, because symbolic links may
* mess up the full path name, even though it starts with a '/'. * mess up the full path name, even though it starts with a '/'.
* Also expand always for VMS, it may have alternate paths that need to be
* resolved.
* Also expand when there is ".." in the file name, try to remove it, * Also expand when there is ".." in the file name, try to remove it,
* because "c:/src/../README" is equal to "c:/README". * because "c:/src/../README" is equal to "c:/README".
* For MS-Windows also expand names like "longna~1" to "longname". * For MS-Windows also expand names like "longna~1" to "longname".
*/ */
#ifdef UNIX #if defined(UNIX) || defined(VMS)
return FullName_save(fname, TRUE); return FullName_save(fname, TRUE);
#else #else
if (!vim_isAbsName(fname) || strstr((char *)fname, "..") != NULL if (!vim_isAbsName(fname) || strstr((char *)fname, "..") != NULL

View File

@@ -2202,7 +2202,7 @@ slash_adjust(p)
#endif #endif
/* /*
* Get absolute file name into buffer 'buf' of length 'len' bytes. * Get absolute file name into "buf[len]".
* *
* return FAIL for failure, OK for success * return FAIL for failure, OK for success
*/ */
@@ -2212,6 +2212,38 @@ mch_FullName(fname, buf, len, force)
int len; int len;
int force; /* also expand when already absolute path */ int force; /* also expand when already absolute path */
{ {
#ifdef VMS
/*
* VMS does this in a completely different way.
*
* By default a file found in a complex path is written to the first
* directory in the path and not to the original directory. This
* behaviour should be avoided for the existing files and we need to find
* the exact path of the edited file.
*/
if (force || !mch_isFullName(fname))
{
char_u *fixed_fname = vms_fixfilename(fname);
int fd = mch_open((char *)fixed_fname, O_RDONLY | O_EXTRA, 0);
if (fd > 0)
{
char nbuf[MAXNAMLEN];
/* File exists, use getname() to get the real name. */
if (getname(fd, nbuf))
vim_strncpy(fixed_fname, (char_u *)nbuf, (size_t)(len - 1));
close(fd);
}
if (STRLEN(fixed_fname) >= len)
return FAIL;
STRCPY(buf, fixed_fname);
}
#else /* not VMS */
int l; int l;
# ifdef OS2 # ifdef OS2
int only_drive; /* file name is only a drive letter */ int only_drive; /* file name is only a drive letter */
@@ -2224,10 +2256,6 @@ mch_FullName(fname, buf, len, force)
char_u *p; char_u *p;
int retval = OK; int retval = OK;
#ifdef VMS
fname = vms_fixfilename(fname);
#endif
/* expand it if forced or not an absolute path */ /* expand it if forced or not an absolute path */
if (force || !mch_isFullName(fname)) if (force || !mch_isFullName(fname))
{ {
@@ -2333,15 +2361,14 @@ mch_FullName(fname, buf, len, force)
l = STRLEN(buf); l = STRLEN(buf);
if (l >= len) if (l >= len)
retval = FAIL; retval = FAIL;
#ifndef VMS
else else
{ {
if (l > 0 && buf[l - 1] != '/' && *fname != NUL if (l > 0 && buf[l - 1] != '/' && *fname != NUL
&& STRCMP(fname, ".") != 0) && STRCMP(fname, ".") != 0)
STRCAT(buf, "/"); STRCAT(buf, "/");
} }
#endif
} }
/* Catch file names which are too long. */ /* Catch file names which are too long. */
if (retval == FAIL || STRLEN(buf) + STRLEN(fname) >= len) if (retval == FAIL || STRLEN(buf) + STRLEN(fname) >= len)
return FAIL; return FAIL;
@@ -2350,6 +2377,8 @@ mch_FullName(fname, buf, len, force)
if (STRCMP(fname, ".") != 0) if (STRCMP(fname, ".") != 0)
STRCAT(buf, fname); STRCAT(buf, fname);
#endif /* VMS */
return OK; return OK;
} }

View File

@@ -666,6 +666,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 */
/**/
171,
/**/ /**/
170, 170,
/**/ /**/
@@ -1113,6 +1115,14 @@ list_version()
#endif #endif
#ifdef VMS #ifdef VMS
MSG_PUTS("\nOpenVMS version"); MSG_PUTS("\nOpenVMS version");
# ifdef HAVE_PATHDEF
if (*compiled_arch != NUL)
{
MSG_PUTS(" - ");
MSG_PUTS(compiled_arch);
}
# endif
#endif #endif
/* Print the list of patch numbers if there is at least one. */ /* Print the list of patch numbers if there is at least one. */