char tmp[1024], *tmpname;
char tmp[1024];
struct timidity_file *try_to_open(char *name, int decompress){    struct timidity_file *tf;    URL url;    int len;    if((url = url_arc_open(name)) == NULL)      if((url = url_open(name)) == NULL)	return NULL;    tf = (struct timidity_file *)safe_malloc(sizeof(struct timidity_file));    tf->url = url;    tf->tmpname = NULL;    len = strlen(name);    if(decompress && len >= 3 && strcasecmp(name + len - 3, ".gz") == 0)    {	int method;	if(!IS_URL_SEEK_SAFE(tf->url))	{	    if((tf->url = url_cache_open(tf->url, 1)) == NULL)	    {		close_file(tf);		return NULL;	    }	}	method = skip_gzip_header(tf->url);	if(method == ARCHIVEC_DEFLATED)	{	    url_cache_disable(tf->url);	    if((tf->url = url_inflate_open(tf->url, -1, 1)) == NULL)	    {		close_file(tf);		return NULL;	    }	    /* success */	    return tf;	}	/* fail */	url_rewind(tf->url);	url_cache_disable(tf->url);    }#ifdef __W32__    /* Sorry, DECOMPRESSOR_LIST and PATCH_CONVERTERS are not worked yet. */    return tf;#endif /* __W32__ */#if defined(DECOMPRESSOR_LIST)    if(decompress)    {	static char *decompressor_list[] = DECOMPRESSOR_LIST, **dec;	char tmp[1024], *tmpname;	/* Check if it's a compressed file */	for(dec = decompressor_list; *dec; dec += 2)	{	    if(!check_file_extension(name, *dec, 0))		continue;	    tf->tmpname = url_dumpfile(tf->url, *dec);	    if (tf->tmpname == NULL) {		close_file(tf);		return NULL;	    }	    url_close(tf->url);	    snprintf(tmp, sizeof(tmp), *(dec+1), tf->tmpname);	    if((tf->url = url_pipe_open(tmp)) == NULL)	    {		close_file(tf);		return NULL;	    }	    break;	}    }#endif /* DECOMPRESSOR_LIST */#if defined(PATCH_CONVERTERS)    if(decompress == 2)    {	static char *decompressor_list[] = PATCH_CONVERTERS, **dec;	char tmp[1024], *tmpname;	/* Check if it's a compressed file */	for(dec = decompressor_list; *dec; dec += 2)	{	    if(!check_file_extension(name, *dec, 0))		continue;	    tf->tmpname = url_dumpfile(tf->url, *dec);	    if (tf->tmpname == NULL) {		close_file(tf);		return NULL;	    }	    url_close(tf->url);	    sprintf(tmp, *(dec+1), tf->tmpname);	    if((tf->url = url_pipe_open(tmp)) == NULL)	    {		close_file(tf);		return NULL;	    }	    break;	}    }#endif /* PATCH_CONVERTERS */        return tf;}