2016-08-29 22:49:24 +02:00
|
|
|
/* vi:set ts=8 sts=4 sw=4 noet:
|
2004-06-13 20:20:40 +00:00
|
|
|
*
|
|
|
|
* VIM - Vi IMproved by Bram Moolenaar
|
|
|
|
* GUI support by Robert Webb
|
|
|
|
*
|
|
|
|
* Do ":help uganda" in Vim to read copying and usage conditions.
|
|
|
|
* Do ":help credits" in Vim to see a list of people who contributed.
|
|
|
|
* See README.txt for an overview of the Vim source code.
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
* Windows GUI: main program (EXE) entry point:
|
|
|
|
*
|
2019-04-02 22:02:32 +02:00
|
|
|
* Ron Aaron <ronaharon@yahoo.com> wrote this and the (now deleted) DLL support
|
|
|
|
* code.
|
2004-06-13 20:20:40 +00:00
|
|
|
*/
|
|
|
|
#include "vim.h"
|
|
|
|
|
2019-04-02 22:02:32 +02:00
|
|
|
// cproto doesn't create a prototype for VimMain()
|
2019-04-28 19:46:49 +02:00
|
|
|
#ifdef VIMDLL
|
|
|
|
__declspec(dllimport)
|
|
|
|
#endif
|
2019-05-09 15:12:55 +02:00
|
|
|
int VimMain(int argc, char **argv);
|
2019-04-28 19:46:49 +02:00
|
|
|
#ifndef VIMDLL
|
2019-05-09 15:12:55 +02:00
|
|
|
void SaveInst(HINSTANCE hInst);
|
2004-06-13 20:20:40 +00:00
|
|
|
#endif
|
|
|
|
|
2019-04-02 22:02:32 +02:00
|
|
|
#ifndef PROTO
|
2019-04-03 20:31:00 +02:00
|
|
|
# ifdef FEAT_GUI
|
2004-06-13 20:20:40 +00:00
|
|
|
int WINAPI
|
2019-04-03 20:31:00 +02:00
|
|
|
wWinMain(
|
2019-04-02 22:02:32 +02:00
|
|
|
HINSTANCE hInstance,
|
2017-02-01 13:43:36 +01:00
|
|
|
HINSTANCE hPrevInst UNUSED,
|
2019-04-03 20:31:00 +02:00
|
|
|
LPWSTR lpszCmdLine UNUSED,
|
2017-02-01 13:43:36 +01:00
|
|
|
int nCmdShow UNUSED)
|
2019-04-03 20:31:00 +02:00
|
|
|
# else
|
|
|
|
int
|
|
|
|
wmain(int argc UNUSED, wchar_t **argv UNUSED)
|
|
|
|
# endif
|
2004-06-13 20:20:40 +00:00
|
|
|
{
|
2019-04-28 19:46:49 +02:00
|
|
|
# ifndef VIMDLL
|
|
|
|
# ifdef FEAT_GUI
|
2019-04-02 22:02:32 +02:00
|
|
|
SaveInst(hInstance);
|
2019-04-28 19:46:49 +02:00
|
|
|
# else
|
|
|
|
SaveInst(GetModuleHandleW(NULL));
|
|
|
|
# endif
|
2019-04-02 22:02:32 +02:00
|
|
|
# endif
|
2019-04-03 20:31:00 +02:00
|
|
|
VimMain(0, NULL);
|
2004-06-13 20:20:40 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
#endif
|