home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.2 Development Libraries / SGI IRIX 6.2 Development Libraries.iso / dist / sgitcl_dev.idb / usr / sgitcl / include / tclExtend.h.z / tclExtend.h
Encoding:
C/C++ Source or Header  |  1996-03-15  |  7.8 KB  |  242 lines

  1. /* 
  2.  * tclExtend.h
  3.  *
  4.  *    External declarations for the extended Tcl library.
  5.  *-----------------------------------------------------------------------------
  6.  * Copyright 1991-1995 Karl Lehenbauer and Mark Diekhans.
  7.  *
  8.  * Permission to use, copy, modify, and distribute this software and its
  9.  * documentation for any purpose and without fee is hereby granted, provided
  10.  * that the above copyright notice appear in all copies.  Karl Lehenbauer and
  11.  * Mark Diekhans make no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without express or
  13.  * implied warranty.
  14.  *-----------------------------------------------------------------------------
  15.  * $Id: tclExtend.h,v 1.4 1995/08/03 00:50:52 jes Exp $
  16.  *-----------------------------------------------------------------------------
  17.  */
  18.  
  19. #ifndef TCLEXTEND_H
  20. #define TCLEXTEND_H
  21.  
  22. #include <stdio.h>
  23. #include "tcl.h"
  24.  
  25. /*
  26.  * Version suffix for extended Tcl, this is appended to the standard Tcl
  27.  * version to form the actual extended Tcl version.
  28.  */
  29.  
  30. #define TCL_EXTD_VERSION_SUFFIX "a"   /* 7.4a */
  31.  
  32. typedef void *void_pt;
  33.  
  34. /*
  35.  * These globals are used by the infox command.  Should be set before
  36.  * initializing the TclX shell.
  37.  */
  38.  
  39. extern char *tclxVersion;        /* Extended Tcl version number.            */
  40. extern int   tclxPatchlevel;     /* Extended Tcl patch level.               */
  41.  
  42. extern char *tclAppName;         /* Application name                        */
  43. extern char *tclAppLongname;     /* Long, natural language application name */
  44. extern char *tclAppVersion;      /* Version number of the application       */
  45. extern int   tclAppPatchlevel;   /* Patchlevel of the application           */
  46.  
  47. /*
  48.  * Used to override the init file name, which is either library relative or
  49.  * absolute.  The value fields must be changed before TclX_Init or
  50.  * TclXLib_Init is called.  To change the library location,
  51.  */
  52. extern char *tclX_library;     /* Library directory to use.        */
  53. extern char *tclX_libraryEnv;  /* Override environment variable.   */
  54. extern char *tclX_initFile;    /* Init file name or absolute path. */
  55.  
  56. /*
  57.  * Flag user to indicate that a signal that was setup to return an error
  58.  * occured (it may not have been processed yet).  This is used by interactive
  59.  * command loops to flush input.  It should be explictly cleared by any routine
  60.  * that cares about it.  Also an application-supplied function to call if a
  61.  * error signal occurs.  This normally flushes command input.
  62.  */
  63. extern int tclGotErrorSignal;
  64. extern void (*tclErrorSignalProc) _ANSI_ARGS_((int signalNum));
  65.  
  66. /*
  67.  * Pointer to background error handler for signals handled while not in an
  68.  * interpreter.
  69.  */
  70. extern void (*tclSignalBackgroundError) _ANSI_ARGS_((Tcl_Interp *interp));
  71.  
  72. /*
  73.  * If this variable is non-zero, the TclX shell will delete the interpreter
  74.  * at the end of a script instead of evaluating the "exit" command.  This is
  75.  * for applications that want to track down memory leaks.  This does not
  76.  * alter the behavior of explicit calls to exit.
  77.  */
  78. extern int tclDeleteInterpAtEnd;
  79.  
  80.  
  81. /*
  82.  * Exported TclX initialization functions.
  83.  */
  84. EXTERN void
  85. TclX_Main _ANSI_ARGS_((int              argc,
  86.                        char           **argv,
  87.                        Tcl_AppInitProc *appInitProc));
  88.  
  89. EXTERN int
  90. TclX_Init _ANSI_ARGS_((Tcl_Interp *interp));
  91.  
  92. EXTERN int
  93. TclXCmd_Init _ANSI_ARGS_((Tcl_Interp *interp));
  94.  
  95. EXTERN int
  96. TclXLib_Init _ANSI_ARGS_((Tcl_Interp *interp));
  97.  
  98. EXTERN void
  99. TclX_ErrorExit _ANSI_ARGS_((Tcl_Interp  *interp,
  100.                             int          exitCode));
  101.  
  102. EXTERN void
  103. TclX_EvalRCFile _ANSI_ARGS_((Tcl_Interp *interp));
  104.  
  105. EXTERN void
  106. TclX_OutputPrompt _ANSI_ARGS_((Tcl_Interp *interp,
  107.                                int         topLevel));
  108.  
  109. EXTERN void
  110. TclX_PrintResult _ANSI_ARGS_((Tcl_Interp *interp,
  111.                               int         intResult,
  112.                               char       *checkCmd));
  113.  
  114. EXTERN void
  115. Tcl_SetupSigInt _ANSI_ARGS_((void));
  116.  
  117. /*
  118.  * Exported utility functions.
  119.  */
  120. EXTERN char * 
  121. Tcl_DownShift _ANSI_ARGS_((char       *targetStr,
  122.                            CONST char *sourceStr));
  123.  
  124. EXTERN int 
  125. Tcl_GetLong _ANSI_ARGS_((Tcl_Interp  *interp,
  126.                          CONST char *string,
  127.                          long        *longPtr));
  128.  
  129. EXTERN int
  130. Tcl_GetTimeZone _ANSI_ARGS_((long  currentTime));
  131.  
  132. EXTERN int 
  133. Tcl_GetUnsigned _ANSI_ARGS_((Tcl_Interp  *interp,
  134.                              CONST char *string,
  135.                              unsigned   *unsignedPtr));
  136.  
  137. EXTERN int
  138. Tcl_StrToLong _ANSI_ARGS_((CONST char *string,
  139.                            int          base,
  140.                            long        *longPtr));
  141.  
  142. EXTERN int
  143. Tcl_StrToInt _ANSI_ARGS_((CONST char *string,
  144.                           int         base,
  145.                           int        *intPtr));
  146.  
  147. EXTERN int
  148. Tcl_StrToUnsigned _ANSI_ARGS_((CONST char *string,
  149.                                int         base,
  150.                                unsigned   *unsignedPtr));
  151.  
  152. EXTERN int
  153. Tcl_StrToDouble _ANSI_ARGS_((CONST char  *string,
  154.                              double      *doublePtr));
  155.  
  156. EXTERN char * 
  157. Tcl_UpShift _ANSI_ARGS_((char       *targetStr,
  158.                          CONST char *sourceStr));
  159.  
  160. /*
  161.  * Exported keyed list manipulation functions.
  162.  */
  163. EXTERN char *
  164. Tcl_DeleteKeyedListField _ANSI_ARGS_((Tcl_Interp  *interp,
  165.                                       CONST char  *fieldName,
  166.                                       CONST char  *keyedList));
  167. EXTERN int
  168. Tcl_GetKeyedListField _ANSI_ARGS_((Tcl_Interp  *interp,
  169.                                    CONST char  *fieldName,
  170.                                    CONST char  *keyedList,
  171.                                    char       **fieldValuePtr));
  172.  
  173. EXTERN int
  174. Tcl_GetKeyedListKeys _ANSI_ARGS_((Tcl_Interp  *interp,
  175.                                   CONST char  *subFieldName,
  176.                                   CONST char  *keyedList,
  177.                                   int         *keyesArgcPtr,
  178.                                   char      ***keyesArgvPtr));
  179.  
  180. EXTERN char *
  181. Tcl_SetKeyedListField _ANSI_ARGS_((Tcl_Interp  *interp,
  182.                                    CONST char  *fieldName,
  183.                                    CONST char  *fieldvalue,
  184.                                    CONST char  *keyedList));
  185.  
  186. /*
  187.  * Exported handle table manipulation functions.
  188.  */
  189. EXTERN void_pt  
  190. Tcl_HandleAlloc _ANSI_ARGS_((void_pt   headerPtr,
  191.                              char     *handlePtr));
  192.  
  193. EXTERN void 
  194. Tcl_HandleFree _ANSI_ARGS_((void_pt  headerPtr,
  195.                             void_pt  entryPtr));
  196.  
  197. EXTERN void_pt
  198. Tcl_HandleTblInit _ANSI_ARGS_((CONST char *handleBase,
  199.                                int         entrySize,
  200.                                int         initEntries));
  201.  
  202. EXTERN void
  203. Tcl_HandleTblRelease _ANSI_ARGS_((void_pt headerPtr));
  204.  
  205. EXTERN int
  206. Tcl_HandleTblUseCount _ANSI_ARGS_((void_pt headerPtr,
  207.                                    int     amount));
  208.  
  209. EXTERN void_pt
  210. Tcl_HandleWalk _ANSI_ARGS_((void_pt   headerPtr,
  211.                             int      *walkKeyPtr));
  212.  
  213. EXTERN void
  214. Tcl_WalkKeyToHandle _ANSI_ARGS_((void_pt   headerPtr,
  215.                                  int       walkKey,
  216.                                  char     *handlePtr));
  217.  
  218. EXTERN void_pt
  219. Tcl_HandleXlate _ANSI_ARGS_((Tcl_Interp  *interp,
  220.                              void_pt      headerPtr,
  221.                              CONST  char *handle));
  222.  
  223. /*
  224.  * Tk with TclX initialization.
  225.  *
  226.  * The variables are Used to override the library and library environment
  227.  * variable used to find the TkX startup file and runtime library.  The values
  228.  * of these fields must be changed before TkX_Init is called.
  229.  */
  230. extern char *tkX_library;
  231. extern char *tkX_libraryEnv;
  232.  
  233. EXTERN int
  234. TkX_Init _ANSI_ARGS_((Tcl_Interp  *interp));
  235.  
  236. EXTERN void
  237. TkX_Main _ANSI_ARGS_((int               argc,
  238.                       char            **argv,
  239.                       Tcl_AppInitProc  *appInitProc));
  240.  
  241. #endif
  242.