setenvtcl.c

Go to the documentation of this file.
00001 /*-----------------------------------------------------------------------------------*/
00002 /* INRIA 2005 */
00003 /* Allan CORNET */
00004 /*-----------------------------------------------------------------------------------*/ 
00005 #include "TCL_Global.h"
00006 #include "setenvtcl.h"
00007 /*-----------------------------------------------------------------------------------*/ 
00008 int setenvtcl(char *string,char *value)
00009 {
00010         int bOK=FALSE;
00011         char MyTclCommand[2048];
00012 
00013         sprintf(MyTclCommand,"env(%s)",string);
00014 
00015         if (TCLinterp==NULL) return((int)FALSE);
00016         
00017         if ( !Tcl_SetVar(TCLinterp,MyTclCommand, value, TCL_GLOBAL_ONLY) )
00018         {
00019                 bOK=(int)(FALSE);
00020         }
00021         else
00022         {
00023                 bOK=(int)(TRUE);
00024         }
00025 
00026         return bOK;
00027 }
00028 /*-----------------------------------------------------------------------------------*/

Generated on Sun Mar 4 15:04:01 2007 for Scilab [trunk] by  doxygen 1.5.1