i = atoi(w[1]); if(i < 0 || i > 127) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: extension reverbsend " "must be between 0 and 127", name, line); CHECKERRLIMIT; continue; } bank->tone[i].reverb_send = atoi(w[2]); 
if (words == 3) { i = atoi(w[1]); if(i < 0 || i > 127) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: extension reverbsend " "must be between 0 and 127", name, line); CHECKERRLIMIT; continue; } bank->tone[i].reverb_send = atoi(w[2]); } else if(words == 4) { if(atoi(w[3]) < 0 || atoi(w[3]) > 127) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: extension reverbsend " "must be between 0 and 127", name, line); CHECKERRLIMIT; continue; } for (i = atoi(w[1]); i < atoi(w[2]); i++) { bank->tone[i].reverb_send = atoi(w[3]); } } 
MAIN_INTERFACE int read_config_file(char *name, int self){    struct timidity_file *tf;    char tmp[1024], *w[MAXWORDS + 1], *cp;    ToneBank *bank = NULL;    int i, j, k, line = 0, words, errcnt = 0;    static int rcf_count = 0;    int dr = 0, bankno = 0;    int extension_flag, param_parse_err;    if(rcf_count > 50)    {	ctl->cmsg(CMSG_ERROR, VERB_NORMAL,		  "Probable source loop in configuration files");	return 2;    }    if(self)    {	tf = open_with_mem(name, (int32)strlen(name), OF_VERBOSE);	name = "(configuration)";    }    else	tf = open_file(name, 1, OF_VERBOSE);    if(tf == NULL)	return 1;    errno = 0;    while(tf_gets(tmp, sizeof(tmp), tf))    {	line++;	if(strncmp(tmp, "#extension", 10) == 0) {	    extension_flag = 1;	    i = 10;	}	else	{	    extension_flag = 0;	    i = 0;	}	while(isspace(tmp[i]))			/* skip /^\s*(?#)/ */	    i++;	if (tmp[i] == '#' || tmp[i] == '\0')	/* /^#|^$/ */	    continue;	j = strcspn(tmp + i, " \t\r\n\240");	if (j == 0)		j = strlen(tmp + i);	j = strip_trailing_comment(tmp + i, j);	tmp[i + j] = '\0';			/* terminate the first token */	w[0] = tmp + i;	i += j + 1;	words = param_parse_err = 0;	while(words < MAXWORDS - 1)		/* -1 : next arg */	{	    char *terminator;	    while(isspace(tmp[i]))		/* skip /^\s*(?#)/ */		i++;	    if (tmp[i] == '\0'		    || tmp[i] == '#')		/* /\s#/ */		break;	    if ((tmp[i] == '"' || tmp[i] == '\'')		    && (terminator = strchr(tmp + i + 1, tmp[i])) != NULL)	    {		if (!isspace(terminator[1]) && terminator[1] != '\0')		{		    ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			"%s: line %d: there must be at least one whitespace between "			"string terminator (%c) and the next parameter", name, line, tmp[i]);		    CHECKERRLIMIT;		    param_parse_err = 1;		    break;		}		w[++words] = tmp + i + 1;		i = terminator - tmp + 1;		*terminator = '\0';	    }	    else	/* not terminated */	    {		j = strcspn(tmp + i, " \t\r\n\240");		if (j > 0)		    j = strip_trailing_comment(tmp + i, j);		w[++words] = tmp + i;		i += j;		if (tmp[i] != '\0')		/* unless at the end-of-string (i.e. EOF) */		    tmp[i++] = '\0';		/* terminate the token */	    }	}	if (param_parse_err)	    continue;	w[++words] = NULL;	/*	 * #extension [something...]	 */	/* #extension comm program comment */	if(strcmp(w[0], "comm") == 0)	{	    char *p;	    if(words != 3)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: syntax error", name, line);		CHECKERRLIMIT;		continue;	    }	    if(!bank)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Must specify tone bank or drum "			  "set before assignment", name, line);		CHECKERRLIMIT;		continue;	    }	    i = atoi(w[1]);	    if(i < 0 || i > 127)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: extension comm must be "			  "between 0 and 127", name, line);		CHECKERRLIMIT;		continue;	    }	    if(bank->tone[i].comment)		free(bank->tone[i].comment);	    p = bank->tone[i].comment = safe_strdup(w[2]);	    while(*p)	    {		if(*p == ',') *p = ' ';		p++;	    }	}	/* #extension timeout program sec */	else if(strcmp(w[0], "timeout") == 0)	{	    if(words != 3)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: syntax error", name, line);		CHECKERRLIMIT;		continue;	    }	    if(!bank)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Must specify tone bank or drum set "			  "before assignment", name, line);		CHECKERRLIMIT;		continue;	    }	    i = atoi(w[1]);	    if(i < 0 || i > 127)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: extension timeout "			  "must be between 0 and 127", name, line);		CHECKERRLIMIT;		continue;	    }	    bank->tone[i].loop_timeout = atoi(w[2]);	}	/* #extension copydrumset drumset */	else if(strcmp(w[0], "copydrumset") == 0)	{	    if(words < 2)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: No copydrumset number given",			  name, line);		CHECKERRLIMIT;		continue;	    }	    i = atoi(w[1]);	    if(i < 0 || i > 127)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: extension copydrumset "			  "must be between 0 and 127", name, line);		CHECKERRLIMIT;		continue;	    }	    if(!bank)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Must specify tone bank or "			  "drum set before assignment", name, line);		CHECKERRLIMIT;		continue;	    }	    copybank(bank, drumset[i]);	}	/* #extension copybank bank */	else if(strcmp(w[0], "copybank") == 0)	{	    if(words < 2)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: No copybank number given",			  name, line);		CHECKERRLIMIT;		continue;	    }	    i = atoi(w[1]);	    if(i < 0 || i > 127)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: extension copybank "			  "must be between 0 and 127", name, line);		CHECKERRLIMIT;		continue;	    }	    if(!bank)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Must specify tone bank or "			  "drum set before assignment", name, line);		CHECKERRLIMIT;		continue;	    }	    copybank(bank, tonebank[i]);	}	/* #extension HTTPproxy hostname:port */	else if(strcmp(w[0], "HTTPproxy") == 0)	{	    if(words < 2)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: No proxy name given",			  name, line);		CHECKERRLIMIT;		continue;	    }	    /* If network is not supported, this extension is ignored. */#ifdef SUPPORT_SOCKET	    url_http_proxy_host = safe_strdup(w[1]);	    if((cp = strchr(url_http_proxy_host, ':')) == NULL)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Syntax error", name, line);		CHECKERRLIMIT;		continue;	    }	    *cp++ = '\0';	    if((url_http_proxy_port = atoi(cp)) <= 0)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Port number must be "			  "positive number", name, line);		CHECKERRLIMIT;		continue;	    }#endif	}	/* #extension FTPproxy hostname:port */	else if(strcmp(w[0], "FTPproxy") == 0)	{	    if(words < 2)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: No proxy name given",			  name, line);		CHECKERRLIMIT;		continue;	    }	    /* If network is not supported, this extension is ignored. */#ifdef SUPPORT_SOCKET	    url_ftp_proxy_host = safe_strdup(w[1]);	    if((cp = strchr(url_ftp_proxy_host, ':')) == NULL)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Syntax error", name, line);		CHECKERRLIMIT;		continue;	    }	    *cp++ = '\0';	    if((url_ftp_proxy_port = atoi(cp)) <= 0)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Port number "			  "must be positive number", name, line);		CHECKERRLIMIT;		continue;	    }#endif	}	/* #extension mailaddr somebody@someware.domain.com */	else if(strcmp(w[0], "mailaddr") == 0)	{	    if(words < 2)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: No mail address given",			  name, line);		CHECKERRLIMIT;		continue;	    }	    if(strchr(w[1], '@') == NULL) {		ctl->cmsg(CMSG_WARNING, VERB_NOISY,			  "%s: line %d: Warning: Mail address %s is not valid",			  name, line);	    }	    /* If network is not supported, this extension is ignored. */#ifdef SUPPORT_SOCKET	    user_mailaddr = safe_strdup(w[1]);#endif /* SUPPORT_SOCKET */	}	/* #extension opt [-]{option}[optarg] */	else if (strcmp(w[0], "opt") == 0) {		int c, longind, err;		char *p, *cmd, *arg;				if (words != 2 && words != 3) {			ctl->cmsg(CMSG_ERROR, VERB_NORMAL,					"%s: line %d: Syntax error", name, line);			CHECKERRLIMIT;			continue;		}		if (*w[1] == '-') {			int optind_save = optind;			optind = 0;			c = getopt_long(words, w, optcommands, longopts, &longind);			err = set_tim_opt_long(c, optarg, longind);			optind = optind_save;		} else {			/* backward compatibility */			if ((p = strchr(optcommands, c = *(cmd = w[1]))) == NULL)				err = 1;			else {				if (*(p + 1) == ':')					arg = (words == 2) ? cmd + 1 : w[2];				else					arg = "";				err = set_tim_opt_short(c, arg);			}		}		if (err) {			/* error */			ctl->cmsg(CMSG_ERROR, VERB_NORMAL,					"%s: line %d: Invalid command line option",					name, line);			errcnt += err - 1;			CHECKERRLIMIT;			continue;		}	}	/* #extension undef program */	else if(strcmp(w[0], "undef") == 0)	{	    if(words < 2)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: No undef number given",			  name, line);		CHECKERRLIMIT;		continue;	    }	    i = atoi(w[1]);	    if(i < 0 || i > 127)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: extension undef "			  "must be between 0 and 127", name, line);		CHECKERRLIMIT;		continue;	    }	    if(!bank)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Must specify tone bank or "			  "drum set before assignment", name, line);		CHECKERRLIMIT;		continue;	    }	    if(bank->tone[i].name)	    {		free(bank->tone[i].name);		    bank->tone[i].name = NULL;	    }	    if(bank->tone[i].comment)	    {		free(bank->tone[i].comment);		bank->tone[i].comment = NULL;	    }			bank->tone[i].instype = 0;	}	/* #extension altassign numbers... */	else if(strcmp(w[0], "altassign") == 0)	{	    ToneBank *bk;	    if(!bank)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Must specify tone bank or drum set "			  "before altassign", name, line);		CHECKERRLIMIT;		continue;	    }	    if(words < 2)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: No alternate assignment", name, line);		CHECKERRLIMIT;		continue;	    }	    if(!dr) {		ctl->cmsg(CMSG_WARNING, VERB_NORMAL,			  "%s: line %d: Warning: Not a drumset altassign"			  " (ignored)",			  name, line);		continue;	    }	    bk = drumset[bankno];	    bk->alt = add_altassign_string(bk->alt, w + 1, words - 1);	}	/* #extension legato [program] [0 or 1] */	else if(strcmp(w[0], "legato") == 0)	{	    if(words != 3)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: syntax error", name, line);		CHECKERRLIMIT;		continue;	    }	    if(!bank)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Must specify tone bank or drum set "			  "before assignment", name, line);		CHECKERRLIMIT;		continue;	    }	    i = atoi(w[1]);	    if(i < 0 || i > 127)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: extension legato "			  "must be between 0 and 127", name, line);		CHECKERRLIMIT;		continue;	    }	    bank->tone[i].legato = atoi(w[2]);	}	/* #extension level program tva_level */	else if(strcmp(w[0], "level") == 0)	{	    if(words != 3)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line);		CHECKERRLIMIT;		continue;	    }	    if(!bank)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Must specify tone bank or drum set "			  "before assignment", name, line);		CHECKERRLIMIT;		continue;	    }	    i = atoi(w[1]);	    if(i < 0 || i > 127)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: extension level "			  "must be between 0 and 127", name, line);		CHECKERRLIMIT;		continue;	    }		bank->tone[i].tva_level = atoi(w[2]);	}	/* #extension reverbsend */	else if(strcmp(w[0], "reverbsend") == 0)	{	    if(words != 3)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line);		CHECKERRLIMIT;		continue;	    }	    if(!bank)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Must specify tone bank or drum set "			  "before assignment", name, line);		CHECKERRLIMIT;		continue;	    }	    i = atoi(w[1]);	    if(i < 0 || i > 127)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: extension reverbsend "			  "must be between 0 and 127", name, line);		CHECKERRLIMIT;		continue;	    }		bank->tone[i].reverb_send = atoi(w[2]);	}	/* #extension chorussend */	else if(strcmp(w[0], "chorussend") == 0)	{	    if(words != 3)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line);		CHECKERRLIMIT;		continue;	    }	    if(!bank)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Must specify tone bank or drum set "			  "before assignment", name, line);		CHECKERRLIMIT;		continue;	    }	    i = atoi(w[1]);	    if(i < 0 || i > 127)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: extension chorussend "			  "must be between 0 and 127", name, line);		CHECKERRLIMIT;		continue;	    }		bank->tone[i].chorus_send = atoi(w[2]);	}	/* #extension delaysend */	else if(strcmp(w[0], "delaysend") == 0)	{	    if(words != 3)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line);		CHECKERRLIMIT;		continue;	    }	    if(!bank)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Must specify tone bank or drum set "			  "before assignment", name, line);		CHECKERRLIMIT;		continue;	    }	    i = atoi(w[1]);	    if(i < 0 || i > 127)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: extension delaysend "			  "must be between 0 and 127", name, line);		CHECKERRLIMIT;		continue;	    }		bank->tone[i].delay_send = atoi(w[2]);	}	/* #extension playnote */	else if(strcmp(w[0], "playnote") == 0)	{	    if(words < 3)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line);		CHECKERRLIMIT;		continue;	    }	    if(!bank)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Must specify tone bank or drum set "			  "before assignment", name, line);		CHECKERRLIMIT;		continue;	    }		if (words == 3) {			i = atoi(w[1]);			if(i < 0 || i > 127)			{			ctl->cmsg(CMSG_ERROR, VERB_NORMAL,				  "%s: line %d: extension playnote "				  "must be between 0 and 127", name, line);			CHECKERRLIMIT;			continue;			}			bank->tone[i].play_note = atoi(w[2]);		} else if(words == 4) {			for (i = atoi(w[1]); i < atoi(w[2]); i++) {				if(i < 0 || i > 127)				{				ctl->cmsg(CMSG_ERROR, VERB_NORMAL,					  "%s: line %d: extension playnote "					  "must be between 0 and 127", name, line);				CHECKERRLIMIT;				continue;				}				bank->tone[i].play_note = atoi(w[3]);			}		}	}	else if(!strcmp(w[0], "soundfont"))	{	    int order, cutoff, isremove, reso, amp;	    char *sf_file;	    if(words < 2)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: No soundfont file given",			  name, line);		CHECKERRLIMIT;		continue;	    }	    sf_file = w[1];	    order = cutoff = reso = amp = -1;	    isremove = 0;	    for(j = 2; j < words; j++)	    {		if(strcmp(w[j], "remove") == 0)		{		    isremove = 1;		    break;		}		if(!(cp = strchr(w[j], '=')))		{		    ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			      "%s: line %d: bad patch option %s",			      name, line, w[j]);		    CHECKERRLIMIT;		    break;		}		*cp++=0;		k = atoi(cp);		if(!strcmp(w[j], "order"))		{		    if(k < 0 || (*cp < '0' || *cp > '9'))		    {			ctl->cmsg(CMSG_ERROR, VERB_NORMAL,				  "%s: line %d: order must be a digit",				  name, line);			CHECKERRLIMIT;			break;		    }		    order = k;		}		else if(!strcmp(w[j], "cutoff"))		{		    if(k < 0 || (*cp < '0' || *cp > '9'))		    {			ctl->cmsg(CMSG_ERROR, VERB_NORMAL,				  "%s: line %d: cutoff must be a digit",				  name, line);			CHECKERRLIMIT;			break;		    }		    cutoff = k;		}		else if(!strcmp(w[j], "reso"))		{		    if(k < 0 || (*cp < '0' || *cp > '9'))		    {			ctl->cmsg(CMSG_ERROR, VERB_NORMAL,				  "%s: line %d: reso must be a digit",				  name, line);			CHECKERRLIMIT;			break;		    }		    reso = k;		}		else if(!strcmp(w[j], "amp"))		{		    amp = k;		}	    }	    if(isremove)		remove_soundfont(sf_file);	    else		add_soundfont(sf_file, order, cutoff, reso, amp);	}	else if(!strcmp(w[0], "font"))	{	    int bank, preset, keynote;	    if(words < 2)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: no font command", name, line);		CHECKERRLIMIT;		continue;	    }	    if(!strcmp(w[1], "exclude"))	    {		if(words < 3)		{		    ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			      "%s: line %d: No bank/preset/key is given",			      name, line);		    CHECKERRLIMIT;		    continue;		}		bank = atoi(w[2]);		if(words >= 4)		    preset = atoi(w[3]) - progbase;		else		    preset = -1;		if(words >= 5)		    keynote = atoi(w[4]);		else		    keynote = -1;		if(exclude_soundfont(bank, preset, keynote))		{		    ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			      "%s: line %d: No soundfont is given",			      name, line);		    CHECKERRLIMIT;		}	    }	    else if(!strcmp(w[1], "order"))	    {		int order;		if(words < 4)		{		    ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			      "%s: line %d: No order/bank is given",			      name, line);		    CHECKERRLIMIT;		    continue;		}		order = atoi(w[2]);		bank = atoi(w[3]);		if(words >= 5)		    preset = atoi(w[4]) - progbase;		else		    preset = -1;		if(words >= 6)		    keynote = atoi(w[5]);		else		    keynote = -1;		if(order_soundfont(bank, preset, keynote, order))		{		    ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			      "%s: line %d: No soundfont is given",			      name, line);		    CHECKERRLIMIT;		}	    }	}	else if(!strcmp(w[0], "progbase"))	{	    if(words < 2 || *w[1] < '0' || *w[1] > '9')	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: syntax error", name, line);		CHECKERRLIMIT;		continue;	    }	    progbase = atoi(w[1]);	}	else if(!strcmp(w[0], "map")) /* map <name> set1 elem1 set2 elem2 */	{	    int arg[5], isdrum;	    if(words != 6)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: syntax error", name, line);		CHECKERRLIMIT;		continue;	    }	    if((arg[0] = mapname2id(w[1], &isdrum)) == -1)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Invalid map name: %s", name, line, w[1]);		CHECKERRLIMIT;		continue;	    }	    for(i = 2; i < 6; i++)		arg[i - 1] = atoi(w[i]);	    if(isdrum)	    {		arg[1] -= progbase;		arg[3] -= progbase;	    }	    else	    {		arg[2] -= progbase;		arg[4] -= progbase;	    }	    for(i = 1; i < 5; i++)		if(arg[i] < 0 || arg[i] > 127)		    break;	    if(i != 5)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Invalid parameter", name, line);		CHECKERRLIMIT;		continue;	    }	    set_instrument_map(arg[0], arg[1], arg[2], arg[3], arg[4]);	}	/*	 * Standard configurations	 */	else if(!strcmp(w[0], "dir"))	{	    if(words < 2)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: No directory given", name, line);		CHECKERRLIMIT;		continue;	    }	    for(i = 1; i < words; i++)		add_to_pathlist(w[i]);	}	else if(!strcmp(w[0], "source"))	{	    if(words < 2)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: No file name given", name, line);		CHECKERRLIMIT;		continue;	    }	    for(i = 1; i < words; i++)	    {		int status;		rcf_count++;		status = read_config_file(w[i], 0);		rcf_count--;		if(status == 2)		{		    close_file(tf);		    return 2;		}		else if(status != 0)		{		    CHECKERRLIMIT;		    continue;		}	    }	}	else if(!strcmp(w[0], "default"))	{	    if(words != 2)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Must specify exactly one patch name",			  name, line);		CHECKERRLIMIT;		continue;	    }	    strncpy(def_instr_name, w[1], 255);	    def_instr_name[255] = '\0';	    default_instrument_name = def_instr_name;	}	else if(!strcmp(w[0], "drumset"))	{	    if(words < 2)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: No drum set number given", name, line);		CHECKERRLIMIT;		continue;	    }	    i = atoi(w[1]) - progbase;	    if(i < 0 || i > 127)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Drum set must be between %d and %d",			  name, line,			  progbase, progbase + 127);		CHECKERRLIMIT;		continue;	    }	    alloc_instrument_bank(1, i);	    if(words == 2)	    {		bank = drumset[i];		bankno = i;		dr = 1;	    }	    else	    {		ToneBank *localbank;		localbank = drumset[i];		if(words < 4 || *w[2] < '0' || *w[2] > '9')		{		    ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			      "%s: line %d: syntax error", name, line);		    CHECKERRLIMIT;		    continue;		}		i = atoi(w[2]);		if(i < 0 || i > 127)		{		    ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			      "%s: line %d: Drum number must be between "			      "0 and 127",			      name, line);		    CHECKERRLIMIT;		    continue;		}		if(set_gus_patchconf(name, line, &localbank->tone[i],				     w[3], w + 4))		{		    CHECKERRLIMIT;		    continue;		}	    }	}	else if(!strcmp(w[0], "bank"))	{	    if(words < 2)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: No bank number given", name, line);		CHECKERRLIMIT;		continue;	    }	    i = atoi(w[1]);	    if(i < 0 || i > 127)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Tone bank must be between 0 and 127",			  name, line);		CHECKERRLIMIT;		continue;	    }	    alloc_instrument_bank(0, i);	    if(words == 2)	    {		bank = tonebank[i];		bankno = i;		dr = 0;	    }	    else	    {		ToneBank *localbank;		localbank = tonebank[i];		if(words < 4 || *w[2] < '0' || *w[2] > '9')		{		    ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			      "%s: line %d: syntax error", name, line);		    CHECKERRLIMIT;		    continue;		}		i = atoi(w[2]) - progbase;		if(i < 0 || i > 127)		{		    ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			      "%s: line %d: Program must be between "			      "%d and %d",			      name, line,			      progbase, 127 + progbase);		    CHECKERRLIMIT;		    continue;		}		if(set_gus_patchconf(name, line, &localbank->tone[i],				     w[3], w + 4))		{		    CHECKERRLIMIT;		    continue;		}	    }	}	else	{	    if(words < 2 || *w[0] < '0' || *w[0] > '9')	    {		if(extension_flag)		    continue;		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: syntax error", name, line);		CHECKERRLIMIT;		continue;	    }	    i = atoi(w[0]);	    if(!dr)		i -= progbase;	    if(i < 0 || i > 127)	    {		if(dr)		    ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			      "%s: line %d: Drum number must be between "			      "0 and 127",			      name, line);		else		    ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			      "%s: line %d: Program must be between "			      "%d and %d",			      name, line,			      progbase, 127 + progbase);		CHECKERRLIMIT;		continue;	    }	    if(!bank)	    {		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "%s: line %d: Must specify tone bank or drum set "			  "before assignment", name, line);		CHECKERRLIMIT;		continue;	    }	    if(set_gus_patchconf(name, line, &bank->tone[i], w[1], w + 2))	    {		CHECKERRLIMIT;		continue;	    }	}    }    if(errno)    {	ctl->cmsg(CMSG_ERROR, VERB_NORMAL,		  "Can't read %s: %s", name, strerror(errno));	errcnt++;    }    close_file(tf);    return errcnt != 0;}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/ebaefc26f518c37542a792e828379d3bf22746a5/timidity.c/clean/timidity/timidity.c