6c23cef446490c7f0aa69e19ecda02bf889af8de
[scilab.git] / scilab / modules / tclsci / src / c / tksynchro.c
1 /*--------------------------------------------------------------------------*/
2 /* Copyright INRIA */
3 /*--------------------------------------------------------------------------*/
4 #include <math.h>
5 #include <stdio.h>
6 #include "machine.h"
7 #include "TCL_Global.h"
8 #include "tksynchro.h"
9 #include "Scierror.h"
10 #include "localization.h"
11 /*--------------------------------------------------------------------------*/
12 void C2F(tksynchro)( int *l)
13 {
14   char str[128];
15
16   if (TK_Started) 
17   {
18     int RET;
19
20     if(TCLinterp != NULL)
21         {
22       RET = Tcl_Eval(TCLinterp,"set isscipadinterp [interp exists scipad]");
23       if (RET==TCL_ERROR)
24           {
25                   Scierror(999,_("Error : tksynchro %s.\n"),TCLinterp->result);
26       }
27       if(strcmp((char*) Tcl_GetVar(TCLinterp,"isscipadinterp", TCL_GLOBAL_ONLY),"1")==0)
28           {
29                 sprintf(str,"scipad eval {set sciprompt %d}",*l);
30                 RET=Tcl_Eval(TCLinterp,str);
31           
32                 if (RET==TCL_ERROR)
33             {
34                   Scierror(999,_("Error : tksynchro %s.\n"),TCLinterp->result);
35             }
36           }
37     }
38   }
39 }
40 /*--------------------------------------------------------------------------*/