/* Re-route "main" so we can invoke the SIOUX command line
 * interface without messing with the main sources. */

#ifndef NO_MAIN

#include <MacTypes.h>
#include <console.h>
#include <SIOUX.h>

#ifdef MAC_SC_COMPILER
extern int _fmain(int argc, char *argv[], char *env[]);
#else
extern int _fmain(int argc, char *argv[]);
#endif

#undef main

#ifdef MAC_SC_COMPILER
int main(int argc, char *argv[], char *env[])
#else
int main(int argc, char *argv[])
#endif
{
	argc = ccommand(&argv);			   
	SIOUXSettings.standalone       = 1;
	SIOUXSettings.autocloseonquit  = 0;
	SIOUXSettings.asktosaveonclose = 0;

#ifdef MAC_SC_COMPILER
	return _fmain(argc, argv, env);
#else
	return _fmain(argc, argv);
#endif
}

#endif // NO_MAIN