home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.0.250 < prev    next >
Encoding:
Internet Message Format  |  2002-02-20  |  13.1 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.250 (extra)
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.0.250 (extra)
  11. Problem:    Macintosh: Various problems when compiling.
  12. Solution:   Various fixes, mostly #ifdefs.
  13. Files:        src/gui_mac.c, src/main.c, src/misc2.c, src/os_mac.h,
  14.         src/os_mac.pbproj/project.pbxproj, src/os_unix.c
  15.  
  16.  
  17. *** ../vim60.249/src/gui_mac.c    Mon Aug 27 17:23:35 2001
  18. --- src/gui_mac.c    Thu Feb 21 19:07:01 2002
  19. ***************
  20. *** 1882,1893 ****
  21.   
  22.       whichWindow = (WindowPtr) event->message;
  23.       if ((event->modifiers) & activeFlag)
  24. !     /* Activate */
  25. !     gui.in_focus = TRUE;
  26.       else
  27.       {
  28.       /* Deactivate */
  29. !     gui.in_focus = FALSE;
  30.   /*    DON'T KNOW what the code below was doing
  31.       found in the deactivate clause, but the
  32.       clause writting TRUE into in_focus (BUG)
  33. --- 1882,1893 ----
  34.   
  35.       whichWindow = (WindowPtr) event->message;
  36.       if ((event->modifiers) & activeFlag)
  37. !         /* Activate */
  38. !     gui_focus_change(TRUE);
  39.       else
  40.       {
  41.       /* Deactivate */
  42. !     gui_focus_change(FALSE);
  43.   /*    DON'T KNOW what the code below was doing
  44.       found in the deactivate clause, but the
  45.       clause writting TRUE into in_focus (BUG)
  46. ***************
  47. *** 1899,1905 ****
  48.       SetOutlinePreferred (a_bool);
  49.   #endif
  50.       }
  51. -     gui_update_cursor(TRUE, FALSE);
  52.   }
  53.   
  54.   
  55. --- 1899,1904 ----
  56. ***************
  57. *** 1921,1932 ****
  58.        * get an activate/desactivate event
  59.        */
  60.       if (event->message & 1)
  61. !     /* Resume */
  62. !     gui.in_focus = TRUE;
  63.       else
  64. !     /* Suspend */
  65. !     gui.in_focus = FALSE;
  66. !     gui_update_cursor(TRUE, FALSE);
  67.   }
  68.   
  69.   /*
  70. --- 1920,1930 ----
  71.        * get an activate/desactivate event
  72.        */
  73.       if (event->message & 1)
  74. !         /* Resume */
  75. !     gui_focus_change(TRUE);
  76.       else
  77. !         /* Suspend */
  78. !     gui_focus_change(FALSE);
  79.   }
  80.   
  81.   /*
  82. *** ../vim60.249/src/main.c    Thu Feb 21 17:40:20 2002
  83. --- src/main.c    Thu Feb 21 19:07:01 2002
  84. ***************
  85. *** 171,177 ****
  86.       qnx_init();        /* PhAttach() for clipboard, (and gui) */
  87.   #endif
  88.   
  89. ! #ifdef FEAT_GUI_MAC
  90.       /* Macintosh needs this before any memory is allocated. */
  91.       gui_prepare(&argc, argv);    /* Prepare for possibly starting GUI sometime */
  92.       TIME_MSG("GUI prepared");
  93. --- 171,177 ----
  94.       qnx_init();        /* PhAttach() for clipboard, (and gui) */
  95.   #endif
  96.   
  97. ! #ifdef MAC_OS_CLASSIC
  98.       /* Macintosh needs this before any memory is allocated. */
  99.       gui_prepare(&argc, argv);    /* Prepare for possibly starting GUI sometime */
  100.       TIME_MSG("GUI prepared");
  101. ***************
  102. *** 301,307 ****
  103.   #ifdef FEAT_SUN_WORKSHOP
  104.       findYourself(argv[0]);
  105.   #endif
  106. ! #if defined(FEAT_GUI) && !defined(FEAT_GUI_MAC)
  107.       gui_prepare(&argc, argv);    /* Prepare for possibly starting GUI sometime */
  108.       TIME_MSG("GUI prepared");
  109.   #endif
  110. --- 301,307 ----
  111.   #ifdef FEAT_SUN_WORKSHOP
  112.       findYourself(argv[0]);
  113.   #endif
  114. ! #if defined(FEAT_GUI) && !defined(MAC_OS_CLASSIC)
  115.       gui_prepare(&argc, argv);    /* Prepare for possibly starting GUI sometime */
  116.       TIME_MSG("GUI prepared");
  117.   #endif
  118. ***************
  119. *** 642,650 ****
  120.              -psn_0_10223617 is passed in when invoke from Finder
  121.              or with the 'open' command */
  122.           case 'p':
  123. -         mch_errmsg("What does this mean: ");
  124. -         mch_errmsg(argv[0]);
  125. -         mch_errmsg("\n");
  126.           argv_idx = -1; /* bypass full -psn */
  127.           break;
  128.   #endif
  129. --- 642,647 ----
  130. *** ../vim60.249/src/misc2.c    Thu Feb  7 15:41:28 2002
  131. --- src/misc2.c    Thu Feb 21 19:07:01 2002
  132. ***************
  133. *** 5266,5272 ****
  134.   #define EXTRASIZE 5        /* increment to add to env. size */
  135.   
  136.   static int  envsize = -1;    /* current size of environment */
  137. ! #ifndef MACOS
  138.   extern
  139.   #endif
  140.          char **environ;        /* the global which is your env. */
  141. --- 5272,5278 ----
  142.   #define EXTRASIZE 5        /* increment to add to env. size */
  143.   
  144.   static int  envsize = -1;    /* current size of environment */
  145. ! #ifndef MACOS_CLASSIC
  146.   extern
  147.   #endif
  148.          char **environ;        /* the global which is your env. */
  149. *** ../vim60.249/src/os_mac.h    Thu Aug 23 11:06:28 2001
  150. --- src/os_mac.h    Thu Feb 21 19:07:01 2002
  151. ***************
  152. *** 29,63 ****
  153.   #include <OSUtils.h>
  154.   #include <Files.h>
  155.   #ifdef FEAT_MBYTE
  156. ! #include <Script.h>
  157.   #endif
  158.   
  159.   /*
  160.    * Unix interface
  161.    */
  162. ! #if defined(__MWERKS__)/* Only for metrowerks and MacOSX Compilers */
  163.   # include <unistd.h>
  164.   # include <utsname.h>
  165. - # include <stat.h>
  166.   # include <unix.h>
  167.   #endif
  168. ! #if defined(__APPLE_CC__)
  169.   # include <unistd.h>
  170. - # include <sys/stat.h>
  171. - # include <curses.h>
  172. -   /* Remove some BACKWARD compatibilty stuff */
  173. - # undef reg
  174. - # undef ospeed
  175.   #endif
  176. ! #include <signal.h>
  177. ! #include <errno.h>
  178. ! #include <stdio.h>
  179. ! #include <stdlib.h>
  180. ! #include <time.h>
  181. ! #ifdef MACOS_X
  182. ! # include <dirent.h>
  183.   #endif
  184.   #if defined(__MRC__) || defined(__SC__) /* for Apple MPW Compilers */
  185.   # ifdef powerc
  186.   #  pragma options align=power
  187.   # endif
  188. --- 29,57 ----
  189.   #include <OSUtils.h>
  190.   #include <Files.h>
  191.   #ifdef FEAT_MBYTE
  192. ! # include <Script.h>
  193.   #endif
  194.   
  195.   /*
  196.    * Unix interface
  197.    */
  198. ! #if defined(__MWERKS__) /* for CodeWarrior */
  199.   # include <unistd.h>
  200.   # include <utsname.h>
  201.   # include <unix.h>
  202.   #endif
  203. ! #if defined(__APPLE_CC__) /* for Project Builder and ... */
  204.   # include <unistd.h>
  205.   #endif
  206. ! /* Get stat.h or something similar. Comment: How come some OS get in in vim.h */
  207. ! #if defined(__MWERKS__)
  208. ! # include <stat.h>
  209. ! #endif
  210. ! #if defined(__APPLE_CC__)
  211. ! # include <sys/stat.h>
  212.   #endif
  213.   #if defined(__MRC__) || defined(__SC__) /* for Apple MPW Compilers */
  214. + /* There's no stat.h for MPW? */
  215.   # ifdef powerc
  216.   #  pragma options align=power
  217.   # endif
  218. ***************
  219. *** 71,88 ****
  220.   #  pragma options align=reset
  221.   # endif
  222.   #endif
  223. ! /*
  224. !  * Allow use of MacOS memory allocation subroutine
  225. !  */
  226. ! #if 0        /* this doesn't work, because realloc() isn't redefined */
  227. ! /*
  228. !  * Use Macintosh subroutine to alloc the memory.
  229. !  * (malloc generate Ptr format hard to debug with ZoneRanger)
  230. !  */
  231. ! # define malloc(x) NewPtr(x)
  232. ! # define free(x)   DisposePtr((char *) x)
  233. ! # define realloc() something
  234.   #endif
  235.   
  236.   /*
  237. --- 65,84 ----
  238.   #  pragma options align=reset
  239.   # endif
  240.   #endif
  241. ! #if defined(__APPLE_CC__) /* && defined(HAVE_CURSE) */
  242. ! /* The curses.h from MacOS X provides by default some BACKWARD compatibilty
  243. !  * definition which can cause us problem later on. So we undefine a few of them. */
  244. ! # include <curses.h>
  245. ! # undef reg
  246. ! # undef ospeed
  247. ! #endif
  248. ! #include <signal.h>
  249. ! #include <errno.h>
  250. ! #include <stdio.h>
  251. ! #include <stdlib.h>
  252. ! #include <time.h>
  253. ! #ifdef MACOS_X
  254. ! # include <dirent.h>
  255.   #endif
  256.   
  257.   /*
  258. ***************
  259. *** 100,106 ****
  260.   #  error "You must compile with enums always int!"
  261.   # endif
  262.   # if defined(__MWERKS__) && !defined(__fourbyteints__)
  263. ! #  error "You must compile the projecct with 4-byte ints"
  264.   /* MPW ints are always 4 byte long */
  265.   # endif
  266.   #endif
  267. --- 96,102 ----
  268.   #  error "You must compile with enums always int!"
  269.   # endif
  270.   # if defined(__MWERKS__) && !defined(__fourbyteints__)
  271. ! #  error "You must compile the project with 4-byte ints"
  272.   /* MPW ints are always 4 byte long */
  273.   # endif
  274.   #endif
  275. ***************
  276. *** 134,140 ****
  277.   #define CASE_INSENSITIVE_FILENAME   /* ignore case when comparing file names */
  278.   #define SPACE_IN_FILENAME
  279.   #define BREAKCHECK_SKIP       32        /* call mch_breakcheck() each time, it's
  280. !                        quite fast */
  281.   
  282.   
  283.   #undef  USE_FNAME_CASE        /* So that :e os_Mac.c, :w, save back the file as os_mac.c */
  284. --- 130,136 ----
  285.   #define CASE_INSENSITIVE_FILENAME   /* ignore case when comparing file names */
  286.   #define SPACE_IN_FILENAME
  287.   #define BREAKCHECK_SKIP       32        /* call mch_breakcheck() each time, it's
  288. !                        quite fast. Did I forgot to update the comment */
  289.   
  290.   
  291.   #undef  USE_FNAME_CASE        /* So that :e os_Mac.c, :w, save back the file as os_mac.c */
  292. ***************
  293. *** 323,328 ****
  294. --- 319,325 ----
  295.   
  296.   #define WILDCHAR_LIST "*?[{`$"
  297.   
  298. + /**************/
  299.   #define mch_rename(src, dst) rename(src, dst)
  300.   #define mch_remove(x) unlink((char *)(x))
  301.   #if defined(__MRC__) || defined(__SC__)
  302. ***************
  303. *** 330,336 ****
  304.   # define mch_setenv(name, val, x) setenv((name), (val))
  305.   #elif defined(__APPLE_CC__)
  306.   # define mch_getenv(name)  ((char_u *)getenv((char *)(name)))
  307. ! # define mch_setenv(name, val, x) setenv((name), (val))
  308.   #else
  309.    /* vim_getenv() is in pty.c */
  310.   # define USE_VIMPTY_GETENV
  311. --- 327,334 ----
  312.   # define mch_setenv(name, val, x) setenv((name), (val))
  313.   #elif defined(__APPLE_CC__)
  314.   # define mch_getenv(name)  ((char_u *)getenv((char *)(name)))
  315. ! /*# define mch_setenv(name, val, x) setenv((name), (val)) */ /* Obsoleted by Dany on Oct 30, 2001 */
  316. ! # define mch_setenv(name, val, x) setenv(name, val, x)
  317.   #else
  318.    /* vim_getenv() is in pty.c */
  319.   # define USE_VIMPTY_GETENV
  320. ***************
  321. *** 357,371 ****
  322.   # define SIGPROTOARG    (int)
  323.   # define SIGDEFARG(s)    (s) int s;
  324.   # define SIGDUMMYARG    0
  325. ! # define USE_SYSTEM  /* Output ship do debugger :(, but ot compile */
  326.   # define HAVE_TERMIOS_H 1
  327.   # define SYS_SELECT_WITH_SYS_TIME 1
  328.   # define HAVE_SELECT 1
  329.   # define HAVE_SYS_SELECT_H 1
  330.   # undef  HAVE_AVAIL_MEM
  331.   # define mch_chdir(s) chdir(s)
  332.   #endif
  333.   
  334. ! /* A Mac constat causing big problem to syntax highlighting */
  335.   #define UNKNOWN_CREATOR '????'
  336.   
  337. --- 355,373 ----
  338.   # define SIGPROTOARG    (int)
  339.   # define SIGDEFARG(s)    (s) int s;
  340.   # define SIGDUMMYARG    0
  341. ! /*# define USE_SYSTEM */  /* Output ship do debugger :(, but ot compile */
  342. ! # define HAVE_SYS_WAIT_H 1 /* Attempt */
  343.   # define HAVE_TERMIOS_H 1
  344.   # define SYS_SELECT_WITH_SYS_TIME 1
  345.   # define HAVE_SELECT 1
  346.   # define HAVE_SYS_SELECT_H 1
  347.   # undef  HAVE_AVAIL_MEM
  348. + # define HAVE_PUTENV
  349. + # define HAVE_SETENV
  350. + # define HAVE_RENAME
  351.   # define mch_chdir(s) chdir(s)
  352.   #endif
  353.   
  354. ! /* A Mac constant causing big problem to syntax highlighting */
  355.   #define UNKNOWN_CREATOR '????'
  356.   
  357. *** ../vim60.249/src/os_mac.pbproj/project.pbxproj    Tue Jul 10 16:10:02 2001
  358. --- src/os_mac.pbproj/project.pbxproj    Thu Feb 21 19:08:14 2002
  359. ***************
  360. *** 3,9 ****
  361.       archiveVersion = 1;
  362.       classes = {
  363.       };
  364. !     objectVersion = 32;
  365.       objects = {
  366.           00EF808200C49A857F000001 = {
  367.               isa = PBXFileReference;
  368. --- 3,9 ----
  369.       archiveVersion = 1;
  370.       classes = {
  371.       };
  372. !     objectVersion = 34;
  373.       objects = {
  374.           00EF808200C49A857F000001 = {
  375.               isa = PBXFileReference;
  376. ***************
  377. *** 121,126 ****
  378. --- 121,127 ----
  379.               );
  380.               buildSettings = {
  381.                   COPY_PHASE_STRIP = NO;
  382. +                 OPTIMIZATION_CFLAGS = "-O0";
  383.               };
  384.               isa = PBXBuildStyle;
  385.               name = Development;
  386. ***************
  387. *** 373,379 ****
  388.                   HEADER_SEARCH_PATHS = "proto /Developer/Headers/FlatCarbon";
  389.                   INSTALL_PATH = "$(HOME)/Applications";
  390.                   LIBRARY_SEARCH_PATHS = "";
  391. -                 OPTIMIZATION_CFLAGS = "";
  392.                   OTHER_CFLAGS = "-DMACOS_X";
  393.                   OTHER_LDFLAGS = "";
  394.                   OTHER_REZFLAGS = "";
  395. --- 374,379 ----
  396. ***************
  397. *** 496,501 ****
  398. --- 496,502 ----
  399.                   06B64A4B00BBD0257F000001,
  400.                   F5D0FB2D00F8C2BF01000001,
  401.                   F5E2C54000FACD0901000001,
  402. +                 F5CC3220018E3F6801891561,
  403.               );
  404.               isa = PBXSourcesBuildPhase;
  405.               name = Sources;
  406. ***************
  407. *** 1445,1450 ****
  408. --- 1446,1457 ----
  409.   //F52
  410.   //F53
  411.   //F54
  412. +         F5CC3220018E3F6801891561 = {
  413. +             fileRef = 273798E200B36B037F000001;
  414. +             isa = PBXBuildFile;
  415. +             settings = {
  416. +             };
  417. +         };
  418.           F5D0FB2B00F8C29A01000001 = {
  419.               children = (
  420.                   F5D0FB2C00F8C2BF01000001,
  421. *** ../vim60.249/src/os_unix.c    Thu Feb 21 12:58:20 2002
  422. --- src/os_unix.c    Thu Feb 21 19:07:10 2002
  423. ***************
  424. *** 3457,3468 ****
  425.   finished:
  426.           p_more = p_more_save;
  427.   
  428.           /*
  429.            * Give all typeahead that wasn't used back to ui_inchar().
  430.            */
  431.           if (ta_len)
  432.               ui_inchar_undo(ta_buf, ta_len);
  433.           State = old_State;
  434.           if (toshell_fd >= 0)
  435.               close(toshell_fd);
  436. --- 3511,3523 ----
  437.   finished:
  438.           p_more = p_more_save;
  439.   
  440. + #ifndef MACOS_X_UNIX /* TODO: Is it needed for MACOS_X ? */
  441.           /*
  442.            * Give all typeahead that wasn't used back to ui_inchar().
  443.            */
  444.           if (ta_len)
  445.               ui_inchar_undo(ta_buf, ta_len);
  446. ! #endif
  447.           State = old_State;
  448.           if (toshell_fd >= 0)
  449.               close(toshell_fd);
  450. ***************
  451. *** 3978,3984 ****
  452.       }
  453.   
  454.       /* compile the regexp into a program */
  455. ! #ifdef MACOS_X
  456.       regmatch.rm_ic = TRUE;        /* Behave like Terminal.app */
  457.   #else
  458.       regmatch.rm_ic = FALSE;        /* Don't ever ignore case */
  459. --- 4033,4039 ----
  460.       }
  461.   
  462.       /* compile the regexp into a program */
  463. ! #ifdef MACOS_X /* Can/Should we use CASE_INSENSITIVE_FILENAME instead ?*/
  464.       regmatch.rm_ic = TRUE;        /* Behave like Terminal.app */
  465.   #else
  466.       regmatch.rm_ic = FALSE;        /* Don't ever ignore case */
  467. *** ../vim60.249/src/version.c    Thu Feb 21 17:40:20 2002
  468. --- src/version.c    Thu Feb 21 19:17:17 2002
  469. ***************
  470. *** 608,609 ****
  471. --- 608,611 ----
  472.   {   /* Add new patch number below this line */
  473. + /**/
  474. +     250,
  475.   /**/
  476.  
  477. -- 
  478. The fastest way to get an engineer to solve a problem is to declare that the
  479. problem is unsolvable.  No engineer can walk away from an unsolvable problem
  480. until it's solved.
  481.                 (Scott Adams - The Dilbert principle)
  482.  
  483.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  484. ///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
  485. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  486.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  487.