Mercurial > vim
annotate src/os_w32exe.c @ 16194:3a5114768cfa v8.1.1102
patch 8.1.1102: Win32 exe file contains unused code
commit https://github.com/vim/vim/commit/b26705afb55955306ffbe2a390e02fc052802b77
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Apr 2 22:02:32 2019 +0200
patch 8.1.1102: Win32 exe file contains unused code
Problem: Win32 exe file contains unused code.
Solution: Remove unused #ifdefs and code. (Ken Takata, closes https://github.com/vim/vim/issues/4198)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 02 Apr 2019 22:15:04 +0200 |
parents | a246b020984c |
children | b0e19f135e50 |
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 | 2 * |
3 * VIM - Vi IMproved by Bram Moolenaar | |
4 * GUI support by Robert Webb | |
5 * | |
6 * Do ":help uganda" in Vim to read copying and usage conditions. | |
7 * Do ":help credits" in Vim to see a list of people who contributed. | |
8 * See README.txt for an overview of the Vim source code. | |
9 */ | |
10 /* | |
11 * Windows GUI: main program (EXE) entry point: | |
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 | 15 */ |
16 #include "vim.h" | |
17 | |
18 #ifdef __MINGW32__ | |
19 # ifndef _cdecl | |
20 # define _cdecl | |
21 # endif | |
22 #endif | |
23 | |
16194
3a5114768cfa
patch 8.1.1102: Win32 exe file contains unused code
Bram Moolenaar <Bram@vim.org>
parents:
16123
diff
changeset
|
24 // cproto doesn't create a prototype for VimMain() |
3a5114768cfa
patch 8.1.1102: Win32 exe file contains unused code
Bram Moolenaar <Bram@vim.org>
parents:
16123
diff
changeset
|
25 int _cdecl VimMain(int argc, char **argv); |
3a5114768cfa
patch 8.1.1102: Win32 exe file contains unused code
Bram Moolenaar <Bram@vim.org>
parents:
16123
diff
changeset
|
26 #ifdef FEAT_GUI |
3a5114768cfa
patch 8.1.1102: Win32 exe file contains unused code
Bram Moolenaar <Bram@vim.org>
parents:
16123
diff
changeset
|
27 void _cdecl SaveInst(HINSTANCE hInst); |
7 | 28 #endif |
29 | |
30 #ifndef PROTO | |
31 int WINAPI | |
32 WinMain( | |
16194
3a5114768cfa
patch 8.1.1102: Win32 exe file contains unused code
Bram Moolenaar <Bram@vim.org>
parents:
16123
diff
changeset
|
33 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
|
34 HINSTANCE hPrevInst UNUSED, |
16111
c0961d9ac269
patch 8.1.1060: MS-Windows: get_cmd_args() is no longer needed
Bram Moolenaar <Bram@vim.org>
parents:
15868
diff
changeset
|
35 LPSTR 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
|
36 int nCmdShow UNUSED) |
7 | 37 { |
23 | 38 int argc = 0; |
16111
c0961d9ac269
patch 8.1.1060: MS-Windows: get_cmd_args() is no longer needed
Bram Moolenaar <Bram@vim.org>
parents:
15868
diff
changeset
|
39 char **argv = NULL; |
7 | 40 |
16194
3a5114768cfa
patch 8.1.1102: Win32 exe file contains unused code
Bram Moolenaar <Bram@vim.org>
parents:
16123
diff
changeset
|
41 # ifdef FEAT_GUI |
3a5114768cfa
patch 8.1.1102: Win32 exe file contains unused code
Bram Moolenaar <Bram@vim.org>
parents:
16123
diff
changeset
|
42 SaveInst(hInstance); |
3a5114768cfa
patch 8.1.1102: Win32 exe file contains unused code
Bram Moolenaar <Bram@vim.org>
parents:
16123
diff
changeset
|
43 # endif |
3a5114768cfa
patch 8.1.1102: Win32 exe file contains unused code
Bram Moolenaar <Bram@vim.org>
parents:
16123
diff
changeset
|
44 VimMain(argc, argv); |
7 | 45 |
46 return 0; | |
47 } | |
48 #endif |