cctw  0.2.1
Functions
cctwtcl.cpp File Reference
#include <tcl.h>
#include "cctwtcl_commands.h"
#include "cctwapplication.h"
Include dependency graph for cctwtcl.cpp:

Go to the source code of this file.

Functions

int Cctwtcl_Init (Tcl_Interp *interp)
 

Function Documentation

int Cctwtcl_Init ( Tcl_Interp *  interp)

Definition at line 8 of file cctwtcl.cpp.

References Cctwtcl_Cmd(), Cctwtcl_Initialize(), Cctwtcl_Input_Cmd(), Cctwtcl_Merge_Cmd(), Cctwtcl_Output_Cmd(), Cctwtcl_Parameters_Cmd(), and Cctwtcl_Transform_Cmd().

9 {
10  if (sizeof(void*) > sizeof(long)) {
11  Tcl_SetResult(interp, (char*) "ERROR: Pointers are bigger than longs", TCL_STATIC);
12 
13  return TCL_ERROR;
14  }
15 
16  if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
17  return TCL_ERROR;
18  }
19 
20  if (Tcl_PkgRequire(interp, "Tcl", "8.1", 0) == NULL) {
21  return TCL_ERROR;
22  }
23 
24  if (Tcl_PkgProvide(interp, "cctw", STR(CCTW_VERSION)) != TCL_OK) {
25  return TCL_ERROR;
26  }
27 
28  Tcl_CreateObjCommand(interp, "cctw", (Tcl_ObjCmdProc *) Cctwtcl_Cmd,
29  (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
30 
31  Tcl_CreateObjCommand(interp, "cctw_parameters", (Tcl_ObjCmdProc *) Cctwtcl_Parameters_Cmd,
32  (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
33 
34  Tcl_CreateObjCommand(interp, "cctw_input", (Tcl_ObjCmdProc *) Cctwtcl_Input_Cmd,
35  (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
36 
37  Tcl_CreateObjCommand(interp, "cctw_transform", (Tcl_ObjCmdProc *) Cctwtcl_Transform_Cmd,
38  (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
39 
40  Tcl_CreateObjCommand(interp, "cctw_merge", (Tcl_ObjCmdProc *) Cctwtcl_Merge_Cmd,
41  (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
42 
43  Tcl_CreateObjCommand(interp, "cctw_output", (Tcl_ObjCmdProc *) Cctwtcl_Output_Cmd,
44  (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
45 
47 
48  return TCL_OK;
49 }
int Cctwtcl_Input_Cmd(ClientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
int Cctwtcl_Parameters_Cmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
int Cctwtcl_Cmd(ClientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
int Cctwtcl_Merge_Cmd(ClientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
int Cctwtcl_Output_Cmd(ClientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
int Cctwtcl_Transform_Cmd(ClientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
int Cctwtcl_Initialize()