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.2 / 7.2.327 < prev    next >
Encoding:
Internet Message Format  |  2010-01-05  |  7.7 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 7.2.327
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.2.327
  11. Problem:    Unused functions in Workshop.
  12. Solution:   Add "#if 0" and minor cleanup. (Dominique Pelle)
  13. Files:        src/workshop.c, src/integration.c, src/ingegration.h
  14.  
  15.  
  16. *** ../vim-7.2.326/src/workshop.c    2009-05-21 23:25:38.000000000 +0200
  17. --- src/workshop.c    2010-01-06 18:10:10.000000000 +0100
  18. ***************
  19. *** 56,67 ****
  20.   static void     load_window(char *, int lnum);
  21.   static void     warp_to_pc(int);
  22.   #ifdef FEAT_BEVAL
  23. ! void        workshop_beval_cb(BalloonEval *, int);
  24.   #endif
  25.   static char    *fixAccelText(char *);
  26.   static void     addMenu(char *, char *, char *);
  27.   static char    *lookupVerb(char *, int);
  28. - static int     computeIndex(int, char_u *, int);
  29.   static void     coloncmd(char *, Boolean);
  30.   
  31.   extern Widget     vimShell;
  32. --- 56,67 ----
  33.   static void     load_window(char *, int lnum);
  34.   static void     warp_to_pc(int);
  35.   #ifdef FEAT_BEVAL
  36. ! void         workshop_beval_cb(BalloonEval *, int);
  37. ! static int     computeIndex(int, char_u *, int);
  38.   #endif
  39.   static char    *fixAccelText(char *);
  40.   static void     addMenu(char *, char *, char *);
  41.   static char    *lookupVerb(char *, int);
  42.   static void     coloncmd(char *, Boolean);
  43.   
  44.   extern Widget     vimShell;
  45. ***************
  46. *** 1624,1631 ****
  47.       }
  48.       }
  49.   }
  50. - #endif
  51.   
  52.       static int
  53.   computeIndex(
  54. --- 1624,1629 ----
  55. ***************
  56. *** 1649,1654 ****
  57. --- 1647,1653 ----
  58.   
  59.       return -1;
  60.   }
  61. + #endif
  62.   
  63.       static void
  64.   addMenu(
  65. *** ../vim-7.2.326/src/integration.c    2008-06-24 22:27:10.000000000 +0200
  66. --- src/integration.c    2010-01-06 18:18:11.000000000 +0100
  67. ***************
  68. *** 78,84 ****
  69.   
  70.   /* Functions private to this file */
  71.   static void workshop_connection_closed(void);
  72. ! static void messageFromEserve(XtPointer clientData, int *NOTUSED1, XtInputId *NOTUSED2);
  73.   static void workshop_disconnect(void);
  74.   static void workshop_sensitivity(int num, char *table);
  75.   static void adjust_sign_name(char *filename);
  76. --- 78,84 ----
  77.   
  78.   /* Functions private to this file */
  79.   static void workshop_connection_closed(void);
  80. ! static void messageFromEserve(XtPointer clientData, int *dum1, XtInputId *dum2);
  81.   static void workshop_disconnect(void);
  82.   static void workshop_sensitivity(int num, char *table);
  83.   static void adjust_sign_name(char *filename);
  84. ***************
  85. *** 157,165 ****
  86.   
  87.   }
  88.   
  89. - /*ARGSUSED*/
  90.   void
  91. ! messageFromEserve(XtPointer clientData, int *NOTUSED1, XtInputId *NOTUSED2)
  92.   {
  93.       char    *cmd;        /* the 1st word of the command */
  94.   
  95. --- 157,166 ----
  96.   
  97.   }
  98.   
  99.   void
  100. ! messageFromEserve(XtPointer clientData UNUSED,
  101. !           int *dum1 UNUSED,
  102. !           XtInputId *dum2 UNUSED)
  103.   {
  104.       char    *cmd;        /* the 1st word of the command */
  105.   
  106. ***************
  107. *** 199,205 ****
  108.               if (sign) {
  109.                   sign++;
  110.               }
  111. !             /* Change sign name to accomodate a different size? */
  112.               adjust_sign_name(sign);
  113.               workshop_add_mark_type(idx, color, sign);
  114.           }
  115. --- 200,206 ----
  116.               if (sign) {
  117.                   sign++;
  118.               }
  119. !             /* Change sign name to accommodate a different size? */
  120.               adjust_sign_name(sign);
  121.               workshop_add_mark_type(idx, color, sign);
  122.           }
  123. ***************
  124. *** 580,586 ****
  125.   #endif
  126.   
  127.   
  128. ! /* Change sign name to accomodate a different size:
  129.    * Create the filename based on the height. The filename format
  130.    * of multisize icons are:
  131.    *    x.xpm   : largest icon
  132. --- 581,587 ----
  133.   #endif
  134.   
  135.   
  136. ! /* Change sign name to accommodate a different size:
  137.    * Create the filename based on the height. The filename format
  138.    * of multisize icons are:
  139.    *    x.xpm   : largest icon
  140. ***************
  141. *** 614,619 ****
  142. --- 615,621 ----
  143.           strcpy(s, ".xpm");
  144.   }
  145.   
  146. + #if 0
  147.   /* Were we invoked by WorkShop? This function can be used early during startup
  148.      if you want to do things differently if the editor is started standalone
  149.      or in WorkShop mode. For example, in standalone mode you may not want to
  150. ***************
  151. *** 627,632 ****
  152. --- 629,635 ----
  153.       }
  154.       return result;
  155.   }
  156. + #endif
  157.   
  158.   /* Connect back to eserve */
  159.   void    workshop_connect(XtAppContext context)
  160. ***************
  161. *** 750,755 ****
  162. --- 753,759 ----
  163.    * Utility functions
  164.    */
  165.   
  166. + #if 0
  167.   /* Set icon for the window */
  168.   void
  169.   workshop_set_icon(Display *display, Widget shell, char **xpmdata,
  170. ***************
  171. *** 793,798 ****
  172. --- 797,803 ----
  173.       }
  174.       XtFree((char *)xpmAttributes.colorsymbols);
  175.   }
  176. + #endif
  177.   
  178.   /* Minimize and maximize shells. From libutil's shell.cc. */
  179.   
  180. ***************
  181. *** 927,933 ****
  182.       return success;
  183.   }
  184.   
  185.   Boolean workshop_get_rows_cols(int *rows, int *cols)
  186.   {
  187.       static int    r = 0;
  188. --- 932,938 ----
  189.       return success;
  190.   }
  191.   
  192. ! #if 0
  193.   Boolean workshop_get_rows_cols(int *rows, int *cols)
  194.   {
  195.       static int    r = 0;
  196. ***************
  197. *** 958,963 ****
  198. --- 963,969 ----
  199.       }
  200.       return success;
  201.   }
  202. + #endif
  203.   
  204.   /*
  205.    * Toolbar code
  206. ***************
  207. *** 1043,1054 ****
  208.   }
  209.   
  210.   
  211.   /*
  212.    * Send information to eserve on certain editor events
  213.    * You must make sure these are called when necessary
  214.    */
  215.   void workshop_file_closed(char *filename)
  216.   {
  217.       char buffer[2*MAXPATHLEN];
  218. --- 1049,1059 ----
  219.   }
  220.   
  221.   
  222. ! #if 0
  223.   /*
  224.    * Send information to eserve on certain editor events
  225.    * You must make sure these are called when necessary
  226.    */
  227.   void workshop_file_closed(char *filename)
  228.   {
  229.       char buffer[2*MAXPATHLEN];
  230. ***************
  231. *** 1056,1061 ****
  232. --- 1061,1067 ----
  233.               NOCATGETS("deletedFile %s\n"), filename);
  234.       write(sd, buffer, strlen(buffer));
  235.   }
  236. + #endif
  237.   
  238.   void workshop_file_closed_lineno(char *filename, int lineno)
  239.   {
  240. ***************
  241. *** 1086,1106 ****
  242.       workshop_moved_marks(filename);
  243.   }
  244.   
  245. ! void workshop_move_mark(char *filename, int markId, int newLineno)
  246.   {
  247.       char buffer[2*MAXPATHLEN];
  248.       vim_snprintf(buffer, sizeof(buffer),
  249. !             NOCATGETS("moveMark %s %d %d\n"), filename, markId, newLineno);
  250.       write(sd, buffer, strlen(buffer));
  251.   }
  252.   
  253. ! void workshop_file_modified(char *filename)
  254.   {
  255.       char buffer[2*MAXPATHLEN];
  256.       vim_snprintf(buffer, sizeof(buffer),
  257. !             NOCATGETS("modifiedFile %s\n"), filename);
  258.       write(sd, buffer, strlen(buffer));
  259.   }
  260.   
  261.   void workshop_frame_moved(int new_x, int new_y, int new_w, int new_h)
  262.   {
  263. --- 1092,1114 ----
  264.       workshop_moved_marks(filename);
  265.   }
  266.   
  267. ! #if 0
  268. ! void workshop_file_modified(char *filename)
  269.   {
  270.       char buffer[2*MAXPATHLEN];
  271.       vim_snprintf(buffer, sizeof(buffer),
  272. !             NOCATGETS("modifiedFile %s\n"), filename);
  273.       write(sd, buffer, strlen(buffer));
  274.   }
  275.   
  276. ! void workshop_move_mark(char *filename, int markId, int newLineno)
  277.   {
  278.       char buffer[2*MAXPATHLEN];
  279.       vim_snprintf(buffer, sizeof(buffer),
  280. !            NOCATGETS("moveMark %s %d %d\n"), filename, markId, newLineno);
  281.       write(sd, buffer, strlen(buffer));
  282.   }
  283. + #endif
  284.   
  285.   void workshop_frame_moved(int new_x, int new_y, int new_w, int new_h)
  286.   {
  287. ***************
  288. *** 1179,1188 ****
  289. --- 1187,1198 ----
  290.   }
  291.   
  292.   /* Send a message to eserve */
  293. + #if defined(NOHANDS_SUPPORT_FUNCTIONS) || defined(FEAT_BEVAL)
  294.   void workshop_send_message(char *buf)
  295.   {
  296.       write(sd, buf, strlen(buf));
  297.   }
  298. + #endif
  299.   
  300.   /* Some methods, like currentFile, cursorPos, etc. are missing here.
  301.    * But it looks like these are used for NoHands testing only so we
  302. *** ../vim-7.2.326/src/version.c    2010-01-06 17:46:03.000000000 +0100
  303. --- src/version.c    2010-01-06 18:20:41.000000000 +0100
  304. ***************
  305. *** 683,684 ****
  306. --- 683,686 ----
  307.   {   /* Add new patch number below this line */
  308. + /**/
  309. +     327,
  310.   /**/
  311.  
  312. -- 
  313. From "know your smileys":
  314.  (:-#    Said something he shouldn't have
  315.  
  316.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  317. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  318. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  319.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  320.