diff options
Diffstat (limited to 'src/os_w32exe.c')
-rw-r--r-- | src/os_w32exe.c | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/src/os_w32exe.c b/src/os_w32exe.c index 197d65da4..d3ac092b4 100644 --- a/src/os_w32exe.c +++ b/src/os_w32exe.c @@ -10,7 +10,7 @@ /* * Windows GUI: main program (EXE) entry point: * - * Ron Aaron <ronaharon@yahoo.com> wrote this and the DLL support code. + * Ron Aaron <ronaharon@yahoo.com> wrote this and the DLL support code. */ #include "vim.h" @@ -42,36 +42,25 @@ static void (_cdecl *pSaveInst)(HINSTANCE); WinMain( HINSTANCE hInstance UNUSED, HINSTANCE hPrevInst UNUSED, - LPSTR lpszCmdLine, + LPSTR lpszCmdLine UNUSED, int nCmdShow UNUSED) { int argc = 0; - char **argv; - char *tofree; - char prog[256]; + char **argv = NULL; #ifdef VIMDLL + char prog[256]; char *p; HANDLE hLib; -#endif /* Ron: added full path name so that the $VIM variable will get set to our * startup path (so the .vimrc file can be found w/o a VIM env. var.) */ GetModuleFileName(NULL, prog, 255); - argc = get_cmd_args(prog, (char *)lpszCmdLine, &argv, &tofree); - if (argc == 0) - { - MessageBox(0, "Could not allocate memory for command line.", - "VIM Error", 0); - return 0; - } - -#ifdef DYNAMIC_GETTEXT +# ifdef DYNAMIC_GETTEXT /* Initialize gettext library */ dyn_libintl_init(); -#endif +# endif -#ifdef VIMDLL // LoadLibrary - get name of dll to load in here: p = strrchr(prog, '\\'); if (p != NULL) @@ -127,9 +116,6 @@ WinMain( FreeLibrary(hLib); errout: #endif - free(argv); - if (tofree != NULL) - free(tofree); free_cmd_argsW(); return 0; |