TclXInit(TCL)

NAME
tclXAppInit, TclX_Init, TclXCmd_Init, TclXLib_Init - Extended Tcl initialization.

SYNOPSIS
#include "tclExtend.h"
extern char *tclAppName;
extern char *tclAppLongname;
extern char *tclAppVersion;
extern int   tclAppPatchlevel;
int
Tcl_AppInit (Tcl_Interp *interp);
int
TclX_Init (Tcl_Interp *interp);
int
TclXCmd_Init (Tcl_Interp *interp);
int
TclXLib_Init (Tcl_Interp *interp);

DESCRIPTION
These functions are used to initialize Extended Tcl and applications based on Extended Tcl.

  tclAppName
The application name to be returned by the infox command. This should be a short mnemonic. This value maybe altered from the default by the application.

  tclAppLongname
The application long name to be returned by the infox command. This should be a natural language string. This value maybe altered from the default by the application.

  tclAppVersion
The application version string to be returned by the infox command. procedures are called. This value maybe altered from the default by the application.

  tclAppPatchlevel
The application patchlevel to be returned by the infox command. procedures are called. This value maybe altered from the default by the application.

  Tcl_AppInit

This function is used to initialize an TclX based application. It is intended to the the only file that is modified for most applications. There are two versions of this function, one for applications built on just TclX and the other for applications built on TclX and Tk.

The TclX version of this function is found in tclXAppInit.c and the Tk version is found in tkXAppInit.c. It should be modified according to the instructions in these files to initialize a TclX based application.

A custom application is then linked in a manner similar to:

  cc tclXAppInit.o mystuff.a libtclx.a libtcl.a ${SYSLIBS} -o myapp

or

  cc tkXAppInit.o mystuff.a libtkx.a libtk.a libtclx.a libtcl.a \
     ${SYSLIBS} -o myapp

  TclX_Init

Initializes Extended Tcl, adding the extended command set to the interpreter. This is called from Tcl_AppInit.

Parameters
    o interp - A pointer to the interpreter to add the commands to.

Returns:
    TCL_OK if all is ok, TCL_ERROR if an error occurred.

  TclXCmd_Init

Add the TclX command set to the interpreter, with the exception of the TclX library management commands. This is normally called by TclX_Init and should only be used if you don't want the TclX library handling.

Parameters
    o interp - A pointer to the interpreter to add the commands to.

Returns:
    TCL_OK if all is ok, TCL_ERROR if an error occurred.

  TclXLib_Init

Add the TclX library management commands to the interpreter. This is normally called by TclX_Init.

Parameters
    o interp - A pointer to the interpreter to add the commands to.

Returns:
    TCL_OK if all is ok, TCL_ERROR if an error occurred.