source:
patches/expect-5.43.0-avoid-tcl-internals-1.patch@
697d86d
Last change on this file since 697d86d was e8e6c4e, checked in by , 16 years ago | |
---|---|
|
|
File size: 3.3 KB |
-
exp_command.c
Submitted By: Bryan Kadzban <bryan@kadzban.is-a-geek.net> Date: 2008-01-12 Initial Package Version: 5.43 Upstream status: Not Submitted - Test Version Origin: LFS ticket 2126 (http://wiki.linuxfromscratch.org/lfs/ticket/2126) Description: Removes references to functions that Tcl 8.5 no longer exposes. diff -Naur expect-5.43/exp_command.c expect-5.43-patched/exp_command.c
old new 2265 2265 /*NOTREACHED*/ 2266 2266 } 2267 2267 2268 static struct exp_cmd_data cmd_data[]; 2269 2268 2270 /*ARGSUSED*/ 2269 2271 static int 2270 2272 Exp_CloseObjCmd(clientData, interp, objc, objv) … … 2311 2313 /* Historical note: we used "close" long before there was a */ 2312 2314 /* Tcl builtin by the same name. */ 2313 2315 2316 /* The code that registered this function as the handler for */ 2317 /* the "close" command stored away the old handler in the */ 2318 /* exp_cmd_data for the "close" command. */ 2319 2320 struct exp_cmd_data *cmd_ptr; 2314 2321 Tcl_CmdInfo info; 2322 2323 for(cmd_ptr = &cmd_data[0]; cmd_ptr->name; cmd_ptr++) { 2324 if(strncmp(cmd_ptr->name, "close", 5) == 0) 2325 break; 2326 } 2327 2315 2328 Tcl_ResetResult(interp); 2316 2329 if (0 == Tcl_GetCommandInfo(interp,"close",&info)) { 2317 2330 info.clientData = 0; 2318 2331 } 2319 return( Tcl_CloseObjCmd(info.clientData,interp,objc_orig,objv_orig));2332 return(cmd_ptr->old_objProc(info.clientData,interp,objc_orig,objv_orig)); 2320 2333 } 2321 2334 2322 2335 if (chanName) { … … 2961 2974 /* if successful (i.e., TCL_RETURN is returned) */ 2962 2975 /* modify the result, so that we will handle it specially */ 2963 2976 2964 int result = Tcl_ReturnObjCmd(clientData,interp,objc,objv); 2977 Tcl_CmdInfo info; 2978 Tcl_GetCommandInfo(interp, "return", &info); 2979 2980 int result = info.objProc(clientData,interp,objc,objv); 2965 2981 if (result == TCL_RETURN) 2966 2982 result = EXP_TCL_RETURN; 2967 2983 return result; … … 3062 3078 3063 3079 for (;c->name;c++) { 3064 3080 /* if already defined, don't redefine */ 3065 if ((c->flags & EXP_REDEFINE) || 3066 !(Tcl_FindHashEntry(&globalNsPtr->cmdTable,c->name) || 3081 if (!(Tcl_FindHashEntry(&globalNsPtr->cmdTable,c->name) || 3067 3082 Tcl_FindHashEntry(&currNsPtr->cmdTable,c->name))) { 3068 3083 if (c->objproc) 3069 3084 Tcl_CreateObjCommand(interp,c->name, … … 3072 3087 Tcl_CreateCommand(interp,c->name,c->proc, 3073 3088 c->data,exp_deleteProc); 3074 3089 } 3090 else if (c->flags & EXP_REDEFINE) { /* unless the REDEFINE flag is present */ 3091 Tcl_CmdInfo info; 3092 3093 if (Tcl_GetCommandInfo(interp, c->name, &info)) { 3094 c->old_proc = info.proc; 3095 c->old_objProc = info.objProc; 3096 } 3097 3098 if (c->objproc) 3099 Tcl_CreateObjCommand(interp,c->name, 3100 c->objproc,c->data,exp_deleteObjProc); 3101 else 3102 Tcl_CreateCommand(interp,c->name,c->proc, 3103 c->data,exp_deleteProc); 3104 } 3075 3105 if (!(c->name[0] == 'e' && 3076 3106 c->name[1] == 'x' && 3077 3107 c->name[2] == 'p') -
exp_command.h
diff -Naur expect-5.43/exp_command.h expect-5.43-patched/exp_command.h
old new 297 297 Tcl_CmdProc *proc; 298 298 ClientData data; 299 299 int flags; 300 Tcl_CmdProc *old_proc; /* these store the procedure for the old command, */ 301 Tcl_ObjCmdProc *old_objProc; /* if any */ 300 302 }; 301 303 302 304 EXTERN void exp_create_commands _ANSI_ARGS_((Tcl_Interp *,
Note:
See TracBrowser
for help on using the repository browser.