To: vim-dev@vim.org Subject: Patch 5.7a.006 (extra) Fcc: outbox From: Bram Moolenaar ------------ Patch 5.7a.006 (extra) Problem: VMS: Various problems, also with the VAXC compiler. Solution: In many places use the Unix code for VMS too. Added time, date and compiler version to version message. (Zoltan Arpadffy) Files: src/ex_cmds.c, src/ex_docmd.c, src/globals.h, src/gui_vms_conf.h, src/main.c, src/message.c, src/misc1.c, src/os_vms.c, src/os_vms.h, src/os_vms.mms, src/os_vms_conf.h, src/proto/os_vms.pro, src/proto/version.pro, src/term.c, src/version.c, src/xxd/os_vms.mms, src/xxd/xxd.c *** ../vim-5.7a.5/src/ex_cmds.c Tue Jun 20 16:02:33 2000 --- src/ex_cmds.c Tue Jun 20 15:55:51 2000 *************** *** 1295,1303 **** char_u *tempname = NULL; /* name of temp viminfo file */ struct stat st_new; /* mch_stat() of potential new file */ char_u *wp; #ifdef UNIX int shortname = FALSE; /* use 8.3 file name */ - mode_t umask_save; struct stat st_old; /* mch_stat() of existing viminfo file */ #endif --- 1295,1305 ---- char_u *tempname = NULL; /* name of temp viminfo file */ struct stat st_new; /* mch_stat() of potential new file */ char_u *wp; + #if defined(UNIX) || defined(VMS) + mode_t umask_save; + #endif #ifdef UNIX int shortname = FALSE; /* use 8.3 file name */ struct stat st_old; /* mch_stat() of existing viminfo file */ #endif *************** *** 1315,1321 **** /* if it does exist, but we can't read it, don't try writing */ if (mch_stat((char *)file, &st_new) == 0) goto end; ! #ifdef UNIX /* * For Unix we create the .viminfo non-accessible for others, * because it may contain text from non-accessible documents. --- 1317,1323 ---- /* if it does exist, but we can't read it, don't try writing */ if (mch_stat((char *)file, &st_new) == 0) goto end; ! #if defined(UNIX) || defined(VMS) /* * For Unix we create the .viminfo non-accessible for others, * because it may contain text from non-accessible documents. *************** *** 1323,1329 **** umask_save = umask(077); #endif fp_out = mch_fopen((char *)file, WRITEBIN); ! #ifdef UNIX (void)umask(umask_save); #endif } --- 1325,1331 ---- umask_save = umask(077); #endif fp_out = mch_fopen((char *)file, WRITEBIN); ! #if defined(UNIX) || defined(VMS) (void)umask(umask_save); #endif } *************** *** 1525,1531 **** --- 1527,1537 ---- { #ifdef VIMINFO_FILE2 /* don't use $HOME when not defined (turned into "c:/"!). */ + # ifdef VMS + if (mch_getenv((char_u *)"SYS$LOGIN") == NULL) + # else if (mch_getenv((char_u *)"HOME") == NULL) + # endif { /* don't use $VIM when not available. */ expand_env((char_u *)"$VIM", NameBuff, MAXPATHL); *** ../vim-5.7a.5/src/ex_docmd.c Wed Jun 7 13:53:53 2000 --- src/ex_docmd.c Tue Jun 20 11:18:24 2000 *************** *** 121,127 **** static void do_sleep __ARGS((EXARG *eap)); static void do_exmap __ARGS((EXARG *eap, int isabbrev)); static void do_winsize __ARGS((char_u *arg)); ! #if defined(USE_GUI) || defined(UNIX) static void do_winpos __ARGS((char_u *arg)); #endif static void do_exops __ARGS((EXARG *eap)); --- 121,127 ---- static void do_sleep __ARGS((EXARG *eap)); static void do_exmap __ARGS((EXARG *eap, int isabbrev)); static void do_winsize __ARGS((char_u *arg)); ! #if defined(USE_GUI) || defined(UNIX) || defined(VMS) static void do_winpos __ARGS((char_u *arg)); #endif static void do_exops __ARGS((EXARG *eap)); *************** *** 1962,1968 **** do_winsize(ea.arg); break; ! #if defined(USE_GUI) || defined(UNIX) case CMD_winpos: do_winpos(ea.arg); break; --- 1962,1968 ---- do_winsize(ea.arg); break; ! #if defined(USE_GUI) || defined(UNIX) || defined(VMS) case CMD_winpos: do_winpos(ea.arg); break; *************** *** 6421,6427 **** char_u *tofree; new_dir = eap->arg; ! #ifndef UNIX /* for non-UNIX ":cd" means: print current directory */ if (*new_dir == NUL) do_pwd(); --- 6421,6427 ---- char_u *tofree; new_dir = eap->arg; ! #if !defined(UNIX) && !defined(VMS) /* for non-UNIX ":cd" means: print current directory */ if (*new_dir == NUL) do_pwd(); *************** *** 6446,6457 **** else prev_dir = NULL; ! #ifdef UNIX /* for UNIX ":cd" means: go to home directory */ if (*new_dir == NUL) { /* use NameBuff for home directory name */ expand_env((char_u *)"$HOME", NameBuff, MAXPATHL); new_dir = NameBuff; } #endif --- 6446,6467 ---- else prev_dir = NULL; ! #if defined(UNIX) || defined(VMS) /* for UNIX ":cd" means: go to home directory */ if (*new_dir == NUL) { /* use NameBuff for home directory name */ + # ifdef VMS + char_u *p; + + p = mch_getenv((char_u *)"SYS$LOGIN"); + if (p == NULL || *p == NUL) /* empty is the same as not set */ + NameBuff[0] = NUL; + else + STRNCPY(NameBuff, p, MAXPATHL); + # else expand_env((char_u *)"$HOME", NameBuff, MAXPATHL); + # endif new_dir = NameBuff; } #endif *************** *** 6545,6551 **** set_winsize(w, h, TRUE); } ! #if defined(USE_GUI) || defined(UNIX) /* * ":winpos" command. */ --- 6555,6561 ---- set_winsize(w, h, TRUE); } ! #if defined(USE_GUI) || defined(UNIX) || defined(VMS) /* * ":winpos" command. */ *** ../vim-5.7a.5/src/globals.h Mon Dec 27 12:58:44 1999 --- src/globals.h Tue Jun 20 21:28:04 2000 *************** *** 139,145 **** EXTERN int quit_more INIT(= FALSE); /* 'q' hit at "--more--" msg */ EXTERN int more_back INIT(= 0); /* 'b' or 'u' at "--more--" msg */ EXTERN int more_back_used INIT(= FALSE); /* using more_back */ ! #if defined(UNIX) || defined(__EMX__) EXTERN int newline_on_exit INIT(= FALSE); /* did msg in altern. screen */ EXTERN int intr_char INIT(= 0); /* extra interrupt character */ #endif --- 139,145 ---- EXTERN int quit_more INIT(= FALSE); /* 'q' hit at "--more--" msg */ EXTERN int more_back INIT(= 0); /* 'b' or 'u' at "--more--" msg */ EXTERN int more_back_used INIT(= FALSE); /* using more_back */ ! #if defined(UNIX) || defined(__EMX__) || defined(VMS) EXTERN int newline_on_exit INIT(= FALSE); /* did msg in altern. screen */ EXTERN int intr_char INIT(= 0); /* extra interrupt character */ #endif *************** *** 623,629 **** --- 623,633 ---- /* these are in version.c */ extern char *Version; extern char *mediumVersion; + #if defined(HAVE_DATE_TIME) && defined(VMS) && defined(VAXC) + extern char longVersion[]; + #else extern char *longVersion; + #endif /* * Some file names for Unix are stored in pathdef.c, to make their value *************** *** 635,640 **** --- 639,647 ---- extern char_u *default_vimruntime_dir; extern char_u *all_cflags; extern char_u *all_lflags; + # ifdef VMS + extern char_u *compiler_version; + # endif extern char_u *compiled_user; extern char_u *compiled_sys; #endif *** ../vim-5.7a.5/src/gui_vms_conf.h Wed Jun 7 17:03:43 2000 --- src/gui_vms_conf.h Mon Jun 19 09:57:06 2000 *************** *** 65,70 **** --- 65,73 ---- /* Define to `int' if doesn't define. */ /* #undef gid_t */ + /* Define to `long' if doesn't define. */ + /* #undef ino_t */ + /* Define if you can safely include both and . */ #define TIME_WITH_SYS_TIME 1 *************** *** 77,82 **** --- 80,88 ---- /* Define as the command at the end of signal handlers ("" or "return 0;"). */ #define SIGRETURN return + /* Define if struct sigcontext is present */ + #define HAVE_SIGCONTEXT 1 + /* Define if touuper/tolower only work on lower/upercase characters */ /* #undef BROKEN_TOUPPER */ *************** *** 113,118 **** --- 119,130 ---- /* Define if you have the rename() function. */ #define HAVE_RENAME 1 + /* Define if you have the qsort() function. */ + #define HAVE_QSORT 1 + + /* Define if you have the strftime() function. */ + #define HAVE_STRFTIME 1 + /* Define if you have the fsync() function. */ #define HAVE_FSYNC 1 *************** *** 167,173 **** --- 179,189 ---- /*#define HAVE_TERMCAP_H 1*/ /* Define if you have the header file. */ + #ifdef VAXC + #undef HAVE_FCNTL_H + #else #define HAVE_FCNTL_H 1 + #endif /* Define if you have the header file. */ /* #undef HAVE_SGTTY_H */ *************** *** 219,221 **** --- 235,253 ---- /* Define if you have the header file. */ /*#define HAVE_PWD_H 1*/ + + /* Define if you have the header file (only used by configure). */ + /* #undef HAVE_XM_XM_H */ + + /* Define if strings.h cannot be included when string.h already is */ + /* #undef NO_STRINGS_WITH_STRING_H */ + + /* Define if you want to include fontset support. */ + #define USE_FONTSET 1 + + /* Define if your libc doesn't work POSIX.2 locale function correctly */ + #define BROKEN_LOCALE 1 + + /* Define if your X has own locale library */ + /* #undef X_LOCALE */ + *** ../vim-5.7a.5/src/main.c Tue May 9 20:57:12 2000 --- src/main.c Tue Jun 20 20:38:10 2000 *************** *** 328,333 **** --- 328,337 ---- gui_prepare(&argc, argv); /* Prepare for possibly starting GUI sometime */ #endif + #if defined(HAVE_DATE_TIME) && defined(VMS) && defined(VAXC) + make_version(); + #endif + /* * Allocate space for the generic buffers (needed for set_init_1() and * EMSG2()). *************** *** 1019,1030 **** */ if (p_exrc) { ! #ifdef UNIX { struct stat s; /* if ".vimrc" file is not owned by user, set 'secure' mode */ ! if (mch_stat(VIMRC_FILE, &s) || s.st_uid != getuid()) secure = p_secure; } #else --- 1023,1041 ---- */ if (p_exrc) { ! #if defined(UNIX) || defined(VMS) { struct stat s; /* if ".vimrc" file is not owned by user, set 'secure' mode */ ! ! if (mch_stat(VIMRC_FILE, &s) || s.st_uid != ! # ifdef UNIX ! getuid() ! # else /* VMS */ ! ((getgid() << 16) | getuid()) ! # endif ! ) secure = p_secure; } #else *************** *** 1051,1061 **** if (i == FAIL) { ! #ifdef UNIX struct stat s; /* if ".exrc" is not owned by user set 'secure' mode */ ! if (mch_stat(EXRC_FILE, &s) || s.st_uid != getuid()) secure = p_secure; else secure = 0; --- 1062,1078 ---- if (i == FAIL) { ! #if defined(UNIX) || defined(VMS) struct stat s; /* if ".exrc" is not owned by user set 'secure' mode */ ! if (mch_stat(EXRC_FILE, &s) || s.st_uid != ! # ifdef UNIX ! getuid() ! # else /* VMS */ ! ((getgid() << 16) | getuid()) ! # endif ! ) secure = p_secure; else secure = 0; *** ../vim-5.7a.5/src/message.c Tue Jun 6 12:45:32 2000 --- src/message.c Tue Jun 20 11:54:36 2000 *************** *** 657,663 **** /* * When switching screens, we need to output an extra newline on exit. */ ! #ifdef UNIX if (swapping_screen() && !termcap_active) newline_on_exit = TRUE; #endif --- 657,663 ---- /* * When switching screens, we need to output an extra newline on exit. */ ! #if defined(UNIX) || defined(VMS) if (swapping_screen() && !termcap_active) newline_on_exit = TRUE; #endif *** ../vim-5.7a.5/src/misc1.c Sun Jun 18 15:33:52 2000 --- src/misc1.c Tue Jun 20 21:30:53 2000 *************** *** 2232,2238 **** --- 2232,2243 ---- { char_u *var; + #ifdef VMS + var = mch_getenv((char_u *)"SYS$LOGIN"); + #else var = mch_getenv((char_u *)"HOME"); + #endif + if (var != NULL && *var == NUL) /* empty is same as not set */ var = NULL; #if defined(OS2) || defined(MSDOS) || defined(MSWIN) *************** *** 2331,2341 **** } else /* user directory */ { ! #ifndef UNIX ! /* cannot expand user's home directory, so don't try */ ! var = NULL; ! tail = (char_u *)""; /* for gcc */ ! #else /* * Copy ~user to dst[], so we can put a NUL after it. */ --- 2336,2342 ---- } else /* user directory */ { ! #if defined(UNIX) || (defined(VMS) && defined(USER_HOME)) /* * Copy ~user to dst[], so we can put a NUL after it. */ *************** *** 2348,2361 **** && !vim_ispathsep(*tail)) *var++ = *tail++; *var = NUL; ! /* * If the system supports getpwnam(), use it. * Otherwise, or if getpwnam() fails, the shell is used to * expand ~user. This is slower and may fail if the shell * does not support ~user (old versions of /bin/sh). */ ! # if defined(HAVE_GETPWNAM) && defined(HAVE_PWD_H) { struct passwd *pw; --- 2349,2362 ---- && !vim_ispathsep(*tail)) *var++ = *tail++; *var = NUL; ! # ifdef UNIX /* * If the system supports getpwnam(), use it. * Otherwise, or if getpwnam() fails, the shell is used to * expand ~user. This is slower and may fail if the shell * does not support ~user (old versions of /bin/sh). */ ! # if defined(HAVE_GETPWNAM) && defined(HAVE_PWD_H) { struct passwd *pw; *************** *** 2366,2379 **** var = NULL; } if (var == NULL) ! # endif { expand_context = EXPAND_FILES; var = ExpandOne(dst, NULL, WILD_ADD_SLASH|WILD_SILENT, WILD_EXPAND_FREE); mustfree = TRUE; } ! #endif /* UNIX */ } if (var != NULL && *var != NUL && --- 2367,2416 ---- var = NULL; } if (var == NULL) ! # endif { expand_context = EXPAND_FILES; var = ExpandOne(dst, NULL, WILD_ADD_SLASH|WILD_SILENT, WILD_EXPAND_FREE); mustfree = TRUE; } ! ! # else /* !UNIX, thus VMS */ ! /* ! * USER_HOME is a comma-separated list of ! * directories to search for the user account in. ! */ ! { ! char_u test[MAXPATHL], paths[MAXPATHL]; ! char_u *path, *next_path, *ptr; ! struct stat st; ! ! STRCPY(paths, USER_HOME); ! next_path = paths; ! while (*next_path) ! { ! for (path = next_path; *next_path && *next_path != ','; ! next_path++); ! if (*next_path) ! *next_path++ = NUL; ! STRCPY(test, path); ! STRCAT(test, "/"); ! STRCAT(test, dst + 1); ! if (mch_stat(test, &st) == 0) ! { ! var = alloc(STRLEN(test) + 1); ! STRCPY(var, test); ! mustfree = TRUE; ! break; ! } ! } ! } ! # endif /* UNIX */ ! #else ! /* cannot expand user's home directory, so don't try */ ! var = NULL; ! tail = (char_u *)""; /* for gcc */ ! #endif /* UNIX || VMS */ } if (var != NULL && *var != NUL && *************** *** 2699,2705 **** --- 2736,2748 ---- */ if (homedir != NULL) dirlen = STRLEN(homedir); + + #ifdef VMS + homedir_env = mch_getenv((char_u *)"SYS$LOGIN"); + #else homedir_env = mch_getenv((char_u *)"HOME"); + #endif + if (homedir_env != NULL && *homedir_env == NUL) homedir_env = NULL; if (homedir_env != NULL) *** ../vim-5.7a.5/src/os_vms.c Wed Jun 7 13:08:19 2000 --- src/os_vms.c Tue Jun 20 12:08:46 2000 *************** *** 95,104 **** static int get_x11_title __ARGS((int)); static int get_x11_icon __ARGS((int)); static char_u *oldtitle = NULL; ! static int did_set_title = FALSE; static char_u *fixedtitle = (char_u *)"Thanks for flying Vim"; static char_u *oldicon = NULL; ! static int did_set_icon = FALSE; #endif static void may_core_dump __ARGS((void)); --- 95,104 ---- static int get_x11_title __ARGS((int)); static int get_x11_icon __ARGS((int)); static char_u *oldtitle = NULL; ! static int did_set_title = FALSE; static char_u *fixedtitle = (char_u *)"Thanks for flying Vim"; static char_u *oldicon = NULL; ! static int did_set_icon = FALSE; #endif static void may_core_dump __ARGS((void)); *************** *** 118,124 **** static int do_resize = FALSE; static char_u *extra_shell_arg = NULL; static int show_shell_mess = TRUE; ! static int deadly_signal = 0; /* The signal we caught */ static TT_MODE orgmode; static void ass_tty(void); --- 118,124 ---- static int do_resize = FALSE; static char_u *extra_shell_arg = NULL; static int show_shell_mess = TRUE; ! static int deadly_signal = 0; /* The signal we caught */ static TT_MODE orgmode; static void ass_tty(void); *************** *** 380,386 **** static RETSIGTYPE deathtrap SIGDEFARG(sigarg) { ! static int entered = 0; #ifdef SIGHASARG int i; --- 380,386 ---- static RETSIGTYPE deathtrap SIGDEFARG(sigarg) { ! static int entered = 0; #ifdef SIGHASARG int i; *************** *** 589,595 **** --- 589,599 ---- for (i = 0; signal_info[i].sig != -1; i++) if (signal_info[i].deadly) signal(signal_info[i].sig, func_deadly); + #ifdef SIG_ERR else if (func_other != SIG_ERR) + #else + else if (func_other != BADSIG) + #endif signal(signal_info[i].sig, func_other); } *************** *** 1070,1077 **** --- 1074,1085 ---- /* presumably compiled with /decc */ strcpy((char *)s, (char *)sys_hostname); #else + # ifdef VAXC /* presumably compiled with /standard=vaxc */ + vaxc$gethostname((char *)s, len); + # else gethostname((char *)s, len); + # endif #endif } *************** *** 1259,1265 **** void mch_windexit(int r) { - settmode(TMODE_COOK); exiting = TRUE; #ifdef USE_GUI --- 1267,1272 ---- *************** *** 1271,1276 **** --- 1278,1292 ---- #endif stoptermcap(); + /* + * A newline is only required after a message in the alternate screen. + * This is set to TRUE by wait_return(). + */ + if (newline_on_exit || (msg_didout && !swapping_screen())) + out_char('\n'); + else + msg_clr_eos(); /* clear the rest of the display */ + /* Cursor may have been switched off without calling starttermcap() * when doing "vim -u vimrc" and vimrc contains ":q". */ if (full_screen) *************** *** 1279,1284 **** --- 1295,1301 ---- vms_flushbuf(); ml_close_all(TRUE); /* remove all memfiles */ may_core_dump(); + settmode(TMODE_COOK); #ifdef USE_GUI if (gui.in_use) gui_exit(r); *************** *** 1503,1519 **** mch_setmouse(int on) { static int ison = FALSE; if (on == ison) /* return quickly if nothing to do */ return; ! if (vim_is_xterm(term_str(KS_NAME))) { ! if (on) ! OUT_STR_NF((char_u *)"\033[?1000h"); /* xterm: enable mouse events */ ! else ! OUT_STR_NF((char_u *)"\033[?1000l"); /* xterm: disable mouse events */ ! } ison = on; } /* --- 1520,1551 ---- mch_setmouse(int on) { static int ison = FALSE; + int xterm_mouse_vers; if (on == ison) /* return quickly if nothing to do */ return; ! ! xterm_mouse_vers = use_xterm_mouse(); ! if (xterm_mouse_vers > 0) { ! if (on) /* enable mouse events, use mouse tracking if available */ ! out_str_nf((char_u *) ! (xterm_mouse_vers > 1 ? "\033[?1002h" : "\033[?1000h")); ! else /* disable mouse events, could probably always send the same */ ! out_str_nf((char_u *) ! (xterm_mouse_vers > 1 ? "\033[?1002l" : "\033[?1000l")); ! ison = on; ! } ! #if defined(DEC_MOUSE) ! else if (use_dec_mouse()) ! { ! if (on) /* enable mouse events */ ! out_str_nf((char_u *) "\033[1;2'z\033[1;3'{"); ! else /* disable mouse events */ ! out_str_nf((char_u *) "\033['z"); ison = on; + } + #endif /* DEC_MOUSE */ } /* *************** *** 1571,1577 **** return 0; } ! #endif /* * set screen mode, always fails. --- 1603,1624 ---- return 0; } ! #if defined(DEC_MOUSE) ! /* ! * Return non-zero when using a DEC mouse, according to 'ttymouse'. ! */ ! int ! use_dec_mouse() ! { ! if (STRNICMP(p_ttym, "dec", 3) == 0) ! { ! return 1; ! } ! return 0; ! } ! #endif /* DEC_MOUSE */ ! ! #endif /* USE_MOUSE */ /* * set screen mode, always fails. *************** *** 1708,1725 **** static int WaitForChar(long msec) { ! if (vim_is_input_buf_empty()) { if (RealWaitForChar(0, msec)) { add_to_input_buf((char_u *)ibuf, 1); return 1; } else return 0; } - else - return 1; } /* --- 1755,1781 ---- static int WaitForChar(long msec) { ! if (!vim_is_input_buf_empty()) /* something in inbuf[] */ ! return 1; ! ! #if defined(DEC_MOUSE) ! /* May need to query the mouse position. */ ! if (WantQueryMouse) { + WantQueryMouse = 0; + mch_write((char_u *)"\033[1'|", 5); + } + #endif + if (RealWaitForChar(0, msec)) { add_to_input_buf((char_u *)ibuf, 1); return 1; } else + { return 0; } } /* *** ../vim-5.7a.5/src/os_vms.h Fri May 5 16:54:28 2000 --- src/os_vms.h Tue Jun 20 12:11:25 2000 *************** *** 8,15 **** #include #include ! #include ! #include #ifdef HAVE_STDLIB_H # include --- 8,21 ---- #include #include ! ! #ifdef VAXC ! # include ! # include ! #else ! # include ! # include ! #endif #ifdef HAVE_STDLIB_H # include *************** *** 156,172 **** # define W_OK 2 /* for systems that don't have W_OK in unistd.h */ #endif /* * System definitions */ ! /* Open VMS is case insensitive */ ! #define CASE_INSENSITIVE_FILENAME ! ! /* Use binary fileio */ ! #define BINARY_FILE_IO ! /* #define USE_TMPNAM */ /* use tmpnam() instead of mktemp() */ /* * system-dependent filenames --- 162,182 ---- # define W_OK 2 /* for systems that don't have W_OK in unistd.h */ #endif + #ifndef R_OK + # define R_OK 4 /* for systems that don't have R_OK in unistd.h */ + #endif + + /* * System definitions */ ! #define CASE_INSENSITIVE_FILENAME /* Open VMS is case insensitive */ ! #define SPACE_IN_FILENAME /* There is space between user and passwd */ ! #define FNAME_ILLEGAL "|*#?%" /* Illegal characters in a file name */ ! #define BINARY_FILE_IO /* Use binary fileio */ ! /* #define USE_TMPNAM */ /* use tmpnam() instead of mktemp() */ /* * system-dependent filenames *************** *** 176,193 **** # define USR_EXRC_FILE "sys$login:.exrc" #endif #ifndef USR_VIMRC_FILE # define USR_VIMRC_FILE "sys$login:.vimrc" #endif ! #ifndef SYS_VIMRC_FILE ! # define SYS_VIMRC_FILE "$VIM/vimrc" #endif #ifdef USE_GUI # ifndef USR_GVIMRC_FILE # define USR_GVIMRC_FILE "sys$login:.gvimrc" # endif #endif #ifdef USE_GUI --- 186,214 ---- # define USR_EXRC_FILE "sys$login:.exrc" #endif + #ifndef USR_EXRC_FILE2 + # define USR_EXRC_FILE2 "sys$login:_exrc" + #endif + #ifndef USR_VIMRC_FILE # define USR_VIMRC_FILE "sys$login:.vimrc" #endif ! #ifndef USR_VIMRC_FILE2 ! # define USR_VIMRC_FILE2 "sys$login:_vimrc" #endif #ifdef USE_GUI # ifndef USR_GVIMRC_FILE # define USR_GVIMRC_FILE "sys$login:.gvimrc" # endif + # ifndef USR_GVIMRC_FILE2 + # define USR_GVIMRC_FILE2 "sys$login:_gvimrc" + # endif + #endif + + #ifndef SYS_VIMRC_FILE + # define SYS_VIMRC_FILE "$VIM/vimrc" #endif #ifdef USE_GUI *************** *** 231,246 **** #ifdef VIMINFO # ifndef VIMINFO_FILE ! # define VIMINFO_FILE "sys$login:.viminfo" # endif #endif /* VIMINFO */ #ifndef DEF_BDIR ! # define DEF_BDIR "./,tmp:,sys$login:" /* default for 'backupdir' */ #endif #ifndef DEF_DIR ! # define DEF_DIR "./,tmp:,sys$login:" /* default for 'directory' */ #endif #define TEMPNAME "tmp:v?XXXXXX.txt" --- 252,279 ---- #ifdef VIMINFO # ifndef VIMINFO_FILE ! # define VIMINFO_FILE "sys$login:.viminfo" ! # endif ! # ifndef VIMINFO_FILE2 ! # define VIMINFO_FILE2 "sys$login:_viminfo" # endif #endif /* VIMINFO */ + /* + * This should contain a comma-separated list of all the user account base + * directories on your system. For instance, if accounts are found in + * USER:[000000] and USER2:[000000], define USER_HOME as follows: + */ + #ifndef USER_HOME + # define USER_HOME "/user,/user2" + #endif + #ifndef DEF_BDIR ! # define DEF_BDIR "./,sys$login:,tmp:" /* default for 'backupdir' */ #endif #ifndef DEF_DIR ! # define DEF_DIR "./,sys$login:,tmp:" /* default for 'directory' */ #endif #define TEMPNAME "tmp:v?XXXXXX.txt" *************** *** 249,256 **** #define CMDBUFFSIZE 1024 /* size of the command processing buffer */ #define MAXPATHL 1024 /* VMS has long paths and plenty of memory */ ! #define CHECK_INODE /* used when checking if a swap file already ! exists for a file */ #ifndef MAXMEM # define MAXMEM 512 /* use up to 512Kbyte for buffer */ --- 282,289 ---- #define CMDBUFFSIZE 1024 /* size of the command processing buffer */ #define MAXPATHL 1024 /* VMS has long paths and plenty of memory */ ! #define CHECK_INODE /* used when checking if a swap file already ! exists for a file */ #ifndef MAXMEM # define MAXMEM 512 /* use up to 512Kbyte for buffer */ *************** *** 282,288 **** #define mch_rename(src, dst) rename(src, dst) #define mch_chdir(s) chdir(vms_fixfilename(s)) ! /* modifications by C Campbell */ ! typedef struct dsc$descriptor DESC; #define ERRORFILE "errors.err" #define MAKEEF "tmp:vim##.err" /* user must assign tmp: */ --- 315,320 ---- #define mch_rename(src, dst) rename(src, dst) #define mch_chdir(s) chdir(vms_fixfilename(s)) ! typedef struct dsc$descriptor DESC; #define ERRORFILE "errors.err" #define MAKEEF "tmp:vim##.err" /* user must assign tmp: */ *** ../vim-5.7a.5/src/os_vms.mms Fri May 5 18:22:34 2000 --- src/os_vms.mms Tue Jun 20 12:15:50 2000 *************** *** 2,9 **** # Makefile for Vim on OpenVMS # # Maintainer: Zoltan Arpadffy ! # Last change: 2000 May 5 ! # # This has been tested on VMS 6.2 to 7.1 on DEC Alpha and VAX. # The following will be built: # vim.exe: standard --- 2,9 ---- # Makefile for Vim on OpenVMS # # Maintainer: Zoltan Arpadffy ! # Last change: 2000 Apr 7 ! # # This has been tested on VMS 6.2 to 7.1 on DEC Alpha and VAX. # The following will be built: # vim.exe: standard *************** *** 22,34 **** ###################################################################### # Configuration section. ###################################################################### ! # Comment out if you want just the character terminal mode only. GUI = YES ###################################################################### # Comment out if you want the compiler version with :ver command. ! # NOTE: This part can make some complications if you're using some # predefined symbols/flags for your compiler. If does, just leave behind # the comment varialbe CCVER. ###################################################################### --- 22,41 ---- ###################################################################### # Configuration section. ###################################################################### ! # GUI or terminal mode executable. # Comment out if you want just the character terminal mode only. + ###################################################################### GUI = YES + ##################################################################### + # Compiler selection. + # Comment out if you use the VAXC compiler + ###################################################################### + DECC = YES + ###################################################################### # Comment out if you want the compiler version with :ver command. ! # NOTE: This part can make some complications if you're using some # predefined symbols/flags for your compiler. If does, just leave behind # the comment varialbe CCVER. ###################################################################### *************** *** 55,73 **** # VIM_SNIFF = YES # VIM_PYTHON = YES .IFDEF GUI ###################################################################### # X/Motif executable (also works in terminal mode ) ###################################################################### ! DEFS = "HAVE_CONFIG_H","USE_GUI_MOTIF" LIBS = ,OS_VMS.OPT/OPT CONFIG_H = gui_vms_conf.h GUI_SRC = gui.c gui_motif.c gui_x11.c GUI_OBJ = gui.obj gui_motif.obj gui_x11.obj GUI_INC = gui.h - # These may need to be defined if things are not in standard locations: - # GUI_INC_DIR = decw$include: # GUI_LIB_DIR = sys$library: # X_LIB_DIR = --- 62,85 ---- # VIM_SNIFF = YES # VIM_PYTHON = YES + ###################################################################### + # Library and include files configuration section. + # + # Normally you need not to change anything below. + # These may need to be defined if things are not in standard locations + ###################################################################### + .IFDEF GUI ###################################################################### # X/Motif executable (also works in terminal mode ) ###################################################################### ! DEFS = "HAVE_CONFIG_H","USE_GUI_MOTIF" LIBS = ,OS_VMS.OPT/OPT CONFIG_H = gui_vms_conf.h GUI_SRC = gui.c gui_motif.c gui_x11.c GUI_OBJ = gui.obj gui_motif.obj gui_x11.obj GUI_INC = gui.h # GUI_INC_DIR = decw$include: # GUI_LIB_DIR = sys$library: # X_LIB_DIR = *************** *** 78,84 **** ###################################################################### # Character terminal only executable ###################################################################### ! DEFS = "HAVE_CONFIG_H" LIBS = CONFIG_H = os_vms_conf.h .ENDIF --- 90,96 ---- ###################################################################### # Character terminal only executable ###################################################################### ! DEFS = "HAVE_CONFIG_H" LIBS = CONFIG_H = os_vms_conf.h .ENDIF *************** *** 90,101 **** PERL_DEF = ,"HAVE_PERL_INTERP" PERL_SRC = if_perlsfio.c if_perl.xs PERL_OBJ = if_perlsfio.obj if_perl.obj ! PERL_LIB = .ENDIF .IFDEF VIM_PYTHON ###################################################################### ! # Python related setup. ###################################################################### PYTHON_DEF = ,"HAVE_PYTHON" PYTHON_SRC = if_python.c --- 102,113 ---- PERL_DEF = ,"HAVE_PERL_INTERP" PERL_SRC = if_perlsfio.c if_perl.xs PERL_OBJ = if_perlsfio.obj if_perl.obj ! PERL_LIB = .ENDIF .IFDEF VIM_PYTHON ###################################################################### ! # Python related setup. ###################################################################### PYTHON_DEF = ,"HAVE_PYTHON" PYTHON_SRC = if_python.c *************** *** 105,111 **** .IFDEF VIM_TCL ###################################################################### ! # TCL related setup. ###################################################################### TCL_DEF = ,"HAVE_TCL" TCL_SRC = if_tcl.c --- 117,123 ---- .IFDEF VIM_TCL ###################################################################### ! # TCL related setup. ###################################################################### TCL_DEF = ,"HAVE_TCL" TCL_SRC = if_tcl.c *************** *** 115,126 **** .IFDEF VIM_SNIFF ###################################################################### ! # SNIFF related setup. ###################################################################### SNIFF_DEF = ,"USE_SNIFF" SNIFF_SRC = if_sniff.c SNIFF_OBJ = if_sniff.obj ! SNIFF_LIB = .ENDIF ###################################################################### --- 127,138 ---- .IFDEF VIM_SNIFF ###################################################################### ! # SNIFF related setup. ###################################################################### SNIFF_DEF = ,"USE_SNIFF" SNIFF_SRC = if_sniff.c SNIFF_OBJ = if_sniff.obj ! SNIFF_LIB = .ENDIF ###################################################################### *************** *** 130,157 **** ###################################################################### CC = cc CC_DEF = $(CC)/decc LD_DEF = link .IFDEF DEBUG TARGET = dvim.exe ! CFLAGS = /debug/noopt/prefix=all/include=[.proto] LDFLAGS = /debug .ELSE TARGET = vim.exe ! CFLAGS = /opt/prefix=all/include=[.proto] LDFLAGS = .ENDIF ! ! ### These go into pathdef.c VIMLOC = "" VIMRUN = "" VIMUSER = "''f$extract(f$locate(",",f$user())+1,f$length(f$user())-f$locate(",",f$user())-2,f$user())'" VIMHOST = "''f$extract(0,f$length(f$trnlnm("sys$node"))-2,f$trnlnm("sys$node"))' (''f$trnlnm("ucx$inet_host")'.''f$trnlnm("ucx$inet_domain")')" ! ! ### ! ### GRAPHICAL USER INTERFACE (GUI). .SUFFIXES : .obj .c .pro .xs --- 142,178 ---- ###################################################################### CC = cc + + .IFDEF DECC CC_DEF = $(CC)/decc + PREFIX = /prefix=all + .ELSE + CC_DEF = $(CC) + PREFIX = + CCVER = + .ENDIF + LD_DEF = link .IFDEF DEBUG TARGET = dvim.exe ! CFLAGS = /debug/noopt$(PREFIX)/include=[.proto] LDFLAGS = /debug .ELSE TARGET = vim.exe ! CFLAGS = /opt$(PREFIX)/include=[.proto] LDFLAGS = .ENDIF ! ######################################################################## ! # These go into pathdef.c ! ######################################################################## VIMLOC = "" VIMRUN = "" VIMUSER = "''f$extract(f$locate(",",f$user())+1,f$length(f$user())-f$locate(",",f$user())-2,f$user())'" VIMHOST = "''f$extract(0,f$length(f$trnlnm("sys$node"))-2,f$trnlnm("sys$node"))' (''f$trnlnm("ucx$inet_host")'.''f$trnlnm("ucx$inet_domain")')" ! ! ######################################################################## .SUFFIXES : .obj .c .pro .xs *************** *** 218,252 **** $(CC_DEF) $(ALL_CFLAGS) $< ! .IFDEF CCVER ! ######################################################################### ! # This part can make come complications if you're using some predefined ! # symbols/flags for your compiler. If does, just comment out _CCVER_ variable ! ########################################################################## ! ! pathdef.c : $(CONFIG_H) ! -@ define sys$output cc_ver.tmp ! -@ $(CC)/version ! -@ deass sys$output ! -@ open/read file cc_ver.tmp ! -@ read file CC_VERSION ! -@ close file ! -@ del cc_ver.tmp.* ! -@ write sys$output "creating pathdef.c (CCVER = YES)" ! -@ open/write pd pathdef.c ! -@ write pd "/* pathdef.c -- DO NOT EDIT! */" ! -@ write pd "/* This file is automatically created by os_vms.mms" ! -@ write pd " * Change the file os_vms.mms only. */" ! -@ write pd "#include ""vim.h""" ! -@ write pd "char_u *default_vim_dir = (char_u *)"$(VIMLOC)";" ! -@ write pd "char_u *default_vimruntime_dir = (char_u *)"$(VIMRUN)";" ! -@ write pd "char_u *all_cflags = (char_u *)""$(CC_DEF) /incl=[] $(ALL_CFLAGS)\nCompiler: ''CC_VERSION'"";" ! -@ write pd "char_u *all_lflags = (char_u *)""$(LD_DEF) $(LDFLAGS) /exe=$(TARGET) $+ $(ALL_LIBS)"";" ! -@ write pd "char_u *compiled_user = (char_u *) "$(VIMUSER)";" ! -@ write pd "char_u *compiled_sys = (char_u *) "$(VIMHOST)";" ! -@ close pd ! .ELSE ! pathdef.c : $(CONFIG_H) -@ write sys$output "creating pathdef.c" -@ open/write pd pathdef.c -@ write pd "/* pathdef.c -- DO NOT EDIT! */" --- 239,245 ---- $(CC_DEF) $(ALL_CFLAGS) $< ! pathdef.c : check_ccver $(CONFIG_H) -@ write sys$output "creating pathdef.c" -@ open/write pd pathdef.c -@ write pd "/* pathdef.c -- DO NOT EDIT! */" *************** *** 256,266 **** -@ write pd "char_u *default_vim_dir = (char_u *)"$(VIMLOC)";" -@ write pd "char_u *default_vimruntime_dir = (char_u *)"$(VIMRUN)";" -@ write pd "char_u *all_cflags = (char_u *)""$(CC_DEF) /incl=[] $(ALL_CFLAGS)"";" ! -@ write pd "char_u *all_lflags = (char_u *)""$(LD_DEF) $(LDFLAGS) /exe=$(TARGET) $+ $(ALL_LIBS)"";" -@ write pd "char_u *compiled_user = (char_u *) "$(VIMUSER)";" -@ write pd "char_u *compiled_sys = (char_u *) "$(VIMHOST)";" -@ close pd - .ENDIF os_vms.mms : @ write sys$output "The name of the makefile MUST be !!!!" --- 249,259 ---- -@ write pd "char_u *default_vim_dir = (char_u *)"$(VIMLOC)";" -@ write pd "char_u *default_vimruntime_dir = (char_u *)"$(VIMRUN)";" -@ write pd "char_u *all_cflags = (char_u *)""$(CC_DEF) /incl=[] $(ALL_CFLAGS)"";" ! -@ write pd "char_u *all_lflags = (char_u *)""$(LD_DEF) $(LDFLAGS) /exe=$(TARGET) *.obj $(ALL_LIBS)"";" ! -@ write pd "char_u *compiler_version = (char_u *) ""''CC_VER'"";" -@ write pd "char_u *compiled_user = (char_u *) "$(VIMUSER)";" -@ write pd "char_u *compiled_sys = (char_u *) "$(VIMHOST)";" -@ close pd os_vms.mms : @ write sys$output "The name of the makefile MUST be !!!!" *************** *** 369,375 **** if_perlsfio.obj : if_perlsfio.c vim.h config.h feature.h os_unix.h osdef.h ascii.h keymap.h \ term.h macros.h regexp.h structs.h gui.h globals.h farsi.h option.h ex_cmds.h proto.h $(CC_DEF) $(ALL_CFLAGS) $< ! if_python.obj : if_python.c vim.h config.h feature.h os_unix.h osdef.h ascii.h keymap.h \ term.h macros.h regexp.h structs.h gui.h globals.h farsi.h option.h ex_cmds.h proto.h $(CC_DEF) $(ALL_CFLAGS) $< if_tcl.obj : if_tcl.c vim.h config.h feature.h os_unix.h osdef.h ascii.h keymap.h term.h \ --- 362,368 ---- if_perlsfio.obj : if_perlsfio.c vim.h config.h feature.h os_unix.h osdef.h ascii.h keymap.h \ term.h macros.h regexp.h structs.h gui.h globals.h farsi.h option.h ex_cmds.h proto.h $(CC_DEF) $(ALL_CFLAGS) $< ! if_python.obj : if_python.c vim.h config.h feature.h os_unix.h osdef.h ascii.h keymap.h \ term.h macros.h regexp.h structs.h gui.h globals.h farsi.h option.h ex_cmds.h proto.h $(CC_DEF) $(ALL_CFLAGS) $< if_tcl.obj : if_tcl.c vim.h config.h feature.h os_unix.h osdef.h ascii.h keymap.h term.h \ *************** *** 437,439 **** --- 430,450 ---- mms_vim.obj : os_vms_mms.c $(CC_DEF) $(CFLAGS) os_vms_mms.c copy os_vms_mms.obj mms_vim.obj + + .IFDEF CCVER + ######################################################################### + # This part can make come complications if you're using some predefined + # symbols/flags for your compiler. If does, just comment out CCVER variable + ########################################################################## + check_ccver : + -@ define sys$output cc_ver.tmp + -@ $(CC)/version + -@ deass sys$output + -@ open/read file cc_ver.tmp + -@ read file CC_VER + -@ close file + -@ del cc_ver.tmp.* + .ELSE + check_ccver : + -@ ! + .ENDIF *** ../vim-5.7a.5/src/os_vms_conf.h Wed Jun 7 13:02:34 2000 --- src/os_vms_conf.h Tue Jun 20 12:17:06 2000 *************** *** 44,49 **** --- 44,52 ---- #define USEMEMMOVE 1 /* #undef USEMEMCPY */ + /* Define when "man -s 2" is to be used */ + /* #undef USEMAN_S */ + /* Define to empty if the keyword does not work. */ /* #undef const */ *************** *** 65,70 **** --- 68,76 ---- /* Define to `int' if doesn't define. */ /* #undef gid_t */ + /* Define to `long' if doesn't define. */ + /* #undef ino_t */ + /* Define if you can safely include both and . */ #define TIME_WITH_SYS_TIME 1 *************** *** 77,82 **** --- 83,91 ---- /* Define as the command at the end of signal handlers ("" or "return 0;"). */ #define SIGRETURN return + /* Define if struct sigcontext is present */ + #define HAVE_SIGCONTEXT 1 + /* Define if touuper/tolower only work on lower/upercase characters */ /* #undef BROKEN_TOUPPER */ *************** *** 104,109 **** --- 113,121 ---- /* Define if you have the memset() function. */ #define HAVE_MEMSET 1 + /* Define if you have the memcmp() function. */ + #define HAVE_MEMCMP 1 + /* Define if you have the strerror() function. */ #define HAVE_STRERROR 1 *************** *** 131,136 **** --- 143,172 ---- /* Define if you have the getpwnam() function. */ #define HAVE_GETPWNAM 1 + /* Define if you have the nanosleep() function. */ + /* #undef HAVE_NANOSLEEP */ + + /* Define if you have the opendir() function. */ + /* #undef HAVE_OPENDIR */ + + /* Define if you have the qsort() function. */ + #define HAVE_QSORT 1 + + /* Define if you have the select() function. */ + #define HAVE_SELECT 1 + + /* Define if you have the setpgid() function. */ + /* #undef HAVE_SETPGID */ + + /* Define if you have the setsid() function. */ + /* #undef HAVE_SETSID */ + + /* Define if you have the sigset() function. */ + /* #undef HAVE_SIGSET */ + + /* Define if you have the strcasecmp() function. */ + /* #undef HAVE_STRCASECMP */ + #undef HAVE_DIRENT_H #undef HAVE_SYS_NDIR_H #undef HAVE_SYS_DIR_H *************** *** 147,158 **** #undef HAVE_SYS_SELECT_H #undef HAVE_SYS_UTSNAME_H #undef HAVE_TERMCAP_H ! #define HAVE_FCNTL_H 1 #undef HAVE_SGTTY_H #undef HAVE_SYS_IOCTL_H #define HAVE_SYS_TIME_H 1 #undef HAVE_TERMIO_H - #define HAVE_UNISTD_H 1 #undef HAVE_STROPTS_H #define HAVE_ERRNO_H 1 #undef HAVE_STRINGS_H --- 183,199 ---- #undef HAVE_SYS_SELECT_H #undef HAVE_SYS_UTSNAME_H #undef HAVE_TERMCAP_H ! #ifdef VAXC ! #undef HAVE_FCNTL_H ! #undef HAVE_UNISTD_H ! #else ! #define HAVE_FCNTL_H 1 ! #define HAVE_UNISTD_H 1 ! #endif #undef HAVE_SGTTY_H #undef HAVE_SYS_IOCTL_H #define HAVE_SYS_TIME_H 1 #undef HAVE_TERMIO_H #undef HAVE_STROPTS_H #define HAVE_ERRNO_H 1 #undef HAVE_STRINGS_H *** ../vim-5.7a.5/src/proto/os_vms.pro Sat Jun 10 11:56:12 2000 --- src/proto/os_vms.pro Tue Jun 20 12:18:33 2000 *************** *** 35,40 **** --- 35,41 ---- void mch_setmouse __ARGS((int on)); void check_mouse_termcode __ARGS((void)); int use_xterm_mouse __ARGS((void)); + int use_dec_mouse __ARGS((void)); int mch_screenmode __ARGS((char_u *arg)); int mch_get_winsize __ARGS((void)); void mch_set_winsize __ARGS((void)); *** ../vim-5.7a.5/src/proto/version.pro Sat Jun 10 11:55:47 2000 --- src/proto/version.pro Tue Jun 20 20:42:48 2000 *************** *** 1,4 **** --- 1,5 ---- /* version.c */ + void make_version __ARGS((void)); int highest_patch __ARGS((void)); void do_version __ARGS((char_u *arg)); void list_version __ARGS((void)); *** ../vim-5.7a.5/src/term.c Wed Jun 7 14:45:03 2000 --- src/term.c Tue Jun 20 12:22:20 2000 *************** *** 2884,2896 **** */ if (tmode != TMODE_COOK || cur_tmode != TMODE_COOK) { out_flush(); mch_settmode(tmode); /* machine specific function */ cur_tmode = tmode; #ifdef USE_MOUSE ! if (tmode != TMODE_RAW) ! mch_setmouse(FALSE); /* switch mouse off */ ! else setmouse(); /* may switch mouse on */ #endif out_flush(); --- 2884,2898 ---- */ if (tmode != TMODE_COOK || cur_tmode != TMODE_COOK) { + #ifdef USE_MOUSE + if (tmode != TMODE_RAW) + mch_setmouse(FALSE); /* switch mouse off */ + #endif out_flush(); mch_settmode(tmode); /* machine specific function */ cur_tmode = tmode; #ifdef USE_MOUSE ! if (tmode == TMODE_RAW) setmouse(); /* may switch mouse on */ #endif out_flush(); *** ../vim-5.7a.5/src/version.c Tue Jun 20 16:04:00 2000 --- src/version.c Tue Jun 20 21:20:17 2000 *************** *** 23,30 **** char *Version = VIM_VERSION_SHORT; char *mediumVersion = VIM_VERSION_MEDIUM; ! #ifdef HAVE_DATE_TIME char *longVersion = VIM_VERSION_LONG_DATE __DATE__ " " __TIME__ ")"; #else char *longVersion = VIM_VERSION_LONG; #endif --- 23,49 ---- char *Version = VIM_VERSION_SHORT; char *mediumVersion = VIM_VERSION_MEDIUM; ! ! #if defined(HAVE_DATE_TIME) || defined(PROTO) ! # if (defined(VMS) && defined(VAXC)) || defined(PROTO) ! char longVersion[sizeof(VIM_VERSION_LONG_DATE) + sizeof(__DATE__) ! + sizeof(__TIME__) + 3]; ! void ! make_version() ! { ! /* ! * Construct the long version string. Necessary because ! * VAX C can't catenate strings in the preprocessor. ! */ ! strcpy(longVersion, VIM_VERSION_LONG_DATE); ! strcat(longVersion, __DATE__); ! strcat(longVersion, " "); ! strcat(longVersion, __TIME__); ! strcat(longVersion, ")"); ! } ! # else char *longVersion = VIM_VERSION_LONG_DATE __DATE__ " " __TIME__ ")"; + # endif #else char *longVersion = VIM_VERSION_LONG; #endif *************** *** 420,421 **** --- 439,442 ---- { /* Add new patch number below this line */ + /**/ + 6, /**/ *************** *** 502,507 **** --- 523,531 ---- #ifdef RISCOS MSG_PUTS("\nRISC OS version"); #endif + #ifdef VMS + MSG_PUTS("\nOpenVMS version"); + #endif /* Print the list of patch numbers if there is at least one. */ /* Print a range when patches are consecutive: "1-10, 12, 15-40, 42-45" */ *************** *** 532,545 **** } #if defined(UNIX) || defined(VMS) ! MSG_PUTS("\nCompiled by "); ! MSG_PUTS(compiled_user); ! MSG_PUTS("@"); ! MSG_PUTS(compiled_sys); ! MSG_PUTS(", with (+) or without (-):\n"); ! #else ! MSG_PUTS("\nCompiled with (+) or without (-):\n"); #endif /* print all the features */ for (i = 0; features[i] != NULL; ++i) --- 556,575 ---- } #if defined(UNIX) || defined(VMS) ! if (*compiled_user != NUL) ! { ! MSG_PUTS("\nCompiled by "); ! MSG_PUTS(compiled_user); ! if (*compiled_sys != NUL) ! { ! MSG_PUTS("@"); ! MSG_PUTS(compiled_sys); ! } ! MSG_PUTS(", with (+) or without (-):\n"); ! } ! else #endif + MSG_PUTS("\nCompiled with (+) or without (-):\n"); /* print all the features */ for (i = 0; features[i] != NULL; ++i) *************** *** 623,628 **** --- 653,666 ---- version_msg("Compilation: "); version_msg((char *)all_cflags); msg_putchar('\n'); + #ifdef VMS + if (*compiler_version != NUL) + { + version_msg("Compiler: "); + version_msg((char *)compiler_version); + msg_putchar('\n'); + } + #endif version_msg("Linking: "); version_msg((char *)all_lflags); #endif *** ../vim-5.7a.5/src/xxd/os_vms.mms Fri Jun 11 21:48:12 1999 --- src/xxd/os_vms.mms Tue Jun 20 12:29:30 2000 *************** *** 1,20 **** ! # The most simplistic Makefile for VMS ! CC = cc/decc ! LD = link ! CFLAGS = /opt/prefix=all ! LDFLAGS = ! LIBS = SOURCES = xxd.c ! OBJ = xxd.obj ! xxd.exe : $(OBJ) ! $(LD) $(LDFLAGS) /exe=xxd.exe $+ ! xxd.obj : xxd.c ! $(CC) $(CFLAGS) $< - # Clean clean : del *.obj;* del *.exe;* --- 1,69 ---- ! # VMS MM[KS] makefile for XXD ! # tested with MMK and MMS as well. ! # ! # Maintained by Zoltan Arpadffy ! # ! # Edit the lines in the Configuration section below to select. ! # ! # To build: use the following command line: ! # ! # mms/descrip=os_vms.mms ! # or if you use mmk ! # mmk/descrip=os_vms.mms ! # ! ! ###################################################################### ! # Configuration section. ! ###################################################################### ! # Compiler selection. ! # Comment out if you use the VAXC compiler ! ###################################################################### ! # DECC = YES ! ! ##################################################################### ! # Uncomment if want a debug version. Resulting executable is DVIM.EXE ! ###################################################################### ! # DEBUG = YES ! ! ###################################################################### ! # End of configuration section. ! # ! # Please, do not change anything below without programming experience. ! ###################################################################### ! ! CC = cc ! ! .IFDEF DECC ! CC_DEF = $(CC)/decc ! PREFIX = /prefix=all ! .ELSE ! CC_DEF = $(CC) ! PREFIX = ! .ENDIF ! ! LD_DEF = link ! ! .IFDEF DEBUG ! TARGET = dxxd.exe ! CFLAGS = /debug/noopt$(PREFIX)/cross_reference/include=[] ! LDFLAGS = /debug ! .ELSE ! TARGET = xxd.exe ! CFLAGS = /opt$(PREFIX)/include=[] ! LDFLAGS = ! .ENDIF ! ! .SUFFIXES : .obj .c SOURCES = xxd.c ! OBJ = xxd.obj ! .obj.c : ! $(CC_DEF) $(CFLAGS) $< ! $(TARGET) : $(OBJ) ! $(LD_DEF) $(LDFLAGS) /exe=$(TARGET) $+ clean : del *.obj;* del *.exe;* *** ../vim-5.7a.5/src/xxd/xxd.c Tue Jun 6 22:46:29 2000 --- src/xxd/xxd.c Tue Jun 20 21:39:25 2000 *************** *** 47,52 **** --- 47,54 ---- * 26.09.98 Fixed: 'xxd -i infile outfile' did not truncate outfile. * 27.10.98 Fixed: -g option parser required blank. * option -b added: 01000101 binary output in normal format. + * 16.05.00 Added VAXC changes by Stephen P. Wall + * 16.05.00 Improved MMS file and merege for VMS by Zoltan Arpadffy * * (c) 1990-1998 by Juergen Weigert (jnweiger@informatik.uni-erlangen.de) * *************** *** 55,61 **** * lose money and don't ask me. */ #include ! #include #ifdef __TSC__ # define MSDOS #endif --- 57,67 ---- * lose money and don't ask me. */ #include ! #ifdef VAXC ! # include ! #else ! # include ! #endif #ifdef __TSC__ # define MSDOS #endif *************** *** 135,145 **** # define BIN_ASSIGN(fp, yes) setmode(fileno(fp), (yes) ? O_BINARY : O_TEXT) # define PATH_SEP '\\' #else ! # define BIN_READ(dummy) "r" ! # define BIN_WRITE(dummy) "w" ! # define BIN_CREAT(dummy) O_CREAT ! # define BIN_ASSIGN(fp, dummy) fp ! # define PATH_SEP '/' #endif /* open has only to arguments on the Mac */ --- 141,160 ---- # define BIN_ASSIGN(fp, yes) setmode(fileno(fp), (yes) ? O_BINARY : O_TEXT) # define PATH_SEP '\\' #else ! # ifdef VMS ! # define BIN_READ(dummy) "r" ! # define BIN_WRITE(dummy) "w" ! # define BIN_CREAT(dummy) O_CREAT ! # define BIN_ASSIGN(fp, dummy) fp ! # define PATH_SEP ']' ! # define FILE_SEP '.' ! # else ! # define BIN_READ(dummy) "r" ! # define BIN_WRITE(dummy) "w" ! # define BIN_CREAT(dummy) O_CREAT ! # define BIN_ASSIGN(fp, dummy) fp ! # define PATH_SEP '/' ! # endif #endif /* open has only to arguments on the Mac */ *************** *** 416,421 **** --- 431,444 ---- for (pp = pname; *pp; ) if (*pp++ == PATH_SEP) pname = pp; + #ifdef FILE_SEP + for (pp = pname; *pp; pp++) + if (*pp == FILE_SEP) + { + *pp = '\0'; + break; + } + #endif while (argc >= 2) { -- hundred-and-one symptoms of being an internet addict: 70. ISDN lines are added to your house on a hourly basis /-/-- Bram Moolenaar --- Bram@moolenaar.net --- http://www.moolenaar.net --\-\ \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/