"Fossies" - the Fresh Open Source Software Archive

Member "vim-8.2.1354/src/os_w32exe.c" (2 Aug 2020, 1069 Bytes) of package /linux/misc/vim-8.2.1354.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "os_w32exe.c" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 8.1_vs_8.2.

    1 /* vi:set ts=8 sts=4 sw=4 noet:
    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  *
   13  * Ron Aaron <ronaharon@yahoo.com> wrote this and the (now deleted) DLL support
   14  * code.
   15  */
   16 #include "vim.h"
   17 
   18 // cproto doesn't create a prototype for VimMain()
   19 #ifdef VIMDLL
   20 __declspec(dllimport)
   21 #endif
   22 int VimMain(int argc, char **argv);
   23 #ifndef VIMDLL
   24 void SaveInst(HINSTANCE hInst);
   25 #endif
   26 
   27 #ifndef PROTO
   28 # ifdef FEAT_GUI
   29     int WINAPI
   30 wWinMain(
   31     HINSTANCE   hInstance,
   32     HINSTANCE   hPrevInst UNUSED,
   33     LPWSTR  lpszCmdLine UNUSED,
   34     int     nCmdShow UNUSED)
   35 # else
   36     int
   37 wmain(int argc UNUSED, wchar_t **argv UNUSED)
   38 # endif
   39 {
   40 # ifndef VIMDLL
   41 #  ifdef FEAT_GUI
   42     SaveInst(hInstance);
   43 #  else
   44     SaveInst(GetModuleHandleW(NULL));
   45 #  endif
   46 # endif
   47     VimMain(0, NULL);
   48 
   49     return 0;
   50 }
   51 #endif