Re: [AD] Proposal for first step towards new api

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Neil Townsend <neil@xxxxxxxxxx> wrote:

> If it does turn out to be necessary to keep mangled_main, can I suggest
that
> it becomes users_main or main_routine_in_user_code or somesuch that makes
it
> clearer what it is?

The preprocessor trickery with renaming main in some cases, can be avoided.
I've looked a bit closer at the actual code now. I can rewrite it in such a
way that the main entry point function is put in a header file, and it calls
al_main() in the user program, no problem. This way you avoid END_OF_MAIN
and you get a linker error: 'undefined reference to al_main' if you forget
it. On the positive side you get a cleaner implementation, but the downside
would be code in the header files.

Peter, is this ok, or not worth the bother?

--
Sincerely Henrik Stokseth.
-----------------------------------------------------------------------
E-mail: hstokset@xxxxxxxxxx  Homepage: http://hstokset.n3.net





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/