On Friday 25 July 2003 16:21, Jorge Acereda Maci� wrote: > [EMAIL PROTECTED] (Jorge Acereda Maci�) writes: > > If nobody is working on it tell me and I will send patches in one or > > two weeks (I will be some time away from computers). > > Ok, here you have a preliminary patch, no autoconf libavcall detection > or fancy stuff (like comments ;-). It needs some polishing, it is only > a proof of concept. It is for gforth 0.5.0, sorry (I patched it on a > NetBSD system and they are lagging, should be easy to adapt to 0.6.1). > > You can download ffcall from: > > ftp://ftp.santafe.edu/pub/gnu/ffcall-1.8.tar.gz > ftp://ftp.ilog.fr/pub/Users/haible/gnu/ffcall-1.8.tar.gz > > Oops! I didn't patch the makefiles, compile with: > > make LDLIBS="-lm -lavcall" > > > libc sleep sleep int --int > > libm fmodf fmodf float float --float > > Ok, I changed this format to meet Chuck's requirements: > > libc sleep foreign: sleep int --int > > Chuck: "foreign:" takes the address to call from the stack, so it > should be possible to do what you want. > > It is also possible to use directly the stuff defined in prim instead > > of this interface. The above definition could be expressed as: > : sleep libc sleep aliteral av-start-int av-int av-call-int ; > > I think it should be easy to implement callbacks with these libraries, > will take a look in a couple of weeks.
Thanks for this work. My syntax suggestion is to use the one from bigFORTH, which would be libc sleep int (int) sleep ( n -- retval ) The second sleep here is the foreign name. Then we could use bigFORTH's library definitions, and share them with Gforth. -- Bernd Paysan "If you want it done right, you have to do it yourself" http://www.jwdt.com/~paysan/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
