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



XL_SEXP *
gb_list(XLISP_ENV * e,XL_SEXP * s)
{
XL_SEXP * ss;
XL_SEXP * ret;
	ret = 0;
	for ( s = cdr(s) ; get_type(s) ; s = cdr(s) ) {
		ss = eval(e,car(s));
		if ( get_type(ss) == XLT_ERROR )
			return ss;
		ret = cons(ss,ret);
	}
	ss = 0;
	for ( ; get_type(ret) ; ret = cdr(ret) )
		ss = cons(car(ret),ss);
	return ss;
}

