Re: [AD] OSX END_OF_MAIN musings

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


> I just had an evil thought, to avoid fork:
> 
> #define allegro_init(); install_allegro(...); } void user_thread(void) {

if (allegro_init() != 0) {
   printf("Error initializing Allegro!\n");
}

> Of course, this would mean, there could be no return value for
> install_allegro. No real advantage over END_OF_MAIN I guess.

Hmm... yeah, what I said above. But then
if (some_condition) {
   allegor_init();
} else {
   other_stuff();
}

will still break. Let's not try to make the preprosessor do smarter things 
than it can ;)

Evert





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