cctw  0.2.1
cctwtcl.cpp
Go to the documentation of this file.
1 
2 #include <tcl.h>
3 
4 #include "cctwtcl_commands.h"
5 #include "cctwapplication.h"
6 
7 extern "C"
8 int Cctwtcl_Init(Tcl_Interp *interp)
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_Init(Tcl_Interp *interp)
Definition: cctwtcl.cpp:8
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()