[AD] got rid of END_OF_MAIN()

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


Attached is a patch which makes it unnecessary to use the END_OF_MAIN macro for all platforms. The main function is still mangled, but the macro is no longer necessary.

This, however, necessitates that the user's main function must be declared (int, char **). (void) declarations will no longer work. I personally feel this is acceptable and far superior to the END_OF_MAIN thing. I have always felt that the less silly preprocessor stuff going on, the better.

I changed all the example code and documentation to reflect the change.

I have to note also that I only have access to a Mac OS X system right now. This certainly works on my system and it's really trivial enough that I don't see why it wouldn't work elsewhere but who knows... I'm not an expert in C and I'm not intimately familiar with Allegro internals so I may have done something stupid. If other people could test this on other systems that would be nice.

This is actually the first time I've used diff and distributed a patch so I may have done something stupid there too.

Mike Benfield

Attachment: no_END_OF_MAIN.diff.gz
Description: GNU Zip compressed data



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