Subject: [clisp-list] ffi intro (c-callouts)

From: Leland Hovey <[email-masked]>
Date: Tue Aug 20 06:09:07 2002

I need to find the documentation describing the basic techniques
(step by step) of using c-callouts.  Specifically, what is the syntax,
where would a c function reside, and how can I inform clisp about the c
function's location?

I've found a little information in the implementation notes (i.e., calling
out to gethostname) but this example doesn't work for me.

thanks,
Leland H.

---

From: Sam Steingold <[email-masked]>
Date: Tue Aug 20 06:40:05 2002

> * In message <[email-masked]>
> * On the subject of "[clisp-list] ffi intro (c-callouts)"
> * Sent on Tue, 20 Aug 2002 09:08:29 -0400 (EDT)
> * Honorable Leland Hovey <[email-masked]> writes:
>
> I need to find the documentation describing the basic techniques (step
> by step) of using c-callouts.  Specifically, what is the syntax, where
> would a c function reside, and how can I inform clisp about the c
> function's location?
> 

you might want to look at the modules sources, e.g.,
bindings/linuxlibc6.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.3 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Beauty is only a light switch away.

---

From: "John K. Hinsdale" <[email-masked]>
Date: Tue Aug 20 07:27:07 2002

> (step by step) of using c-callouts.

 > out to gethostname) but this example doesn't work for me.

Hmmmm ... I just wrote a CLISP wrapper for a "C" lib and I found the
CLISP FFI documentation to be quite copious and detailed.  Maybe
you're checking the "FAQ" and the Implementation Notes?  You want this:
    http://clisp.sourceforge.net/impnotes.html
It's rather big (1MB) so you should save it to your hard drive and
bookmark it; you'll be reading it a lot :).  See the section marked
"Extensions 2.3 - The Foreign Function Call Facility".

I also recommend analyzing the "regexp" add-on module and following
that pattern.  I think there is a also a "toy" example but it was not
sufficiently complicated to exercise and illustrate all the features I
needed.  If you want specific help also feel free to Email me
privately.

Once you get into reading it, though, the CLISP docs really are
refreshingly well done.

---
John Hinsdale, Alma Mater Software, Inc., Tarrytown, NY 10591-3710 USA
[email-masked] | http://www.alma.com/staff/hin | +1 914 631 4690