Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!munnari!otc!metro!basser!elecvax!cad!cadlab!pcng From: pcng@cadlab.jmrc.eecs.unsw.oz (Po Cheung Ng) Newsgroups: comp.sources.bugs Subject: Re: problems compiling umoria on SCO Message-ID: <697@cadlab.jmrc.eecs.unsw.oz> Date: Thu, 12-Nov-87 19:22:01 EST Article-I.D.: cadlab.697 Posted: Thu Nov 12 19:22:01 1987 Date-Received: Tue, 17-Nov-87 03:47:51 EST References: Organization: JMRC, Computer Science, Uni of NSW, Aust. Lines: 41 in article , jl42+@andrew.cmu.edu (Jay Mathew Libove) says: > > Hello. I'm trying to compile the recently posted umoria sources on a > SCO Xenix machine. > > In the source file "spells.c" at line 833 and line 933 I get the > error: > > `destroy' : not a function > > The function "destroy" is defined in those places by being returned by > the function "get_flags" as: > > int fire_ball(typ, dir, y, x, dam_hp, descrip) > int typ, dir, y, x, dam_hp; > ctype descrip; > { > (a bunch of local variable defines) > int (*destroy)(); > > (some code) > the get_flags call: > get_flags(typ, &weapon_type, &harm_type, &destroy); > (some more code) > line 833: > if (destroy(t_list[c_ptr->tptr.tval)) > (void) delete_object(i, j); Try: if ((*destroy)(t_list[c_ptr->tptr.tval)) That should work ---------------- Po Cheung NG ISD: +61 2 697-5301 JMRC, School of Elec. Eng. and Comp. Sci., STD: (02) 697-5301 The University of New South Wales, FAX: +61 2 662-2087 PO Box 1, Kensington, ARPA: pcng%cad.unsw.oz@seismo.css.gov Sydney, NSW 2033, JANET: cad.unsw.oz!pxng@ukc AUSTRALIA. ACSnet: pcng@cad.unsw.oz UUCP: {enea,hplabs,mcvax,prlb2,seismo,ubc-vision,ukc}!munnari!cad.unsw.oz!pcng