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

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


On December 18, 2001 02:58 pm, you wrote:
> 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?

this is not what I ment :)
Later on (maybe Gro6 or whatever) the programmer uses the normal 'main'
function and calls al_main();

-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx
http://strangesoft.net



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