Ken Takata wrote:

> I think that main() and vim_main2() in main.c are complicated and hard to
> understand. The functions and ifdefs are tangled.
> I think it's better to split main() and vim_main2() regardless of
> FEAT_MZSCHEME.  What do you think?

Yes, that would avoid some uglyness.  Especially the way Mzscheme passes
fname and params.  Your patch still copies over params.  We might as
well make it static in the file.  And fname can go into params.

> BTW, a comment in main.c says:
> 
> /* vim_main2() needs to be produced when FEAT_MZSCHEME is defined even when
>  * NO_VIM_MAIN is defined. */
> 
> But I don't understand why vim_main2() is needed when both FEAT_MZSCHEME and
> NO_VIM_MAIN are defined. (The comment was added by v7.3.733.)
> Currently vim_main2() is called only from if_mzsch.c, but if_mzsch.c is not
> linked if NO_VIM_MAIN is defined. Am I missing something?

NO_VIM_MAIN is defined when compiling a unittest.  If that includes
MZscheme then vim_main2() needs to exist, otherwise it fails to build.

I'll make a patch like that and see if it works...
Yes.  It's a lot simpler, since params isn't a pointer.


-- 
I once paid $12 to peer at the box that held King Tutankhamen's little
bandage-covered midget corpse at the De Young Museum in San Francisco.  I
remember thinking how pleased he'd be about the way things turned out in his
afterlife.
                                (Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to