Loading ...
Sorry, an error occurred while loading the content.
 

Patch 6.1.356 (extra)

Expand Messages
  • Bram Moolenaar
    Patch 6.1.356 (extra, depends on, well, eh, several others) Problem: Compiler warnings for using convert_setup() and a few other things. Solution: Add
    Message 1 of 1 , Feb 23, 2003
      Patch 6.1.356 (extra, depends on, well, eh, several others)
      Problem: Compiler warnings for using convert_setup() and a few other
      things.
      Solution: Add typecasts.
      Files: src/mbyte.c, src/os_mswin.c, src/proto/os_win32.pro, src/os_win32.c


      *** ../vim61.355/src/mbyte.c Wed Feb 19 11:21:27 2003
      --- src/mbyte.c Sat Feb 22 15:01:32 2003
      ***************
      *** 579,585 ****
      ime_conv.vc_fd = (iconv_t)-1;
      ime_conv_cp.vc_fd = (iconv_t)-1;
      # endif
      ! convert_setup(&ime_conv, "ucs-2", p_enc);
      ime_conv_cp.vc_type = CONV_DBCS_TO_UCS2;
      ime_conv_cp.vc_dbcs = GetACP();
      ime_conv_cp.vc_factor = 2; /* we don't really know anything about the codepage */
      --- 579,585 ----
      ime_conv.vc_fd = (iconv_t)-1;
      ime_conv_cp.vc_fd = (iconv_t)-1;
      # endif
      ! convert_setup(&ime_conv, (char_u *)"ucs-2", p_enc);
      ime_conv_cp.vc_type = CONV_DBCS_TO_UCS2;
      ime_conv_cp.vc_dbcs = GetACP();
      ime_conv_cp.vc_factor = 2; /* we don't really know anything about the codepage */
      *** ../vim61.355/src/os_mswin.c Sun Feb 23 17:14:04 2003
      --- src/os_mswin.c Sat Feb 22 15:02:54 2003
      ***************
      *** 921,934 ****
      conv.vc_fd = (iconv_t)-1;
      #endif
      /* We might be called before we have p_enc set up. */
      ! convert_setup(&conv, p_enc ? p_enc : "latin1", "utf-8");
      if (conv.vc_type != CONV_NONE)
      {
      str = allocbuf = string_convert(&conv, str, len);
      if (str == NULL)
      return NULL;
      }
      ! convert_setup(&conv, "", "");

      length = utf8_to_ucs2((char_u **)&str, len, NULL);
      ret = (WCHAR *)alloc((unsigned)(length * sizeof(WCHAR)));
      --- 921,935 ----
      conv.vc_fd = (iconv_t)-1;
      #endif
      /* We might be called before we have p_enc set up. */
      ! convert_setup(&conv, p_enc ? p_enc : (char_u *)"latin1",
      ! (char_u *)"utf-8");
      if (conv.vc_type != CONV_NONE)
      {
      str = allocbuf = string_convert(&conv, str, len);
      if (str == NULL)
      return NULL;
      }
      ! convert_setup(&conv, (char_u *)"", (char_u *)"");

      length = utf8_to_ucs2((char_u **)&str, len, NULL);
      ret = (WCHAR *)alloc((unsigned)(length * sizeof(WCHAR)));
      ***************
      *** 984,990 ****
      conv.vc_fd = (iconv_t)-1;
      #endif
      /* We might be called before we have p_enc set up. */
      ! convert_setup(&conv, "utf-8", p_enc? p_enc: "latin1");
      if (conv.vc_type == CONV_NONE)
      {
      /* p_enc is utf-8, so we're done. */
      --- 985,992 ----
      conv.vc_fd = (iconv_t)-1;
      #endif
      /* We might be called before we have p_enc set up. */
      ! convert_setup(&conv, (char_u *)"utf-8",
      ! p_enc? p_enc: (char_u *)"latin1");
      if (conv.vc_type == CONV_NONE)
      {
      /* p_enc is utf-8, so we're done. */
      ***************
      *** 996,1002 ****
      vim_free(utf8_str);
      }

      ! convert_setup(&conv, "", "");
      }

      return enc_str;
      --- 998,1004 ----
      vim_free(utf8_str);
      }

      ! convert_setup(&conv, (char_u *)"", (char_u *)"");
      }

      return enc_str;
      *** ../vim61.355/src/proto/os_win32.pro Sun Aug 4 22:13:27 2002
      --- src/proto/os_win32.pro Sat Feb 22 21:08:15 2003
      ***************
      *** 1,9 ****
      /* os_win32.c */
      int dyn_libintl_init __ARGS((char *libname));
      void dyn_libintl_end __ARGS((void));
      - char *null_libintl_gettext __ARGS((const char *msgid));
      - char *null_libintl_bindtextdomain __ARGS((const char *domainname, const char *dirname));
      - char *null_libintl_textdomain __ARGS((const char *domainname));
      void PlatformId __ARGS((void));
      int mch_windows95 __ARGS((void));
      void mch_setmouse __ARGS((int on));
      --- 1,6 ----
      *** ../vim61.355/src/os_win32.c Sun Feb 16 22:28:48 2003
      --- src/os_win32.c Sat Feb 22 15:10:01 2003
      ***************
      *** 297,315 ****
      dyn_libintl_bindtextdomain = null_libintl_bindtextdomain;
      }

      ! char*
      null_libintl_gettext(const char* msgid)
      {
      return (char*)msgid;
      }

      ! char*
      null_libintl_bindtextdomain(const char* domainname, const char* dirname)
      {
      return NULL;
      }

      ! char*
      null_libintl_textdomain(const char* domainname)
      {
      return NULL;
      --- 297,315 ----
      dyn_libintl_bindtextdomain = null_libintl_bindtextdomain;
      }

      ! static char *
      null_libintl_gettext(const char* msgid)
      {
      return (char*)msgid;
      }

      ! static char *
      null_libintl_bindtextdomain(const char* domainname, const char* dirname)
      {
      return NULL;
      }

      ! static char *
      null_libintl_textdomain(const char* domainname)
      {
      return NULL;
      ***************
      *** 786,792 ****
      static s_dwLastClickTime = 0;
      static BOOL s_fNextIsMiddle = FALSE;

      ! static int cButtons = 0; /* number of buttons supported */

      const DWORD LEFT = FROM_LEFT_1ST_BUTTON_PRESSED;
      const DWORD MIDDLE = FROM_LEFT_2ND_BUTTON_PRESSED;
      --- 786,792 ----
      static s_dwLastClickTime = 0;
      static BOOL s_fNextIsMiddle = FALSE;

      ! static DWORD cButtons = 0; /* number of buttons supported */

      const DWORD LEFT = FROM_LEFT_1ST_BUTTON_PRESSED;
      const DWORD MIDDLE = FROM_LEFT_2ND_BUTTON_PRESSED;
      *** ../vim61.355/src/version.c Sun Feb 23 17:31:09 2003
      --- src/version.c Sun Feb 23 17:43:09 2003
      ***************
      *** 608,609 ****
      --- 612,615 ----
      { /* Add new patch number below this line */
      + /**/
      + 356,
      /**/

      --
      "It's so simple to be wise. Just think of something stupid to say
      and then don't say it." -- Sam Levenson

      /// Bram Moolenaar -- Bram@... -- 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 at Amazon -- http://ICCF.nl/click1.html ///
    Your message has been successfully submitted and would be delivered to recipients shortly.