strcpy(Panel->filename,p); 
strncpy(Panel->filename,p,sizeof(Panel->filename)); 
static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]){	static int init_flag = 1;    int rc;    int32 value;    extern void timidity_init_aq_buff(void);    int errcnt;    w32g_add_playlist(number_of_files, list_of_files, 0,		      ctl.flags & CTLF_AUTOUNIQ,		      ctl.flags & CTLF_AUTOREFINE);    w32g_play_active = 0;    errcnt = 0;    if(init_flag && w32g_nvalid_playlist() && (ctl.flags & CTLF_AUTOSTART))//    if(play_mode->fd != -1 &&//       w32g_nvalid_playlist() && (ctl.flags & CTLF_AUTOSTART))	rc = RC_LOAD_FILE;    else	rc = RC_NONE;	init_flag = 0;#ifdef W32G_RANDOM_IS_SHUFFLE	w32g_shuffle_playlist_reset(0);#endif    while(1)    {	if(rc == RC_NONE)	{	    if(play_mode->fd != -1)	    {		aq_flush(1);		play_mode->close_output();	    }	    rc = w32g_get_rc(&value, 1);	}      redo:	switch(rc)	{	  case RC_NONE:	    Sleep(1000);	    break;	  case RC_LOAD_FILE: /* Play playlist.selected */	    if(w32g_nvalid_playlist())	    {		int selected;		w32g_get_playlist_index(&selected, NULL, NULL);		w32g_play_active = 1;		if(play_mode->fd == -1)		{		    if(play_mode->open_output() == -1)		    {			ctl.cmsg(CMSG_FATAL, VERB_NORMAL,				 "Couldn't open %s (`%c') %s",				 play_mode->id_name,				 play_mode->id_character,				 play_mode->name ? play_mode->name : "");			break;		    }		    aq_setup();		    timidity_init_aq_buff();		}		if(play_mode->id_character == 'l')		    w32g_show_console();		if(!DocWndIndependent){			w32g_setup_doc(selected);			if(DocWndAutoPopup)				w32g_open_doc(1);			else				w32g_open_doc(2);		}		{			char *p = w32g_get_playlist(selected);			if(Panel!=NULL && p!=NULL)				strcpy(Panel->filename,p);		}		SetWrdWndActive();		rc = play_midi_file(w32g_get_playlist(selected));		if(ctl.flags & CTLF_NOT_CONTINUE)		    w32g_update_playlist(); /* Update mark of error */		if(rc == RC_ERROR)		{		    int nfiles;		    errcnt++;		    w32g_get_playlist_index(NULL, &nfiles, NULL);		    if(errcnt >= nfiles)			w32g_msg_box("No MIDI file to play",				     "TiMidity Warning", MB_OK);		}		else		    errcnt = 0;		w32g_play_active = 0;		goto redo;	    }	    break;	  case RC_ERROR:	  case RC_TUNE_END:#if 0	    if(play_mode->id_character != 'd' ||			(ctl.flags & CTLF_NOT_CONTINUE)) {#else		if(ctl.flags & CTLF_NOT_CONTINUE) {#endif			break;		}	    /* FALLTHROUGH */	  case RC_NEXT:	    if(!w32g_nvalid_playlist())	    {		if(ctl.flags & CTLF_AUTOEXIT) {		    if(play_mode->fd != -1)			aq_flush(0);		    return;		}		break;	    }			if(ctl.flags & CTLF_LIST_RANDOM) {#ifdef W32G_RANDOM_IS_SHUFFLE				if(w32g_shuffle_playlist_next(!(ctl.flags & CTLF_NOT_CONTINUE))) {#else				if(w32g_random_playlist(!(ctl.flags & CTLF_NOT_CONTINUE))) {#endif					rc = RC_LOAD_FILE;					goto redo;				}			} else {				if(w32g_next_playlist(!(ctl.flags & CTLF_NOT_CONTINUE))) {					rc = RC_LOAD_FILE;					goto redo;				}			}	    {		/* end of list */		if(ctl.flags & CTLF_AUTOEXIT){		    if(play_mode->fd != -1)			aq_flush(0);		    return;		}		if((ctl.flags & CTLF_LIST_LOOP) && w32g_nvalid_playlist())		{#ifdef W32G_RANDOM_IS_SHUFFLE			if(ctl.flags & CTLF_LIST_RANDOM) {				w32g_shuffle_playlist_reset(0);				w32g_shuffle_playlist_next(!(ctl.flags & CTLF_NOT_CONTINUE));			} else {#endif				w32g_first_playlist(!(ctl.flags & CTLF_NOT_CONTINUE));#ifdef W32G_RANDOM_IS_SHUFFLE			}#endif		    rc = RC_LOAD_FILE;		    goto redo;		}		if((ctl.flags & CTLF_LIST_RANDOM) && w32g_nvalid_playlist())			w32g_shuffle_playlist_reset(0);	    }	    break;	  case RC_REALLY_PREVIOUS:#ifdef W32G_RANDOM_IS_SHUFFLE		w32g_shuffle_playlist_reset(0);#endif	    if(w32g_prev_playlist(!(ctl.flags & CTLF_NOT_CONTINUE)))	    {		rc = RC_LOAD_FILE;		goto redo;	    }	    break;	  case RC_QUIT:	    if(play_mode->fd != -1)		aq_flush(1);	    return;	  case RC_CHANGE_VOLUME:	    amplification += value;	    ctl_master_volume(amplification);	    break;	  case RC_TOGGLE_PAUSE:	    play_pause_flag = !play_pause_flag;	    break;	  default:		if(rc == RC_STOP)#ifdef W32G_RANDOM_IS_SHUFFLE			w32g_shuffle_playlist_reset(0);#endif	    if(rc >= RC_EXT_BASE)	    {		rc = w32g_ext_control(rc, value);		if(rc != RC_NONE)		    goto redo;	    }	    break;	}	if(mark_apply_setting)	    PrefSettingApplyReally();	rc = RC_NONE;    }}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/361cc5df1e14516b0a3eef7766539860da9a9721/w32g_c.c/clean/interface/w32g_c.c