git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@366 626c5289-ae23-0410-ae9c-e8d60b6d4f22
24 lines
493 B
C
24 lines
493 B
C
#include <tcl.h>
|
|
extern int matrix_init(Tcl_Interp *); /* Init function from matrix.i */
|
|
|
|
int main() {
|
|
|
|
int code;
|
|
char input[1024];
|
|
Tcl_Interp *interp;
|
|
|
|
interp = Tcl_CreateInterp();
|
|
|
|
/* Initialize the wrappers */
|
|
|
|
if (matrix_init(interp) == TCL_ERROR)
|
|
exit(0);
|
|
|
|
fprintf(stdout,"matrix > ");
|
|
while(fgets(input, 1024, stdin) != NULL) {
|
|
code = Tcl_Eval(interp, input);
|
|
fprintf(stdout,"%s\n",interp->result);
|
|
fprintf(stdout,"matrix > ");
|
|
}
|
|
}
|
|
|