RE: [AD] Magic main in Windows |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: <alleg-developers@xxxxxxxxxx>
- Subject: RE: [AD] Magic main in Windows
- From: "Robert Ohannessian" <ROhannessian@xxxxxxxxxx>
- Date: Sun, 1 Aug 2004 15:02:59 -0700
- Thread-index: AcR4Eu4PmbaSrHJ+SKKx9EIN6Y9SEgAAAu+w
- Thread-topic: [AD] Magic main in Windows
main() may have more than 2 parameters. This is allowed by the standard.
However, if main() has some parameters, then the first two must be (int,
char **).
> -----Original Message-----
> From: alleg-developers-admin@xxxxxxxxxx [mailto:alleg-
> developers-admin@xxxxxxxxxx] On Behalf Of Daniel Schlyder
> Sent: Sunday, August 01, 2004 3:00 PM
> To: alleg-developers@xxxxxxxxxx
> Subject: Re: [AD] Magic main in Windows
>
> Evert Glebbeek:
> > Yes. In Windows, SDL defines
> > #define SDL_main main
> > and then calls SDL_main from its own WinMain.
> > It can get away with this by requiring that main be declared as
> > int main(int argc, int *argv[])
> > Any other declaration of main fails.
>
> You mean "char *argv[]", of course.
>
> > Not something we want to do for Allegro IMO.
>
> Why not? AFAIK, there's only two legal definitions anyway: that one,
and
> the
> one without any arguments. From a user's point of view, I think it
would
> be
> less of an inconvenience to have to define main() that way, than use
the
> END_OF_MAIN macro. Heck, most games probably want to support a few
command
> line
> options, anyway.
>
> --
> Daniel Schlyder
> http://bitblaze.com/
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by OSTG. Have you noticed the changes
on
> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
> one more big change to announce. We are now OSTG- Open Source
Technology
> Group. Come see the changes on the new OSTG site. www.ostg.com
> --
> https://lists.sourceforge.net/lists/listinfo/alleg-developers