To: vim-dev@vim.org Subject: Patch 6.2.141 (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.141 (extra) Problem: Mac: The b_FSSpec field is sometimes unused. Solution: Change the #ifdef to FEAT_CW_EDITOR and defined it in feature.h Files: src/fileio.c, src/gui_mac.c, src/structs.h, src/feature.h *** ../vim-6.2.140/src/fileio.c Wed Oct 29 14:29:15 2003 --- src/fileio.c Sat Nov 1 13:42:24 2003 *************** *** 443,449 **** (void)mch_setperm(curbuf->b_ml.ml_mfp->mf_fname, (long)((st.st_mode & 0777) | 0600)); #endif ! #ifdef MACOS_CLASSIC /* TODO: Is it need for MACOS_X? (Dany) */ /* Get the FSSpec on MacOS * TODO: Update it properly when the buffer name changes */ --- 443,449 ---- (void)mch_setperm(curbuf->b_ml.ml_mfp->mf_fname, (long)((st.st_mode & 0777) | 0600)); #endif ! #ifdef FEAT_CW_EDITOR /* Get the FSSpec on MacOS * TODO: Update it properly when the buffer name changes */ *** ../vim-6.2.140/src/gui_mac.c Mon Oct 13 22:21:06 2003 --- src/gui_mac.c Sun Nov 2 12:55:39 2003 *************** *** 60,66 **** #define USE_AEVENT /* Compile as CodeWarior External Editor */ - #define FEAT_CW_EDITOR #if defined(FEAT_CW_EDITOR) && !defined(USE_AEVENT) # define USE_AEVENT /* Need Apple Event Support */ #endif --- 60,65 ---- *************** *** 5108,5127 **** #endif } ! /* ! * ! */ void mch_post_buffer_write (buf_T *buf) { ! #ifdef USE_SIOUX printf ("Writing Buf...\n"); ! #endif GetFSSpecFromPath (buf->b_ffname, &buf->b_FSSpec); - #ifdef FEAT_CW_EDITOR Send_KAHL_MOD_AE (buf); - #endif } #ifdef FEAT_TITLE /* --- 5107,5124 ---- #endif } ! #if defined(FEAT_CW_EDITOR) || defined(PROTO) ! /* TODO: Is it need for MACOS_X? (Dany) */ void mch_post_buffer_write(buf_T *buf) { ! # ifdef USE_SIOUX printf ("Writing Buf...\n"); ! # endif GetFSSpecFromPath (buf->b_ffname, &buf->b_FSSpec); Send_KAHL_MOD_AE (buf); } + #endif #ifdef FEAT_TITLE /* *** ../vim-6.2.140/src/structs.h Sun Aug 10 22:24:37 2003 --- src/structs.h Sat Nov 1 13:42:02 2003 *************** *** 891,897 **** int b_dev; /* device number (-1 if not set) */ ino_t b_ino; /* inode number */ #endif ! #ifdef MACOS FSSpec b_FSSpec; /* MacOS File Identification */ #endif #ifdef VMS --- 891,897 ---- int b_dev; /* device number (-1 if not set) */ ino_t b_ino; /* inode number */ #endif ! #ifdef FEAT_CW_EDITOR FSSpec b_FSSpec; /* MacOS File Identification */ #endif #ifdef VMS *** ../vim-6.2.140/src/feature.h Mon Oct 13 22:48:17 2003 --- src/feature.h Sun Nov 2 12:56:37 2003 *************** *** 743,748 **** --- 743,753 ---- # define FEAT_GUI_TEXTDIALOG #endif + /* Mac specific thing: Codewarrior interface. */ + #ifdef FEAT_GUI_MAC + # define FEAT_CW_EDITOR + #endif + /* * Preferences: * ============ *** ../vim-6.2.140/src/version.c Wed Oct 29 14:51:49 2003 --- src/version.c Sun Nov 2 15:26:23 2003 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 141, /**/ -- A parent can be arrested if his child cannot hold back a burp during a church service. [real standing law in Nebraska, United States of America] /// 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 ///