Initial revision.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@366 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b016737462
commit
6ca566dee0
12 changed files with 472 additions and 0 deletions
24
Examples/guile/matrix/main.c
Normal file
24
Examples/guile/matrix/main.c
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#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 > ");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue