31 # ifndef HAVE_ITCLDECLS_H
32 # define RESOURCE_INCLUDED
68 const char *tmp = Tcl_GetStringResult( interp );
74 if ( tmp != NULL && tmp !=
'\0' )
75 fprintf( stderr,
"%s\n", Tcl_GetStringResult( interp ) );
80 Tcl_UnsetVar( interp,
"tcl_prompt1", 0 );
81 Tcl_Eval( interp,
"tclexit" );
104 if ( pls->
ipls == 0 )
105 sprintf( prompt,
"pltext; puts -nonewline \"pltcl> \"; flush stdout" );
107 sprintf( prompt,
"pltext; puts -nonewline \"pltcl_%d> \"; flush stdout", pls->
ipls );
109 Tcl_VarEval( interp, prompt, 0 );
146 if ( Tcl_Init( interp ) == TCL_ERROR )
148 printf(
"Error Tcl_Init\n" );
152 if ( Itcl_Init( interp ) == TCL_ERROR )
166 Tcl_VarEval( interp,
"rename exit tclexit", (
char *) NULL );
168 Tcl_CreateCommand( interp,
"exit", (Tcl_CmdProc *)
plExitCmd,
169 (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL );
171 Tcl_CreateCommand( interp,
"pr_prompt", (Tcl_CmdProc *)
prPromptCmd,
172 (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL );
176 Tcl_SetVar( interp,
"tcl_prompt1",
"pr_prompt", 0 );
PLDLLIMPEXP_TCLTK int pltclMain(int argc, char **argv, char *RcFileName, int(*AppInit)(Tcl_Interp *interp))
static int prPromptCmd(ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
static PLStream * pls[PL_NSTREAMS]
static int AppInit(Tcl_Interp *interp)
static int plExitCmd(ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
static Tcl_Interp * interp
PLDLLIMPEXP_TCLTK int Pltcl_Init(Tcl_Interp *interp)
void plgpls(PLStream **p_pls)
int main(int argc, char **argv)