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

Re: vim 6.0* Win32 "Edit with vim popup" installation FAILS [Patch]

Expand Messages
  • Jonathon Merz
    ... Unfortunately, this still does not work on WinNT :( I ve narrowed the problem a bit, but I have no idea about a workaround unless there is a way to find
    Message 1 of 19 , Jun 29, 2001
      Walter Briscoe wrote:

      > [snip]
      > It is amazing what you can find when you RTFM. The following works on
      > DJGPP and VC5 in W2K and W95. The return value from system is probably
      > uninformative.
      >
      > #include <stdlib.h> /* For system, etc. */
      >
      > int main(void)
      > {
      > #if defined(__DJGPP__)
      > __system_flags |= __system_call_cmdproc; /* Force $COMSPEC in system() */
      > #endif
      >
      > return system("start /w gvim");
      > }


      Unfortunately, this still does not work on WinNT :( I've narrowed the problem
      a bit, but I have no idea about a workaround unless there is a way to find the
      OS version. The trouble is that DJGPP for some reason resolves COMSPEC wrong.
      With the following code:

      main()
      {
      char *comspec_value = getenv("COMSPEC");
      printf("%s\n\n", comspec_value);
      }

      Compiled under most compilers, this prints c:\winnt\system32\cmd.exe on NT
      (which is what my COMSPEC is set to.)

      If I compile that under DJGPP, it prints c:\winnt\system32\command.com. I
      cannot for the life of me figure out why. I found a few spots in the DJGPP
      source where if it cannot find COMSPEC at all, it defaults to c:\command.com,
      but I have no idea how that would get transmuted to
      c:\winnt\system32\command.com, aside from the fact that requiring all Vim
      users to patch their DJGPP in order to build the installer is not a very
      appealing prospect anyway.

      I've subscribed myself to a DJGPP list to try and see if there is a workaround
      for that or a way to detect what version of Windows I'm on. The only thing
      I've found for this so far is __get_dos_version which unfortunately returns 5
      for every version of Windows I've had opportunity to test.

      -Jon
    Your message has been successfully submitted and would be delivered to recipients shortly.