/**********************************************************************
 
	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	"xlerror.h"
#include	"xl.h"

#include "HTMLDB.h"

XL_SEXP * xl_DeleteElement();

void
init_Delete(XLISP_ENV * env)
{
	set_env(env,l_string(std_cm,"Delete"),
		get_func_prim(xl_DeleteElement,FO_APPLICATIVE,0,0,256));	
}

XL_SEXP *
xl_DeleteElement(XLISP_ENV * env,XL_SEXP * s,
	  XLISP_ENV * arg_env,XL_SYM_FIELD * sf)
{
lock_task(http_lock);

	HTMLDataBase = RemoveElement(GetOption(l_string(std_cm,"url"),sf),HTMLDataBase);
/* mori
	if(HTMLDataBase)
	{
		set_env(env,HTMLDataBase->symbol.data,HTMLDataBase);
		dbENV = new_env(env);
	}
*/

unlock_task(http_lock,"xl_DeleteElement()");

	return HTMLDataBase;
}



