p->format = 1; 
p->format = format = 1; 
int check_midi_file(char *filename){    struct midi_file_info *p;    struct timidity_file *tf;    char tmp[4];    int32 len;    int16 format;    int check_cache;    if(filename == NULL)    {	if(current_file_info == NULL)	    return -1;	filename = current_file_info->filename;    }    p = get_midi_file_info(filename, 0);    if(p != NULL)	return p->format;    p = get_midi_file_info(filename, 1);    if(get_module_type(filename) > 0)    {	p->format = 0;	return 0;    }    tf = open_file(filename, 1, OF_SILENT);    if(tf == NULL)	return -1;    check_cache = check_need_cache(tf->url, filename);    if(check_cache)    {	if(!IS_URL_SEEK_SAFE(tf->url))	{	    if((tf->url = url_cache_open(tf->url, 1)) == NULL)	    {		close_file(tf);		return -1;	    }	}    }    /* Parse MIDI header */    if(tf_read(tmp, 1, 4, tf) != 4)    {	close_file(tf);	return -1;    }    if(tmp[0] == 0)    {	skip(tf, 128 - 4);	if(tf_read(tmp, 1, 4, tf) != 4)	{	    close_file(tf);	    return -1;	}    }    if(strncmp(tmp, "RCM-", 4) == 0 ||       strncmp(tmp, "COME", 4) == 0 ||       strncmp(tmp, "M1", 2) == 0)    {	p->format = 1;	goto end_of_header;    }    if(strncmp(tmp, "MThd", 4) != 0)    {	close_file(tf);	return -1;    }    if(tf_read(&len, 4, 1, tf) != 1)    {	close_file(tf);	return -1;    }    len = BE_LONG(len);    tf_read(&format, 2, 1, tf);    format = BE_SHORT(format);    if(format < 0 || format > 2)    {	close_file(tf);	return -1;    }    skip(tf, len - 2);    p->format = format;    p->hdrsiz = (int16)tf_tell(tf);  end_of_header:    if(check_cache)    {	url_rewind(tf->url);	url_cache_disable(tf->url);	url_make_file_data(tf->url, p);    }    close_file(tf);    return format;}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/1150228c395e3db231c531082f9d1e894b341aa0/readmidi.c/clean/timidity/readmidi.c