To: vim-dev@vim.org Subject: Patch 6.2.470 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.470 Problem: The name returned by tempname() may be equal to the file used for shell output when ignoring case. Solution: Skip 'O' and 'I' in tempname(). Files: src/eval.c *** ../vim-6.2.469/src/eval.c Wed Apr 14 11:08:53 2004 --- src/eval.c Wed Apr 14 11:56:43 2004 *************** *** 7264,7283 **** retvar->var_type = VAR_STRING; retvar->var_val.var_string = vim_tempname(x); ! /* advance 'x', so that there are at least 26 different names */ ! if (x == 'Z') ! x = 'A'; ! else { ! #ifdef EBCDIC ! if (x == 'I') ! x = 'J'; ! else if (x == 'R') ! x = 'S'; else #endif ! ++x; ! } } /* --- 7264,7290 ---- retvar->var_type = VAR_STRING; retvar->var_val.var_string = vim_tempname(x); ! ! /* Advance 'x' to use A-Z and 0-9, so that there are at least 34 different ! * names. Skip 'I' and 'O', they are used for shell redirection. */ ! do { ! if (x == 'Z') ! x = '0'; ! else if (x == '9') ! x = 'A'; else + { + #ifdef EBCDIC + if (x == 'I') + x = 'J'; + else if (x == 'R') + x = 'S'; + else #endif ! ++x; ! } ! } while (x == 'I' || x == 'O'); } /* *** ../vim-6.2.469/src/version.c Wed Apr 14 14:10:23 2004 --- src/version.c Wed Apr 14 21:41:07 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 470, /**/ -- Compilation process failed successfully. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///