To: vim-dev@vim.org Subject: Patch 6.2.385 (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.385 (extra) Problem: Win32: forward_slash() and trash_input_buf() are undefined when compiling with small features. (Ajit Thakkar) Solution: Change the #ifdefs for forward_slash(). Don't call trash_input_buf() if the input buffer isn't used. Files: src/fileio.c, src/os_win32.c *** ../vim-6.2.384/src/fileio.c Sun Mar 7 15:21:39 2004 --- src/fileio.c Sat Mar 20 20:02:34 2004 *************** *** 6064,6069 **** --- 6069,6097 ---- #endif /* TEMPDIRNAMES */ } + #if defined(BACKSLASH_IN_FILENAME) || defined(PROTO) + /* + * Convert all backslashes in fname to forward slashes in-place. + */ + void + forward_slash(fname) + char_u *fname; + { + char_u *p; + + for (p = fname; *p != NUL; ++p) + # ifdef FEAT_MBYTE + /* The Big5 encoding can have '\' in the trail byte. */ + if (enc_dbcs != 0 && (*mb_ptr2len_check)(p) > 1) + ++p; + else + # endif + if (*p == '\\') + *p = '/'; + } + #endif + + /* * Code for automatic commands. * *************** *** 6255,6282 **** static EVENT_T last_event; static int last_group; - #if defined(BACKSLASH_IN_FILENAME) || defined(PROTO) - /* - * Convert all backslashes in fname to forward slashes in-place. - */ - void - forward_slash(fname) - char_u *fname; - { - char_u *p; - - for (p = fname; *p != NUL; ++p) - # ifdef FEAT_MBYTE - /* The Big5 encoding can have '\' in the trail byte. */ - if (enc_dbcs != 0 && (*mb_ptr2len_check)(p) > 1) - ++p; - else - # endif - if (*p == '\\') - *p = '/'; - } - #endif - /* * Show the autocommands for one AutoPat. */ --- 6283,6288 ---- *** ../vim-6.2.384/src/os_win32.c Thu Mar 11 21:03:40 2004 --- src/os_win32.c Sat Mar 20 20:06:51 2004 *************** *** 1396,1402 **** --- 1401,1409 ---- if (c == Ctrl_C && ctrl_c_interrupts) { + #if defined(FEAT_CLIENTSERVER) trash_input_buf(); + #endif got_int = TRUE; } *** ../vim-6.2.384/src/version.c Sat Mar 20 21:12:16 2004 --- src/version.c Sat Mar 20 21:13:46 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 385, /**/ -- From "know your smileys": :-{} Too much lipstick /// 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 ///