Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!cornell!vax1!ag4 From: ag4@vax1.UUCP (Anne Louise Gockel) Newsgroups: comp.lang.prolog Subject: CProlog for a HP 9000 running HP-UX Message-ID: <481@vax1.UUCP> Date: Mon, 28-Sep-87 13:51:13 EDT Article-I.D.: vax1.481 Posted: Mon Sep 28 13:51:13 1987 Date-Received: Tue, 29-Sep-87 06:26:03 EDT Lines: 43 Keywords: CProlog HP 9000 HP-UX I am naively trying to compile CProlog 1.5 on the Hewlett-Packard HP 9000 which runs HP-UX. HP-UX is a System V based Unix. The HP-UX C compiler chokes on several constructions that the Mt. Xinu (BSD) C-compiler allows. Can anyone tell me where I can find a CProlog that will compile on a System V machine, or even better under HP-UX? Can anyone tell me where I can find a more recent version of CProlog? I am not sure why the BSD C compiler compiles the code that the HP-UX compiler chokes on. As far as I can see the code is incorrect. Basically a variable that is defined as 'pointer to a pointer' is dereferenced. E.G.: /* The original EMAS Prolog in IMP relies too much on pointers being just addresses, independently of the type pointed to, for me to be able to do anything about it. To help satisfy the compiler's view of typing, addresses are objects of type PTR, which are then cast into the appopriate types. */ typedef unsigned **PTR; static PTR f, d, b, k, k1, y, p, l, arg1; ....... if (k->NextVar == NULL || (SC(k->NextVar,>=,pauxstk) && SC(k->NextVar,<,ptr))) { k->VarValue += rglb; if (k->NextVar) k->NextVar += rauxstk; k += k->VarLen; } In the above code fragment the compiler complains about dereferencing the variable k. ('Cannot select field of non-structure.' and 'Incompatible types in cast.') SC is a macro that does a signed-comparison between the 1st and 3rd arguements. Thank you, Anne Louise Gockel Cornell Computer Services (ag4@vax1.ccs.cornell.edu ag4@CORNELLC.bitnet)