To: vim-dev@vim.org Subject: Patch 6.3a.001 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.3a.001 Problem: Win32: if testing for the "--binary" option fails, diff isn't used at all. Solution: Handle the "ok" flag properly. (Yasuhiro Matsumoto) Files: src/diff.c *** ../vim-6.3a.000/src/diff.c Fri May 7 10:59:38 2004 --- src/diff.c Fri May 7 12:17:25 2004 *************** *** 609,615 **** char_u *tmp_new; char_u *tmp_diff; FILE *fd; ! int ok = FALSE; /* Delete all diffblocks. */ diff_clear(); --- 609,615 ---- char_u *tmp_new; char_u *tmp_diff; FILE *fd; ! int ok; /* Delete all diffblocks. */ diff_clear(); *************** *** 644,649 **** --- 644,650 ---- */ for (;;) { + ok = FALSE; fd = fopen((char *)tmp_orig, "w"); if (fd != NULL) { *************** *** 691,698 **** continue; } if (!ok && diff_a_works == TRUE && diff_bin_works == TRUE) ! /* Tried --binary, but it failed. */ diff_bin_works = FALSE; #endif /* If we checked if "-a" works already, break here. */ --- 692,702 ---- continue; } if (!ok && diff_a_works == TRUE && diff_bin_works == TRUE) ! { ! /* Tried --binary, but it failed. "-a" works though. */ diff_bin_works = FALSE; + ok = TRUE; + } #endif /* If we checked if "-a" works already, break here. */ *** ../vim-6.3a.000/src/version.c Fri May 7 10:59:38 2004 --- src/version.c Fri May 7 12:19:52 2004 *************** *** 643,644 **** --- 643,646 ---- { /* Add new patch number below this line */ + /**/ + 1, /**/ -- hundred-and-one symptoms of being an internet addict: 157. You fum through a magazine, you first check to see if it has a web address. /// 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 ///