/**********************************************************************
 
	Copyright (C) 2003 Hirohisa MORI <joshua@nichibun.ac.jp>
 
	This program is free software; you can redistribute it 
	and/or modify it under the terms of the GLOBALBASE 
	Library General Public License (G-LGPL) as published by 

	http://www.globalbase.org/
 
	This program is distributed in the hope that it will be 
	useful, but WITHOUT ANY WARRANTY; without even the 
	implied warranty of MERCHANTABILITY or FITNESS FOR A 
	PARTICULAR PURPOSE.

**********************************************************************/

#include	"memory_debug.h"
#include	"utils.h"
#include	"mp.h"



unsigned int
get_file_modify(L_CHAR * filename,char * prefix)
{
URL u;
L_CHAR * f;
int ret;
U_STAT buf;
	get_url2(&u,filename);
	f = get_access_path(&u,prefix);
	if ( f == 0 )
		return 0;
	if ( u_stat(n_string(std_cm,f),&buf) < 0 ) {
		ret = 0;
		goto end;
	}
	ret = buf.us_mtime;
end:
	d_f_ree(f);
	return ret;
}

