예제 #1
0
파일: gui.c 프로젝트: bsv798/pcsxr
int main(int argc, char *argv[]) {
#ifdef ENABLE_NLS
	setlocale(LC_ALL, "");
	bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR);
	bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
	textdomain(GETTEXT_PACKAGE);
#endif

	gtk_init(&argc, &argv);

	if (!strcmp(argv[1], "configure")) {
		CFGconfigure();
	} else if (!strcmp(argv[1], "open")) {
		return CFGopen();
	} else if (!strcmp(argv[1], "wait")) {
		CFGwait();
	} else if (!strcmp(argv[1], "pause")) {
		return CFGpause();
	} else if (!strcmp(argv[1], "about")) {
		CFGabout();
	} else if (!strcmp(argv[1], "message")) {
		CFGmessage(&argv[2], argc - 2);
	}

	return 0;
}
예제 #2
0
int main(int argc, char *argv[]) {
#ifdef ENABLE_NLS
	setlocale(LC_ALL, "");
	bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR);
	bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
	textdomain(GETTEXT_PACKAGE);
#endif

	gtk_init(&argc, &argv);

	if (argc < 2) {
		printf ("Usage: cfgDFNet {about | configure | open | wait | pause | message}\n");
		return 0;
	}

	if (strcmp(argv[1], "about") != 0 && 
		strcmp(argv[1], "configure") != 0 && 
		strcmp(argv[1], "open") != 0 && 
		strcmp(argv[1], "wait") != 0 && 
		strcmp(argv[1], "pause") != 0 && 
		strcmp(argv[1], "message") != 0) {
		printf ("Usage: cfgDFNet {about | configure | open | wait | pause | message}\n");
		return 0;
	}
	
	if(argc > 1) {
		if (!strcmp(argv[1], "configure")) {
			CFGconfigure();
		} else if (!strcmp(argv[1], "about")) {
			CFGabout();
		} else if (!strcmp(argv[1], "open")) {
			return CFGopen();
		} else if (!strcmp(argv[1], "wait")) {
			CFGwait();
		} else if (!strcmp(argv[1], "pause")) {
			return CFGpause();
		} else if (!strcmp(argv[1], "message")) {
			CFGmessage(&argv[2], argc - 2);
		}
	}

	return 0;
}