To: vim-dev@vim.org Subject: Patch 6.2.138 (extra) Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.138 (extra) Problem: Compilation problem on VMS with dynamic buffer on the stack. Solution: Read one byte less than the size of the buffer, so that we can check for the string length without an extra buffer. Files: src/os_vms.c *** ../vim-6.2.137/src/os_vms.c Sun May 4 22:44:43 2003 --- src/os_vms.c Mon Oct 20 20:00:01 2003 *************** *** 299,305 **** int vms_read(char *inbuf, size_t nbytes) { - char ibuf[nbytes]; int status, function, len; float wait = 0.05; TT_MODE tt_mode; --- 298,303 ---- *************** *** 309,325 **** tt_mode = get_tty(); function = (IO$_READLBLK | IO$M_NOECHO | IO$M_TIMED | IO$M_ESCAPE); ! memset(ibuf, 0, sizeof(ibuf)); while (1) { ! status = sys$qiow(0,iochan,function,&iosb,0,0,&ibuf,nbytes,0,0,0,0); ! len = strlen(ibuf); if (len > 0) - { - mch_memmove(inbuf, ibuf, len); break; - } lib$wait(&wait); } return len; --- 307,320 ---- tt_mode = get_tty(); function = (IO$_READLBLK | IO$M_NOECHO | IO$M_TIMED | IO$M_ESCAPE); ! memset(inbuf, 0, nbytes); while (1) { ! status = sys$qiow(0,iochan,function,&iosb,0,0,inbuf,nbytes-1,0,0,0,0); ! len = strlen(inbuf); if (len > 0) break; lib$wait(&wait); } return len; *** ../vim-6.2.137/src/version.c Wed Oct 29 14:37:09 2003 --- src/version.c Wed Oct 29 14:38:52 2003 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 138, /**/ -- Q: How do you tell the difference between a female cat and a male cat? A: You ask it a question and if HE answers, it's a male but, if SHE answers, it's a female. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///