--- gforth/fflib.fs 2005/11/27 23:58:02 1.10 +++ gforth/fflib.fs 2005/12/31 15:46:08 1.13 @@ -1,6 +1,6 @@ \ lib.fs shared library support package 16aug03py -\ Copyright (C) 1995,1996,1997,1998,2000,2003 Free Software Foundation, Inc. +\ Copyright (C) 1995,1996,1997,1998,2000,2003,2005 Free Software Foundation, Inc. \ This file is part of Gforth. @@ -63,6 +63,11 @@ Defer legacy-proc ' noop IS legacy-proc DOES> ( x1 .. xn -- r ) dup cell+ @ swap 3 cells + >r ; +Variable ind-call ind-call off +: fptr ( "name" -- ) + Create here thisproc ! 0 , 0 , 0 , 0 also c-decl ind-call on + DOES> 3 cells + >r ; + : library ( "name" "file" -- ) \G loads library "file" and creates a proc defining word "name" \G library format: @@ -112,7 +117,8 @@ DOES> ( -- ) dup thislib ! proc: ; : rettype ( endxt startxt "name" -- ) Create 2, - DOES> decl, symbol, previous revarg off ; + DOES> decl, ind-call @ 0= IF symbol, THEN + previous revarg off ind-call off ; also c-decl definitions