Exemplo n.º 1
0
int main(int argc, char** argv)
{
	int len;
	char opt;
	int TC=120;
	int As=60;
	int Namps=6;
	double growth_comb=0.627216;		// 16c
	int output_options=0;
	char filename[256]="";		// it should be enough
	char filenameA[256]="";		// it should be enough

	while ((opt=getopt(argc,argv,"hptecdqurf:g:T:A:N:"))!=-1) {
		switch(opt) {
			case 'h':
				print_help("hptecdqurf:g:T:A:N:");
				return 0;
			PTECIDQUR_OPTIONS_BLOCK
			case 'f':		// can be "filename,filenameA", if missing default is used
				table_selection2(optarg, filename, filenameA);
				break;
			case 'g':
				growth_comb = atof(optarg);
				break;
			TAN_OPTIONS_BLOCK
			case '?':
				return 1;
			default:
				break;
		}
	}
	if (optind==argc) {
		printf("No length specified\n");
		return 1;
	}
	if (optind+1==argc) {
		len = atoi(argv[optind]);
	}
	else {
		printf("Too many arguments:\n");
		while (argv[optind]!=NULL) {
			printf("%s ", argv[optind]);
			optind++;
		}
		printf("\n");
		return 1;
	}
	if (len<1) {
		printf("Improper gem number\n");
		return 1;
	}
	file_selection(filename, "table_mgspec");
	file_selection(filenameA, "table_leech");
	worker(len, output_options, growth_comb, filename, filenameA, TC, As, Namps);
	return 0;
}
Exemplo n.º 2
0
int main(int argc, char** argv)
{
	int len;
	char opt;
	int pool_zero=2;     // speccing by default
	int output_options=0;
	char filename[256]="";     // it should be enough

	while ((opt=getopt(argc,argv,"hptecidqurf:"))!=-1) {
		switch(opt) {
			case 'h':
				print_help("hptecidqurf:");
				return 0;
			PTECIDQUR_OPTIONS_BLOCK
			case 'f':
				strcpy(filename,optarg);
				break;
			case '?':
				return 1;
			default:
				break;
		}
	}
	if (optind==argc) {
		printf("No length specified\n");
		return 1;
	}
	if (optind+1==argc) {
		len = atoi(argv[optind]);
		char* p=argv[optind];
		while (*p != '\0') p++;
		if (*(p-1)=='c') pool_zero=1;
	}
	else {
		printf("Too many arguments:\n");
		while (argv[optind]!=NULL) {
			printf("%s ", argv[optind]);
			optind++;
		}
		printf("\n");
		return 1;
	}
	if (len<1) {
		printf("Improper gem number\n");
		return 1;
	}
	if (pool_zero==2) file_selection(filename, "table_kgspec");
	else file_selection(filename, "table_kgcomb");
	worker(len, output_options, pool_zero, filename);
	return 0;
}
Exemplo n.º 3
0
static void
midi_mimpi_browse_button_clicked(GtkButton *b, gpointer d)
{
	midi_init_item_t *mii = (midi_init_item_t *)d;
	gchar *path = gtk_entry_get_text(GTK_ENTRY(mii->mimpi_entry));

	UNUSED(b);

	file_selection(1, "MIMPI tone map", path, mii->mimpi_entry);
}
Exemplo n.º 4
0
static void
others_sasi_hdd_browse_button_clicked(GtkButton *b, gpointer d)
{
	sasi_hdd_t *sasi_hdd = (sasi_hdd_t *)d;
	gchar *path = gtk_entry_get_text(GTK_ENTRY(sasi_hdd->entry));

	UNUSED(b);

	file_selection(2, "SASI HDD", path, d);
}
Exemplo n.º 5
0
int main(int argc, char** argv)
{
	int len;
	int lenc;
	char opt;
	int TC=120;
	int As=60;
	int GT=30;    // NT = pow(2, GT-1)
	int Namps=8;  // killgem in tower
	int output_options=0;
	char filename[256]="";		// it should be enough
	char filenamec[256]="";		// it should be enough
	char filenameA[256]="";		// it should be enough

	while ((opt=getopt(argc,argv,"hptecdqurf:T:A:N:G:"))!=-1) {
		switch(opt) {
			case 'h':
				print_help("hptecdqurf:T:A:N:G:");
				return 0;
			PTECIDQUR_OPTIONS_BLOCK
			case 'f':			// can be "filename,filenamec,filenameA", if missing default is used
				;
				char* p=optarg;
				while (*p != ',' && *p != '\0') p++;
				if (*p==',') *p='\0';			// ok, it's "f,..."
				else p--;							// not ok, it's "f" -> empty string
				char* q=p+1;
				while (*q != ',' && *q != '\0') q++;
				if (*q==',') *q='\0';			// ok, it's "...,fc,fA"
				else q--;							// not ok, it's "...,fc" -> empty string
				strcpy(filename,optarg);
				strcpy(filenamec,p+1);
				strcpy(filenameA,q+1);
				break;
			TAN_OPTIONS_BLOCK
			case 'G':
				GT=atoi(optarg);
				break;
			case '?':
				return 1;
			default:
				break;
		}
	}
	if (optind==argc) {
		printf("No length specified\n");
		return 1;
	}
	if (optind+1==argc) {
		len = atoi(argv[optind]);
		lenc= 16;		// 16c as default combine
	}
	else if (optind+2==argc) {
		len = atoi(argv[optind]);
		lenc= atoi(argv[optind+1]);
	}
	else {
		printf("Too many arguments:\n");
		while (argv[optind]!=NULL) {
			printf("%s ", argv[optind]);
			optind++;
		}
		printf("\n");
		return 1;
	}
	if (len<1 || lenc<1) {
		printf("Improper gem number\n");
		return 1;
	}
	file_selection(filename, "table_kgspec");
	file_selection(filenamec, "table_kgcomb");
	file_selection(filenameA, "table_crit");
	worker(len, lenc, output_options, filename, filenamec, filenameA, TC, As, GT, Namps);
	return 0;
}
Exemplo n.º 6
0
int main(int argc, char** argv)
{
	int len;
	char opt;
	int TC=120;
	int As=60;
	int Namps=8;
	int gem_limit=0;
	int output_options=0;
	char filename[256]="";		// it should be enough
	char filenameA[256]="";		// it should be enough

	while ((opt=getopt(argc,argv,"hptecdqrl:f:T:A:N:"))!=-1) {
		switch(opt) {
			case 'h':
				print_help("hptecdqrl:f:T:A:N:");
				return 0;
			PTECIDQUR_OPTIONS_BLOCK
			case 'l':
				gem_limit = atoi(optarg);
				break;
			case 'f':			// can be "filename,filenameA", if missing default is used
				;
				char* p=optarg;
				while (*p != ',' && *p != '\0') p++;
				if (*p==',') *p='\0';			// ok, it's "f,fA"
				else p--;							// not ok, it's "f" -> empty string
				strcpy(filename,optarg);
				strcpy(filenameA,p+1);
				break;
			TAN_OPTIONS_BLOCK
			case '?':
				return 1;
			default:
				break;
		}
	}
	if (optind==argc) {
		printf("No length specified\n");
		return 1;
	}
	if (optind+1==argc) {
		len = atoi(argv[optind]);
		if (gem_limit==0) gem_limit=len;
	}
	else {
		printf("Too many arguments:\n");
		while (argv[optind]!=NULL) {
			printf("%s ", argv[optind]);
			optind++;
		}
		printf("\n");
		return 1;
	}
	if (len<1) {
		printf("Improper gem number\n");
		return 1;
	}
	file_selection(filename, "table_kgspec");
	file_selection(filenameA, "table_crit");
	worker(len, output_options, gem_limit, filename, filenameA, TC, As, Namps);
	return 0;
}