1 /* @(#) pf_cglue.h 96/12/18 1.7 */
5 /***************************************************************
6 ** Include file for PForth 'C' Glue support
9 ** Copyright 1994 3DO, Phil Burk, Larry Polansky, David Rosenboom
11 ** Permission to use, copy, modify, and/or distribute this
12 ** software for any purpose with or without fee is hereby granted.
14 ** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
15 ** WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
16 ** WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
17 ** THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
18 ** CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
19 ** FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
20 ** CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
21 ** OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 ***************************************************************/
25 typedef cell_t (*CFunc0)( void );
26 typedef cell_t (*CFunc1)( cell_t P1 );
27 typedef cell_t (*CFunc2)( cell_t P1, cell_t P2 );
28 typedef cell_t (*CFunc3)( cell_t P1, cell_t P2, cell_t P3 );
29 typedef cell_t (*CFunc4)( cell_t P1, cell_t P2, cell_t P3, cell_t P4 );
30 typedef cell_t (*CFunc5)( cell_t P1, cell_t P2, cell_t P3, cell_t P4, cell_t P5 );
36 Err CreateGlueToC( const char *CName, ucell_t Index, cell_t ReturnMode, int32_t NumParams );
37 Err CompileCustomFunctions( void );
38 Err LoadCustomFunctionTable( void );
39 cell_t CallUserFunction( cell_t Index, int32_t ReturnMode, int32_t NumParams );
45 #define C_RETURNS_VOID (0)
46 #define C_RETURNS_VALUE (1)
48 #endif /* _pf_c_glue_h */