home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / unreleased / patches / 5.7a.006 < prev    next >
Encoding:
Internet Message Format  |  2000-06-19  |  50.3 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 5.7a.006 (extra)
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. ------------
  6.  
  7. Patch 5.7a.006 (extra)
  8. Problem:    VMS: Various problems, also with the VAXC compiler.
  9. Solution:   In many places use the Unix code for VMS too.
  10.         Added time, date and compiler version to version message.
  11.         (Zoltan Arpadffy)
  12. Files:        src/ex_cmds.c, src/ex_docmd.c, src/globals.h, src/gui_vms_conf.h,
  13.         src/main.c, src/message.c, src/misc1.c, src/os_vms.c,
  14.         src/os_vms.h, src/os_vms.mms, src/os_vms_conf.h,
  15.         src/proto/os_vms.pro, src/proto/version.pro, src/term.c,
  16.         src/version.c, src/xxd/os_vms.mms, src/xxd/xxd.c
  17.  
  18.  
  19. *** ../vim-5.7a.5/src/ex_cmds.c    Tue Jun 20 16:02:33 2000
  20. --- src/ex_cmds.c    Tue Jun 20 15:55:51 2000
  21. ***************
  22. *** 1295,1303 ****
  23.       char_u        *tempname = NULL;    /* name of temp viminfo file */
  24.       struct stat        st_new;        /* mch_stat() of potential new file */
  25.       char_u        *wp;
  26.   #ifdef UNIX
  27.       int            shortname = FALSE;    /* use 8.3 file name */
  28. -     mode_t        umask_save;
  29.       struct stat        st_old;        /* mch_stat() of existing viminfo file */
  30.   #endif
  31.   
  32. --- 1295,1305 ----
  33.       char_u        *tempname = NULL;    /* name of temp viminfo file */
  34.       struct stat        st_new;        /* mch_stat() of potential new file */
  35.       char_u        *wp;
  36. + #if defined(UNIX) || defined(VMS)
  37. +      mode_t        umask_save;
  38. + #endif
  39.   #ifdef UNIX
  40.       int            shortname = FALSE;    /* use 8.3 file name */
  41.       struct stat        st_old;        /* mch_stat() of existing viminfo file */
  42.   #endif
  43.   
  44. ***************
  45. *** 1315,1321 ****
  46.           /* if it does exist, but we can't read it, don't try writing */
  47.           if (mch_stat((char *)file, &st_new) == 0)
  48.           goto end;
  49. ! #ifdef UNIX
  50.           /*
  51.            * For Unix we create the .viminfo non-accessible for others,
  52.            * because it may contain text from non-accessible documents.
  53. --- 1317,1323 ----
  54.           /* if it does exist, but we can't read it, don't try writing */
  55.           if (mch_stat((char *)file, &st_new) == 0)
  56.           goto end;
  57. ! #if defined(UNIX) || defined(VMS)
  58.           /*
  59.            * For Unix we create the .viminfo non-accessible for others,
  60.            * because it may contain text from non-accessible documents.
  61. ***************
  62. *** 1323,1329 ****
  63.           umask_save = umask(077);
  64.   #endif
  65.           fp_out = mch_fopen((char *)file, WRITEBIN);
  66. ! #ifdef UNIX
  67.           (void)umask(umask_save);
  68.   #endif
  69.       }
  70. --- 1325,1331 ----
  71.           umask_save = umask(077);
  72.   #endif
  73.           fp_out = mch_fopen((char *)file, WRITEBIN);
  74. ! #if defined(UNIX) || defined(VMS)
  75.           (void)umask(umask_save);
  76.   #endif
  77.       }
  78. ***************
  79. *** 1525,1531 ****
  80. --- 1527,1537 ----
  81.       {
  82.   #ifdef VIMINFO_FILE2
  83.           /* don't use $HOME when not defined (turned into "c:/"!). */
  84. + # ifdef VMS
  85. +         if (mch_getenv((char_u *)"SYS$LOGIN") == NULL)
  86. + # else
  87.           if (mch_getenv((char_u *)"HOME") == NULL)
  88. + # endif
  89.           {
  90.           /* don't use $VIM when not available. */
  91.           expand_env((char_u *)"$VIM", NameBuff, MAXPATHL);
  92. *** ../vim-5.7a.5/src/ex_docmd.c    Wed Jun  7 13:53:53 2000
  93. --- src/ex_docmd.c    Tue Jun 20 11:18:24 2000
  94. ***************
  95. *** 121,127 ****
  96.   static void    do_sleep __ARGS((EXARG *eap));
  97.   static void    do_exmap __ARGS((EXARG *eap, int isabbrev));
  98.   static void    do_winsize __ARGS((char_u *arg));
  99. ! #if defined(USE_GUI) || defined(UNIX)
  100.   static void    do_winpos __ARGS((char_u *arg));
  101.   #endif
  102.   static void    do_exops __ARGS((EXARG *eap));
  103. --- 121,127 ----
  104.   static void    do_sleep __ARGS((EXARG *eap));
  105.   static void    do_exmap __ARGS((EXARG *eap, int isabbrev));
  106.   static void    do_winsize __ARGS((char_u *arg));
  107. ! #if defined(USE_GUI) || defined(UNIX) || defined(VMS)
  108.   static void    do_winpos __ARGS((char_u *arg));
  109.   #endif
  110.   static void    do_exops __ARGS((EXARG *eap));
  111. ***************
  112. *** 1962,1968 ****
  113.           do_winsize(ea.arg);
  114.           break;
  115.   
  116. ! #if defined(USE_GUI) || defined(UNIX)
  117.       case CMD_winpos:
  118.           do_winpos(ea.arg);
  119.           break;
  120. --- 1962,1968 ----
  121.           do_winsize(ea.arg);
  122.           break;
  123.   
  124. ! #if defined(USE_GUI) || defined(UNIX) || defined(VMS)
  125.       case CMD_winpos:
  126.           do_winpos(ea.arg);
  127.           break;
  128. ***************
  129. *** 6421,6427 ****
  130.       char_u        *tofree;
  131.   
  132.       new_dir = eap->arg;
  133. ! #ifndef UNIX
  134.       /* for non-UNIX ":cd" means: print current directory */
  135.       if (*new_dir == NUL)
  136.       do_pwd();
  137. --- 6421,6427 ----
  138.       char_u        *tofree;
  139.   
  140.       new_dir = eap->arg;
  141. ! #if !defined(UNIX) && !defined(VMS)
  142.       /* for non-UNIX ":cd" means: print current directory */
  143.       if (*new_dir == NUL)
  144.       do_pwd();
  145. ***************
  146. *** 6446,6457 ****
  147.       else
  148.           prev_dir = NULL;
  149.   
  150. ! #ifdef UNIX
  151.       /* for UNIX ":cd" means: go to home directory */
  152.       if (*new_dir == NUL)
  153.       {
  154.           /* use NameBuff for home directory name */
  155.           expand_env((char_u *)"$HOME", NameBuff, MAXPATHL);
  156.           new_dir = NameBuff;
  157.       }
  158.   #endif
  159. --- 6446,6467 ----
  160.       else
  161.           prev_dir = NULL;
  162.   
  163. ! #if defined(UNIX) || defined(VMS)
  164.       /* for UNIX ":cd" means: go to home directory */
  165.       if (*new_dir == NUL)
  166.       {
  167.           /* use NameBuff for home directory name */
  168. + # ifdef VMS
  169. +         char_u    *p;
  170. +         p = mch_getenv((char_u *)"SYS$LOGIN");
  171. +         if (p == NULL || *p == NUL)    /* empty is the same as not set */
  172. +         NameBuff[0] = NUL;
  173. +         else
  174. +         STRNCPY(NameBuff, p, MAXPATHL);
  175. + # else
  176.           expand_env((char_u *)"$HOME", NameBuff, MAXPATHL);
  177. + # endif
  178.           new_dir = NameBuff;
  179.       }
  180.   #endif
  181. ***************
  182. *** 6545,6551 ****
  183.       set_winsize(w, h, TRUE);
  184.   }
  185.   
  186. ! #if defined(USE_GUI) || defined(UNIX)
  187.   /*
  188.    * ":winpos" command.
  189.    */
  190. --- 6555,6561 ----
  191.       set_winsize(w, h, TRUE);
  192.   }
  193.   
  194. ! #if defined(USE_GUI) || defined(UNIX) || defined(VMS)
  195.   /*
  196.    * ":winpos" command.
  197.    */
  198. *** ../vim-5.7a.5/src/globals.h    Mon Dec 27 12:58:44 1999
  199. --- src/globals.h    Tue Jun 20 21:28:04 2000
  200. ***************
  201. *** 139,145 ****
  202.   EXTERN int    quit_more INIT(= FALSE);    /* 'q' hit at "--more--" msg */
  203.   EXTERN int    more_back INIT(= 0);        /* 'b' or 'u' at "--more--" msg */
  204.   EXTERN int    more_back_used INIT(= FALSE); /* using more_back */
  205. ! #if defined(UNIX) || defined(__EMX__)
  206.   EXTERN int    newline_on_exit INIT(= FALSE);    /* did msg in altern. screen */
  207.   EXTERN int    intr_char INIT(= 0);        /* extra interrupt character */
  208.   #endif
  209. --- 139,145 ----
  210.   EXTERN int    quit_more INIT(= FALSE);    /* 'q' hit at "--more--" msg */
  211.   EXTERN int    more_back INIT(= 0);        /* 'b' or 'u' at "--more--" msg */
  212.   EXTERN int    more_back_used INIT(= FALSE); /* using more_back */
  213. ! #if defined(UNIX) || defined(__EMX__) || defined(VMS)
  214.   EXTERN int    newline_on_exit INIT(= FALSE);    /* did msg in altern. screen */
  215.   EXTERN int    intr_char INIT(= 0);        /* extra interrupt character */
  216.   #endif
  217. ***************
  218. *** 623,629 ****
  219. --- 623,633 ----
  220.   /* these are in version.c */
  221.   extern char *Version;
  222.   extern char *mediumVersion;
  223. + #if defined(HAVE_DATE_TIME) && defined(VMS) && defined(VAXC)
  224. + extern char longVersion[];
  225. + #else
  226.   extern char *longVersion;
  227. + #endif
  228.   
  229.   /*
  230.    * Some file names for Unix are stored in pathdef.c, to make their value
  231. ***************
  232. *** 635,640 ****
  233. --- 639,647 ----
  234.   extern char_u *default_vimruntime_dir;
  235.   extern char_u *all_cflags;
  236.   extern char_u *all_lflags;
  237. + # ifdef VMS
  238. + extern char_u *compiler_version;
  239. + # endif
  240.   extern char_u *compiled_user;
  241.   extern char_u *compiled_sys;
  242.   #endif
  243. *** ../vim-5.7a.5/src/gui_vms_conf.h    Wed Jun  7 17:03:43 2000
  244. --- src/gui_vms_conf.h    Mon Jun 19 09:57:06 2000
  245. ***************
  246. *** 65,70 ****
  247. --- 65,73 ----
  248.   /* Define to `int' if <sys/types.h> doesn't define.  */
  249.   /* #undef gid_t */
  250.   
  251. + /* Define to `long' if <sys/types.h> doesn't define.  */
  252. + /* #undef ino_t */
  253.   /* Define if you can safely include both <sys/time.h> and <time.h>.  */
  254.   #define TIME_WITH_SYS_TIME 1
  255.   
  256. ***************
  257. *** 77,82 ****
  258. --- 80,88 ----
  259.   /* Define as the command at the end of signal handlers ("" or "return 0;").  */
  260.   #define SIGRETURN return
  261.   
  262. + /* Define if struct sigcontext is present */
  263. + #define HAVE_SIGCONTEXT 1
  264.   /* Define if touuper/tolower only work on lower/upercase characters */
  265.   /* #undef BROKEN_TOUPPER */
  266.   
  267. ***************
  268. *** 113,118 ****
  269. --- 119,130 ----
  270.   /* Define if you have the rename() function. */
  271.   #define HAVE_RENAME 1
  272.   
  273. + /* Define if you have the qsort() function. */
  274. + #define HAVE_QSORT 1
  275. + /* Define if you have the strftime() function.  */
  276. + #define HAVE_STRFTIME 1
  277.   /* Define if you have the fsync() function. */
  278.   #define HAVE_FSYNC 1
  279.   
  280. ***************
  281. *** 167,173 ****
  282. --- 179,189 ----
  283.   /*#define HAVE_TERMCAP_H 1*/
  284.   
  285.   /* Define if you have the <fcntl.h> header file.  */
  286. + #ifdef        VAXC
  287. + #undef HAVE_FCNTL_H
  288. + #else
  289.   #define HAVE_FCNTL_H 1
  290. + #endif
  291.   
  292.   /* Define if you have the <sgtty.h> header file.  */
  293.   /* #undef HAVE_SGTTY_H */
  294. ***************
  295. *** 219,221 ****
  296. --- 235,253 ----
  297.   
  298.   /* Define if you have the <pwd.h> header file. */
  299.   /*#define HAVE_PWD_H 1*/
  300. + /* Define if you have the <Xm/Xm.h> header file (only used by configure). */
  301. + /* #undef HAVE_XM_XM_H */
  302. + /* Define if strings.h cannot be included when string.h already is */
  303. + /* #undef NO_STRINGS_WITH_STRING_H */
  304. + /* Define if you want to include fontset support. */
  305. + #define USE_FONTSET 1
  306. + /* Define if your libc doesn't work POSIX.2 locale function correctly */
  307. + #define BROKEN_LOCALE 1
  308. + /* Define if your X has own locale library */
  309. + /* #undef X_LOCALE */
  310. *** ../vim-5.7a.5/src/main.c    Tue May  9 20:57:12 2000
  311. --- src/main.c    Tue Jun 20 20:38:10 2000
  312. ***************
  313. *** 328,333 ****
  314. --- 328,337 ----
  315.       gui_prepare(&argc, argv);    /* Prepare for possibly starting GUI sometime */
  316.   #endif
  317.   
  318. + #if defined(HAVE_DATE_TIME) && defined(VMS) && defined(VAXC)
  319. +     make_version();
  320. + #endif
  321.       /*
  322.        * Allocate space for the generic buffers (needed for set_init_1() and
  323.        * EMSG2()).
  324. ***************
  325. *** 1019,1030 ****
  326.        */
  327.       if (p_exrc)
  328.       {
  329. ! #ifdef UNIX
  330.           {
  331.           struct stat s;
  332.   
  333.           /* if ".vimrc" file is not owned by user, set 'secure' mode */
  334. !         if (mch_stat(VIMRC_FILE, &s) || s.st_uid != getuid())
  335.               secure = p_secure;
  336.           }
  337.   #else
  338. --- 1023,1041 ----
  339.        */
  340.       if (p_exrc)
  341.       {
  342. ! #if defined(UNIX) || defined(VMS)
  343.           {
  344.           struct stat s;
  345.   
  346.           /* if ".vimrc" file is not owned by user, set 'secure' mode */
  347. !         if (mch_stat(VIMRC_FILE, &s) || s.st_uid !=
  348. ! # ifdef UNIX
  349. !                 getuid()
  350. ! # else     /* VMS */
  351. !                 ((getgid() << 16) | getuid())
  352. ! # endif
  353. !             )
  354.               secure = p_secure;
  355.           }
  356.   #else
  357. ***************
  358. *** 1051,1061 ****
  359.   
  360.           if (i == FAIL)
  361.           {
  362. ! #ifdef UNIX
  363.           struct stat s;
  364.   
  365.           /* if ".exrc" is not owned by user set 'secure' mode */
  366. !         if (mch_stat(EXRC_FILE, &s) || s.st_uid != getuid())
  367.               secure = p_secure;
  368.           else
  369.               secure = 0;
  370. --- 1062,1078 ----
  371.   
  372.           if (i == FAIL)
  373.           {
  374. ! #if defined(UNIX) || defined(VMS)
  375.           struct stat s;
  376.   
  377.           /* if ".exrc" is not owned by user set 'secure' mode */
  378. !         if (mch_stat(EXRC_FILE, &s) || s.st_uid !=
  379. ! # ifdef UNIX
  380. !                 getuid()
  381. ! # else     /* VMS */
  382. !                 ((getgid() << 16) | getuid())
  383. ! # endif
  384. !             )
  385.               secure = p_secure;
  386.           else
  387.               secure = 0;
  388. *** ../vim-5.7a.5/src/message.c    Tue Jun  6 12:45:32 2000
  389. --- src/message.c    Tue Jun 20 11:54:36 2000
  390. ***************
  391. *** 657,663 ****
  392.       /*
  393.        * When switching screens, we need to output an extra newline on exit.
  394.        */
  395. ! #ifdef UNIX
  396.       if (swapping_screen() && !termcap_active)
  397.       newline_on_exit = TRUE;
  398.   #endif
  399. --- 657,663 ----
  400.       /*
  401.        * When switching screens, we need to output an extra newline on exit.
  402.        */
  403. ! #if defined(UNIX) || defined(VMS)
  404.       if (swapping_screen() && !termcap_active)
  405.       newline_on_exit = TRUE;
  406.   #endif
  407. *** ../vim-5.7a.5/src/misc1.c    Sun Jun 18 15:33:52 2000
  408. --- src/misc1.c    Tue Jun 20 21:30:53 2000
  409. ***************
  410. *** 2232,2238 ****
  411. --- 2232,2243 ----
  412.   {
  413.       char_u  *var;
  414.   
  415. + #ifdef VMS
  416. +     var = mch_getenv((char_u *)"SYS$LOGIN");
  417. + #else
  418.       var = mch_getenv((char_u *)"HOME");
  419. + #endif
  420.       if (var != NULL && *var == NUL)    /* empty is same as not set */
  421.       var = NULL;
  422.   #if defined(OS2) || defined(MSDOS) || defined(MSWIN)
  423. ***************
  424. *** 2331,2341 ****
  425.           }
  426.           else                    /* user directory */
  427.           {
  428. ! #ifndef UNIX
  429. !         /* cannot expand user's home directory, so don't try */
  430. !         var = NULL;
  431. !         tail = (char_u *)"";    /* for gcc */
  432. ! #else
  433.           /*
  434.            * Copy ~user to dst[], so we can put a NUL after it.
  435.            */
  436. --- 2336,2342 ----
  437.           }
  438.           else                    /* user directory */
  439.           {
  440. ! #if defined(UNIX) || (defined(VMS) && defined(USER_HOME))
  441.           /*
  442.            * Copy ~user to dst[], so we can put a NUL after it.
  443.            */
  444. ***************
  445. *** 2348,2361 ****
  446.               && !vim_ispathsep(*tail))
  447.               *var++ = *tail++;
  448.           *var = NUL;
  449.           /*
  450.            * If the system supports getpwnam(), use it.
  451.            * Otherwise, or if getpwnam() fails, the shell is used to
  452.            * expand ~user.  This is slower and may fail if the shell
  453.            * does not support ~user (old versions of /bin/sh).
  454.            */
  455. ! # if defined(HAVE_GETPWNAM) && defined(HAVE_PWD_H)
  456.           {
  457.               struct passwd *pw;
  458.   
  459. --- 2349,2362 ----
  460.               && !vim_ispathsep(*tail))
  461.               *var++ = *tail++;
  462.           *var = NUL;
  463. ! # ifdef UNIX
  464.           /*
  465.            * If the system supports getpwnam(), use it.
  466.            * Otherwise, or if getpwnam() fails, the shell is used to
  467.            * expand ~user.  This is slower and may fail if the shell
  468.            * does not support ~user (old versions of /bin/sh).
  469.            */
  470. ! #  if defined(HAVE_GETPWNAM) && defined(HAVE_PWD_H)
  471.           {
  472.               struct passwd *pw;
  473.   
  474. ***************
  475. *** 2366,2379 ****
  476.               var = NULL;
  477.           }
  478.           if (var == NULL)
  479. ! # endif
  480.           {
  481.               expand_context = EXPAND_FILES;
  482.               var = ExpandOne(dst, NULL, WILD_ADD_SLASH|WILD_SILENT,
  483.                                   WILD_EXPAND_FREE);
  484.               mustfree = TRUE;
  485.           }
  486. ! #endif /* UNIX */
  487.           }
  488.   
  489.           if (var != NULL && *var != NUL &&
  490. --- 2367,2416 ----
  491.               var = NULL;
  492.           }
  493.           if (var == NULL)
  494. ! #  endif
  495.           {
  496.               expand_context = EXPAND_FILES;
  497.               var = ExpandOne(dst, NULL, WILD_ADD_SLASH|WILD_SILENT,
  498.                                   WILD_EXPAND_FREE);
  499.               mustfree = TRUE;
  500.           }
  501. ! # else    /* !UNIX, thus VMS */
  502. !         /*
  503. !          * USER_HOME is a comma-separated list of
  504. !          * directories to search for the user account in.
  505. !          */
  506. !         {
  507. !             char_u    test[MAXPATHL], paths[MAXPATHL];
  508. !             char_u    *path, *next_path, *ptr;
  509. !             struct stat    st;
  510. !             STRCPY(paths, USER_HOME);
  511. !             next_path = paths;
  512. !             while (*next_path)
  513. !             {
  514. !             for (path = next_path; *next_path && *next_path != ',';
  515. !                 next_path++);
  516. !             if (*next_path)
  517. !                 *next_path++ = NUL;
  518. !             STRCPY(test, path);
  519. !             STRCAT(test, "/");
  520. !             STRCAT(test, dst + 1);
  521. !             if (mch_stat(test, &st) == 0)
  522. !             {
  523. !                 var = alloc(STRLEN(test) + 1);
  524. !                 STRCPY(var, test);
  525. !                 mustfree = TRUE;
  526. !                 break;
  527. !             }
  528. !             }
  529. !         }
  530. ! # endif /* UNIX */
  531. ! #else
  532. !         /* cannot expand user's home directory, so don't try */
  533. !         var = NULL;
  534. !         tail = (char_u *)"";    /* for gcc */
  535. ! #endif /* UNIX || VMS */
  536.           }
  537.   
  538.           if (var != NULL && *var != NUL &&
  539. ***************
  540. *** 2699,2705 ****
  541. --- 2736,2748 ----
  542.        */
  543.       if (homedir != NULL)
  544.       dirlen = STRLEN(homedir);
  545. + #ifdef VMS
  546. +     homedir_env = mch_getenv((char_u *)"SYS$LOGIN");
  547. + #else
  548.       homedir_env = mch_getenv((char_u *)"HOME");
  549. + #endif
  550.       if (homedir_env != NULL && *homedir_env == NUL)
  551.       homedir_env = NULL;
  552.       if (homedir_env != NULL)
  553. *** ../vim-5.7a.5/src/os_vms.c    Wed Jun  7 13:08:19 2000
  554. --- src/os_vms.c    Tue Jun 20 12:08:46 2000
  555. ***************
  556. *** 95,104 ****
  557.   static int    get_x11_title __ARGS((int));
  558.   static int    get_x11_icon __ARGS((int));
  559.   static char_u    *oldtitle = NULL;
  560. ! static int      did_set_title = FALSE;
  561.   static char_u    *fixedtitle = (char_u *)"Thanks for flying Vim";
  562.   static char_u    *oldicon = NULL;
  563. ! static int      did_set_icon = FALSE;
  564.   #endif
  565.   
  566.   static void    may_core_dump __ARGS((void));
  567. --- 95,104 ----
  568.   static int    get_x11_title __ARGS((int));
  569.   static int    get_x11_icon __ARGS((int));
  570.   static char_u    *oldtitle = NULL;
  571. ! static int    did_set_title = FALSE;
  572.   static char_u    *fixedtitle = (char_u *)"Thanks for flying Vim";
  573.   static char_u    *oldicon = NULL;
  574. ! static int    did_set_icon = FALSE;
  575.   #endif
  576.   
  577.   static void    may_core_dump __ARGS((void));
  578. ***************
  579. *** 118,124 ****
  580.   static int    do_resize = FALSE;
  581.   static char_u    *extra_shell_arg = NULL;
  582.   static int    show_shell_mess = TRUE;
  583. ! static int      deadly_signal = 0;    /* The signal we caught */
  584.   static TT_MODE    orgmode;
  585.   
  586.   static void    ass_tty(void);
  587. --- 118,124 ----
  588.   static int    do_resize = FALSE;
  589.   static char_u    *extra_shell_arg = NULL;
  590.   static int    show_shell_mess = TRUE;
  591. ! static int    deadly_signal = 0;    /* The signal we caught */
  592.   static TT_MODE    orgmode;
  593.   
  594.   static void    ass_tty(void);
  595. ***************
  596. *** 380,386 ****
  597.      static RETSIGTYPE
  598.   deathtrap SIGDEFARG(sigarg)
  599.   {
  600. !     static int      entered = 0;
  601.   #ifdef SIGHASARG
  602.       int     i;
  603.   
  604. --- 380,386 ----
  605.      static RETSIGTYPE
  606.   deathtrap SIGDEFARG(sigarg)
  607.   {
  608. !     static int        entered = 0;
  609.   #ifdef SIGHASARG
  610.       int     i;
  611.   
  612. ***************
  613. *** 589,595 ****
  614. --- 589,599 ----
  615.       for (i = 0; signal_info[i].sig != -1; i++)
  616.       if (signal_info[i].deadly)
  617.           signal(signal_info[i].sig, func_deadly);
  618. + #ifdef SIG_ERR
  619.       else if (func_other != SIG_ERR)
  620. + #else
  621. +     else if (func_other != BADSIG)
  622. + #endif
  623.           signal(signal_info[i].sig, func_other);
  624.   }
  625.   
  626. ***************
  627. *** 1070,1077 ****
  628. --- 1074,1085 ----
  629.       /* presumably compiled with /decc */
  630.       strcpy((char *)s, (char *)sys_hostname);
  631.   #else
  632. + # ifdef VAXC
  633.       /* presumably compiled with /standard=vaxc */
  634. +     vaxc$gethostname((char *)s, len);
  635. + # else
  636.       gethostname((char *)s, len);
  637. + # endif
  638.   #endif
  639.   }
  640.   
  641. ***************
  642. *** 1259,1265 ****
  643.       void
  644.   mch_windexit(int r)
  645.   {
  646. -     settmode(TMODE_COOK);
  647.       exiting = TRUE;
  648.   
  649.   #ifdef USE_GUI
  650. --- 1267,1272 ----
  651. ***************
  652. *** 1271,1276 ****
  653. --- 1278,1292 ----
  654.   #endif
  655.       stoptermcap();
  656.   
  657. +     /*
  658. +      * A newline is only required after a message in the alternate screen.
  659. +      * This is set to TRUE by wait_return().
  660. +      */
  661. +     if (newline_on_exit || (msg_didout && !swapping_screen()))
  662. +         out_char('\n');
  663. +     else
  664. +         msg_clr_eos();  /* clear the rest of the display */
  665.       /* Cursor may have been switched off without calling starttermcap()
  666.        * when doing "vim -u vimrc" and vimrc contains ":q". */
  667.       if (full_screen)
  668. ***************
  669. *** 1279,1284 ****
  670. --- 1295,1301 ----
  671.       vms_flushbuf();
  672.       ml_close_all(TRUE);            /* remove all memfiles */
  673.       may_core_dump();
  674. +     settmode(TMODE_COOK);
  675.   #ifdef USE_GUI
  676.       if (gui.in_use)
  677.       gui_exit(r);
  678. ***************
  679. *** 1503,1519 ****
  680.   mch_setmouse(int on)
  681.   {
  682.       static int    ison = FALSE;
  683.   
  684.       if (on == ison)        /* return quickly if nothing to do */
  685.       return;
  686. !     if (vim_is_xterm(term_str(KS_NAME)))
  687.       {
  688. !     if (on)
  689. !         OUT_STR_NF((char_u *)"\033[?1000h"); /* xterm: enable mouse events */
  690. !     else
  691. !         OUT_STR_NF((char_u *)"\033[?1000l"); /* xterm: disable mouse events */
  692. !     }
  693.       ison = on;
  694.   }
  695.   
  696.   /*
  697. --- 1520,1551 ----
  698.   mch_setmouse(int on)
  699.   {
  700.       static int    ison = FALSE;
  701. +     int        xterm_mouse_vers;
  702.   
  703.       if (on == ison)        /* return quickly if nothing to do */
  704.       return;
  705. !     xterm_mouse_vers = use_xterm_mouse();
  706. !     if (xterm_mouse_vers > 0)
  707.       {
  708. !       if (on) /* enable mouse events, use mouse tracking if available */
  709. !       out_str_nf((char_u *)
  710. !           (xterm_mouse_vers > 1 ? "\033[?1002h" : "\033[?1000h"));
  711. !       else    /* disable mouse events, could probably always send the same */
  712. !       out_str_nf((char_u *)
  713. !           (xterm_mouse_vers > 1 ? "\033[?1002l" : "\033[?1000l"));
  714. !       ison = on;
  715. !     }
  716. ! #if defined(DEC_MOUSE)
  717. !     else if (use_dec_mouse())
  718. !     {
  719. !       if (on) /* enable mouse events */
  720. !       out_str_nf((char_u *) "\033[1;2'z\033[1;3'{");
  721. !       else    /* disable mouse events */
  722. !       out_str_nf((char_u *) "\033['z");
  723.       ison = on;
  724. +     }
  725. + #endif /* DEC_MOUSE */
  726.   }
  727.   
  728.   /*
  729. ***************
  730. *** 1571,1577 ****
  731.       return 0;
  732.   }
  733.   
  734. ! #endif
  735.   
  736.   /*
  737.    * set screen mode, always fails.
  738. --- 1603,1624 ----
  739.       return 0;
  740.   }
  741.   
  742. ! #if defined(DEC_MOUSE)
  743. ! /*
  744. !  * Return non-zero when using a DEC mouse, according to 'ttymouse'.
  745. !  */
  746. !     int
  747. ! use_dec_mouse()
  748. ! {
  749. !     if (STRNICMP(p_ttym, "dec", 3) == 0)
  750. !     {
  751. !       return 1;
  752. !     }
  753. !     return 0;
  754. ! }
  755. ! #endif /* DEC_MOUSE */
  756. ! #endif /* USE_MOUSE */
  757.   
  758.   /*
  759.    * set screen mode, always fails.
  760. ***************
  761. *** 1708,1725 ****
  762.       static int
  763.   WaitForChar(long msec)
  764.   {
  765. !     if (vim_is_input_buf_empty())
  766.       {
  767.       if (RealWaitForChar(0, msec))
  768.       {
  769.           add_to_input_buf((char_u *)ibuf, 1);
  770.           return 1;
  771.       }
  772.       else
  773.           return 0;
  774.       }
  775. -     else
  776. -     return 1;
  777.   }
  778.   
  779.   /*
  780. --- 1755,1781 ----
  781.       static int
  782.   WaitForChar(long msec)
  783.   {
  784. !     if (!vim_is_input_buf_empty())    /* something in inbuf[] */
  785. !       return 1;
  786. ! #if defined(DEC_MOUSE)
  787. !     /* May need to query the mouse position. */
  788. !     if (WantQueryMouse)
  789.       {
  790. +       WantQueryMouse = 0;
  791. +       mch_write((char_u *)"\033[1'|", 5);
  792. +     }
  793. + #endif
  794.       if (RealWaitForChar(0, msec))
  795.       {
  796.           add_to_input_buf((char_u *)ibuf, 1);
  797.           return 1;
  798.       }
  799.       else
  800. +     {
  801.           return 0;
  802.       }
  803.   }
  804.   
  805.   /*
  806. *** ../vim-5.7a.5/src/os_vms.h    Fri May  5 16:54:28 2000
  807. --- src/os_vms.h    Tue Jun 20 12:11:25 2000
  808. ***************
  809. *** 8,15 ****
  810.   
  811.   #include <stdio.h>
  812.   #include <ctype.h>
  813. ! #include <sys/types.h>
  814. ! #include <sys/stat.h>
  815.   
  816.   #ifdef HAVE_STDLIB_H
  817.   # include <stdlib.h>
  818. --- 8,21 ----
  819.   
  820.   #include <stdio.h>
  821.   #include <ctype.h>
  822. ! #ifdef VAXC
  823. ! # include <types.h>
  824. ! # include <stat.h>
  825. ! #else
  826. ! # include <sys/types.h>
  827. ! # include <sys/stat.h>
  828. ! #endif
  829.   
  830.   #ifdef HAVE_STDLIB_H
  831.   # include <stdlib.h>
  832. ***************
  833. *** 156,172 ****
  834.   # define W_OK 2            /* for systems that don't have W_OK in unistd.h */
  835.   #endif
  836.   
  837.   /*
  838.    * System definitions
  839.    */
  840.   
  841. ! /* Open VMS is case insensitive */
  842. ! #define CASE_INSENSITIVE_FILENAME
  843. ! /* Use binary fileio */
  844. ! #define BINARY_FILE_IO
  845.   
  846. ! /* #define USE_TMPNAM */        /* use tmpnam() instead of mktemp() */
  847.   
  848.   /*
  849.    * system-dependent filenames
  850. --- 162,182 ----
  851.   # define W_OK 2            /* for systems that don't have W_OK in unistd.h */
  852.   #endif
  853.   
  854. + #ifndef R_OK
  855. + # define R_OK 4            /* for systems that don't have R_OK in unistd.h */
  856. + #endif
  857.   /*
  858.    * System definitions
  859.    */
  860.   
  861. ! #define CASE_INSENSITIVE_FILENAME    /* Open VMS is case insensitive */
  862. ! #define SPACE_IN_FILENAME            /* There is space between user and passwd */
  863. ! #define FNAME_ILLEGAL "|*#?%"        /* Illegal characters in a file name */
  864. ! #define BINARY_FILE_IO                /* Use binary fileio */
  865.   
  866. ! /* #define USE_TMPNAM */            /* use tmpnam() instead of mktemp() */
  867.   
  868.   /*
  869.    * system-dependent filenames
  870. ***************
  871. *** 176,193 ****
  872.   # define USR_EXRC_FILE    "sys$login:.exrc"
  873.   #endif
  874.   
  875.   #ifndef USR_VIMRC_FILE
  876.   # define USR_VIMRC_FILE    "sys$login:.vimrc"
  877.   #endif
  878.   
  879. ! #ifndef SYS_VIMRC_FILE
  880. ! # define SYS_VIMRC_FILE    "$VIM/vimrc"
  881.   #endif
  882.   
  883.   #ifdef USE_GUI
  884.   # ifndef USR_GVIMRC_FILE
  885.   #  define USR_GVIMRC_FILE    "sys$login:.gvimrc"
  886.   # endif
  887.   #endif
  888.   
  889.   #ifdef USE_GUI
  890. --- 186,214 ----
  891.   # define USR_EXRC_FILE    "sys$login:.exrc"
  892.   #endif
  893.   
  894. + #ifndef USR_EXRC_FILE2
  895. + # define USR_EXRC_FILE2  "sys$login:_exrc"
  896. + #endif
  897.   #ifndef USR_VIMRC_FILE
  898.   # define USR_VIMRC_FILE    "sys$login:.vimrc"
  899.   #endif
  900.   
  901. ! #ifndef USR_VIMRC_FILE2
  902. ! # define USR_VIMRC_FILE2 "sys$login:_vimrc"
  903.   #endif
  904.   
  905.   #ifdef USE_GUI
  906.   # ifndef USR_GVIMRC_FILE
  907.   #  define USR_GVIMRC_FILE    "sys$login:.gvimrc"
  908.   # endif
  909. + # ifndef USR_GVIMRC_FILE2
  910. + #  define USR_GVIMRC_FILE2   "sys$login:_gvimrc"
  911. + # endif
  912. + #endif
  913. + #ifndef SYS_VIMRC_FILE
  914. + # define SYS_VIMRC_FILE "$VIM/vimrc"
  915.   #endif
  916.   
  917.   #ifdef USE_GUI
  918. ***************
  919. *** 231,246 ****
  920.   
  921.   #ifdef VIMINFO
  922.   # ifndef VIMINFO_FILE
  923. ! #  define VIMINFO_FILE    "sys$login:.viminfo"
  924.   # endif
  925.   #endif /* VIMINFO */
  926.   
  927.   #ifndef DEF_BDIR
  928. ! # define DEF_BDIR        "./,tmp:,sys$login:"    /* default for 'backupdir' */
  929.   #endif
  930.   
  931.   #ifndef DEF_DIR
  932. ! # define DEF_DIR        "./,tmp:,sys$login:"    /* default for 'directory' */
  933.   #endif
  934.   
  935.   #define TEMPNAME        "tmp:v?XXXXXX.txt"
  936. --- 252,279 ----
  937.   
  938.   #ifdef VIMINFO
  939.   # ifndef VIMINFO_FILE
  940. ! #  define VIMINFO_FILE        "sys$login:.viminfo"
  941. ! # endif
  942. ! # ifndef VIMINFO_FILE2
  943. ! #  define VIMINFO_FILE2        "sys$login:_viminfo"
  944.   # endif
  945.   #endif /* VIMINFO */
  946.   
  947. + /*
  948. + * This should contain a comma-separated list of all the user account base
  949. + * directories on your system.  For instance, if accounts are found in
  950. + * USER:[000000] and USER2:[000000], define USER_HOME as follows:
  951. + */
  952. + #ifndef USER_HOME
  953. + # define USER_HOME    "/user,/user2"
  954. + #endif
  955.   #ifndef DEF_BDIR
  956. ! # define DEF_BDIR        "./,sys$login:,tmp:"    /* default for 'backupdir' */
  957.   #endif
  958.   
  959.   #ifndef DEF_DIR
  960. ! # define DEF_DIR        "./,sys$login:,tmp:"    /* default for 'directory' */
  961.   #endif
  962.   
  963.   #define TEMPNAME        "tmp:v?XXXXXX.txt"
  964. ***************
  965. *** 249,256 ****
  966.   #define CMDBUFFSIZE    1024    /* size of the command processing buffer */
  967.   #define MAXPATHL    1024    /* VMS has long paths and plenty of memory */
  968.   
  969. ! #define CHECK_INODE             /* used when checking if a swap file already
  970. !                                 exists for a file */
  971.   
  972.   #ifndef MAXMEM
  973.   # define MAXMEM            512            /* use up to 512Kbyte for buffer */
  974. --- 282,289 ----
  975.   #define CMDBUFFSIZE    1024    /* size of the command processing buffer */
  976.   #define MAXPATHL    1024    /* VMS has long paths and plenty of memory */
  977.   
  978. ! #define CHECK_INODE            /* used when checking if a swap file already
  979. !                                exists for a file */
  980.   
  981.   #ifndef MAXMEM
  982.   # define MAXMEM            512            /* use up to 512Kbyte for buffer */
  983. ***************
  984. *** 282,288 ****
  985.   #define mch_rename(src, dst) rename(src, dst)
  986.   #define mch_chdir(s) chdir(vms_fixfilename(s))
  987.   
  988. ! /* modifications by C Campbell */
  989. ! typedef     struct dsc$descriptor   DESC;
  990.   #define ERRORFILE   "errors.err"
  991.   #define MAKEEF    "tmp:vim##.err"        /* user must assign tmp: */
  992. --- 315,320 ----
  993.   #define mch_rename(src, dst) rename(src, dst)
  994.   #define mch_chdir(s) chdir(vms_fixfilename(s))
  995.   
  996. ! typedef struct dsc$descriptor   DESC;
  997.   #define ERRORFILE   "errors.err"
  998.   #define MAKEEF    "tmp:vim##.err"        /* user must assign tmp: */
  999. *** ../vim-5.7a.5/src/os_vms.mms    Fri May  5 18:22:34 2000
  1000. --- src/os_vms.mms    Tue Jun 20 12:15:50 2000
  1001. ***************
  1002. *** 2,9 ****
  1003.   # Makefile for Vim on OpenVMS
  1004.   #
  1005.   # Maintainer:   Zoltan Arpadffy <arpadffy@altavista.net>
  1006. ! # Last change:  2000 May 5
  1007. ! # 
  1008.   # This has been tested on VMS 6.2 to 7.1 on DEC Alpha and VAX.
  1009.   # The following will be built:
  1010.   #    vim.exe:    standard
  1011. --- 2,9 ----
  1012.   # Makefile for Vim on OpenVMS
  1013.   #
  1014.   # Maintainer:   Zoltan Arpadffy <arpadffy@altavista.net>
  1015. ! # Last change:  2000 Apr 7
  1016. ! #
  1017.   # This has been tested on VMS 6.2 to 7.1 on DEC Alpha and VAX.
  1018.   # The following will be built:
  1019.   #    vim.exe:    standard
  1020. ***************
  1021. *** 22,34 ****
  1022.   ######################################################################
  1023.   # Configuration section.
  1024.   ######################################################################
  1025.   # Comment out if you want just the character terminal mode only.
  1026.   GUI = YES
  1027.   
  1028.   ######################################################################
  1029.   # Comment out if you want the compiler version with :ver command.
  1030. ! # NOTE: This part can make some complications if you're using some 
  1031.   # predefined symbols/flags for your compiler. If does, just leave behind
  1032.   # the comment varialbe CCVER.
  1033.   ######################################################################
  1034. --- 22,41 ----
  1035.   ######################################################################
  1036.   # Configuration section.
  1037.   ######################################################################
  1038. ! # GUI or terminal mode executable.
  1039.   # Comment out if you want just the character terminal mode only.
  1040. + ######################################################################
  1041.   GUI = YES
  1042.   
  1043. + #####################################################################
  1044. + # Compiler selection.
  1045. + # Comment out if you use the VAXC compiler
  1046. + ######################################################################
  1047. + DECC = YES
  1048.   ######################################################################
  1049.   # Comment out if you want the compiler version with :ver command.
  1050. ! # NOTE: This part can make some complications if you're using some
  1051.   # predefined symbols/flags for your compiler. If does, just leave behind
  1052.   # the comment varialbe CCVER.
  1053.   ######################################################################
  1054. ***************
  1055. *** 55,73 ****
  1056.   # VIM_SNIFF  = YES
  1057.   # VIM_PYTHON = YES
  1058.   
  1059.   .IFDEF GUI
  1060.   ######################################################################
  1061.   # X/Motif executable  (also works in terminal mode )
  1062.   ######################################################################
  1063. ! DEFS     = "HAVE_CONFIG_H","USE_GUI_MOTIF"
  1064.   LIBS     = ,OS_VMS.OPT/OPT
  1065.   CONFIG_H = gui_vms_conf.h
  1066.   GUI_SRC  = gui.c gui_motif.c gui_x11.c
  1067.   GUI_OBJ  = gui.obj gui_motif.obj gui_x11.obj
  1068.   GUI_INC  = gui.h
  1069.   
  1070. - # These may need to be defined if things are not in standard locations:
  1071.   # GUI_INC_DIR = decw$include:
  1072.   # GUI_LIB_DIR = sys$library:
  1073.   # X_LIB_DIR   =
  1074. --- 62,85 ----
  1075.   # VIM_SNIFF  = YES
  1076.   # VIM_PYTHON = YES
  1077.   
  1078. + ######################################################################
  1079. + # Library and include files configuration section.
  1080. + #
  1081. + # Normally you need not to change anything below.
  1082. + # These may need to be defined if things are not in standard locations
  1083. + ######################################################################
  1084.   .IFDEF GUI
  1085.   ######################################################################
  1086.   # X/Motif executable  (also works in terminal mode )
  1087.   ######################################################################
  1088. ! DEFS     = "HAVE_CONFIG_H","USE_GUI_MOTIF"
  1089.   LIBS     = ,OS_VMS.OPT/OPT
  1090.   CONFIG_H = gui_vms_conf.h
  1091.   GUI_SRC  = gui.c gui_motif.c gui_x11.c
  1092.   GUI_OBJ  = gui.obj gui_motif.obj gui_x11.obj
  1093.   GUI_INC  = gui.h
  1094.   
  1095.   # GUI_INC_DIR = decw$include:
  1096.   # GUI_LIB_DIR = sys$library:
  1097.   # X_LIB_DIR   =
  1098. ***************
  1099. *** 78,84 ****
  1100.   ######################################################################
  1101.   # Character terminal only executable
  1102.   ######################################################################
  1103. ! DEFS     = "HAVE_CONFIG_H"
  1104.   LIBS     =
  1105.   CONFIG_H = os_vms_conf.h
  1106.   .ENDIF
  1107. --- 90,96 ----
  1108.   ######################################################################
  1109.   # Character terminal only executable
  1110.   ######################################################################
  1111. ! DEFS     = "HAVE_CONFIG_H"
  1112.   LIBS     =
  1113.   CONFIG_H = os_vms_conf.h
  1114.   .ENDIF
  1115. ***************
  1116. *** 90,101 ****
  1117.   PERL_DEF = ,"HAVE_PERL_INTERP"
  1118.   PERL_SRC = if_perlsfio.c if_perl.xs
  1119.   PERL_OBJ = if_perlsfio.obj if_perl.obj
  1120. ! PERL_LIB = 
  1121.   .ENDIF
  1122.   
  1123.   .IFDEF VIM_PYTHON
  1124.   ######################################################################
  1125. ! # Python related setup. 
  1126.   ######################################################################
  1127.   PYTHON_DEF = ,"HAVE_PYTHON"
  1128.   PYTHON_SRC = if_python.c
  1129. --- 102,113 ----
  1130.   PERL_DEF = ,"HAVE_PERL_INTERP"
  1131.   PERL_SRC = if_perlsfio.c if_perl.xs
  1132.   PERL_OBJ = if_perlsfio.obj if_perl.obj
  1133. ! PERL_LIB =
  1134.   .ENDIF
  1135.   
  1136.   .IFDEF VIM_PYTHON
  1137.   ######################################################################
  1138. ! # Python related setup.
  1139.   ######################################################################
  1140.   PYTHON_DEF = ,"HAVE_PYTHON"
  1141.   PYTHON_SRC = if_python.c
  1142. ***************
  1143. *** 105,111 ****
  1144.   
  1145.   .IFDEF VIM_TCL
  1146.   ######################################################################
  1147. ! # TCL related setup. 
  1148.   ######################################################################
  1149.   TCL_DEF = ,"HAVE_TCL"
  1150.   TCL_SRC = if_tcl.c
  1151. --- 117,123 ----
  1152.   
  1153.   .IFDEF VIM_TCL
  1154.   ######################################################################
  1155. ! # TCL related setup.
  1156.   ######################################################################
  1157.   TCL_DEF = ,"HAVE_TCL"
  1158.   TCL_SRC = if_tcl.c
  1159. ***************
  1160. *** 115,126 ****
  1161.   
  1162.   .IFDEF VIM_SNIFF
  1163.   ######################################################################
  1164. ! # SNIFF related setup. 
  1165.   ######################################################################
  1166.   SNIFF_DEF = ,"USE_SNIFF"
  1167.   SNIFF_SRC = if_sniff.c
  1168.   SNIFF_OBJ = if_sniff.obj
  1169. ! SNIFF_LIB = 
  1170.   .ENDIF
  1171.   
  1172.   ######################################################################
  1173. --- 127,138 ----
  1174.   
  1175.   .IFDEF VIM_SNIFF
  1176.   ######################################################################
  1177. ! # SNIFF related setup.
  1178.   ######################################################################
  1179.   SNIFF_DEF = ,"USE_SNIFF"
  1180.   SNIFF_SRC = if_sniff.c
  1181.   SNIFF_OBJ = if_sniff.obj
  1182. ! SNIFF_LIB =
  1183.   .ENDIF
  1184.   
  1185.   ######################################################################
  1186. ***************
  1187. *** 130,157 ****
  1188.   ######################################################################
  1189.   
  1190.   CC      = cc
  1191.   CC_DEF    = $(CC)/decc
  1192.   LD_DEF    = link
  1193.   
  1194.   .IFDEF DEBUG
  1195.   TARGET  = dvim.exe
  1196. ! CFLAGS    = /debug/noopt/prefix=all/include=[.proto]
  1197.   LDFLAGS    = /debug
  1198.   .ELSE
  1199.   TARGET  = vim.exe
  1200. ! CFLAGS    = /opt/prefix=all/include=[.proto]
  1201.   LDFLAGS    =
  1202.   .ENDIF
  1203.   
  1204. ! ### These go into pathdef.c
  1205.   VIMLOC  = ""
  1206.   VIMRUN  = ""
  1207.   VIMUSER = "''f$extract(f$locate(",",f$user())+1,f$length(f$user())-f$locate(",",f$user())-2,f$user())'"
  1208.   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")')"
  1209. !     
  1210. ! ###
  1211. ! ### GRAPHICAL USER INTERFACE (GUI).
  1212.   
  1213.   .SUFFIXES : .obj .c .pro .xs
  1214.   
  1215. --- 142,178 ----
  1216.   ######################################################################
  1217.   
  1218.   CC      = cc
  1219. + .IFDEF DECC
  1220.   CC_DEF    = $(CC)/decc
  1221. + PREFIX  = /prefix=all
  1222. + .ELSE
  1223. + CC_DEF  = $(CC)
  1224. + PREFIX  =
  1225. + CCVER   =
  1226. + .ENDIF
  1227.   LD_DEF    = link
  1228.   
  1229.   .IFDEF DEBUG
  1230.   TARGET  = dvim.exe
  1231. ! CFLAGS    = /debug/noopt$(PREFIX)/include=[.proto]
  1232.   LDFLAGS    = /debug
  1233.   .ELSE
  1234.   TARGET  = vim.exe
  1235. ! CFLAGS    = /opt$(PREFIX)/include=[.proto]
  1236.   LDFLAGS    =
  1237.   .ENDIF
  1238.   
  1239. ! ########################################################################
  1240. ! # These go into pathdef.c
  1241. ! ########################################################################
  1242.   VIMLOC  = ""
  1243.   VIMRUN  = ""
  1244.   VIMUSER = "''f$extract(f$locate(",",f$user())+1,f$length(f$user())-f$locate(",",f$user())-2,f$user())'"
  1245.   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")')"
  1246. ! ########################################################################
  1247.   
  1248.   .SUFFIXES : .obj .c .pro .xs
  1249.   
  1250. ***************
  1251. *** 218,252 ****
  1252.       $(CC_DEF) $(ALL_CFLAGS) $<
  1253.   
  1254.   
  1255. ! .IFDEF CCVER
  1256. ! #########################################################################
  1257. ! # This part can make come complications if you're using some predefined
  1258. ! # symbols/flags for your compiler. If does, just comment out _CCVER_ variable
  1259. ! ##########################################################################
  1260. ! pathdef.c : $(CONFIG_H)
  1261. !     -@ define sys$output cc_ver.tmp
  1262. !     -@ $(CC)/version
  1263. !     -@ deass sys$output
  1264. !     -@ open/read file cc_ver.tmp
  1265. !     -@ read file CC_VERSION
  1266. !     -@ close file
  1267. !     -@ del cc_ver.tmp.*
  1268. !     -@ write sys$output "creating pathdef.c (CCVER = YES)"
  1269. !     -@ open/write pd pathdef.c
  1270. !     -@ write pd "/* pathdef.c -- DO NOT EDIT! */"
  1271. !     -@ write pd "/* This file is automatically created by os_vms.mms"
  1272. !     -@ write pd " * Change the file os_vms.mms only. */"
  1273. !     -@ write pd "#include ""vim.h"""
  1274. !     -@ write pd "char_u *default_vim_dir = (char_u *)"$(VIMLOC)";"
  1275. !     -@ write pd "char_u *default_vimruntime_dir = (char_u *)"$(VIMRUN)";"
  1276. !     -@ write pd "char_u *all_cflags = (char_u *)""$(CC_DEF) /incl=[] $(ALL_CFLAGS)\nCompiler: ''CC_VERSION'"";"
  1277. !     -@ write pd "char_u *all_lflags = (char_u *)""$(LD_DEF) $(LDFLAGS) /exe=$(TARGET) $+ $(ALL_LIBS)"";"
  1278. !     -@ write pd "char_u *compiled_user = (char_u *) "$(VIMUSER)";" 
  1279. !     -@ write pd "char_u *compiled_sys = (char_u *) "$(VIMHOST)";"
  1280. !     -@ close pd
  1281. ! .ELSE
  1282. ! pathdef.c : $(CONFIG_H)
  1283.       -@ write sys$output "creating pathdef.c"
  1284.       -@ open/write pd pathdef.c
  1285.       -@ write pd "/* pathdef.c -- DO NOT EDIT! */"
  1286. --- 239,245 ----
  1287.       $(CC_DEF) $(ALL_CFLAGS) $<
  1288.   
  1289.   
  1290. ! pathdef.c : check_ccver $(CONFIG_H)
  1291.       -@ write sys$output "creating pathdef.c"
  1292.       -@ open/write pd pathdef.c
  1293.       -@ write pd "/* pathdef.c -- DO NOT EDIT! */"
  1294. ***************
  1295. *** 256,266 ****
  1296.       -@ write pd "char_u *default_vim_dir = (char_u *)"$(VIMLOC)";"
  1297.       -@ write pd "char_u *default_vimruntime_dir = (char_u *)"$(VIMRUN)";"
  1298.       -@ write pd "char_u *all_cflags = (char_u *)""$(CC_DEF) /incl=[] $(ALL_CFLAGS)"";"
  1299. !     -@ write pd "char_u *all_lflags = (char_u *)""$(LD_DEF) $(LDFLAGS) /exe=$(TARGET) $+ $(ALL_LIBS)"";"
  1300.       -@ write pd "char_u *compiled_user = (char_u *) "$(VIMUSER)";"
  1301.       -@ write pd "char_u *compiled_sys = (char_u *) "$(VIMHOST)";"
  1302.       -@ close pd
  1303. - .ENDIF
  1304.   
  1305.   os_vms.mms :
  1306.       @ write sys$output "The name of the makefile MUST be <OS_VMS.MMS> !!!!"
  1307. --- 249,259 ----
  1308.       -@ write pd "char_u *default_vim_dir = (char_u *)"$(VIMLOC)";"
  1309.       -@ write pd "char_u *default_vimruntime_dir = (char_u *)"$(VIMRUN)";"
  1310.       -@ write pd "char_u *all_cflags = (char_u *)""$(CC_DEF) /incl=[] $(ALL_CFLAGS)"";"
  1311. !     -@ write pd "char_u *all_lflags = (char_u *)""$(LD_DEF) $(LDFLAGS) /exe=$(TARGET) *.obj $(ALL_LIBS)"";"
  1312. !     -@ write pd "char_u *compiler_version = (char_u *) ""''CC_VER'"";"
  1313.       -@ write pd "char_u *compiled_user = (char_u *) "$(VIMUSER)";"
  1314.       -@ write pd "char_u *compiled_sys = (char_u *) "$(VIMHOST)";"
  1315.       -@ close pd
  1316.   
  1317.   os_vms.mms :
  1318.       @ write sys$output "The name of the makefile MUST be <OS_VMS.MMS> !!!!"
  1319. ***************
  1320. *** 369,375 ****
  1321.   if_perlsfio.obj : if_perlsfio.c vim.h config.h feature.h os_unix.h osdef.h ascii.h keymap.h \
  1322.       term.h macros.h regexp.h structs.h gui.h globals.h farsi.h option.h ex_cmds.h proto.h
  1323.       $(CC_DEF) $(ALL_CFLAGS) $<
  1324. ! if_python.obj : if_python.c vim.h config.h feature.h os_unix.h osdef.h ascii.h keymap.h \ 
  1325.       term.h macros.h regexp.h structs.h gui.h globals.h farsi.h option.h ex_cmds.h proto.h
  1326.       $(CC_DEF) $(ALL_CFLAGS) $<
  1327.   if_tcl.obj : if_tcl.c vim.h config.h feature.h os_unix.h osdef.h ascii.h keymap.h term.h \
  1328. --- 362,368 ----
  1329.   if_perlsfio.obj : if_perlsfio.c vim.h config.h feature.h os_unix.h osdef.h ascii.h keymap.h \
  1330.       term.h macros.h regexp.h structs.h gui.h globals.h farsi.h option.h ex_cmds.h proto.h
  1331.       $(CC_DEF) $(ALL_CFLAGS) $<
  1332. ! if_python.obj : if_python.c vim.h config.h feature.h os_unix.h osdef.h ascii.h keymap.h \
  1333.       term.h macros.h regexp.h structs.h gui.h globals.h farsi.h option.h ex_cmds.h proto.h
  1334.       $(CC_DEF) $(ALL_CFLAGS) $<
  1335.   if_tcl.obj : if_tcl.c vim.h config.h feature.h os_unix.h osdef.h ascii.h keymap.h term.h \
  1336. ***************
  1337. *** 437,439 ****
  1338. --- 430,450 ----
  1339.   mms_vim.obj :    os_vms_mms.c
  1340.       $(CC_DEF) $(CFLAGS) os_vms_mms.c
  1341.       copy os_vms_mms.obj mms_vim.obj
  1342. + .IFDEF CCVER
  1343. + #########################################################################
  1344. + # This part can make come complications if you're using some predefined
  1345. + # symbols/flags for your compiler. If does, just comment out CCVER variable
  1346. + ##########################################################################
  1347. + check_ccver :
  1348. +     -@ define sys$output cc_ver.tmp
  1349. +     -@ $(CC)/version
  1350. +     -@ deass sys$output
  1351. +     -@ open/read file cc_ver.tmp
  1352. +     -@ read file CC_VER
  1353. +     -@ close file
  1354. +     -@ del cc_ver.tmp.*
  1355. + .ELSE
  1356. + check_ccver :
  1357. +     -@ !
  1358. + .ENDIF
  1359. *** ../vim-5.7a.5/src/os_vms_conf.h    Wed Jun  7 13:02:34 2000
  1360. --- src/os_vms_conf.h    Tue Jun 20 12:17:06 2000
  1361. ***************
  1362. *** 44,49 ****
  1363. --- 44,52 ----
  1364.   #define USEMEMMOVE 1
  1365.   /* #undef USEMEMCPY */
  1366.   
  1367. + /* Define when "man -s 2" is to be used */
  1368. + /* #undef USEMAN_S */
  1369.   /* Define to empty if the keyword does not work.  */
  1370.   /* #undef const */
  1371.   
  1372. ***************
  1373. *** 65,70 ****
  1374. --- 68,76 ----
  1375.   /* Define to `int' if <sys/types.h> doesn't define.  */
  1376.   /* #undef gid_t */
  1377.   
  1378. + /* Define to `long' if <sys/types.h> doesn't define.  */
  1379. + /* #undef ino_t */
  1380.   /* Define if you can safely include both <sys/time.h> and <time.h>.  */
  1381.   #define TIME_WITH_SYS_TIME 1
  1382.   
  1383. ***************
  1384. *** 77,82 ****
  1385. --- 83,91 ----
  1386.   /* Define as the command at the end of signal handlers ("" or "return 0;").  */
  1387.   #define SIGRETURN return
  1388.   
  1389. + /* Define if struct sigcontext is present */
  1390. + #define HAVE_SIGCONTEXT 1
  1391.   /* Define if touuper/tolower only work on lower/upercase characters */
  1392.   /* #undef BROKEN_TOUPPER */
  1393.   
  1394. ***************
  1395. *** 104,109 ****
  1396. --- 113,121 ----
  1397.   /* Define if you have the memset() function.  */
  1398.   #define HAVE_MEMSET 1
  1399.   
  1400. + /* Define if you have the memcmp() function.  */
  1401. + #define HAVE_MEMCMP 1
  1402.   /* Define if you have the strerror() function.  */
  1403.   #define HAVE_STRERROR 1
  1404.   
  1405. ***************
  1406. *** 131,136 ****
  1407. --- 143,172 ----
  1408.   /* Define if you have the getpwnam() function. */
  1409.   #define HAVE_GETPWNAM 1
  1410.   
  1411. + /* Define if you have the nanosleep() function.  */
  1412. + /* #undef HAVE_NANOSLEEP */
  1413. + /* Define if you have the opendir() function. */
  1414. + /* #undef HAVE_OPENDIR */
  1415. + /* Define if you have the qsort() function. */
  1416. + #define HAVE_QSORT 1
  1417. + /* Define if you have the select() function.  */
  1418. + #define HAVE_SELECT 1
  1419. + /* Define if you have the setpgid() function.  */
  1420. + /* #undef HAVE_SETPGID */
  1421. + /* Define if you have the setsid() function.  */
  1422. + /* #undef HAVE_SETSID */
  1423. + /* Define if you have the sigset() function.  */
  1424. + /* #undef HAVE_SIGSET */
  1425. + /* Define if you have the strcasecmp() function.  */
  1426. + /* #undef HAVE_STRCASECMP */
  1427.   #undef    HAVE_DIRENT_H
  1428.   #undef    HAVE_SYS_NDIR_H
  1429.   #undef    HAVE_SYS_DIR_H
  1430. ***************
  1431. *** 147,158 ****
  1432.   #undef    HAVE_SYS_SELECT_H
  1433.   #undef    HAVE_SYS_UTSNAME_H
  1434.   #undef    HAVE_TERMCAP_H
  1435. ! #define    HAVE_FCNTL_H        1
  1436.   #undef    HAVE_SGTTY_H
  1437.   #undef    HAVE_SYS_IOCTL_H
  1438.   #define    HAVE_SYS_TIME_H        1
  1439.   #undef    HAVE_TERMIO_H
  1440. - #define    HAVE_UNISTD_H        1
  1441.   #undef    HAVE_STROPTS_H
  1442.   #define    HAVE_ERRNO_H        1
  1443.   #undef    HAVE_STRINGS_H
  1444. --- 183,199 ----
  1445.   #undef    HAVE_SYS_SELECT_H
  1446.   #undef    HAVE_SYS_UTSNAME_H
  1447.   #undef    HAVE_TERMCAP_H
  1448. ! #ifdef  VAXC
  1449. ! #undef HAVE_FCNTL_H
  1450. ! #undef HAVE_UNISTD_H
  1451. ! #else
  1452. ! #define HAVE_FCNTL_H        1
  1453. ! #define HAVE_UNISTD_H        1
  1454. ! #endif
  1455.   #undef    HAVE_SGTTY_H
  1456.   #undef    HAVE_SYS_IOCTL_H
  1457.   #define    HAVE_SYS_TIME_H        1
  1458.   #undef    HAVE_TERMIO_H
  1459.   #undef    HAVE_STROPTS_H
  1460.   #define    HAVE_ERRNO_H        1
  1461.   #undef    HAVE_STRINGS_H
  1462. *** ../vim-5.7a.5/src/proto/os_vms.pro    Sat Jun 10 11:56:12 2000
  1463. --- src/proto/os_vms.pro    Tue Jun 20 12:18:33 2000
  1464. ***************
  1465. *** 35,40 ****
  1466. --- 35,41 ----
  1467.   void mch_setmouse __ARGS((int on));
  1468.   void check_mouse_termcode __ARGS((void));
  1469.   int use_xterm_mouse __ARGS((void));
  1470. + int use_dec_mouse __ARGS((void));
  1471.   int mch_screenmode __ARGS((char_u *arg));
  1472.   int mch_get_winsize __ARGS((void));
  1473.   void mch_set_winsize __ARGS((void));
  1474. *** ../vim-5.7a.5/src/proto/version.pro    Sat Jun 10 11:55:47 2000
  1475. --- src/proto/version.pro    Tue Jun 20 20:42:48 2000
  1476. ***************
  1477. *** 1,4 ****
  1478. --- 1,5 ----
  1479.   /* version.c */
  1480. + void make_version __ARGS((void));
  1481.   int highest_patch __ARGS((void));
  1482.   void do_version __ARGS((char_u *arg));
  1483.   void list_version __ARGS((void));
  1484. *** ../vim-5.7a.5/src/term.c    Wed Jun  7 14:45:03 2000
  1485. --- src/term.c    Tue Jun 20 12:22:20 2000
  1486. ***************
  1487. *** 2884,2896 ****
  1488.        */
  1489.       if (tmode != TMODE_COOK || cur_tmode != TMODE_COOK)
  1490.       {
  1491.           out_flush();
  1492.           mch_settmode(tmode);    /* machine specific function */
  1493.           cur_tmode = tmode;
  1494.   #ifdef USE_MOUSE
  1495. !         if (tmode != TMODE_RAW)
  1496. !         mch_setmouse(FALSE);        /* switch mouse off */
  1497. !         else
  1498.           setmouse();            /* may switch mouse on */
  1499.   #endif
  1500.           out_flush();
  1501. --- 2884,2898 ----
  1502.        */
  1503.       if (tmode != TMODE_COOK || cur_tmode != TMODE_COOK)
  1504.       {
  1505. + #ifdef USE_MOUSE
  1506. +         if (tmode != TMODE_RAW)
  1507. +         mch_setmouse(FALSE);        /* switch mouse off */
  1508. + #endif
  1509.           out_flush();
  1510.           mch_settmode(tmode);    /* machine specific function */
  1511.           cur_tmode = tmode;
  1512.   #ifdef USE_MOUSE
  1513. !         if (tmode == TMODE_RAW)
  1514.           setmouse();            /* may switch mouse on */
  1515.   #endif
  1516.           out_flush();
  1517. *** ../vim-5.7a.5/src/version.c    Tue Jun 20 16:04:00 2000
  1518. --- src/version.c    Tue Jun 20 21:20:17 2000
  1519. ***************
  1520. *** 23,30 ****
  1521.   
  1522.   char    *Version = VIM_VERSION_SHORT;
  1523.   char    *mediumVersion = VIM_VERSION_MEDIUM;
  1524. ! #ifdef HAVE_DATE_TIME
  1525.   char    *longVersion = VIM_VERSION_LONG_DATE __DATE__ " " __TIME__ ")";
  1526.   #else
  1527.   char    *longVersion = VIM_VERSION_LONG;
  1528.   #endif
  1529. --- 23,49 ----
  1530.   
  1531.   char    *Version = VIM_VERSION_SHORT;
  1532.   char    *mediumVersion = VIM_VERSION_MEDIUM;
  1533. ! #if defined(HAVE_DATE_TIME) || defined(PROTO)
  1534. ! # if (defined(VMS) && defined(VAXC)) || defined(PROTO)
  1535. ! char    longVersion[sizeof(VIM_VERSION_LONG_DATE) + sizeof(__DATE__)
  1536. !                               + sizeof(__TIME__) + 3];
  1537. !     void
  1538. ! make_version()
  1539. ! {
  1540. !     /*
  1541. !      * Construct the long version string.  Necessary because
  1542. !      * VAX C can't catenate strings in the preprocessor.
  1543. !      */
  1544. !     strcpy(longVersion, VIM_VERSION_LONG_DATE);
  1545. !     strcat(longVersion, __DATE__);
  1546. !     strcat(longVersion, " ");
  1547. !     strcat(longVersion, __TIME__);
  1548. !     strcat(longVersion, ")");
  1549. ! }
  1550. ! # else
  1551.   char    *longVersion = VIM_VERSION_LONG_DATE __DATE__ " " __TIME__ ")";
  1552. + # endif
  1553.   #else
  1554.   char    *longVersion = VIM_VERSION_LONG;
  1555.   #endif
  1556. ***************
  1557. *** 420,421 ****
  1558. --- 439,442 ----
  1559.   {   /* Add new patch number below this line */
  1560. + /**/
  1561. +     6,
  1562.   /**/
  1563. ***************
  1564. *** 502,507 ****
  1565. --- 523,531 ----
  1566.   #ifdef RISCOS
  1567.       MSG_PUTS("\nRISC OS version");
  1568.   #endif
  1569. + #ifdef VMS
  1570. +     MSG_PUTS("\nOpenVMS version");
  1571. + #endif
  1572.   
  1573.       /* Print the list of patch numbers if there is at least one. */
  1574.       /* Print a range when patches are consecutive: "1-10, 12, 15-40, 42-45" */
  1575. ***************
  1576. *** 532,545 ****
  1577.       }
  1578.   
  1579.   #if defined(UNIX) || defined(VMS)
  1580. !     MSG_PUTS("\nCompiled by ");
  1581. !     MSG_PUTS(compiled_user);
  1582. !     MSG_PUTS("@");
  1583. !     MSG_PUTS(compiled_sys);
  1584. !     MSG_PUTS(", with (+) or without (-):\n");
  1585. ! #else
  1586. !     MSG_PUTS("\nCompiled with (+) or without (-):\n");
  1587.   #endif
  1588.   
  1589.       /* print all the features */
  1590.       for (i = 0; features[i] != NULL; ++i)
  1591. --- 556,575 ----
  1592.       }
  1593.   
  1594.   #if defined(UNIX) || defined(VMS)
  1595. !     if (*compiled_user != NUL)
  1596. !     {
  1597. !     MSG_PUTS("\nCompiled by ");
  1598. !     MSG_PUTS(compiled_user);
  1599. !     if (*compiled_sys != NUL)
  1600. !     {
  1601. !         MSG_PUTS("@");
  1602. !         MSG_PUTS(compiled_sys);
  1603. !     }
  1604. !     MSG_PUTS(", with (+) or without (-):\n");
  1605. !     }
  1606. !     else
  1607.   #endif
  1608. +     MSG_PUTS("\nCompiled with (+) or without (-):\n");
  1609.   
  1610.       /* print all the features */
  1611.       for (i = 0; features[i] != NULL; ++i)
  1612. ***************
  1613. *** 623,628 ****
  1614. --- 653,666 ----
  1615.       version_msg("Compilation: ");
  1616.       version_msg((char *)all_cflags);
  1617.       msg_putchar('\n');
  1618. + #ifdef VMS
  1619. +     if (*compiler_version != NUL)
  1620. +     {
  1621. +     version_msg("Compiler: ");
  1622. +     version_msg((char *)compiler_version);
  1623. +     msg_putchar('\n');
  1624. +     }
  1625. + #endif
  1626.       version_msg("Linking: ");
  1627.       version_msg((char *)all_lflags);
  1628.   #endif
  1629. *** ../vim-5.7a.5/src/xxd/os_vms.mms    Fri Jun 11 21:48:12 1999
  1630. --- src/xxd/os_vms.mms    Tue Jun 20 12:29:30 2000
  1631. ***************
  1632. *** 1,20 ****
  1633. ! # The most simplistic Makefile for VMS
  1634. ! CC    = cc/decc
  1635. ! LD    = link
  1636. ! CFLAGS    = /opt/prefix=all
  1637. ! LDFLAGS    =
  1638. ! LIBS    =
  1639.   
  1640.   SOURCES    = xxd.c
  1641. ! OBJ = xxd.obj
  1642.   
  1643. ! xxd.exe : $(OBJ)
  1644. !     $(LD) $(LDFLAGS) /exe=xxd.exe $+
  1645.   
  1646. ! xxd.obj : xxd.c
  1647. !     $(CC) $(CFLAGS) $<
  1648.   
  1649. - # Clean
  1650.   clean :
  1651.       del *.obj;*
  1652.       del *.exe;*
  1653. --- 1,69 ----
  1654. ! # VMS MM[KS] makefile for XXD
  1655. ! # tested with MMK and MMS as well.
  1656. ! #
  1657. ! # Maintained by Zoltan Arpadffy <arpadffy@altavista.net>
  1658. ! #
  1659. ! # Edit the lines in the Configuration section below to select.
  1660. ! #
  1661. ! # To build: use the following command line:
  1662. ! #
  1663. ! #    mms/descrip=os_vms.mms 
  1664. ! #      or if you use mmk
  1665. ! #    mmk/descrip=os_vms.mms
  1666. ! #
  1667. ! ######################################################################
  1668. ! # Configuration section.
  1669. ! ######################################################################
  1670. ! # Compiler selection.
  1671. ! # Comment out if you use the VAXC compiler
  1672. ! ######################################################################
  1673. ! # DECC = YES
  1674. ! #####################################################################
  1675. ! # Uncomment if want a debug version. Resulting executable is DVIM.EXE
  1676. ! ######################################################################
  1677. ! # DEBUG = YES
  1678. ! ######################################################################
  1679. ! # End of configuration section.
  1680. ! #
  1681. ! # Please, do not change anything below without programming experience.
  1682. ! ######################################################################
  1683. ! CC      = cc
  1684. ! .IFDEF DECC
  1685. ! CC_DEF  = $(CC)/decc
  1686. ! PREFIX  = /prefix=all
  1687. ! .ELSE
  1688. ! CC_DEF  = $(CC)
  1689. ! PREFIX  =
  1690. ! .ENDIF
  1691. ! LD_DEF  = link
  1692. ! .IFDEF DEBUG
  1693. ! TARGET  = dxxd.exe
  1694. ! CFLAGS  = /debug/noopt$(PREFIX)/cross_reference/include=[]
  1695. ! LDFLAGS = /debug
  1696. ! .ELSE
  1697. ! TARGET  = xxd.exe
  1698. ! CFLAGS  = /opt$(PREFIX)/include=[]
  1699. ! LDFLAGS =
  1700. ! .ENDIF
  1701. ! .SUFFIXES : .obj .c
  1702.   
  1703.   SOURCES    = xxd.c
  1704. ! OBJ     = xxd.obj
  1705.   
  1706. ! .obj.c :
  1707. !     $(CC_DEF) $(CFLAGS) $<
  1708.   
  1709. ! $(TARGET) : $(OBJ)        
  1710. !     $(LD_DEF) $(LDFLAGS) /exe=$(TARGET) $+
  1711.   
  1712.   clean :
  1713.       del *.obj;*
  1714.       del *.exe;*
  1715. *** ../vim-5.7a.5/src/xxd/xxd.c    Tue Jun  6 22:46:29 2000
  1716. --- src/xxd/xxd.c    Tue Jun 20 21:39:25 2000
  1717. ***************
  1718. *** 47,52 ****
  1719. --- 47,54 ----
  1720.    * 26.09.98 Fixed: 'xxd -i infile outfile' did not truncate outfile.
  1721.    * 27.10.98 Fixed: -g option parser required blank.
  1722.    *          option -b added: 01000101 binary output in normal format.
  1723. +  * 16.05.00 Added VAXC changes by Stephen P. Wall
  1724. +  * 16.05.00 Improved MMS file and merege for VMS by Zoltan Arpadffy
  1725.    *
  1726.    * (c) 1990-1998 by Juergen Weigert (jnweiger@informatik.uni-erlangen.de)
  1727.    *
  1728. ***************
  1729. *** 55,61 ****
  1730.    * lose money and don't ask me.
  1731.    */
  1732.   #include <stdio.h>
  1733. ! #include <fcntl.h>
  1734.   #ifdef __TSC__
  1735.   # define MSDOS
  1736.   #endif
  1737. --- 57,67 ----
  1738.    * lose money and don't ask me.
  1739.    */
  1740.   #include <stdio.h>
  1741. ! #ifdef VAXC
  1742. ! # include <file.h>
  1743. ! #else
  1744. ! # include <fcntl.h>
  1745. ! #endif
  1746.   #ifdef __TSC__
  1747.   # define MSDOS
  1748.   #endif
  1749. ***************
  1750. *** 135,145 ****
  1751.   # define BIN_ASSIGN(fp, yes) setmode(fileno(fp), (yes) ? O_BINARY : O_TEXT)
  1752.   # define PATH_SEP '\\'
  1753.   #else
  1754. ! # define BIN_READ(dummy)  "r"
  1755. ! # define BIN_WRITE(dummy) "w"
  1756. ! # define BIN_CREAT(dummy) O_CREAT
  1757. ! # define BIN_ASSIGN(fp, dummy) fp
  1758. ! # define PATH_SEP '/'
  1759.   #endif
  1760.   
  1761.   /* open has only to arguments on the Mac */
  1762. --- 141,160 ----
  1763.   # define BIN_ASSIGN(fp, yes) setmode(fileno(fp), (yes) ? O_BINARY : O_TEXT)
  1764.   # define PATH_SEP '\\'
  1765.   #else
  1766. ! # ifdef VMS
  1767. ! #  define BIN_READ(dummy)  "r"
  1768. ! #  define BIN_WRITE(dummy) "w"
  1769. ! #  define BIN_CREAT(dummy) O_CREAT
  1770. ! #  define BIN_ASSIGN(fp, dummy) fp
  1771. ! #  define PATH_SEP ']'
  1772. ! #  define FILE_SEP '.'
  1773. ! # else
  1774. ! #  define BIN_READ(dummy)  "r"
  1775. ! #  define BIN_WRITE(dummy) "w"
  1776. ! #  define BIN_CREAT(dummy) O_CREAT
  1777. ! #  define BIN_ASSIGN(fp, dummy) fp
  1778. ! #  define PATH_SEP '/'
  1779. ! # endif
  1780.   #endif
  1781.   
  1782.   /* open has only to arguments on the Mac */
  1783. ***************
  1784. *** 416,421 ****
  1785. --- 431,444 ----
  1786.     for (pp = pname; *pp; )
  1787.       if (*pp++ == PATH_SEP)
  1788.         pname = pp;
  1789. + #ifdef FILE_SEP
  1790. +   for (pp = pname; *pp; pp++)
  1791. +     if (*pp == FILE_SEP)
  1792. +       {
  1793. +     *pp = '\0';
  1794. +     break;
  1795. +       }
  1796. + #endif
  1797.   
  1798.     while (argc >= 2)
  1799.       {
  1800.  
  1801. -- 
  1802. hundred-and-one symptoms of being an internet addict:
  1803. 70. ISDN lines are added to your house on a hourly basis
  1804.  
  1805. /-/-- Bram Moolenaar --- Bram@moolenaar.net --- http://www.moolenaar.net --\-\
  1806. \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
  1807.