if(*def_instr_name) set_default_instrument(def_instr_name); 
if (def_prog >= 0) set_default_program(def_prog); if (*def_instr_name) set_default_instrument(def_instr_name); 
MAIN_INTERFACE int timidity_play_main(int nfiles, char **files){    int need_stdin = 0, need_stdout = 0;    int i;    int output_fail = 0;    if(nfiles == 0 && !strchr(INTERACTIVE_INTERFACE_IDS, ctl->id_character))	return 0;    if(opt_output_name)    {	play_mode->name = opt_output_name;	if(!strcmp(opt_output_name, "-"))	    need_stdout = 1;    }    for(i = 0; i < nfiles; i++)	if (!strcmp(files[i], "-"))	    need_stdin = 1;    if(ctl->open(need_stdin, need_stdout))    {	fprintf(stderr, "Couldn't open %s (`%c')" NLS,		ctl->id_name, ctl->id_character);	play_mode->close_output();	return 3;    }    if(wrdt->open(wrdt_open_opts))    {	fprintf(stderr, "Couldn't open WRD Tracer: %s (`%c')" NLS,		wrdt->name, wrdt->id);	play_mode->close_output();	ctl->close();	return 1;    }#ifdef BORLANDC_EXCEPTION    __try    {#endif /* BORLANDC_EXCEPTION */#ifdef __W32__#ifdef HAVE_SIGNAL	signal(SIGTERM, sigterm_exit);#endif	SetConsoleCtrlHandler(handler, TRUE);	ctl->cmsg(CMSG_INFO, VERB_DEBUG_SILLY,		  "Initialize for Critical Section");	InitializeCriticalSection(&critSect);	if(opt_evil_mode)	    if(!SetThreadPriority(GetCurrentThread(),				  THREAD_PRIORITY_ABOVE_NORMAL))		ctl->cmsg(CMSG_ERROR, VERB_NORMAL,			  "Error raising process priority");#else	/* UNIX */#ifdef HAVE_SIGNAL	signal(SIGINT, sigterm_exit);	signal(SIGTERM, sigterm_exit);#ifdef SIGPIPE	signal(SIGPIPE, sigterm_exit);    /* Handle broken pipe */#endif /* SIGPIPE */#endif /* HAVE_SIGNAL */#endif	/* Open output device */	ctl->cmsg(CMSG_INFO, VERB_DEBUG_SILLY,		  "Open output: %c, %s",		  play_mode->id_character,		  play_mode->id_name);	if (play_mode->flag & PF_PCM_STREAM) {	    play_mode->extra_param[1] = aq_calc_fragsize();	    ctl->cmsg(CMSG_INFO, VERB_DEBUG_SILLY,		      "requesting fragment size: %d",		      play_mode->extra_param[1]);	}#if !defined ( IA_W32GUI ) && !defined ( IA_W32G_SYN )	if(play_mode->open_output() < 0)	{	    ctl->cmsg(CMSG_FATAL, VERB_NORMAL,		      "Couldn't open %s (`%c')",		      play_mode->id_name, play_mode->id_character);	    output_fail = 1;	    ctl->close();	    return 2;	}#endif /* IA_W32GUI */	if(!control_ratio)	{	    control_ratio = play_mode->rate / CONTROLS_PER_SECOND;	    if(control_ratio < 1)		control_ratio = 1;	    else if (control_ratio > MAX_CONTROL_RATIO)		control_ratio = MAX_CONTROL_RATIO;	}	init_load_soundfont();	if(!output_fail)	{	    aq_setup();	    timidity_init_aq_buff();	}	if(allocate_cache_size > 0)	    resamp_cache_reset();	if(*def_instr_name)	    set_default_instrument(def_instr_name);	if(ctl->flags & CTLF_LIST_RANDOM)	    randomize_string_list(files, nfiles);	else if(ctl->flags & CTLF_LIST_SORT)	    sort_pathname(files, nfiles);	/* Return only when quitting */	ctl->cmsg(CMSG_INFO, VERB_DEBUG_SILLY,		  "pass_playing_list() nfiles=%d", nfiles);	ctl->pass_playing_list(nfiles, files);	if(intr)	    aq_flush(1);#ifdef XP_UNIX	return 0;#endif /* XP_UNIX */	play_mode->close_output();	ctl->close();	wrdt->close();#ifdef __W32__	DeleteCriticalSection (&critSect);#endif#ifdef BORLANDC_EXCEPTION    } __except(1) {	fprintf(stderr, "\nError!!!\nUnexpected Exception Occured!\n");	if(play_mode->fd != -1)	{		play_mode->purge_output();		play_mode->close_output();	}	ctl->close();	wrdt->close();	DeleteCriticalSection (&critSect);	exit(EXIT_FAILURE);    }#endif /* BORLANDC_EXCEPTION */#ifdef SUPPORT_SOUNDSPEC    if(view_soundspec_flag)	close_soundspec();#endif /* SUPPORT_SOUNDSPEC */    free_archive_files();#ifdef SUPPORT_SOCKET    url_news_connection_cache(URL_NEWS_CLOSE_CACHE);#endif /* SUPPORT_SOCKET */    return 0;}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/0e91e7ef1fadc562b6bd4c7a94b76d54675dfad1/timidity.c/buggy/timidity/timidity.c