{ case 'U': free_instruments_afterwards=1; break; 
{		case 'U': free_instruments_afterwards=1; break; 
int main(int argc, char **argv)#endif{  int	 c, cmderr=0, i, got_a_configuration=0, try_config_again=0,	 need_stdin=0, need_stdout=0;  int32	 tmpi32, output_rate=DEFAULT_RATE;  char	 *output_name=0;#if defined(AU_LINUX) || defined(AU_WIN32)  int buffer_fragments=-1;#endif#ifdef __WIN32__	int evil=0;#endif#ifdef DANGEROUS_RENICE#include <sys/resource.h>  int u_uid=getuid();  if (setpriority(PRIO_PROCESS, 0, DANGEROUS_RENICE) < 0)	 fprintf(stderr, "Couldn't set priority to %d.\n", DANGEROUS_RENICE);  setreuid(u_uid, u_uid);#endif  if ((program_name=rindex(argv[0], '/'))) program_name++;  else program_name=argv[0];  if (argc==1)	 {		interesting_message();		return 0;	 }  if (!read_config_file(CONFIG_FILE))	 got_a_configuration=1;  while ((c=getopt(argc, argv, "UI:P:L:c:A:C:ap:fo:O:s:Q:FD:hi:"#if defined(AU_LINUX) || defined(AU_WIN32)			"B:" /* buffer fragments */#endif#ifdef __WIN32__			"e"	/* evil (be careful) */#endif			))>0)	 switch(c)		{		case 'U': free_instruments_afterwards=1; break;		case 'L': add_to_pathlist(optarg); try_config_again=1; break;		case 'c':	if (read_config_file(optarg)) cmderr++;	else got_a_configuration=1;	break;		case 'Q':	if (set_channel_flag(&quietchannels, atoi(optarg), "Quiet channel"))	  cmderr++;	break;		case 'D':	if (set_channel_flag(&drumchannels, atoi(optarg), "Drum channel"))	  cmderr++;	break;		case 'O': /* output mode */	if (set_play_mode(optarg))	  cmderr++;	break;		case 'o':	output_name=optarg; break;		case 'a': antialiasing_allowed=1; break;		case 'f': fast_decay=(fast_decay) ? 0 : 1; break;		case 'F': adjust_panning_immediately=1; break;		case 's': /* sampling rate */	i=atoi(optarg);	if (i < 100) i *= 1000;	if (set_value(&output_rate, i, MIN_OUTPUT_RATE, MAX_OUTPUT_RATE,				"Resampling frequency")) cmderr++;	break;		case 'P': /* set overriding instrument */	strncpy(def_instr_name, optarg, 255);	def_instr_name[255]='\0';	break;		case 'I':	if (set_value(&tmpi32, atoi(optarg), 0, 127,				"Default program")) cmderr++;	else default_program=tmpi32;	break;		case 'A':	if (set_value(&amplification, atoi(optarg), 1, MAX_AMPLIFICATION,				"Amplification")) cmderr++;	break;		case 'C':	if (set_value(&control_ratio, atoi(optarg), 1, MAX_CONTROL_RATIO,				"Control ratio")) cmderr++;	break;		case 'p':	if (set_value(&tmpi32, atoi(optarg), 1, MAX_VOICES,				"Polyphony")) cmderr++;	else voices=tmpi32;	break;		case 'i':	if (set_ctl(optarg))	  cmderr++;#if defined(AU_LINUX) || defined(AU_WIN32)	else if (buffer_fragments==-1 && ctl->trace_playing)	  /* user didn't specify anything, so use 2 for real-time response */#if defined(AU_LINUX)	  buffer_fragments=2;#else		buffer_fragments=3;		/* On Win32 2 is chunky */#endif#endif	break;#if defined(AU_LINUX) || defined(AU_WIN32)		case 'B':	if (set_value(&tmpi32, atoi(optarg), 0, 1000,				"Buffer fragments")) cmderr++;	else buffer_fragments=tmpi32;	break;#endif#ifdef __WIN32__		case 'e': /* evil */			evil = 1;			break;#endif		case 'h':	help();	return 0;		default:	cmderr++; break;		}  if (!got_a_configuration)	 {		if (!try_config_again || read_config_file(CONFIG_FILE))	cmderr++;	 }  /* If there were problems, give up now */  if (cmderr || optind >= argc)	 {		fprintf(stderr, "Try %s -h for help\n", program_name);		return 1; /* problems with command line */	 }  /* Set play mode parameters */  play_mode->rate=output_rate;  if (output_name)	 {		play_mode->name=output_name;		if (!strcmp(output_name, "-"))	need_stdout=1;	 }#if defined(AU_LINUX) || defined(AU_WIN32)  if (buffer_fragments != -1)	 play_mode->extra_param[0]=buffer_fragments;#endif  init_tables();  if (optind<argc)	 {		int orig_optind=optind;		while (optind<argc)	if (!strcmp(argv[optind++], "-"))	  need_stdin=1;		optind=orig_optind;		if (ctl->open(need_stdin, need_stdout))	{	  fprintf(stderr, "Couldn't open %s\n", ctl->id_name);	  play_mode->close_output();	  return 3;	}		/* Open output device */		if (play_mode->open_output()<0)	{	  fprintf(stderr, "Couldn't open %s\n", play_mode->id_name);	  ctl->close();	  return 2;	}		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;	}		if (*def_instr_name)	set_default_instrument(def_instr_name);#ifdef __WIN32__		SetConsoleCtrlHandler (handler, TRUE);		InitializeCriticalSection (&critSect);		if(evil)			if (!SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL))				fprintf(stderr, "Error raising process priority.\n");#endif		/* Return only when quitting */		ctl->pass_playing_list(argc-optind, &argv[orig_optind]);		play_mode->close_output();		ctl->close();#ifdef __WIN32__			DeleteCriticalSection (&critSect);#endif		return 0;	 }  return 0;}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/cb293c4705e0c7b93d3269c59bcf9bbcab7f6278/timidity.c/clean/timidity.c