Exemplo n.º 1
0
int main(int argc, char* argv[]) {
	
	OS_X11 os;
	
	Error err  = Main::setup(argv[0],argc-1,&argv[1]);
	if (err!=OK)
		return 255;
		
	if (Main::start())
		os.run(); // it is actually the OS that decides how to run
	Main::cleanup();
	
	return os.get_exit_code();
}
Exemplo n.º 2
0
int main(int argc, char *argv[]) {

	OS_X11 os;

	char *cwd = (char *)malloc(PATH_MAX);
	getcwd(cwd, PATH_MAX);

	Error err = Main::setup(argv[0], argc - 1, &argv[1]);
	if (err != OK)
		return 255;

	if (Main::start())
		os.run(); // it is actually the OS that decides how to run
	Main::cleanup();

	chdir(cwd);
	free(cwd);

	return os.get_exit_code();
}