#include #include #include #include "plugins.h" #include "dict.h" #include "stack.h" #define DEBUG void enterforth(ucell _cfa); char forthcode[]=" .\" This is a forth statement\" cr 23 dup "; /* * this example function can be called from beginagain with "call". */ static void mol_foobar(void) { ucell xt; printf("\nWe're in C now.\n"); PUSH((ucell)forthcode); PUSH(strlen(forthcode)); xt=findword("evaluate"); enterforth(xt); printf("Done with C code.\n"); } int plugin_mol_init(void) { printf("Plugin \"mol\" initializing... "); /* output function pointer for testing with "call" */ printf("\ntest function at %p\n", mol_foobar); printf("done.\n"); return 0; } /* plugin meta information available for the plugin loader */ PLUGIN_DESCRIPTION ("MacOnLinux extension")