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 / 7.0 / 7.0.233 < prev    next >
Encoding:
Internet Message Format  |  2007-04-25  |  9.5 KB

  1. To: vim-dev@vim.org
  2. Subject: patch 7.0.233 (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 7.0.233 (extra)
  11. Problem:    Mac: code formatted badly.
  12. Solution:   Fix code formatting
  13. Files:        src/gui_mac.c
  14.  
  15.  
  16. *** ../vim-7.0.232/src/gui_mac.c    Thu Apr 26 18:22:12 2007
  17. --- src/gui_mac.c    Fri Mar 16 11:26:05 2007
  18. ***************
  19. *** 28,38 ****
  20.    *
  21.    */
  22.   
  23. !  /* TODO (Jussi)
  24. !   *   * Clipboard does not work (at least some cases)
  25. !   *   * ATSU font rendering has some problems
  26. !   *   * Investigate and remove dead code (there is still lots of that)
  27. !   */
  28.   
  29.   #include <Devices.h> /* included first to avoid CR problems */
  30.   #include "vim.h"
  31. --- 28,38 ----
  32.    *
  33.    */
  34.   
  35. ! /* TODO (Jussi)
  36. !  *   * Clipboard does not work (at least some cases)
  37. !  *   * ATSU font rendering has some problems
  38. !  *   * Investigate and remove dead code (there is still lots of that)
  39. !  */
  40.   
  41.   #include <Devices.h> /* included first to avoid CR problems */
  42.   #include "vim.h"
  43. ***************
  44. *** 504,512 ****
  45.       /* Get number of files in list */
  46.       *error = AECountItems(theList, numFiles);
  47.       if (*error)
  48. !     {
  49. !     return(fnames);
  50. !     }
  51.   
  52.       /* Allocate the pointer list */
  53.       fnames = (char_u **) alloc(*numFiles * sizeof(char_u *));
  54. --- 504,510 ----
  55.       /* Get number of files in list */
  56.       *error = AECountItems(theList, numFiles);
  57.       if (*error)
  58. !     return fnames;
  59.   
  60.       /* Allocate the pointer list */
  61.       fnames = (char_u **) alloc(*numFiles * sizeof(char_u *));
  62. ***************
  63. *** 526,532 ****
  64.       {
  65.           /* Caller is able to clean up */
  66.           /* TODO: Should be clean up or not? For safety. */
  67. !         return(fnames);
  68.       }
  69.   
  70.       /* Convert the FSSpec to a pathname */
  71. --- 524,530 ----
  72.       {
  73.           /* Caller is able to clean up */
  74.           /* TODO: Should be clean up or not? For safety. */
  75. !         return fnames;
  76.       }
  77.   
  78.       /* Convert the FSSpec to a pathname */
  79. ***************
  80. *** 589,603 ****
  81.   
  82.       error = AEGetParamPtr(theAEvent, keyDirectObject, typeChar, &typeCode, (Ptr) &SearchData, sizeof(WindowSearch), &actualSize);
  83.       if (error)
  84. !     {
  85. !     return(error);
  86. !     }
  87.   
  88.       error = HandleUnusedParms(theAEvent);
  89.       if (error)
  90. !     {
  91. !     return(error);
  92. !     }
  93.   
  94.       for (buf = firstbuf; buf != NULL; buf = buf->b_next)
  95.       if (buf->b_ml.ml_mfp != NULL
  96. --- 587,597 ----
  97.   
  98.       error = AEGetParamPtr(theAEvent, keyDirectObject, typeChar, &typeCode, (Ptr) &SearchData, sizeof(WindowSearch), &actualSize);
  99.       if (error)
  100. !     return error;
  101.   
  102.       error = HandleUnusedParms(theAEvent);
  103.       if (error)
  104. !     return error;
  105.   
  106.       for (buf = firstbuf; buf != NULL; buf = buf->b_next)
  107.       if (buf->b_ml.ml_mfp != NULL
  108. ***************
  109. *** 668,676 ****
  110.   
  111.       error = HandleUnusedParms(theAEvent);
  112.       if (error)
  113. !     {
  114. !     return(error);
  115. !     }
  116.   
  117.       /* Send the reply */
  118.   /*  replyObject.descriptorType = typeNull;
  119. --- 662,668 ----
  120.   
  121.       error = HandleUnusedParms(theAEvent);
  122.       if (error)
  123. !     return error;
  124.   
  125.       /* Send the reply */
  126.   /*  replyObject.descriptorType = typeNull;
  127. ***************
  128. *** 679,687 ****
  129.   /* AECreateDesc(typeChar, (Ptr)&title[1], title[0], &data) */
  130.       error = AECreateList(nil, 0, false, &replyList);
  131.       if (error)
  132. !     {
  133. !     return(error);
  134. !     }
  135.   
  136.   #if 0
  137.       error = AECountItems(&replyList, &numFiles);
  138. --- 671,677 ----
  139.   /* AECreateDesc(typeChar, (Ptr)&title[1], title[0], &data) */
  140.       error = AECreateList(nil, 0, false, &replyList);
  141.       if (error)
  142. !     return error;
  143.   
  144.   #if 0
  145.       error = AECountItems(&replyList, &numFiles);
  146. ***************
  147. *** 775,783 ****
  148.       error = AEGetParamPtr(theAEvent, keyDirectObject, typeChar, &typeCode, (Ptr) &GetTextData, sizeof(GetTextData), &actualSize);
  149.   
  150.       if (error)
  151. !     {
  152. !     return(error);
  153. !     }
  154.   
  155.       for (buf = firstbuf; buf != NULL; buf = buf->b_next)
  156.       if (buf->b_ml.ml_mfp != NULL)
  157. --- 765,771 ----
  158.       error = AEGetParamPtr(theAEvent, keyDirectObject, typeChar, &typeCode, (Ptr) &GetTextData, sizeof(GetTextData), &actualSize);
  159.   
  160.       if (error)
  161. !     return error;
  162.   
  163.       for (buf = firstbuf; buf != NULL; buf = buf->b_next)
  164.       if (buf->b_ml.ml_mfp != NULL)
  165. ***************
  166. *** 826,837 ****
  167.       }
  168.   
  169.       error = HandleUnusedParms(theAEvent);
  170. -     if (error)
  171. -     {
  172. -     return(error);
  173. -     }
  174.   
  175. !     return(error);
  176.   }
  177.   
  178.   /*
  179. --- 814,821 ----
  180.       }
  181.   
  182.       error = HandleUnusedParms(theAEvent);
  183.   
  184. !     return error;
  185.   }
  186.   
  187.   /*
  188. ***************
  189. *** 1017,1025 ****
  190.       /* the direct object parameter is the list of aliases to files (one or more) */
  191.       error = AEGetParamDesc(theAEvent, keyDirectObject, typeAEList, &theList);
  192.       if (error)
  193. !     {
  194. !     return(error);
  195. !     }
  196.   
  197.   
  198.       error = AEGetParamPtr(theAEvent, keyAEPosition, typeChar, &typeCode, (Ptr) &thePosition, sizeof(SelectionRange), &actualSize);
  199. --- 1001,1007 ----
  200.       /* the direct object parameter is the list of aliases to files (one or more) */
  201.       error = AEGetParamDesc(theAEvent, keyDirectObject, typeAEList, &theList);
  202.       if (error)
  203. !     return error;
  204.   
  205.   
  206.       error = AEGetParamPtr(theAEvent, keyAEPosition, typeChar, &typeCode, (Ptr) &thePosition, sizeof(SelectionRange), &actualSize);
  207. ***************
  208. *** 1028,1036 ****
  209.       if (error == errAEDescNotFound)
  210.       error = noErr;
  211.       if (error)
  212. !     {
  213. !     return(error);
  214. !     }
  215.   
  216.   /*
  217.       error = AEGetParamDesc(theAEvent, keyAEPosition, typeChar, &thePosition);
  218. --- 1010,1016 ----
  219.       if (error == errAEDescNotFound)
  220.       error = noErr;
  221.       if (error)
  222. !     return error;
  223.   
  224.   /*
  225.       error = AEGetParamDesc(theAEvent, keyAEPosition, typeChar, &thePosition);
  226. ***************
  227. *** 1134,1148 ****
  228.       /* Fake mouse event to wake from stall */
  229.       PostEvent(mouseUp, 0);
  230.   
  231. !   finished:
  232.       AEDisposeDesc(&theList); /* dispose what we allocated */
  233.   
  234.       error = HandleUnusedParms(theAEvent);
  235. !     if (error)
  236. !     {
  237. !     return(error);
  238. !     }
  239. !     return(error);
  240.   }
  241.   
  242.   /*
  243. --- 1114,1124 ----
  244.       /* Fake mouse event to wake from stall */
  245.       PostEvent(mouseUp, 0);
  246.   
  247. ! finished:
  248.       AEDisposeDesc(&theList); /* dispose what we allocated */
  249.   
  250.       error = HandleUnusedParms(theAEvent);
  251. !     return error;
  252.   }
  253.   
  254.   /*
  255. ***************
  256. *** 1158,1169 ****
  257.       OSErr    error = noErr;
  258.   
  259.       error = HandleUnusedParms(theAEvent);
  260. !     if (error)
  261. !     {
  262. !     return(error);
  263. !     }
  264. !     return(error);
  265.   }
  266.   
  267.   /*
  268. --- 1134,1140 ----
  269.       OSErr    error = noErr;
  270.   
  271.       error = HandleUnusedParms(theAEvent);
  272. !     return error;
  273.   }
  274.   
  275.   /*
  276. ***************
  277. *** 1180,1193 ****
  278.   
  279.       error = HandleUnusedParms(theAEvent);
  280.       if (error)
  281. !     {
  282. !     return(error);
  283. !     }
  284.   
  285.       /* Need to fake a :confirm qa */
  286.       do_cmdline_cmd((char_u *)"confirm qa");
  287.   
  288. !     return(error);
  289.   }
  290.   
  291.   /*
  292. --- 1151,1162 ----
  293.   
  294.       error = HandleUnusedParms(theAEvent);
  295.       if (error)
  296. !     return error;
  297.   
  298.       /* Need to fake a :confirm qa */
  299.       do_cmdline_cmd((char_u *)"confirm qa");
  300.   
  301. !     return error;
  302.   }
  303.   
  304.   /*
  305. ***************
  306. *** 1203,1214 ****
  307.       OSErr    error = noErr;
  308.   
  309.       error = HandleUnusedParms(theAEvent);
  310. -     if (error)
  311. -     {
  312. -     return(error);
  313. -     }
  314.   
  315. !     return(error);
  316.   }
  317.   
  318.   /*
  319. --- 1172,1179 ----
  320.       OSErr    error = noErr;
  321.   
  322.       error = HandleUnusedParms(theAEvent);
  323.   
  324. !     return error;
  325.   }
  326.   
  327.   /*
  328. ***************
  329. *** 1225,1236 ****
  330.       OSErr    error = noErr;
  331.   
  332.       error = HandleUnusedParms(theAEvent);
  333. -     if (error)
  334. -     {
  335. -     return(error);
  336. -     }
  337.   
  338. !     return(error);
  339.   }
  340.   
  341.   
  342. --- 1190,1197 ----
  343.       OSErr    error = noErr;
  344.   
  345.       error = HandleUnusedParms(theAEvent);
  346.   
  347. !     return error;
  348.   }
  349.   
  350.   
  351. ***************
  352. *** 2517,2523 ****
  353.   
  354.       return noErr;
  355.   
  356. !   bail:
  357.       /*
  358.        * when we fail give any additional callback handler a chance to perform
  359.        * it's actions
  360. --- 2478,2484 ----
  361.   
  362.       return noErr;
  363.   
  364. ! bail:
  365.       /*
  366.        * when we fail give any additional callback handler a chance to perform
  367.        * it's actions
  368. ***************
  369. *** 2907,2913 ****
  370.   #endif
  371.   
  372.       static OSErr
  373. ! receiveHandler(WindowRef theWindow, void* handlerRefCon, DragRef theDrag)
  374.   {
  375.       int        x, y;
  376.       int_u    modifiers;
  377. --- 2868,2874 ----
  378.   #endif
  379.   
  380.       static OSErr
  381. ! receiveHandler(WindowRef theWindow, void *handlerRefCon, DragRef theDrag)
  382.   {
  383.       int        x, y;
  384.       int_u    modifiers;
  385. ***************
  386. *** 4982,4988 ****
  387.       SetControl32BitMaximum (sb->id, max);
  388.       SetControl32BitMinimum (sb->id, 0);
  389.       SetControl32BitValue   (sb->id, val);
  390. !     SetControlViewSize     (sb->id, size);    
  391.   #ifdef DEBUG_MAC_SB
  392.       printf("thumb_sb (%x) %x, %x,%x\n",sb->id, val, size, max);
  393.   #endif
  394. --- 4943,4949 ----
  395.       SetControl32BitMaximum (sb->id, max);
  396.       SetControl32BitMinimum (sb->id, 0);
  397.       SetControl32BitValue   (sb->id, val);
  398. !     SetControlViewSize     (sb->id, size);
  399.   #ifdef DEBUG_MAC_SB
  400.       printf("thumb_sb (%x) %x, %x,%x\n",sb->id, val, size, max);
  401.   #endif
  402. *** ../vim-7.0.232/src/version.c    Thu Apr 26 18:22:12 2007
  403. --- src/version.c    Thu Apr 26 18:41:08 2007
  404. ***************
  405. *** 668,669 ****
  406. --- 668,671 ----
  407.   {   /* Add new patch number below this line */
  408. + /**/
  409. +     233,
  410.   /**/
  411.  
  412. -- 
  413. hundred-and-one symptoms of being an internet addict:
  414. 25. You believe nothing looks sexier than a man in boxer shorts illuminated
  415.     only by a 17" inch svga monitor.
  416.  
  417.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  418. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  419. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  420.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  421.