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

335vim-6.0t: patch for Cygwin of Japanese Windows

Expand Messages
  • Yasushi Higuchi
    Jan 23, 2001
    • 0 Attachment
      Hello.

      It becomes the following when vim-6.0t is made to work on Cygwin of
      Japanese edition Windows.

      * set charcode=japan -> euc-jp.
      * console of Japanese Windows can't display euc-jp.

      So, it tried to make the following patch.

      * set charcode=japan -> cp932. (fileio.c)
      * #ifdef is added so that it can handle cp932 properly. (multibyte.c)

      screenshot:
      http://www2.raidway.ne.jp/%7Eyzone/bin/vim60t-cygwin-jp.jpg
      (use libiconv-1.5.1)

      # I am sorry for me if it is a funny sentence because it isn't accustomed
      # to English.


      --- ../../vim60t.org/src/multibyte.c Mon Jan 15 04:49:30 2001
      +++ multibyte.c Tue Jan 23 18:29:40 2001
      @@ -13,7 +13,7 @@
      #include "vim.h"
      #include "globals.h"
      #include "option.h"
      -#ifdef WIN32
      +#if defined(WIN32) || defined(__CYGWIN__)
      # include <windows.h>
      #ifndef __MINGW32__
      # include <winnls.h>
      @@ -173,7 +173,7 @@
      #endif
      else
      {
      -#ifdef WIN32
      +#if defined(WIN32) || defined(__CYGWIN__)
      /* cc_dbcs is set by setting 'filecharcode'. It becomes a Windows
      * CodePage identifier, which we can pass directly in to Windows
      * API */
      @@ -305,7 +305,7 @@
      unsigned char tb = trail;

      /* convert process code to JIS */
      -# if defined(WIN32) || defined(macintosh)
      +# if defined(WIN32) || defined(macintosh) || defined(__CYGWIN__)
      /* process code is SJIS */
      if (lb <= 0x9f)
      lb = (lb - 0x81) * 2 + 0x21;
      @@ -393,7 +393,7 @@
      if (c1 >= 0xB0 && c1 <= 0xC8)
      /* Hangul */
      return 20;
      -#ifdef WIN32
      +#if defined(WIN32) || defined(__CYGWIN__)
      else if (c1 <= 0xA0 || c2 <= 0xA0)
      /* Extended Hangul Region : MS UHC(Unified Hangul Code) */
      /* c1: 0x81-0xA0 with c2: 0x41-0x5A, 0x61-0x7A, 0x81-0xFE
      --- ../../vim60t.org/src/fileio.c Mon Jan 22 03:25:13 2001
      +++ fileio.c Tue Jan 23 18:29:40 2001
      @@ -7049,7 +7049,7 @@
      {"ucs-4bl", "ucs-4"},
      {"ucs-4lb", "ucs-4"},
      {"unicode", "ucs-2"},
      -#ifdef WIN32
      +#if defined(WIN32) || defined(__CYGWIN__)
      {"japan", "cp932"},
      #else
      {"japan", "euc-jp"},


      --
      Yasushi HIGUCHI
    • Show all 8 messages in this topic