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

Patch 6.3.041 (extra)

Expand Messages
  • Bram Moolenaar
    Patch 6.3.041 (extra) Problem: Win32: When the path to a file has Russian characters, :cd %:p:h doesn t work. (Valery Kondakoff) Solution: Use a wide
    Message 1 of 35 , Dec 5, 2004
      Patch 6.3.041 (extra)
      Problem: Win32: When the path to a file has Russian characters, ":cd %:p:h"
      doesn't work. (Valery Kondakoff)
      Solution: Use a wide function to change directory.
      Files: src/os_mswin.c


      *** ../vim-6.3.040/src/os_mswin.c Sun Sep 5 20:48:38 2004
      --- src/os_mswin.c Sun Dec 5 16:39:37 2004
      ***************
      *** 633,638 ****
      --- 633,655 ----
      if (*path == NUL) /* drive name only */
      return 0;

      + #ifdef FEAT_MBYTE
      + if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
      + {
      + WCHAR *p = enc_to_ucs2(path, NULL);
      + int n;
      +
      + if (p != NULL)
      + {
      + n = _wchdir(p);
      + vim_free(p);
      + if (n == 0)
      + return 0;
      + /* Retry with non-wide function (for Windows 98). */
      + }
      + }
      + #endif
      +
      return chdir(path); /* let the normal chdir() do the rest */
      }

      *** ../vim-6.3.040/src/version.c Sun Dec 5 16:18:46 2004
      --- src/version.c Sun Dec 5 16:42:01 2004
      ***************
      *** 643,644 ****
      --- 643,646 ----
      { /* Add new patch number below this line */
      + /**/
      + 41,
      /**/

      --
      For large projects, Team Leaders use sophisticated project management software
      to keep track of who's doing what. The software collects the lies and guesses
      of the project team and organizes them in to instantly outdated charts that
      are too boring to look at closely. This is called "planning".
      (Scott Adams - The Dilbert principle)

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
      \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
    • Alejandro López-Valencia
      ... Yes, you need nmake to be able to use the compiler as well as link, other utilities equivalent to the GNU binutils and all the headers and libraries, that
      Message 35 of 35 , Dec 16, 2004
        On 15/12/2004 10:52 p.m., Antoine J. Mechelynck wrote:
        > On 16/12/2004 3:34, Alejandro López-Valencia wrote:

        >> Did you remember to download the Microsoft's PSDK? Else, the MS
        >> compiler won't be useful. Vim needs access to headers and import
        >> libraries included there (as well as nmake and other tools).
        >>
        >
        > Reading the Make_mvc.mak convinced me that it wouldn't be useful.
        >
        > I just had a try with Make_cyg.mak but it aborted (a perl file not
        > found; and errors for spurious /R and /P "switches" when compiling
        > pathdef.c

        Yes, you need nmake to be able to use the compiler as well as link,
        other utilities equivalent to the GNU binutils and all the headers and
        libraries, that means installing the PSDK (measely 380 Mb download,
        that's what has held me over it :-).

        > IIUC what you're saying, I could add the following after #!/bin/bash in
        > my makevim.sh:
        >
        > export PERL=`cygpath -u $PERL`
        > export PYTHON=`cygpath -u $PYTHON`
        > export RUBY=`cygpath -u $RUBY`
        > export TCL=`cygpath -u $TCL`

        Correct. But you don't need to export the variables. All the children
        processes of your shell script inherit the environment set up at the
        beginning. Else you'd need to kill and start a new shell to obtain a
        clean environment.

        > cygwin takes care of converting the $PATH; and ATM I don't see other
        > paths that need converting, since make and gcc are found by virtue of
        > being in /bin

        Yup.

        > I'm not setting paths in permanent environment variables (visible
        > outside cygwin) to forward slashes because XP cmd.exe (and most other
        > Windows-native programs) require backslashes; it sees forward slashes as
        > option separators.

        Yes, that's a "best practice" with Cygwin. Try to keep it as isolated
        from the plain win32 environment as possible.

        > Best Regards,
        > Tony.

        You welcome!

        BTW, you may want to make bash 8bit-clean. This is what I have in my
        .inputrc file:

        # Make CLI 8bit clean (python, clisp, guile, bash...)
        set meta-flag on
        set convert-meta off
        set input-meta on
        set output-meta on
        $if Bash
        # rebind tab to complete cli on file list
        TAB: menu-compete
        $endif

        Cheers,

        Alejo

        --
        Alejandro López-Valencia

        Lo que Natura non da, Salamanca non presta.
        Francisco de Quevedo y Villegas
      Your message has been successfully submitted and would be delivered to recipients shortly.