/* If it is a relative filename, we search the full search path for it. */
static char* fopen_any_on_path(const char *fname, FILE **fp)
/* If it is a relative filename, we search the full search path for it. */
static char* fopen_any_on_path(const char *fname, FILE **fp)
{
	const char *cur_dir = NULL;
	struct search_path *node;
	char *fullname;
	assert(fp);
	if (current_srcfile)
		cur_dir = current_srcfile->dir;
	fullname = try_open(cur_dir, fname, fp);
	for (node = search_path_head; !*fp && node; node = node->next)
		fullname = try_open(node->dirname, fname, fp);
	return fullname;
}