home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / devel / tcl / tclx7_31.z / tclx7_31 / tcldev / tclX7.3a-p1 / src / tclExtend.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-03  |  6.9 KB  |  222 lines

  1. /* 
  2.  * tclExtend.h
  3.  *
  4.  *    External declarations for the extended Tcl library.
  5.  *-----------------------------------------------------------------------------
  6.  * Copyright 1991-1993 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 3.2 1993/12/03 10:25:23 markd 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.2a */
  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.  * Flag user to indicate that a signal that was setup to return an error
  49.  * occured (it may not have been processed yet).  This is used by interactive
  50.  * command loops to flush input.  It should be explictly cleared by any routine
  51.  * that cares about it.  Also an application-supplied function to call if a
  52.  * error signal occurs.  This normally flushes command input.
  53.  */
  54. extern int tclGotErrorSignal;
  55. extern void (*tclErrorSignalProc) _ANSI_ARGS_((int signalNum));
  56.  
  57. /*
  58.  * Pointer to background error handler for signals handled while not in an
  59.  * interpreter.
  60.  */
  61. extern void (*tclSignalBackgroundError) _ANSI_ARGS_((Tcl_Interp *interp));
  62.  
  63.  
  64. /*
  65.  * If this variable is non-zero, the TclX shell will delete the interpreter
  66.  * at the end of a script instead of evaluating the "exit" command.  This is
  67.  * for applications that want to track down memory leaks.  This does not
  68.  * alter the behavior of explicit calls to exit.
  69.  */
  70. extern int tclDeleteInterpAtEnd;
  71.  
  72. /*
  73.  * Exported Tcl initialization functions.
  74.  */
  75. EXTERN int
  76. TclX_Init _ANSI_ARGS_((Tcl_Interp *interp));
  77.  
  78. EXTERN int
  79. TclXCmd_Init _ANSI_ARGS_((Tcl_Interp *interp));
  80.  
  81. EXTERN int
  82. TclXLib_Init _ANSI_ARGS_((Tcl_Interp *interp));
  83.  
  84. EXTERN void
  85. TclX_ErrorExit _ANSI_ARGS_((Tcl_Interp  *interp,
  86.                             int          exitCode));
  87.  
  88. EXTERN void
  89. TclX_EvalRCFile _ANSI_ARGS_((Tcl_Interp *interp));
  90.  
  91. EXTERN void
  92. TclX_OutputPrompt _ANSI_ARGS_((Tcl_Interp *interp,
  93.                                int         topLevel));
  94.  
  95. EXTERN void
  96. TclX_PrintResult _ANSI_ARGS_((Tcl_Interp *interp,
  97.                               int         intResult,
  98.                               char       *checkCmd));
  99.  
  100. EXTERN void
  101. TclX_Shell _ANSI_ARGS_((int    argc,
  102.                         char **argv));
  103.  
  104. EXTERN void
  105. Tcl_SetupSigInt _ANSI_ARGS_((void));
  106.  
  107. /*
  108.  * Run a TclX wish.
  109.  */
  110. EXTERN void
  111. TkX_Wish _ANSI_ARGS_((int    argc,
  112.                       char **argv));
  113.  
  114. /*
  115.  * Exported utility functions.
  116.  */
  117. EXTERN char * 
  118. Tcl_DownShift _ANSI_ARGS_((char       *targetStr,
  119.                            CONST char *sourceStr));
  120.  
  121. EXTERN int 
  122. Tcl_GetLong _ANSI_ARGS_((Tcl_Interp  *interp,
  123.                          CONST char *string,
  124.                          long        *longPtr));
  125.  
  126. EXTERN int
  127. Tcl_GetTimeZone _ANSI_ARGS_((long  currentTime));
  128.  
  129. EXTERN int 
  130. Tcl_GetUnsigned _ANSI_ARGS_((Tcl_Interp  *interp,
  131.                              CONST char *string,
  132.                              unsigned   *unsignedPtr));
  133.  
  134. EXTERN int
  135. Tcl_StrToLong _ANSI_ARGS_((CONST char *string,
  136.                            int          base,
  137.                            long        *longPtr));
  138.  
  139. EXTERN int
  140. Tcl_StrToInt _ANSI_ARGS_((CONST char *string,
  141.                           int         base,
  142.                           int        *intPtr));
  143.  
  144. EXTERN int
  145. Tcl_StrToUnsigned _ANSI_ARGS_((CONST char *string,
  146.                                int         base,
  147.                                unsigned   *unsignedPtr));
  148.  
  149. EXTERN int
  150. Tcl_StrToDouble _ANSI_ARGS_((CONST char  *string,
  151.                              double      *doublePtr));
  152.  
  153. EXTERN char * 
  154. Tcl_UpShift _ANSI_ARGS_((char       *targetStr,
  155.                          CONST char *sourceStr));
  156.  
  157. /*
  158.  * Exported keyed list manipulation functions.
  159.  */
  160. EXTERN char *
  161. Tcl_DeleteKeyedListField _ANSI_ARGS_((Tcl_Interp  *interp,
  162.                                       CONST char  *fieldName,
  163.                                       CONST char  *keyedList));
  164. EXTERN int
  165. Tcl_GetKeyedListField _ANSI_ARGS_((Tcl_Interp  *interp,
  166.                                    CONST char  *fieldName,
  167.                                    CONST char  *keyedList,
  168.                                    char       **fieldValuePtr));
  169.  
  170. EXTERN int
  171. Tcl_GetKeyedListKeys _ANSI_ARGS_((Tcl_Interp  *interp,
  172.                                   CONST char  *subFieldName,
  173.                                   CONST char  *keyedList,
  174.                                   int         *keyesArgcPtr,
  175.                                   char      ***keyesArgvPtr));
  176.  
  177. EXTERN char *
  178. Tcl_SetKeyedListField _ANSI_ARGS_((Tcl_Interp  *interp,
  179.                                    CONST char  *fieldName,
  180.                                    CONST char  *fieldvalue,
  181.                                    CONST char  *keyedList));
  182.  
  183. /*
  184.  * Exported handle table manipulation functions.
  185.  */
  186. EXTERN void_pt  
  187. Tcl_HandleAlloc _ANSI_ARGS_((void_pt   headerPtr,
  188.                              char     *handlePtr));
  189.  
  190. EXTERN void 
  191. Tcl_HandleFree _ANSI_ARGS_((void_pt  headerPtr,
  192.                             void_pt  entryPtr));
  193.  
  194. EXTERN void_pt
  195. Tcl_HandleTblInit _ANSI_ARGS_((CONST char *handleBase,
  196.                                int         entrySize,
  197.                                int         initEntries));
  198.  
  199. EXTERN void
  200. Tcl_HandleTblRelease _ANSI_ARGS_((void_pt headerPtr));
  201.  
  202. EXTERN int
  203. Tcl_HandleTblUseCount _ANSI_ARGS_((void_pt headerPtr,
  204.                                    int     amount));
  205.  
  206. EXTERN void_pt
  207. Tcl_HandleWalk _ANSI_ARGS_((void_pt   headerPtr,
  208.                             int      *walkKeyPtr));
  209.  
  210. EXTERN void
  211. Tcl_WalkKeyToHandle _ANSI_ARGS_((void_pt   headerPtr,
  212.                                  int       walkKey,
  213.                                  char     *handlePtr));
  214.  
  215. EXTERN void_pt
  216. Tcl_HandleXlate _ANSI_ARGS_((Tcl_Interp  *interp,
  217.                              void_pt      headerPtr,
  218.                              CONST  char *handle));
  219.  
  220.  
  221. #endif
  222.