Mercurial > vim
comparison src/main.c @ 3955:509e55bd4a3f v7.3.733
updated for version 7.3.733
Problem: Tests fail when including MzScheme.
Solution: Change #ifdefs for vim_main2().
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 28 Nov 2012 15:55:42 +0100 |
parents | 2722f11ddc99 |
children | 915fb3d2dd8f |
comparison
equal
deleted
inserted
replaced
3954:291716c0d6c4 | 3955:509e55bd4a3f |
---|---|
145 #define ME_EXTRA_CMD 4 | 145 #define ME_EXTRA_CMD 4 |
146 N_("Invalid argument for"), | 146 N_("Invalid argument for"), |
147 #define ME_INVALID_ARG 5 | 147 #define ME_INVALID_ARG 5 |
148 }; | 148 }; |
149 | 149 |
150 #ifndef PROTO /* don't want a prototype for main() */ | |
150 #ifndef NO_VIM_MAIN /* skip this for unittests */ | 151 #ifndef NO_VIM_MAIN /* skip this for unittests */ |
151 #ifndef PROTO /* don't want a prototype for main() */ | |
152 int | 152 int |
153 # ifdef VIMDLL | 153 # ifdef VIMDLL |
154 _export | 154 _export |
155 # endif | 155 # endif |
156 # ifdef FEAT_GUI_MSWIN | 156 # ifdef FEAT_GUI_MSWIN |
568 args[0] = (char *)fname; | 568 args[0] = (char *)fname; |
569 args[1] = (char *)¶ms; | 569 args[1] = (char *)¶ms; |
570 return mzscheme_main(2, args); | 570 return mzscheme_main(2, args); |
571 } | 571 } |
572 } | 572 } |
573 | 573 #endif |
574 int vim_main2(int argc, char **argv) | 574 #endif /* NO_VIM_MAIN */ |
575 | |
576 /* vim_main2() needs to be produced when FEAT_MZSCHEME is defined even when | |
577 * NO_VIM_MAIN is defined. */ | |
578 #ifdef FEAT_MZSCHEME | |
579 int | |
580 vim_main2(int argc UNUSED, char **argv UNUSED) | |
575 { | 581 { |
582 # ifndef NO_VIM_MAIN | |
576 char_u *fname = (char_u *)argv[0]; | 583 char_u *fname = (char_u *)argv[0]; |
577 mparm_T params; | 584 mparm_T params; |
578 | 585 |
579 memcpy(¶ms, argv[1], sizeof(params)); | 586 memcpy(¶ms, argv[1], sizeof(params)); |
580 #endif | 587 # else |
581 | 588 return 0; |
589 } | |
590 # endif | |
591 #endif | |
592 | |
593 #ifndef NO_VIM_MAIN | |
582 /* Execute --cmd arguments. */ | 594 /* Execute --cmd arguments. */ |
583 exe_pre_commands(¶ms); | 595 exe_pre_commands(¶ms); |
584 | 596 |
585 /* Source startup scripts. */ | 597 /* Source startup scripts. */ |
586 source_startup_scripts(¶ms); | 598 source_startup_scripts(¶ms); |
997 */ | 1009 */ |
998 main_loop(FALSE, FALSE); | 1010 main_loop(FALSE, FALSE); |
999 | 1011 |
1000 return 0; | 1012 return 0; |
1001 } | 1013 } |
1014 #endif /* NO_VIM_MAIN */ | |
1002 #endif /* PROTO */ | 1015 #endif /* PROTO */ |
1003 #endif /* NO_VIM_MAIN */ | |
1004 | 1016 |
1005 /* | 1017 /* |
1006 * Main loop: Execute Normal mode commands until exiting Vim. | 1018 * Main loop: Execute Normal mode commands until exiting Vim. |
1007 * Also used to handle commands in the command-line window, until the window | 1019 * Also used to handle commands in the command-line window, until the window |
1008 * is closed. | 1020 * is closed. |