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 / patches / 6.1.369 < prev    next >
Encoding:
Internet Message Format  |  2003-03-08  |  20.3 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.369 (extra)
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.1.369 (extra)
  11. Problem:    VMS: Vim hangs when attempting to edit a read-only file in the
  12.         terminal.  Problem with VMS filenames for quickfix.
  13. Solution:   Rewrite low level input.  Remove version number from file name in
  14.         a couple more places.  Fix crash after patch 6.1.362.  Correct
  15.         return code for system().  (Zoltan Arpadffy, Tomas Stehlik)
  16. Files:        src/misc1.c, src/os_unix.c, src/os_vms.c, src/proto/os_vms.pro,
  17.         src/os_vms_conf.h, src/quickfix.c, src/ui.c
  18.  
  19.  
  20. *** ../vim61.368/src/misc1.c    Sat Mar  8 20:33:32 2003
  21. --- src/misc1.c    Fri Mar  7 22:30:02 2003
  22. ***************
  23. *** 6451,6456 ****
  24. --- 6451,6459 ----
  25.           ffname = FullName_save((*file)[i], FALSE);
  26.           if (ffname == NULL)        /* out of memory */
  27.           break;
  28. + # ifdef VMS
  29. +             vms_remove_version(ffname);
  30. + # endif
  31.           if (match_file_list(p_wig, (*file)[i], ffname))
  32.           {
  33.           /* remove this matching file from the list */
  34. ***************
  35. *** 7082,7088 ****
  36. --- 7085,7097 ----
  37.       /*
  38.        * read the names from the file into memory
  39.        */
  40. + # ifdef VMS
  41. +     /* created temporary file is not allways readable as binary */
  42. +     fd = mch_fopen((char *)tempname, "r");
  43. + # else
  44.       fd = mch_fopen((char *)tempname, READBIN);
  45. + # endif
  46.       if (fd == NULL)
  47.       {
  48.       EMSG2(_(e_notopen), tempname);
  49. ***************
  50. *** 7100,7105 ****
  51. --- 7109,7117 ----
  52.       mch_remove(tempname);
  53.       if (buffer == NULL)
  54.       goto done;
  55. + #ifdef VMS
  56. +     len = i;    /* why is this? */
  57. + #endif
  58.       if (i != len)
  59.       {
  60.       EMSG2(_(e_notread), tempname);
  61. *** ../vim61.368/src/os_unix.c    Mon Feb 24 11:29:15 2003
  62. --- src/os_unix.c    Fri Mar  7 22:50:28 2003
  63. ***************
  64. *** 123,129 ****
  65.   static void may_core_dump __ARGS((void));
  66.   
  67.   static int  WaitForChar __ARGS((long));
  68. ! #if defined(__BEOS__) || defined(VMS)
  69.   int  RealWaitForChar __ARGS((int, long, int *));
  70.   #else
  71.   static int  RealWaitForChar __ARGS((int, long, int *));
  72. --- 123,129 ----
  73.   static void may_core_dump __ARGS((void));
  74.   
  75.   static int  WaitForChar __ARGS((long));
  76. ! #if defined(__BEOS__)
  77.   int  RealWaitForChar __ARGS((int, long, int *));
  78.   #else
  79.   static int  RealWaitForChar __ARGS((int, long, int *));
  80. ***************
  81. *** 280,287 ****
  82.       RealWaitForChar(read_cmd_fd, p_wd, NULL);
  83.   }
  84.   
  85. - #ifndef VMS
  86.   /*
  87.    * mch_inchar(): low level input funcion.
  88.    * Get a characters from the keyboard.
  89. --- 280,285 ----
  90. ***************
  91. *** 390,397 ****
  92.       }
  93.   }
  94.   
  95. - #endif /* VMS */
  96.       static void
  97.   handle_resize()
  98.   {
  99. --- 388,393 ----
  100. ***************
  101. *** 3109,3121 ****
  102.           x = system((char *)newcmd);
  103.           vim_free(newcmd);
  104.       }
  105. ! # endif
  106.       }
  107.       if (emsg_silent)
  108.       ;
  109.       else if (x == 127)
  110.       MSG_PUTS(_("\nCannot execute shell sh\n"));
  111. ! #endif    /* __EMX__ */
  112.       else if (x && !(options & SHELL_SILENT))
  113.       {
  114.       MSG_PUTS(_("\nshell returned "));
  115. --- 3114,3129 ----
  116.           x = system((char *)newcmd);
  117.           vim_free(newcmd);
  118.       }
  119. ! #  endif
  120.       }
  121. + # ifdef VMS
  122. +     x = vms_sys_status(x);
  123. + # endif
  124.       if (emsg_silent)
  125.       ;
  126.       else if (x == 127)
  127.       MSG_PUTS(_("\nCannot execute shell sh\n"));
  128. ! # endif    /* __EMX__ */
  129.       else if (x && !(options & SHELL_SILENT))
  130.       {
  131.       MSG_PUTS(_("\nshell returned "));
  132. ***************
  133. *** 3862,3868 ****
  134.    * Or when a Linux GPM mouse event is waiting.
  135.    */
  136.   /* ARGSUSED */
  137. ! #if defined(__BEOS__) || defined(VMS)
  138.       int
  139.   #else
  140.       static  int
  141. --- 3870,3876 ----
  142.    * Or when a Linux GPM mouse event is waiting.
  143.    */
  144.   /* ARGSUSED */
  145. ! #if defined(__BEOS__)
  146.       int
  147.   #else
  148.       static  int
  149. ***************
  150. *** 4040,4046 ****
  151. --- 4048,4060 ----
  152.       }
  153.   # endif
  154.   
  155. + # ifdef OLD_VMS
  156. +     /* Old VMS as v6.2 and older have broken select(). It waits more than
  157. +      * required. Should not be used */
  158. +     ret = 0;
  159. + # else
  160.       ret = select(maxfd + 1, &rfds, NULL, &efds, (msec >= 0) ? &tv : NULL);
  161. + # endif
  162.   
  163.   # ifdef FEAT_SNIFF
  164.       if (ret < 0 )
  165. *** ../vim61.368/src/os_vms.c    Wed Jan 29 22:08:43 2003
  166. --- src/os_vms.c    Fri Mar  7 22:56:25 2003
  167. ***************
  168. *** 11,22 ****
  169.   
  170.   #include    "vim.h"
  171.   
  172. - #define EFN        0            /* Event flag */
  173. - #define NOTIM        0
  174. - #define TIM_0        1
  175. - #define TIM_1        2
  176. - #define EXPL_ALLOC_INC 16
  177.   typedef struct
  178.   {
  179.       char    class;
  180. --- 11,16 ----
  181. ***************
  182. *** 55,61 ****
  183.       int    nul;
  184.   }    ITMLST2;
  185.   
  186. - char        ibuf[1];        /* Input buffer */
  187.   static TT_MODE    orgmode;
  188.   static short    iochan;            /* TTY I/O channel */
  189.   static short    iosb[4];        /* IO status block */
  190. --- 49,54 ----
  191. ***************
  192. *** 66,146 ****
  193.   char_u **vms_fmatch = NULL;
  194.   static char *Fspec_Rms;               /* rms file spec, passed implicitly between routines */
  195.   
  196.   static TT_MODE    get_tty __ARGS((void));
  197.   static void    set_tty __ARGS((int row, int col));
  198. ! static int    vms_wait __ARGS((unsigned int fun));
  199.   
  200.   #define EQN(S1,S2,LN) (strncmp(S1,S2,LN) == 0)
  201.   #define SKIP_FOLLOWING_SLASHES(Str) while (Str[1] == '/') ++Str
  202.   
  203. - /*
  204. -  * low level input funcion.
  205. -  *
  206. -  * Get a characters from the keyboard.
  207. -  * Return the number of characters that are available.
  208. -  * If wtime == 0 do not wait for characters.
  209. -  * If wtime == n wait a short time for characters.
  210. -  * If wtime == -1 wait forever for characters.
  211. -  */
  212. -     int
  213. - mch_inchar(char_u *buf, int maxlen, long wtime)
  214. - {
  215. -     int        c, res;
  216. - #ifdef FEAT_GUI
  217. -     if (gui.in_use)
  218. -     {
  219. -     if (!gui_wait_for_chars(wtime))
  220. -         return 0;
  221. -     return read_from_input_buf(buf, (long)maxlen);
  222. -     }
  223. - #endif
  224. -     /* first check to see if any characters read by
  225. -      * mch_breakcheck(), mch_delay() or mch_char_avail()
  226. -      */
  227. -     if (!vim_is_input_buf_empty())
  228. -     return read_from_input_buf(buf, (long)maxlen);
  229. -     out_flush();
  230. -     if (wtime == -1)
  231. -     res = vms_wait(NOTIM);            /* without timeout */
  232. -     else
  233. -     res = vms_wait(wtime ? TIM_1 : TIM_0);    /* with timeout */
  234. -     if (res != SS$_NORMAL)
  235. -     return(0);
  236. -     out_flush();
  237. -     c = (ibuf[0] & 0xFF);            /* Allow multinational */
  238. -     *buf = c;
  239. -     return(1);
  240. - }
  241. -     static int
  242. - vms_wait(unsigned int fun)
  243. - {
  244. -     int            ret, term[2] = { 0, 0 };
  245. -     switch(fun)
  246. -     {
  247. -     case NOTIM:        /* wait forever for characters        */
  248. -         ret = sys$qiow(EFN, iochan, IO$_READLBLK, iosb, 0, 0,
  249. -                ibuf, 1, 0, term, 0, 0);
  250. -         break;
  251. -     case TIM_1:        /* wait a short time for characters    */
  252. -         ret = sys$qiow(EFN, iochan, IO$_READLBLK | IO$M_TIMED, iosb, 0, 0,
  253. -                ibuf, 1, 1, term, 0, 0);
  254. -         break;
  255. -     default:        /* do not wait for characters        */
  256. -         ret = sys$qiow(EFN, iochan, IO$_READLBLK | IO$M_TIMED, iosb, 0, 0,
  257. -                ibuf, 1, 0, term, 0, 0);
  258. -         break;
  259. -     }
  260. -     if (ret != SS$_NORMAL)
  261. -     return(ret);
  262. -     if ((fun && (iosb[0] != SS$_TIMEOUT) && (iosb[0] != SS$_NORMAL)) ||
  263. -     (!fun && (iosb[0] != SS$_NORMAL)))
  264. -     return(iosb[0]);
  265. -     return(iosb[1] + iosb[3]);
  266. - }
  267.   
  268.   /*
  269.    *    vul_desc    vult een descriptor met een string en de lengte
  270. --- 59,74 ----
  271.   char_u **vms_fmatch = NULL;
  272.   static char *Fspec_Rms;               /* rms file spec, passed implicitly between routines */
  273.   
  274.   static TT_MODE    get_tty __ARGS((void));
  275.   static void    set_tty __ARGS((int row, int col));
  276. ! #define EXPL_ALLOC_INC 64
  277.   
  278.   #define EQN(S1,S2,LN) (strncmp(S1,S2,LN) == 0)
  279.   #define SKIP_FOLLOWING_SLASHES(Str) while (Str[1] == '/') ++Str
  280.   
  281.   
  282.   /*
  283.    *    vul_desc    vult een descriptor met een string en de lengte
  284. ***************
  285. *** 170,176 ****
  286.       void
  287.   mch_settmode(int tmode)
  288.   {
  289. !     long    mystatus;
  290.   
  291.       if ( tmode == TMODE_RAW )
  292.       set_tty(0, 0);
  293. --- 98,104 ----
  294.       void
  295.   mch_settmode(int tmode)
  296.   {
  297. !     int    status;
  298.   
  299.       if ( tmode == TMODE_RAW )
  300.       set_tty(0, 0);
  301. ***************
  302. *** 182,190 ****
  303.           default:    break;
  304.       }
  305.       out_flush();
  306. !     mystatus = sys$qiow(0, iochan, IO$_SETMODE, iosb, 0, 0,
  307.                         &orgmode, sizeof(TT_MODE), 0,0,0,0);
  308. !     if (mystatus!=SS$_NORMAL || (iosb[0]&0xFFFF)!=SS$_NORMAL)
  309.           return;
  310.       (void)sys$dassgn(iochan);
  311.       iochan = 0;
  312. --- 110,118 ----
  313.           default:    break;
  314.       }
  315.       out_flush();
  316. !     status = sys$qiow(0, iochan, IO$_SETMODE, iosb, 0, 0,
  317.                         &orgmode, sizeof(TT_MODE), 0,0,0,0);
  318. !     if (status!=SS$_NORMAL || (iosb[0]&0xFFFF)!=SS$_NORMAL)
  319.           return;
  320.       (void)sys$dassgn(iochan);
  321.       iochan = 0;
  322. ***************
  323. *** 194,202 ****
  324.       static void
  325.   set_tty(int row, int col)
  326.   {
  327. !     long        mystatus;
  328.       TT_MODE        newmode;        /* New TTY mode bits        */
  329. !     static short first_time = TRUE;
  330.   
  331.       if (first_time)
  332.       {
  333. --- 122,130 ----
  334.       static void
  335.   set_tty(int row, int col)
  336.   {
  337. !     int                status;
  338.       TT_MODE        newmode;        /* New TTY mode bits        */
  339. !     static short    first_time = TRUE;
  340.   
  341.       if (first_time)
  342.       {
  343. ***************
  344. *** 211,240 ****
  345.       newmode.x.basic        |= (TT$M_NOECHO | TT$M_HOSTSYNC);
  346.       newmode.x.basic        &= ~TT$M_TTSYNC;
  347.       newmode.extended        |= TT2$M_PASTHRU;
  348. !     mystatus = sys$qiow(0, iochan, IO$_SETMODE, iosb, 0, 0,
  349.                 &newmode, sizeof(newmode), 0, 0, 0, 0);
  350. !     if (mystatus!=SS$_NORMAL || (iosb[0]&0xFFFF)!=SS$_NORMAL)
  351.       return;
  352.   }
  353.   
  354. !     static TT_MODE
  355.   get_tty(void)
  356.   {
  357. !     long    mystatus;
  358.       TT_MODE    tt_mode;
  359. -     DESC    odsc;
  360. -     char    *cp1, *cp2 = "TT";
  361.   
  362.       if (!iochan)
  363. !     {
  364. !     while (cp1 = (char *)mch_getenv((char_u *)cp2))
  365. !         cp2 = cp1;
  366. !     vul_desc(&odsc, cp2);
  367. !     (void)sys$assign(&odsc, &iochan, 0, 0);
  368. !     }
  369. !     mystatus = sys$qiow(0, iochan, IO$_SENSEMODE, iosb, 0, 0,
  370.                 &tt_mode, sizeof(tt_mode), 0, 0, 0, 0);
  371. !     if (mystatus != SS$_NORMAL || (iosb[0] & 0xFFFF) != SS$_NORMAL)
  372.       {
  373.       tt_mode.width        = 0;
  374.       tt_mode.type        = 0;
  375. --- 139,165 ----
  376.       newmode.x.basic        |= (TT$M_NOECHO | TT$M_HOSTSYNC);
  377.       newmode.x.basic        &= ~TT$M_TTSYNC;
  378.       newmode.extended        |= TT2$M_PASTHRU;
  379. !     status = sys$qiow(0, iochan, IO$_SETMODE, iosb, 0, 0,
  380.                 &newmode, sizeof(newmode), 0, 0, 0, 0);
  381. !     if (status!=SS$_NORMAL || (iosb[0]&0xFFFF)!=SS$_NORMAL)
  382.       return;
  383.   }
  384.   
  385. ! static TT_MODE
  386.   get_tty(void)
  387.   {
  388. !     static $DESCRIPTOR(odsc,"SYS$OUTPUT");   /* output descriptor */
  389. !     int        status;
  390.       TT_MODE    tt_mode;
  391.   
  392.       if (!iochan)
  393. !         status = sys$assign(&odsc,&iochan,0,0);
  394. !     status = sys$qiow(0, iochan, IO$_SENSEMODE, iosb, 0, 0,
  395.                 &tt_mode, sizeof(tt_mode), 0, 0, 0, 0);
  396. !     if (status != SS$_NORMAL || (iosb[0] & 0xFFFF) != SS$_NORMAL)
  397.       {
  398.       tt_mode.width        = 0;
  399.       tt_mode.type        = 0;
  400. ***************
  401. *** 321,327 ****
  402.   {
  403.       int        res, dum;
  404.       long    attrib = 0L;
  405. !     char    acmode = PSL$C_SUPER;    /* SYSNAM privilege nodig    */
  406.       DESC    tabnam, lognam;
  407.       ITMLST1    itmlst;
  408.   
  409. --- 246,252 ----
  410.   {
  411.       int        res, dum;
  412.       long    attrib = 0L;
  413. !     char    acmode = PSL$C_SUPER;    /* needs SYSNAM privilege */
  414.       DESC    tabnam, lognam;
  415.       ITMLST1    itmlst;
  416.   
  417. ***************
  418. *** 338,344 ****
  419.   vms_sys(char *cmd, char *out, char *inp)
  420.   {
  421.       DESC    cdsc, odsc, idsc;
  422. !     long    status, substatus;
  423.   
  424.       if (cmd)
  425.       vul_desc(&cdsc, cmd);
  426. --- 263,269 ----
  427.   vms_sys(char *cmd, char *out, char *inp)
  428.   {
  429.       DESC    cdsc, odsc, idsc;
  430. !     long    status;
  431.   
  432.       if (cmd)
  433.       vul_desc(&cdsc, cmd);
  434. ***************
  435. *** 347,362 ****
  436.       if (inp)
  437.       vul_desc(&idsc, inp);
  438.   
  439. !     status = lib$spawn(
  440. !         cmd ? &cdsc : NULL,        /* command string */
  441. !         inp ? &idsc : NULL,        /* input file */
  442. !         out ? &odsc : NULL,        /* output file */
  443. !         0, 0, 0, &substatus, 0, 0, 0, 0, 0, 0);
  444. !     if (status != SS$_NORMAL)
  445. !     substatus = status;
  446. !     if ((substatus&STS$M_SUCCESS) == 0)     /* Command failed.        */
  447. !     return(FALSE);
  448. !     return(TRUE);
  449.   }
  450.   
  451.   /*
  452. --- 272,339 ----
  453.       if (inp)
  454.       vul_desc(&idsc, inp);
  455.   
  456. !     lib$spawn(cmd ? &cdsc : NULL,        /* command string */
  457. !           inp ? &idsc : NULL,        /* input file */
  458. !           out ? &odsc : NULL,        /* output file */
  459. !           0, 0, 0, &status, 0, 0, 0, 0, 0, 0);
  460. !     return status;
  461. ! }
  462. ! /*
  463. !  * Convert VMS system() or lib$spawn() return code to Unix-like exit value.
  464. !  */
  465. !     int
  466. ! vms_sys_status(int status)
  467. ! {
  468. !     if (status != SS$_NORMAL && (status & STS$M_SUCCESS) == 0)
  469. !     return status;        /* Command failed. */
  470. !     return 0;
  471. ! }
  472. ! /*
  473. !  * vms_read()
  474. !  * function for low level char input
  475. !  *
  476. !  * Returns: input length
  477. !  */
  478. !     int
  479. ! vms_read(char *inbuf, size_t nbytes)
  480. ! {
  481. !     static unsigned short add_esc, was_esc = 0;
  482. !     char    ibuf[nbytes];
  483. !     int     status, function, len;
  484. !     TT_MODE tt_mode;
  485. !     /* whatever happened earlier we need an iochan here */
  486. !     if (!iochan)
  487. !        tt_mode=get_tty();
  488. !     function = ( IO$_READLBLK | IO$M_NOECHO | IO$M_TIMED ) ;
  489. !     len=0;
  490. !     add_esc=0;
  491. !     while(1) {
  492. !         memset(ibuf,0,sizeof(ibuf));
  493. !         status = sys$qiow(0,iochan,function,&iosb,0,0,&ibuf,nbytes-1,0,0,0,0);
  494. !         len=strlen( ibuf );
  495. !         if ( was_esc ) {                   /* ESC interrupts the BLOCK QIO  */
  496. !             add_esc=1;                     /* therefore we need to handle   */
  497. !             was_esc=0;                     /* it on special way in order to */
  498. !             inbuf[0]=27;                   /* read ESC sequences            */
  499. !         }
  500. !         if ( len>0 ){
  501. !             if ( ibuf[len-1]==27 ){
  502. !                 was_esc=1;
  503. !                 len=len-1;
  504. !             }
  505. !             mch_memmove(inbuf+add_esc, ibuf, len);
  506. !         }
  507. !         if ((add_esc+len) > 0) break;
  508. !     }
  509. !     return add_esc+len;
  510.   }
  511.   
  512.   /*
  513. ***************
  514. *** 365,371 ****
  515.    *
  516.    * Returns:  1 - continue finding matches
  517.    *         0 - stop trying to find any further mathces
  518. -  *
  519.    */
  520.   static int
  521.   vms_wproc(char *name, int val)
  522. --- 342,347 ----
  523. ***************
  524. *** 668,674 ****
  525.    * we need it in some special cases as:
  526.    * creating swap file name and writing new file
  527.    */
  528. !     void *
  529.   vms_remove_version(void * fname)
  530.   {
  531.       char_u    *cp;
  532. --- 644,650 ----
  533.    * we need it in some special cases as:
  534.    * creating swap file name and writing new file
  535.    */
  536. !     void
  537.   vms_remove_version(void * fname)
  538.   {
  539.       char_u    *cp;
  540. ***************
  541. *** 686,691 ****
  542.           if ( *fp++ == '.' )
  543.           *cp = '\0';
  544.       }
  545. !     return fname;
  546.   }
  547. --- 662,666 ----
  548.           if ( *fp++ == '.' )
  549.           *cp = '\0';
  550.       }
  551. !     return ;
  552.   }
  553. *** ../vim61.368/src/proto/os_vms.pro    Fri Mar 22 21:41:33 2002
  554. --- src/proto/os_vms.pro    Thu Mar  6 21:26:59 2003
  555. ***************
  556. *** 1,13 ****
  557.   /* os_vms.c */
  558. - int mch_inchar __ARGS((char_u *buf, int maxlen, long wtime));
  559.   void mch_settmode __ARGS((int tmode));
  560.   int mch_get_shellsize __ARGS((void));
  561.   void mch_set_shellsize __ARGS((void));
  562.   char_u *mch_getenv __ARGS((char_u *lognam));
  563.   int mch_setenv __ARGS((char *var, char *value, int x));
  564.   int vms_sys __ARGS((char *cmd, char *out, char *inp));
  565.   int mch_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags));
  566.   int mch_expandpath __ARGS((garray_T *gap, char_u *path, int flags));
  567.   void *vms_fixfilename __ARGS((void *instring));
  568. ! void *vms_remove_version __ARGS((void *fname));
  569.   /* vim: set ft=c : */
  570. --- 1,13 ----
  571.   /* os_vms.c */
  572.   void mch_settmode __ARGS((int tmode));
  573.   int mch_get_shellsize __ARGS((void));
  574.   void mch_set_shellsize __ARGS((void));
  575.   char_u *mch_getenv __ARGS((char_u *lognam));
  576.   int mch_setenv __ARGS((char *var, char *value, int x));
  577.   int vms_sys __ARGS((char *cmd, char *out, char *inp));
  578. + int vms_read __ARGS((char *inbuf, size_t nbytes));
  579.   int mch_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags));
  580.   int mch_expandpath __ARGS((garray_T *gap, char_u *path, int flags));
  581.   void *vms_fixfilename __ARGS((void *instring));
  582. ! void vms_remove_version __ARGS((void *fname));
  583.   /* vim: set ft=c : */
  584. *** ../vim61.368/src/os_vms_conf.h    Sun Feb 24 19:36:04 2002
  585. --- src/os_vms_conf.h    Mon Mar  3 18:55:11 2003
  586. ***************
  587. *** 7,24 ****
  588.   #define USE_GETCWD
  589.   #define USE_SYSTEM
  590.   
  591. - /* Define when termcap library found */
  592. - /* #undef HAVE_LIBTERMCAP */
  593. - /* Define when termlib library found */
  594. - /* #undef HAVE_LIBTERMLIB */
  595. - /* Define when ncurses library found */
  596. - #undef HAVE_LIBNCURSES
  597. - /* Define when curses library found */
  598. - /* #undef HAVE_LIBCURSES */
  599.   /* Define when terminfo support found */
  600.   #undef TERMINFO
  601.   
  602. --- 7,12 ----
  603. ***************
  604. *** 104,109 ****
  605. --- 92,98 ----
  606.   /* Define if you have the sigset() function.  */
  607.   /* #undef HAVE_SIGSET */
  608.   
  609. + #define TGETENT_ZERO_ERR
  610.   #define HAVE_GETCWD
  611.   #define HAVE_STRCSPN
  612.   #define HAVE_STRTOL
  613. *** ../vim61.368/src/quickfix.c    Mon Feb 24 11:29:15 2003
  614. --- src/quickfix.c    Wed Feb 19 19:54:19 2003
  615. ***************
  616. *** 702,707 ****
  617. --- 702,710 ----
  618.       char_u        *ptr;
  619.       int        fnum;
  620.   
  621. + # ifdef VMS
  622. +         vms_remove_version(fname);
  623. + # endif
  624.       if (directory != NULL && !vim_isAbsName(fname)
  625.           && (ptr = concat_fnames(directory, fname, TRUE)) != NULL)
  626.       {
  627. *** ../vim61.368/src/ui.c    Sat Mar  8 20:33:33 2003
  628. --- src/ui.c    Sat Mar  8 17:44:27 2003
  629. ***************
  630. *** 58,64 ****
  631.   #endif
  632.   }
  633.   
  634. ! #if (defined(FEAT_GUI) && defined(UNIX)) || defined(MACOS_X_UNIX) || defined(PROTO)
  635.   /*
  636.    * When executing an external program, there may be some typed characters that
  637.    * are not consumed by it.  Give them back to ui_inchar() and they are stored
  638. --- 58,65 ----
  639.   #endif
  640.   }
  641.   
  642. ! #if (defined(FEAT_GUI) && (defined(UNIX) || defined(VMS))) \
  643. !     || defined(MACOS_X_UNIX) || defined(PROTO)
  644.   /*
  645.    * When executing an external program, there may be some typed characters that
  646.    * are not consumed by it.  Give them back to ui_inchar() and they are stored
  647. ***************
  648. *** 113,119 ****
  649.   {
  650.       int        retval = 0;
  651.   
  652. ! #if defined(FEAT_GUI) && defined(UNIX)
  653.       /*
  654.        * Use the typeahead if there is any.
  655.        */
  656. --- 114,120 ----
  657.   {
  658.       int        retval = 0;
  659.   
  660. ! #if defined(FEAT_GUI) && (defined(UNIX) || defined(VMS))
  661.       /*
  662.        * Use the typeahead if there is any.
  663.        */
  664. ***************
  665. *** 141,151 ****
  666.       {
  667.       static int count = 0;
  668.   
  669. ! #ifndef NO_CONSOLE
  670.       retval = mch_inchar(buf, maxlen, 10L);
  671.       if (retval > 0)
  672.           return retval;
  673. ! #endif
  674.       if (wtime == -1 && ++count == 1000)
  675.           read_error_exit();
  676.       buf[0] = CR;
  677. --- 142,152 ----
  678.       {
  679.       static int count = 0;
  680.   
  681. ! # ifndef NO_CONSOLE
  682.       retval = mch_inchar(buf, maxlen, 10L);
  683.       if (retval > 0)
  684.           return retval;
  685. ! # endif
  686.       if (wtime == -1 && ++count == 1000)
  687.           read_error_exit();
  688.       buf[0] = CR;
  689. ***************
  690. *** 1656,1664 ****
  691.       int        try;
  692.       static int    did_read_something = FALSE;
  693.   #endif
  694. - #ifdef VMS
  695. -     extern char ibuf[];
  696. - #endif
  697.   
  698.   #ifdef FEAT_GUI
  699.       if (gui.in_use)
  700. --- 1657,1662 ----
  701. ***************
  702. *** 1696,1721 ****
  703.       return;
  704.       }
  705.   #  endif
  706. - #  ifdef VMS_OLD_STUFF
  707. -     while (!vim_is_input_buf_full() && RealWaitForChar(0, 0L))
  708. -     {
  709. -     add_to_input_buf((char_u *)ibuf, 1);
  710. -     }
  711. -     if (inbufcount < 1 && !exit_on_error)
  712. -     return;
  713. -     len = inbufcount;
  714. -     inbufcount = 0;
  715. - #  else
  716.   
  717.       len = 0;    /* to avoid gcc warning */
  718.       for (try = 0; try < 100; ++try)
  719.       {
  720. !     len = read(read_cmd_fd, (char *)inbuf + inbufcount,
  721. !         (size_t)((INBUFLEN - inbufcount)
  722.   #  ifdef FEAT_MBYTE
  723.           / input_conv.vc_factor
  724.   #  endif
  725.           ));
  726.       if (len > 0 || got_int)
  727.           break;
  728.       /*
  729. --- 1694,1716 ----
  730.       return;
  731.       }
  732.   #  endif
  733.   
  734.       len = 0;    /* to avoid gcc warning */
  735.       for (try = 0; try < 100; ++try)
  736.       {
  737. ! #  ifdef VMS
  738. !         len = vms_read(
  739. ! #  else
  740. !     len = read(read_cmd_fd,
  741. ! #  endif
  742. !         (char *)inbuf + inbufcount, (size_t)((INBUFLEN - inbufcount)
  743.   #  ifdef FEAT_MBYTE
  744.           / input_conv.vc_factor
  745.   #  endif
  746.           ));
  747. + #  if 0
  748. +         )    /* avoid syntax highlight error */
  749. + #  endif
  750.       if (len > 0 || got_int)
  751.           break;
  752.       /*
  753. ***************
  754. *** 1742,1748 ****
  755.       if (!exit_on_error)
  756.           return;
  757.       }
  758. - #  endif /* VMS */
  759.   # endif
  760.       if (len <= 0 && !got_int)
  761.       read_error_exit();
  762. --- 1737,1742 ----
  763. *** ../vim61.368/src/version.c    Sun Mar  9 14:01:01 2003
  764. --- src/version.c    Sun Mar  9 14:03:53 2003
  765. ***************
  766. *** 613,614 ****
  767. --- 613,616 ----
  768.   {   /* Add new patch number below this line */
  769. + /**/
  770. +     369,
  771.   /**/
  772.  
  773. -- 
  774. I think that you'll agree that engineers are very effective in their social
  775. interactions.  It's the "normal" people who are nuts.
  776.                 (Scott Adams - The Dilbert principle)
  777.  
  778.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  779. ///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
  780. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  781.  \\\     Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///
  782.