diff options
author | joye <joye> | 2014-04-24 17:39:29 (GMT) |
---|---|---|
committer | joye <joye> | 2014-04-24 17:39:29 (GMT) |
commit | 5e5fcf5eda29bc13f3826ca392a9965f7019b610 (patch) | |
tree | ba6b22356d420c4ce28bc980e20e950965674e66 /src/bltInt.C | |
parent | d295622d7d281348dda27d2bd6bda7e6b45db273 (diff) | |
download | blt-5e5fcf5eda29bc13f3826ca392a9965f7019b610.zip blt-5e5fcf5eda29bc13f3826ca392a9965f7019b610.tar.gz blt-5e5fcf5eda29bc13f3826ca392a9965f7019b610.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src/bltInt.C')
-rw-r--r-- | src/bltInt.C | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/src/bltInt.C b/src/bltInt.C index 6c65f39..4a73026 100644 --- a/src/bltInt.C +++ b/src/bltInt.C @@ -27,6 +27,8 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include <tk.h> + extern "C" { #include "bltInt.h" Tcl_AppInitProc Tkblt_Init; @@ -34,8 +36,6 @@ Tcl_AppInitProc Tkblt_SafeInit; Tcl_AppInitProc Blt_VectorCmdInitProc; }; -#include <tk.h> - Tcl_AppInitProc Blt_GraphCmdInitProc; int Tkblt_Init(Tcl_Interp* interp) @@ -86,35 +86,3 @@ int Tkblt_SafeInit(Tcl_Interp* interp) { return Tkblt_Init(interp); } - -int Blt_InitCmd(Tcl_Interp* interp, const char *nsName, - Blt_InitCmdSpec *specPtr) -{ - Tcl_DString dString; - Tcl_DStringInit(&dString); - if (nsName) - Tcl_DStringAppend(&dString, nsName, -1); - Tcl_DStringAppend(&dString, "::", -1); - Tcl_DStringAppend(&dString, specPtr->name, -1); - - const char* cmdPath = Tcl_DStringValue(&dString); - Tcl_Command cmdToken = Tcl_FindCommand(interp, cmdPath, NULL, 0); - if (cmdToken) { - Tcl_DStringFree(&dString); - return TCL_OK; /* Assume command was already initialized */ - } - cmdToken = Tcl_CreateObjCommand(interp, cmdPath, specPtr->cmdProc, - specPtr->clientData, specPtr->cmdDeleteProc); - Tcl_DStringFree(&dString); - Tcl_Namespace* nsPtr = Tcl_FindNamespace(interp, nsName, NULL, - TCL_LEAVE_ERR_MSG); - if (nsPtr == NULL) - return TCL_ERROR; - - if (Tcl_Export(interp, nsPtr, specPtr->name, 0) != TCL_OK) - return TCL_ERROR; - - return TCL_OK; -} - - |