[AD] Proposal for new magic main (2) |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
...and this time, it works !
Here's the proposal:
- no (more) magic main on systems that provide the standard main() entry
point (all but Windows),
- install_allegro() and allegro_init() require a copy of the 'argc' and
'argv' parameters,
- the Windows port implements a new magic main, based on macro substitution
of main(argc, argv)
- END_OF_MAIN() R.I.P (Hurra !)
Drawbacks:
- breaks source compatibility for allegro_init(),
Benefits:
- Darwin/MacOS X support,
- better cooperation with other libraries,
- END_OF_MAIN() is gone.
The patch is located at:
http://www.multimania.com/ebotcazou/dev/magic_main3.zip
- magic_main3.diff is the core patch,
- ansify.diff updates the whole distribution to the new argc/argv format
- build_docs.diff removes the 'hey, don't forget END_OF_MAIN()!' lines in
the build docs.
Compiled under DJGPP, Borland C++, Mingw32 and Linux. The only remaining
hurdle is MSVC.
--
Eric Botcazou
ebotcazou@xxxxxxxxxx