( Title: Binding source generator trial File: bindlib-example.fs Author: David N. Williams License: public domain Version: 0.5.0 Started: April 25, 2011 Revised: May 5, 2011 ) s" bindlib.fs" included \ DEBUGGING \ use with: n-types u-types df-types : .list ( 'listp ) cr @ ( node) >r BEGIN r@ WHILE r> dup cell+ $@ $. cr @ >r REPEAT rdrop ; LIBRARY bindlib-example MODULE try "trial test module" WITH-MODULE floating-ext c{ /* Library license: LGPL, or whatever */ #define _P4_SOURCE 1 #include #include #define ulong unsigned long }c \ Embedded whitespace is allowed in C argument types, but not in \ return types. Return types have to be declared on the Forth \ side and recognized on the C side. The one below is not \ built-in. U-RET-TYPE ulong c-func TRY_ME1 int try_me1 ( mpz_t ); c-func TRY_ME2 double try_me2 (long int, char * ) ; c-func TRY_ME3 ulong try_me3 (double, unsigned long) ; c-func TRY_ME4 void try_me4 ( void) ; \ c-func TRY_ME_BAD1 int try_me_bad1 ( void, void ); \ c-func TRY_ME_BAD2 int try_me_bad2 ( int , void ); c-val TRY-CONSTANT sizeof (mpz_t); c-wrap-val ext-const1 int c-ext-const1; c-wrap-val ext-const2 int c-ext-const2 ; END-LIBRARY