Path: utzoo!utgpu!water!watmath!clyde!mcdchg!wucs1!wucs2!adiron!jdp
From: jdp@adiron.UUCP (Powell)
Newsgroups: comp.lang.lisp
Subject: Re: Calling C functions from Franz Lisp
Summary: Here's how I did it but it's not real efficient.
Message-ID: <385@adiron.UUCP>
Date: 12 Jul 88 19:41:57 GMT
References: <12196@sunybcs.UUCP> <484@aiva.ed.ac.uk>
Organization: PAR Technology, New Hartford, NY
Lines: 18


The way we pass C and LISP arguments is through a pipe from
LISP to C and back.  If the lisp call with all arguments
evaluated is (fun a b c), we would call (print '(fun a b c) cinport)
and call (setq result (read coutport)).  The C program itself
would find the function name and pass the string as an argument
to the function.  The function would return a char string that
would be printed to the stdout which is connected to the coutport.

This is not high speed, but it appears to be portable as
far as I can see (remember all arguments are evaluated before being
sent to C).  Well, if you're using the Franz available as part of
the 4.3 distribution, you're used to inefficiency anyway.

Good luck

					John D. Powell
					Par Technology