Ejemplo n.º 1
0
static void
datum_print (repv stream, repv arg)
{    
    if (arg == Qnil)
    {
	DEFSTRING (eol, "()");
	rep_stream_puts (stream, rep_PTR (rep_VAL (&eol)), 2, rep_TRUE);
    }
    else
    {
	repv printer = Fassq (DATUM_ID (arg), printer_alist);
	if (printer && rep_CONSP (printer) && rep_CDR (printer) != Qnil)
	    rep_call_lisp2 (rep_CDR (printer), arg, stream);
	else if (rep_SYMBOLP (DATUM_ID (arg)))
	{
	    rep_stream_puts (stream, "#<datum ", -1, rep_FALSE);
	    rep_stream_puts (stream, rep_PTR (rep_SYM (DATUM_ID (arg))->name), -1, rep_TRUE);
	    rep_stream_putc (stream, '>');
	}
	else
	    rep_stream_puts (stream, "#<datum>", -1, rep_FALSE);
    }
}
Ejemplo n.º 2
0
repv gh_call2 (repv proc, repv arg1, repv arg2)
{
    return rep_call_lisp2 (proc, arg1, arg2);
}