Exemple #1
0
int
main(int argc, char *argv[]) {
	prog = argv[0];

	fps_flag = (getenv("FPS") != NULL);

	load_config("lsc");
	init_font_locale(lookup("locale", 0, 0));
	srandom(0);
	set_screen_size(SCREEN_WIDTH, SCREEN_HEIGHT);
	layout_screen();
	init_polar();
	init_transforms();
	init_video_in();
	init_display(argc, argv, prog);
	set_category(primary_buttons[Cat_change_color].b);
	gettimeofday(&last_busy, 0);

	ARGBEGIN {
	case 'd':	debug++;			break;
	case 'g':	grabtimeout = atoi(ARGF());	break;
	case 'i':	idletime = atoi(ARGF());	break;
	default:
		return usage();
	} ARGEND;

	if (grabtimeout != 0 && grabtimeout < ALARMTIME) {
		fprintf(stderr, "unreasonable grab time limit\n");
		exit(14);
	}

	state = Live;
	io_main_loop();
	return 0;
}
Exemple #2
0
int main( int argc, char* argv[] ) {
  // initialize the environment
  SuifEnv* suif = new SuifEnv;
  suif->init();

  // import and initialize the necessary libraries
  init_suifpasses( suif );
  init_transforms( suif );

  // transform the input arguments into a stream of
  // input tokens
  TokenStream token_stream( argc, argv );

  // execute the Module "execute"
  ModuleSubSystem* mSubSystem = suif->get_module_subsystem();
  mSubSystem -> execute( "execute", &token_stream );

  delete suif;

  return 0;
}