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

Re: MacOS X, iconv and gettext emulation

Expand Messages
  • Mac Vim Support (Axel Kielhorn)
    ... After defining these errors (and ENOENT, EFAULT and EILSEG (the later is defined in mbyte.c but used in os_macosx.c) and including TextEncodingConverter.h,
    Message 1 of 12 , Jul 14 9:25 AM
    • 0 Attachment
      At 11:38 Uhr +0200 2002-07-09, Bram Moolenaar wrote:
      >
      >#ifndef EINVAL
      ># define EINVAL 22
      >#endif
      >#ifndef E2BIG
      ># define E2BIG 7
      >#endif

      After defining these errors (and ENOENT, EFAULT and EILSEG (the later
      is defined in mbyte.c but used in os_macosx.c) and including
      TextEncodingConverter.h, I discovered that my libraries are out of
      date.

      Now I've updated to Universal headers 3.4.1 (which are probably
      already outdated since carbonLib 1.6 got released.)

      I'm now down to several:

      Error : not a struct/union/class
      os_macosx.c line 294 st = TECCreateConverter(&cd->tec, fromEnc, toEnc);

      And a lot of:

      Error : cannot convert
      'const char *' to
      'unsigned long'
      os_macosx.c line 419 buf_in, in_len, (ByteCount*)&in_true,

      Error : cannot convert
      'char *' to
      'unsigned long'
      os_macosx.c line 420 buf_out, out_len, (ByteCount*)&out_true);

      Error : cannot convert
      'char *' to
      'unsigned long'
      os_macosx.c line 432 buf_out, out_true, (ByteCount*)&rev_in,

      Error : cannot convert
      'char *' to
      'unsigned long'
      os_macosx.c line 433 buf_rev, in_true, (ByteCount*)&rev_out);

      Error : cannot convert
      'char *' to
      'unsigned long'
      os_macosx.c line 459 buf_out, out_len, (ByteCount*)&out_true);

      Error : cannot convert
      'char *' to
      'unsigned long'
      os_macosx.c line 469 buf_out, out_len, (ByteCount*)&out_true);

      Why doesn't the MacOS X compiler complain?

      Axel
    • Benji Fisher
      ... MURAOKA Taro: I have tried compiling, and there are several problems. Easy ones first: 1. I want the application to be named Vim.app instead of gvim.app
      Message 2 of 12 , Jul 16 11:26 AM
      • 0 Attachment
        On Monday, July 1, 2002, at 09:26 PM, MURAOKA Taro wrote:

        >> After your previous patch, some of my menus got translated (into
        >> Japanese?) even though I changed none of the defaults. Should I have
        >> read the Makefile more carefully, or was this your fault?
        >
        > It may be fixed on new patch.
        > Language which used for menu and its font maybe depend on existence of
        > *.lproj directory and System Preferences setting. If there is no
        > *.lproj for your selected language, other one of available *.lproj was
        > used. On previous patch, I had prepared only Japanese.lproj, it caused
        > your case. But on new patch, Make_osx.mak create English.lproj as
        > default. It is expected to show default english menu.
        >
        > If you need, you could specify to create other *.lproj directories
        > additionally using MULTILANG compile option.

        MURAOKA Taro:

        I have tried compiling, and there are several problems. Easy ones
        first:

        1. I want the application to be named Vim.app instead of gvim.app so I
        edited Make_osx.mak . This mostly worked, but po/Make_osx.pl also
        assumes that the executable is called gvim. Can you arrange it so that
        the change in Make_osx.mak is automatically made in po/Make_osx.pl ?

        2. A while ago on this list, Raindog gave us an Info.plist that enables
        drag-and-drop. I have been distributing it with my builds. Could you
        change your makefile so that it includes this improvement? (You can get
        the Info.plist from the patches/ folder on my iDisk or ask and I will
        send it to you directly.) Also, I think that most people prefer Douglas
        Stebila's icon; could you use that instead?
        http://mac.douglas.stebila.ca/code/vim/

        3. I tried compiling with MULTILANG=all . The menus look OK, but the
        introduction screen, the window title, and the status line have some
        unwanted characters. I tried again with MULTILANG=none and the problem
        is still there. Worse, my viminfo file got corrupted: here are the
        first few lines:

        åt| his viminfo file was generated by Vim 6.1.
        åt| ou may edit it if you're careful!

        åt| alue of 'encoding' when this file was written

        (Above copied and pasted from Terminal vim, using the usual system copy
        and paste. Below copied from gvim using "*y3<CR> .)

        Ât†his viminfo file was generated by Vim 6.1.
        Ât†ou may edit it if you're careful!

        Ât†alue of 'encoding' when this file was written
        *encoding=latin1

        4. I tried rm ~/.viminfo ; make clean ; make -f Make_osx.mak . There
        was less recompiling than I expected, and the time stamp on gvim.app/
        did not change; I am not sure if this is a problem. After this, I still
        see the strange characters as before, and the first few lines of
        ~/.viminfo now look like this:

        GÄhis viminfo file was generated by Vim 6.1.
        GÄou may edit it if you're careful!

        GÄalue of 'encoding' when this file was written
        *encoding=latin1

        I am not sure where to go from here. I will post the binary on my
        iDisk as vim61alpha.tar.gz in case you or anyone else wants to try it
        out.

        --Benji Fisher
      • Benji Fisher
        ... I guess that should have been make -f Make_osx.mak clean. I tried again, with more recompilation but without much change in the results. --Benji Fisher
        Message 3 of 12 , Jul 16 12:06 PM
        • 0 Attachment
          On Tuesday, July 16, 2002, at 02:26 PM, Benji Fisher wrote:

          > [snip]
          > 4. I tried rm ~/.viminfo ; make clean ; make -f Make_osx.mak . There
          > was less recompiling than I expected, and the time stamp on gvim.app/
          > did not change; I am not sure if this is a problem.

          I guess that should have been make -f Make_osx.mak clean. I tried
          again, with more recompilation but without much change in the results.

          --Benji Fisher

          http://homepage.mac.com/fisherbb/index.html
        • Mac Vim Support (Axel Kielhorn)
          Last week I wrote that it should be possible to use TEC for Mac Classic. That was a bad thing to do, because I couldn t rest until I got it compiled:-) The
          Message 4 of 12 , Jul 29 9:20 AM
          • 0 Attachment
            Last week I wrote that it should be possible to use TEC for Mac Classic.
            That was a bad thing to do, because I couldn't rest until I got it compiled:-)

            The patches included (against a clean 6.1.118) include the changes to
            get iconv emulation layer compiled with CodeWarrior 2 for MacOS
            Classic.

            What have I done?
            os_macosx.c:
            #include <TextEncodingConverter.h>
            (This is automatically included with carbon.h)
            Changed a lot of variables to the types expected by the library to
            avoid casting: buf_in, buf_out, out_len, out_true, etc.
            CW is really picky about type missmatch.

            os_mac.h:
            #define TRACE

            structs.h:
            Added typedef for MacOS Classic,
            define missing errors.

            Project:
            Added library (Patch not included)

            Things to do:
            Learn how to use encodings to test if it really works.

            Muraoka-san,

            could you please integrate these patches into your version and if
            possible release a new patch against a more recent Vim?

            Everyone else:

            The patches will be probably missing from the list, if you really
            want them, please ask by mail.

            Axel
          • MURAOKA Taro
            Great works!!. ... I see. I will try it on this week end. ... MURAOKA Taro
            Message 5 of 12 , Jul 29 9:27 PM
            • 0 Attachment
              Great works!!.

              > Muraoka-san,
              >
              > could you please integrate these patches into your version and if
              > possible release a new patch against a more recent Vim?

              I see. I will try it on this week end.
              ----
              MURAOKA Taro <koron@...>
            Your message has been successfully submitted and would be delivered to recipients shortly.