/**********************************************************************
 
	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 *
append(XL_SEXP * a,XL_SEXP * b)
{
XL_SEXP * s,* ret;
	s = 0;
	for ( ; get_type(a) == XLT_PAIR ; a = cdr(a) )
		s = cons(car(a),s);
	if ( get_type(a) != 0 )
		return 0;
	for ( ; get_type(b) == XLT_PAIR ; b = cdr(b) )
		s = cons(car(b),s);
	if ( get_type(b) != 0 )
		return 0;
	ret = 0;
	for ( ; get_type(s) ; s = cdr(s) )
		ret = cons(car(s),ret);
/*
	set_inh(ret);
*/
	return ret;
}


