annotate src/os_w32exe.c @ 34999:feffaaeaf744 default tip

Added tag v9.1.0354 for changeset f4511bd98310ff2f001d6796a4e8bcf0257ddafc
author Christian Brabandt <cb@256bit.org>
date Fri, 19 Apr 2024 00:00:04 +0200
parents 7e733046db1d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10042
4aead6a9b7a9 commit https://github.com/vim/vim/commit/edf3f97ae2af024708ebb4ac614227327033ca47
Christian Brabandt <cb@256bit.org>
parents: 7805
diff changeset
1 /* vi:set ts=8 sts=4 sw=4 noet:
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 * VIM - Vi IMproved by Bram Moolenaar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 * GUI support by Robert Webb
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 * Do ":help uganda" in Vim to read copying and usage conditions.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 * Do ":help credits" in Vim to see a list of people who contributed.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 * See README.txt for an overview of the Vim source code.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 * Windows GUI: main program (EXE) entry point:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 *
16194
3a5114768cfa patch 8.1.1102: Win32 exe file contains unused code
Bram Moolenaar <Bram@vim.org>
parents: 16123
diff changeset
13 * Ron Aaron <ronaharon@yahoo.com> wrote this and the (now deleted) DLL support
3a5114768cfa patch 8.1.1102: Win32 exe file contains unused code
Bram Moolenaar <Bram@vim.org>
parents: 16123
diff changeset
14 * code.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 #include "vim.h"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
16194
3a5114768cfa patch 8.1.1102: Win32 exe file contains unused code
Bram Moolenaar <Bram@vim.org>
parents: 16123
diff changeset
18 // cproto doesn't create a prototype for VimMain()
16451
7ae2396cef62 patch 8.1.1230: a lot of code is shared between vim.exe and gvim.exe
Bram Moolenaar <Bram@vim.org>
parents: 16198
diff changeset
19 #ifdef VIMDLL
7ae2396cef62 patch 8.1.1230: a lot of code is shared between vim.exe and gvim.exe
Bram Moolenaar <Bram@vim.org>
parents: 16198
diff changeset
20 __declspec(dllimport)
7ae2396cef62 patch 8.1.1230: a lot of code is shared between vim.exe and gvim.exe
Bram Moolenaar <Bram@vim.org>
parents: 16198
diff changeset
21 #endif
16606
7e733046db1d patch 8.1.1306: Borland support is outdated and doesn't work
Bram Moolenaar <Bram@vim.org>
parents: 16451
diff changeset
22 int VimMain(int argc, char **argv);
16451
7ae2396cef62 patch 8.1.1230: a lot of code is shared between vim.exe and gvim.exe
Bram Moolenaar <Bram@vim.org>
parents: 16198
diff changeset
23 #ifndef VIMDLL
16606
7e733046db1d patch 8.1.1306: Borland support is outdated and doesn't work
Bram Moolenaar <Bram@vim.org>
parents: 16451
diff changeset
24 void SaveInst(HINSTANCE hInst);
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 #ifndef PROTO
16198
b0e19f135e50 patch 8.1.1104: MS-Windows: not all environment variables can be used
Bram Moolenaar <Bram@vim.org>
parents: 16194
diff changeset
28 # ifdef FEAT_GUI
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 int WINAPI
16198
b0e19f135e50 patch 8.1.1104: MS-Windows: not all environment variables can be used
Bram Moolenaar <Bram@vim.org>
parents: 16194
diff changeset
30 wWinMain(
16194
3a5114768cfa patch 8.1.1102: Win32 exe file contains unused code
Bram Moolenaar <Bram@vim.org>
parents: 16123
diff changeset
31 HINSTANCE hInstance,
10783
04eb70c77cf4 patch 8.0.0281: some files are still using ARGSUSED instead of UNUSED
Christian Brabandt <cb@256bit.org>
parents: 10042
diff changeset
32 HINSTANCE hPrevInst UNUSED,
16198
b0e19f135e50 patch 8.1.1104: MS-Windows: not all environment variables can be used
Bram Moolenaar <Bram@vim.org>
parents: 16194
diff changeset
33 LPWSTR lpszCmdLine UNUSED,
10783
04eb70c77cf4 patch 8.0.0281: some files are still using ARGSUSED instead of UNUSED
Christian Brabandt <cb@256bit.org>
parents: 10042
diff changeset
34 int nCmdShow UNUSED)
16198
b0e19f135e50 patch 8.1.1104: MS-Windows: not all environment variables can be used
Bram Moolenaar <Bram@vim.org>
parents: 16194
diff changeset
35 # else
b0e19f135e50 patch 8.1.1104: MS-Windows: not all environment variables can be used
Bram Moolenaar <Bram@vim.org>
parents: 16194
diff changeset
36 int
b0e19f135e50 patch 8.1.1104: MS-Windows: not all environment variables can be used
Bram Moolenaar <Bram@vim.org>
parents: 16194
diff changeset
37 wmain(int argc UNUSED, wchar_t **argv UNUSED)
b0e19f135e50 patch 8.1.1104: MS-Windows: not all environment variables can be used
Bram Moolenaar <Bram@vim.org>
parents: 16194
diff changeset
38 # endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 {
16451
7ae2396cef62 patch 8.1.1230: a lot of code is shared between vim.exe and gvim.exe
Bram Moolenaar <Bram@vim.org>
parents: 16198
diff changeset
40 # ifndef VIMDLL
7ae2396cef62 patch 8.1.1230: a lot of code is shared between vim.exe and gvim.exe
Bram Moolenaar <Bram@vim.org>
parents: 16198
diff changeset
41 # ifdef FEAT_GUI
16194
3a5114768cfa patch 8.1.1102: Win32 exe file contains unused code
Bram Moolenaar <Bram@vim.org>
parents: 16123
diff changeset
42 SaveInst(hInstance);
16451
7ae2396cef62 patch 8.1.1230: a lot of code is shared between vim.exe and gvim.exe
Bram Moolenaar <Bram@vim.org>
parents: 16198
diff changeset
43 # else
7ae2396cef62 patch 8.1.1230: a lot of code is shared between vim.exe and gvim.exe
Bram Moolenaar <Bram@vim.org>
parents: 16198
diff changeset
44 SaveInst(GetModuleHandleW(NULL));
7ae2396cef62 patch 8.1.1230: a lot of code is shared between vim.exe and gvim.exe
Bram Moolenaar <Bram@vim.org>
parents: 16198
diff changeset
45 # endif
16194
3a5114768cfa patch 8.1.1102: Win32 exe file contains unused code
Bram Moolenaar <Bram@vim.org>
parents: 16123
diff changeset
46 # endif
16198
b0e19f135e50 patch 8.1.1104: MS-Windows: not all environment variables can be used
Bram Moolenaar <Bram@vim.org>
parents: 16194
diff changeset
47 VimMain(0, NULL);
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 return 0;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 #endif