Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!haven!umbc3!alex From: alex@umbc3.UMD.EDU (Alex S. Crain) Newsgroups: comp.lang.lisp Subject: Re: foreign functions to KCL Message-ID: <1357@umbc3.UMD.EDU> Date: 19 Nov 88 19:37:50 GMT References: <5363@medusa.cs.purdue.edu> <6381@june.cs.washington.edu> <661@aiva.ed.ac.uk> Reply-To: alex@umbc3.UMD.EDU (Alex S. Crain) Organization: University of Maryland, Baltimore County Lines: 23 In article <6381@june.cs.washington.edu> whaley@uw-june.UUCP (Ken Whaley) writes: >The good news is that it's easy to incorporate C functions into >KCL. The bad news is that unless you want to write C code that can't >be used outside of the KCL environment, then you are constrained to use >certain input parameter and function return types. One way to add C code to kcl is to build an interface library of empty functions in lisp, ie: (defun c-fun-1 (arg1 arg2) nil) (defun c-fun-1 (arg1) nil) and then compile this into C. the result is a file full of empty C functions with all the appropriate argument tags. Then backfill the C code with your funcions and compile/load that. This doesn't require si:faslink (which I don't have anyway) and does all your argument handling for you. -- :alex. Systems Programmer nerwin!alex@umbc3.umd.edu UMBC alex@umbc3.umd.edu