diff options
Diffstat (limited to 'unix/dltest/embtest.c')
-rw-r--r-- | unix/dltest/embtest.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/unix/dltest/embtest.c b/unix/dltest/embtest.c new file mode 100644 index 0000000..1111268 --- /dev/null +++ b/unix/dltest/embtest.c @@ -0,0 +1,36 @@ +#include "tcl.h" +#include <stdio.h> + +MODULE_SCOPE const TclStubs *tclStubsPtr; + +int main(int argc, char **argv) { + const char *version; + int exitcode = 0; + + if (tclStubsPtr != NULL) { + printf("ERROR: stub table is already initialized"); + exitcode = 1; + } + tclStubsPtr = NULL; + version = Tcl_SetPanicProc(Tcl_ConsolePanic); + if (tclStubsPtr == NULL) { + printf("ERROR: Tcl_SetPanicProc does not initialize the stub table\n"); + exitcode = 1; + } + tclStubsPtr = NULL; + version = Tcl_InitSubsystems(); + if (tclStubsPtr == NULL) { + printf("ERROR: Tcl_InitSubsystems does not initialize the stub table\n"); + exitcode = 1; + } + tclStubsPtr = NULL; + version = Tcl_FindExecutable(argv[0]); + if (tclStubsPtr == NULL) { + printf("ERROR: Tcl_FindExecutable does not initialize the stub table\n"); + exitcode = 1; + } + if (!exitcode) { + printf("All OK!\n"); + } + return exitcode; +} |