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.1.356 < prev    next >
Encoding:
Internet Message Format  |  2003-02-22  |  5.7 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.356 (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.1.356 (extra, depends on, well, eh, several others)
  11. Problem:    Compiler warnings for using convert_setup() and a few other
  12.         things.
  13. Solution:   Add typecasts.
  14. Files:        src/mbyte.c, src/os_mswin.c, src/proto/os_win32.pro, src/os_win32.c
  15.  
  16.  
  17. *** ../vim61.355/src/mbyte.c    Wed Feb 19 11:21:27 2003
  18. --- src/mbyte.c    Sat Feb 22 15:01:32 2003
  19. ***************
  20. *** 579,585 ****
  21.       ime_conv.vc_fd = (iconv_t)-1;
  22.       ime_conv_cp.vc_fd = (iconv_t)-1;
  23.   # endif
  24. !     convert_setup(&ime_conv, "ucs-2", p_enc);
  25.       ime_conv_cp.vc_type = CONV_DBCS_TO_UCS2;
  26.       ime_conv_cp.vc_dbcs = GetACP();
  27.       ime_conv_cp.vc_factor = 2; /* we don't really know anything about the codepage */
  28. --- 579,585 ----
  29.       ime_conv.vc_fd = (iconv_t)-1;
  30.       ime_conv_cp.vc_fd = (iconv_t)-1;
  31.   # endif
  32. !     convert_setup(&ime_conv, (char_u *)"ucs-2", p_enc);
  33.       ime_conv_cp.vc_type = CONV_DBCS_TO_UCS2;
  34.       ime_conv_cp.vc_dbcs = GetACP();
  35.       ime_conv_cp.vc_factor = 2; /* we don't really know anything about the codepage */
  36. *** ../vim61.355/src/os_mswin.c    Sun Feb 23 17:14:04 2003
  37. --- src/os_mswin.c    Sat Feb 22 15:02:54 2003
  38. ***************
  39. *** 921,934 ****
  40.       conv.vc_fd = (iconv_t)-1;
  41.   #endif
  42.       /* We might be called before we have p_enc set up. */
  43. !     convert_setup(&conv, p_enc ? p_enc : "latin1", "utf-8");
  44.       if (conv.vc_type != CONV_NONE)
  45.       {
  46.           str = allocbuf = string_convert(&conv, str, len);
  47.           if (str == NULL)
  48.           return NULL;
  49.       }
  50. !     convert_setup(&conv, "", "");
  51.   
  52.       length = utf8_to_ucs2((char_u **)&str, len, NULL);
  53.       ret = (WCHAR *)alloc((unsigned)(length * sizeof(WCHAR)));
  54. --- 921,935 ----
  55.       conv.vc_fd = (iconv_t)-1;
  56.   #endif
  57.       /* We might be called before we have p_enc set up. */
  58. !     convert_setup(&conv, p_enc ? p_enc : (char_u *)"latin1",
  59. !                                (char_u *)"utf-8");
  60.       if (conv.vc_type != CONV_NONE)
  61.       {
  62.           str = allocbuf = string_convert(&conv, str, len);
  63.           if (str == NULL)
  64.           return NULL;
  65.       }
  66. !     convert_setup(&conv, (char_u *)"", (char_u *)"");
  67.   
  68.       length = utf8_to_ucs2((char_u **)&str, len, NULL);
  69.       ret = (WCHAR *)alloc((unsigned)(length * sizeof(WCHAR)));
  70. ***************
  71. *** 984,990 ****
  72.       conv.vc_fd = (iconv_t)-1;
  73.   #endif
  74.       /* We might be called before we have p_enc set up. */
  75. !     convert_setup(&conv, "utf-8", p_enc? p_enc: "latin1");
  76.       if (conv.vc_type == CONV_NONE)
  77.       {
  78.           /* p_enc is utf-8, so we're done. */
  79. --- 985,992 ----
  80.       conv.vc_fd = (iconv_t)-1;
  81.   #endif
  82.       /* We might be called before we have p_enc set up. */
  83. !     convert_setup(&conv, (char_u *)"utf-8",
  84. !                         p_enc? p_enc: (char_u *)"latin1");
  85.       if (conv.vc_type == CONV_NONE)
  86.       {
  87.           /* p_enc is utf-8, so we're done. */
  88. ***************
  89. *** 996,1002 ****
  90.           vim_free(utf8_str);
  91.       }
  92.   
  93. !     convert_setup(&conv, "", "");
  94.       }
  95.   
  96.       return enc_str;
  97. --- 998,1004 ----
  98.           vim_free(utf8_str);
  99.       }
  100.   
  101. !     convert_setup(&conv, (char_u *)"", (char_u *)"");
  102.       }
  103.   
  104.       return enc_str;
  105. *** ../vim61.355/src/proto/os_win32.pro    Sun Aug  4 22:13:27 2002
  106. --- src/proto/os_win32.pro    Sat Feb 22 21:08:15 2003
  107. ***************
  108. *** 1,9 ****
  109.   /* os_win32.c */
  110.   int dyn_libintl_init __ARGS((char *libname));
  111.   void dyn_libintl_end __ARGS((void));
  112. - char *null_libintl_gettext __ARGS((const char *msgid));
  113. - char *null_libintl_bindtextdomain __ARGS((const char *domainname, const char *dirname));
  114. - char *null_libintl_textdomain __ARGS((const char *domainname));
  115.   void PlatformId __ARGS((void));
  116.   int mch_windows95 __ARGS((void));
  117.   void mch_setmouse __ARGS((int on));
  118. --- 1,6 ----
  119. *** ../vim61.355/src/os_win32.c    Sun Feb 16 22:28:48 2003
  120. --- src/os_win32.c    Sat Feb 22 15:10:01 2003
  121. ***************
  122. *** 297,315 ****
  123.       dyn_libintl_bindtextdomain    = null_libintl_bindtextdomain;
  124.   }
  125.   
  126. !     char*
  127.   null_libintl_gettext(const char* msgid)
  128.   {
  129.       return (char*)msgid;
  130.   }
  131.   
  132. !     char*
  133.   null_libintl_bindtextdomain(const char* domainname, const char* dirname)
  134.   {
  135.       return NULL;
  136.   }
  137.   
  138. !     char*
  139.   null_libintl_textdomain(const char* domainname)
  140.   {
  141.       return NULL;
  142. --- 297,315 ----
  143.       dyn_libintl_bindtextdomain    = null_libintl_bindtextdomain;
  144.   }
  145.   
  146. !     static char *
  147.   null_libintl_gettext(const char* msgid)
  148.   {
  149.       return (char*)msgid;
  150.   }
  151.   
  152. !     static char *
  153.   null_libintl_bindtextdomain(const char* domainname, const char* dirname)
  154.   {
  155.       return NULL;
  156.   }
  157.   
  158. !     static char *
  159.   null_libintl_textdomain(const char* domainname)
  160.   {
  161.       return NULL;
  162. ***************
  163. *** 786,792 ****
  164.       static s_dwLastClickTime = 0;
  165.       static BOOL s_fNextIsMiddle = FALSE;
  166.   
  167. !     static int cButtons = 0;    /* number of buttons supported */
  168.   
  169.       const DWORD LEFT = FROM_LEFT_1ST_BUTTON_PRESSED;
  170.       const DWORD MIDDLE = FROM_LEFT_2ND_BUTTON_PRESSED;
  171. --- 786,792 ----
  172.       static s_dwLastClickTime = 0;
  173.       static BOOL s_fNextIsMiddle = FALSE;
  174.   
  175. !     static DWORD cButtons = 0;    /* number of buttons supported */
  176.   
  177.       const DWORD LEFT = FROM_LEFT_1ST_BUTTON_PRESSED;
  178.       const DWORD MIDDLE = FROM_LEFT_2ND_BUTTON_PRESSED;
  179. *** ../vim61.355/src/version.c    Sun Feb 23 17:31:09 2003
  180. --- src/version.c    Sun Feb 23 17:43:09 2003
  181. ***************
  182. *** 608,609 ****
  183. --- 612,615 ----
  184.   {   /* Add new patch number below this line */
  185. + /**/
  186. +     356,
  187.   /**/
  188.  
  189. -- 
  190. "It's so simple to be wise.  Just think of something stupid to say
  191. and then don't say it."        -- Sam Levenson  
  192.  
  193.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  194. ///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
  195. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  196.  \\\     Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///
  197.