model_server/gala/src/globalFuncs.cxx
// Utility to evaluate a string resource using TCL.
// Will check $DIS_TCL_PATH/name.tcl before the resource file.
Utility to evaluate a string resource using TCL.
Will check $DIS_TCL_PATH/name.tcl before the resource file.
Utility to evaluate a string resource using TCL . Will check $DIS_TCL_PATH / name . tcl before the resource file .
int eval_StringResource(Tcl_Interp* interp, vchar* resourceName) {
    vbool status = vTRUE;
    gString fileName;
    vchar* ptr = NULL;
    vfsPath* vpath;
    gString name = (vchar*)resourceName;
    name += (vchar*)".tcl";
    char *p = (char *)name;
    while(*p != '\0'){
	if(*p == '/' || *p == '\\' || *p == ':' || *p == '*')
	    *p = '_';
	p++;
    }
    vpath = vfsPath::BuildScribed(vfsPATH_TYPE_FULL,
				  vcharScribeLiteral("$GALA_SCRIPTS"),
				  vcharScribeLiteral(name), 
				  NULL);
    vpath->ExpandVariables();
    vexWITH_HANDLING {
	status = vpath->Access(vfsFILE_EXISTS | vfsCAN_READ);
    }
int eval_StringResource ( Tcl_Interp * interp , vchar * resourceName ) { vbool status = vTRUE ; gString fileName ; vchar * ptr = NULL ; vfsPath * vpath ; gString name = ( vchar * ) resourceName ; name += ( vchar * ) " " ; char * p = ( char * ) name ; while ( * p != ' \0 ' ) { if ( * p == ' ' || * p == ' \\ ' || * p == ' ' || * p == ' ' ) * p = ' ' ; p ++ ; } vpath = vfsPath :: BuildScribed ( vfsPATH_TYPE_FULL , vcharScribeLiteral ( " " ) , vcharScribeLiteral ( name ) , NULL ) ; vpath -> ExpandVariables ( ) ; vexWITH_HANDLING { status = vpath -> Access ( vfsFILE_EXISTS | vfsCAN_READ ) ; }
Utility to evaluate a string resource using TCL.
Utility to evaluate a string resource using TCL .
// replace all '/', ':', '*' and '\\' in name to '_'