diff options
author | joye <joye> | 2014-04-22 20:03:27 (GMT) |
---|---|---|
committer | joye <joye> | 2014-04-22 20:03:27 (GMT) |
commit | 9151d2e9af0fa1d6dd6000a792f37e34babf00bf (patch) | |
tree | a7d3db4916e4df52f630cf5d94c45c18e0d1ec94 /src/bltOp.C | |
parent | aabaad3e8de1dcbb7f64af59e864ef2638b06bf8 (diff) | |
download | blt-9151d2e9af0fa1d6dd6000a792f37e34babf00bf.zip blt-9151d2e9af0fa1d6dd6000a792f37e34babf00bf.tar.gz blt-9151d2e9af0fa1d6dd6000a792f37e34babf00bf.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src/bltOp.C')
-rw-r--r-- | src/bltOp.C | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/bltOp.C b/src/bltOp.C index 429e8f9..53d5e28 100644 --- a/src/bltOp.C +++ b/src/bltOp.C @@ -33,6 +33,26 @@ extern "C" { #include "bltOp.h" }; +int BltInvokeEnsemble(const BltEnsemble* ensemble, int cmdIndex, + void* clientData, Tcl_Interp* interp, + int objc, Tcl_Obj* const objv[]) +{ + while (cmdIndex < objc) { + int index; + if (Tcl_GetIndexFromObjStruct(interp, objv[cmdIndex], ensemble, sizeof(ensemble[0]), "command", 0, &index) != TCL_OK) + return TCL_ERROR; + + if (ensemble[index].command) + return ensemble[index].command(clientData, interp, objc, objv); + + ensemble = (const BltEnsemble*)ensemble[index].ensemble; + ++cmdIndex; + } + + Tcl_WrongNumArgs(interp, cmdIndex, objv, "option ?arg ...?"); + return TCL_ERROR; +} + static int BinaryOpSearch(Blt_OpSpec *specs, int nSpecs, const char *string, int length) { |