-
-void readtclscript (char *script, Tcl_Interp * my_tcl)
-{
- int code;
- FILE *f;
- f = fopen (script, "r");
- if (f == NULL) {
- Debug (LDAP_DEBUG_ANY, "Could not open scriptpath %s\n", script,
- 0, 0);
- return( 1 );
- }
- fclose (f);
- code = Tcl_EvalFile (my_tcl, script);
- if (code != TCL_OK) {
- Debug (LDAP_DEBUG_ANY, "%s: %s\n", script,
- Tcl_GetVar (my_tcl, "errorInfo", TCL_GLOBAL_ONLY), 0);
- Debug (LDAP_DEBUG_ANY, "%s: error at line\n", script,
- my_tcl->errorLine, 0);
- return( 1 );
- }
-}