XLISP 1.2+ defun bug

John Woods jfw at mit-eddie.UUCP
Fri Sep 21 12:54:34 AEST 1984


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 at MIT-XX

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



More information about the Comp.sources.unix mailing list