Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site mit-eddie.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!cbosgd!ihnp4!mit-eddie!jfw From: jfw@mit-eddie.UUCP (John Woods) Newsgroups: net.sources Subject: XLISP 1.2+ defun bug Message-ID: <2744@mit-eddie.UUCP> Date: Thu, 20-Sep-84 22:54:34 EDT Article-I.D.: mit-eddi.2744 Posted: Thu Sep 20 22:54:34 1984 Date-Received: Tue, 25-Sep-84 20:43:00 EDT Distribution: net.sources Organization: MIT, Cambridge, MA Lines: 24 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.