summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-11-28 15:55:42 +0100
committerBram Moolenaar <Bram@vim.org>2012-11-28 15:55:42 +0100
commit8866d277c97632d013c56b12a4bb98701d4a9ae0 (patch)
tree48d83c3adc9ac742d1fbe977a35629f06fcbc551 /src/main.c
parent02e14d67b95cc131c93329e280c38bf7d6ad76ae (diff)
downloadvim-8866d277c97632d013c56b12a4bb98701d4a9ae0.zip
updated for version 7.3.733
Problem: Tests fail when including MzScheme. Solution: Change #ifdefs for vim_main2().
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index e1573a0df..66726d279 100644
--- a/src/main.c
+++ b/src/main.c
@@ -147,8 +147,8 @@ static char *(main_errors[]) =
#define ME_INVALID_ARG 5
};
-#ifndef NO_VIM_MAIN /* skip this for unittests */
#ifndef PROTO /* don't want a prototype for main() */
+#ifndef NO_VIM_MAIN /* skip this for unittests */
int
# ifdef VIMDLL
_export
@@ -570,15 +570,27 @@ main
return mzscheme_main(2, args);
}
}
+#endif
+#endif /* NO_VIM_MAIN */
-int vim_main2(int argc, char **argv)
+/* vim_main2() needs to be produced when FEAT_MZSCHEME is defined even when
+ * NO_VIM_MAIN is defined. */
+#ifdef FEAT_MZSCHEME
+ int
+vim_main2(int argc UNUSED, char **argv UNUSED)
{
+# ifndef NO_VIM_MAIN
char_u *fname = (char_u *)argv[0];
mparm_T params;
memcpy(&params, argv[1], sizeof(params));
+# else
+ return 0;
+}
+# endif
#endif
+#ifndef NO_VIM_MAIN
/* Execute --cmd arguments. */
exe_pre_commands(&params);
@@ -999,8 +1011,8 @@ int vim_main2(int argc, char **argv)
return 0;
}
-#endif /* PROTO */
#endif /* NO_VIM_MAIN */
+#endif /* PROTO */
/*
* Main loop: Execute Normal mode commands until exiting Vim.