[net.sources] XLISP 1.2+ defun bug

jfw@mit-eddie.UUCP (John Woods) (09/21/84)

There is a bug in my XLISP which prevents you from defining functions
which take no arguments.  The fix is in xlsubr.c, the function (C) defun(),
and the following is the diff listing of the change:
( < is new, > is old )
280,286c280,285
<     if (fargs.n_ptr)
< 	    if ((xeq(fargs.n_ptr,Macro) && (macro=1))
< 	    ||  (xeq(fargs.n_ptr,Fexpr) && (fexpr=1)))
< 	    {	fargs.n_ptr = xlmatch(LIST,&arg.n_ptr);
< 	    } else
< 		if (fargs.n_ptr->n_type != LIST
< 		&&  fargs.n_ptr->n_type != SYM) xlfail("bad argument type");
---
>     if ((xeq(fargs.n_ptr,Macro) && (macro=1))
>     ||  (xeq(fargs.n_ptr,Fexpr) && (fexpr=1)))
>     {	fargs.n_ptr = xlmatch(LIST,&arg.n_ptr);
>     } else
> 	if (fargs.n_ptr->n_type != LIST
> 	&&  fargs.n_ptr->n_type != SYM) xlfail("bad argument type");
-- 
John Woods, Charles River Data Systems
decvax!frog!john, mit-eddie!jfw, JFW@MIT-XX

" `The Ego posits itself'...Rubbish!"	-M.P.