|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _TCL |
|
|
#define _TCL |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
|
extern "C" { |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_ALPHA_RELEASE 0 |
|
|
#define TCL_BETA_RELEASE 1 |
|
|
#define TCL_FINAL_RELEASE 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if !defined(TCL_MAJOR_VERSION) |
|
|
# define TCL_MAJOR_VERSION 8 |
|
|
#endif |
|
|
#if TCL_MAJOR_VERSION != 8 |
|
|
# error "This header-file is for Tcl 8 only" |
|
|
#endif |
|
|
#define TCL_MINOR_VERSION 6 |
|
|
#define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE |
|
|
#define TCL_RELEASE_SERIAL 14 |
|
|
|
|
|
#define TCL_VERSION "8.6" |
|
|
#define TCL_PATCH_LEVEL "8.6.14" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef _WIN32 |
|
|
# ifndef __WIN32__ |
|
|
# define __WIN32__ |
|
|
# endif |
|
|
# ifndef WIN32 |
|
|
# define WIN32 |
|
|
# endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef STRINGIFY |
|
|
# define STRINGIFY(x) STRINGIFY1(x) |
|
|
# define STRINGIFY1(x) #x |
|
|
#endif |
|
|
#ifndef JOIN |
|
|
# define JOIN(a,b) JOIN1(a,b) |
|
|
# define JOIN1(a,b) a##b |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef RC_INVOKED |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef TCL_THREADS |
|
|
#define TCL_DECLARE_MUTEX(name) static Tcl_Mutex name; |
|
|
#else |
|
|
#define TCL_DECLARE_MUTEX(name) |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <stdio.h> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <stdarg.h> |
|
|
#if !defined(TCL_NO_DEPRECATED) |
|
|
# define TCL_VARARGS(type, name) (type name, ...) |
|
|
# define TCL_VARARGS_DEF(type, name) (type name, ...) |
|
|
# define TCL_VARARGS_START(type, name, list) (va_start(list, name), name) |
|
|
#endif |
|
|
#if defined(__GNUC__) && (__GNUC__ > 2) |
|
|
# if defined(_WIN32) && defined(__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO |
|
|
# define TCL_FORMAT_PRINTF(a,b) __attribute__ ((__format__ (__MINGW_PRINTF_FORMAT, a, b))) |
|
|
# else |
|
|
# define TCL_FORMAT_PRINTF(a,b) __attribute__ ((__format__ (__printf__, a, b))) |
|
|
# endif |
|
|
# define TCL_NORETURN __attribute__ ((noreturn)) |
|
|
# if defined(BUILD_tcl) || defined(BUILD_tk) |
|
|
# define TCL_NORETURN1 __attribute__ ((noreturn)) |
|
|
# else |
|
|
# define TCL_NORETURN1 |
|
|
# endif |
|
|
#else |
|
|
# define TCL_FORMAT_PRINTF(a,b) |
|
|
# if defined(_MSC_VER) && (_MSC_VER >= 1310) |
|
|
# define TCL_NORETURN _declspec(noreturn) |
|
|
# else |
|
|
# define TCL_NORETURN |
|
|
# endif |
|
|
# define TCL_NORETURN1 |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) |
|
|
# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) |
|
|
# define TCL_DEPRECATED_API(msg) __attribute__ ((__deprecated__ (msg))) |
|
|
# else |
|
|
# define TCL_DEPRECATED_API(msg) __attribute__ ((__deprecated__)) |
|
|
# endif |
|
|
#else |
|
|
# define TCL_DEPRECATED_API(msg) |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if (defined(_WIN32) && (defined(_MSC_VER) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x0550)) || defined(__LCC__) || defined(__WATCOMC__) || (defined(__GNUC__) && defined(__declspec)))) |
|
|
# define HAVE_DECLSPEC 1 |
|
|
# ifdef STATIC_BUILD |
|
|
# define DLLIMPORT |
|
|
# define DLLEXPORT |
|
|
# ifdef _DLL |
|
|
# define CRTIMPORT __declspec(dllimport) |
|
|
# else |
|
|
# define CRTIMPORT |
|
|
# endif |
|
|
# else |
|
|
# define DLLIMPORT __declspec(dllimport) |
|
|
# define DLLEXPORT __declspec(dllexport) |
|
|
# define CRTIMPORT __declspec(dllimport) |
|
|
# endif |
|
|
#else |
|
|
# define DLLIMPORT |
|
|
# if defined(__GNUC__) && __GNUC__ > 3 |
|
|
# define DLLEXPORT __attribute__ ((visibility("default"))) |
|
|
# else |
|
|
# define DLLEXPORT |
|
|
# endif |
|
|
# define CRTIMPORT |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#undef TCL_STORAGE_CLASS |
|
|
#ifdef BUILD_tcl |
|
|
# define TCL_STORAGE_CLASS DLLEXPORT |
|
|
#else |
|
|
# ifdef USE_TCL_STUBS |
|
|
# define TCL_STORAGE_CLASS |
|
|
# else |
|
|
# define TCL_STORAGE_CLASS DLLIMPORT |
|
|
# endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef TCL_NO_DEPRECATED |
|
|
# undef _ANSI_ARGS_ |
|
|
# define _ANSI_ARGS_(x) x |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef INLINE |
|
|
# define INLINE |
|
|
#endif |
|
|
|
|
|
#ifdef NO_CONST |
|
|
# ifndef const |
|
|
# define const |
|
|
# endif |
|
|
#endif |
|
|
#ifndef CONST |
|
|
# define CONST const |
|
|
#endif |
|
|
|
|
|
#ifdef USE_NON_CONST |
|
|
# ifdef USE_COMPAT_CONST |
|
|
# error define at most one of USE_NON_CONST and USE_COMPAT_CONST |
|
|
# endif |
|
|
# define CONST84 |
|
|
# define CONST84_RETURN |
|
|
#else |
|
|
# ifdef USE_COMPAT_CONST |
|
|
# define CONST84 |
|
|
# define CONST84_RETURN const |
|
|
# else |
|
|
# define CONST84 const |
|
|
# define CONST84_RETURN const |
|
|
# endif |
|
|
#endif |
|
|
|
|
|
#ifndef CONST86 |
|
|
# define CONST86 CONST84 |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef EXTERN |
|
|
# undef EXTERN |
|
|
#endif |
|
|
|
|
|
#ifdef __cplusplus |
|
|
# define EXTERN extern "C" TCL_STORAGE_CLASS |
|
|
#else |
|
|
# define EXTERN extern TCL_STORAGE_CLASS |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(_WIN32) && !defined(HAVE_WINNT_IGNORE_VOID) |
|
|
#ifndef VOID |
|
|
#define VOID void |
|
|
typedef char CHAR; |
|
|
typedef short SHORT; |
|
|
typedef long LONG; |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __VXWORKS__ |
|
|
# ifndef NO_VOID |
|
|
# define VOID void |
|
|
# else |
|
|
# define VOID char |
|
|
# endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _CLIENTDATA |
|
|
# ifndef NO_VOID |
|
|
typedef void *ClientData; |
|
|
# else |
|
|
typedef int *ClientData; |
|
|
# endif |
|
|
# define _CLIENTDATA |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __APPLE__ |
|
|
# ifdef __LP64__ |
|
|
# undef TCL_WIDE_INT_TYPE |
|
|
# define TCL_WIDE_INT_IS_LONG 1 |
|
|
# define TCL_CFG_DO64BIT 1 |
|
|
# else |
|
|
# define TCL_WIDE_INT_TYPE long long |
|
|
# undef TCL_WIDE_INT_IS_LONG |
|
|
# undef TCL_CFG_DO64BIT |
|
|
# endif |
|
|
# undef HAVE_STRUCT_STAT64 |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(__GNUC__) && !defined(_WIN32) && !defined(__LP64__) |
|
|
# undef TCL_WIDE_INT_IS_LONG |
|
|
# undef TCL_WIDE_INT_TYPE |
|
|
# define TCL_WIDE_INT_TYPE long long |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if !defined(TCL_WIDE_INT_TYPE)&&!defined(TCL_WIDE_INT_IS_LONG) |
|
|
# ifdef _WIN32 |
|
|
# define TCL_WIDE_INT_TYPE __int64 |
|
|
# ifdef __BORLANDC__ |
|
|
# define TCL_LL_MODIFIER "L" |
|
|
# elif defined(_WIN32) && (!defined(__USE_MINGW_ANSI_STDIO) || !__USE_MINGW_ANSI_STDIO) |
|
|
# define TCL_LL_MODIFIER "I64" |
|
|
# else |
|
|
# define TCL_LL_MODIFIER "ll" |
|
|
# endif |
|
|
# elif defined(__GNUC__) |
|
|
# define TCL_WIDE_INT_TYPE long long |
|
|
# define TCL_LL_MODIFIER "ll" |
|
|
# else |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# include <limits.h> |
|
|
# if (INT_MAX < LONG_MAX) |
|
|
# define TCL_WIDE_INT_IS_LONG 1 |
|
|
# else |
|
|
# define TCL_WIDE_INT_TYPE long long |
|
|
# endif |
|
|
# endif |
|
|
#endif |
|
|
#ifdef TCL_WIDE_INT_IS_LONG |
|
|
# undef TCL_WIDE_INT_TYPE |
|
|
# define TCL_WIDE_INT_TYPE long |
|
|
#endif |
|
|
|
|
|
typedef TCL_WIDE_INT_TYPE Tcl_WideInt; |
|
|
typedef unsigned TCL_WIDE_INT_TYPE Tcl_WideUInt; |
|
|
|
|
|
#ifdef TCL_WIDE_INT_IS_LONG |
|
|
# define Tcl_WideAsLong(val) ((long)(val)) |
|
|
# define Tcl_LongAsWide(val) ((long)(val)) |
|
|
# define Tcl_WideAsDouble(val) ((double)((long)(val))) |
|
|
# define Tcl_DoubleAsWide(val) ((long)((double)(val))) |
|
|
# ifndef TCL_LL_MODIFIER |
|
|
# define TCL_LL_MODIFIER "l" |
|
|
# endif |
|
|
#else |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ifndef TCL_LL_MODIFIER |
|
|
# define TCL_LL_MODIFIER "ll" |
|
|
# endif |
|
|
# define Tcl_WideAsLong(val) ((long)((Tcl_WideInt)(val))) |
|
|
# define Tcl_LongAsWide(val) ((Tcl_WideInt)((long)(val))) |
|
|
# define Tcl_WideAsDouble(val) ((double)((Tcl_WideInt)(val))) |
|
|
# define Tcl_DoubleAsWide(val) ((Tcl_WideInt)((double)(val))) |
|
|
#endif |
|
|
|
|
|
#ifdef _WIN32 |
|
|
# ifdef __BORLANDC__ |
|
|
typedef struct stati64 Tcl_StatBuf; |
|
|
# elif defined(_WIN64) || defined(_USE_64BIT_TIME_T) |
|
|
typedef struct __stat64 Tcl_StatBuf; |
|
|
# elif (defined(_MSC_VER) && (_MSC_VER < 1400)) || defined(_USE_32BIT_TIME_T) |
|
|
typedef struct _stati64 Tcl_StatBuf; |
|
|
# else |
|
|
typedef struct _stat32i64 Tcl_StatBuf; |
|
|
# endif |
|
|
#elif defined(__CYGWIN__) |
|
|
typedef struct { |
|
|
unsigned st_dev; |
|
|
unsigned short st_ino; |
|
|
unsigned short st_mode; |
|
|
short st_nlink; |
|
|
short st_uid; |
|
|
short st_gid; |
|
|
|
|
|
unsigned st_rdev; |
|
|
|
|
|
long long st_size; |
|
|
struct {long tv_sec;} st_atim; |
|
|
struct {long tv_sec;} st_mtim; |
|
|
struct {long tv_sec;} st_ctim; |
|
|
} Tcl_StatBuf; |
|
|
#elif defined(HAVE_STRUCT_STAT64) && !defined(__APPLE__) |
|
|
typedef struct stat64 Tcl_StatBuf; |
|
|
#else |
|
|
typedef struct stat Tcl_StatBuf; |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Tcl_Interp |
|
|
#if !defined(TCL_NO_DEPRECATED) |
|
|
{ |
|
|
|
|
|
|
|
|
#ifdef USE_INTERP_RESULT |
|
|
char *result TCL_DEPRECATED_API("use Tcl_GetStringResult/Tcl_SetResult"); |
|
|
|
|
|
|
|
|
void (*freeProc) (char *blockPtr) |
|
|
TCL_DEPRECATED_API("use Tcl_GetStringResult/Tcl_SetResult"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#else |
|
|
char *resultDontUse; |
|
|
void (*freeProcDontUse) (char *); |
|
|
#endif |
|
|
#ifdef USE_INTERP_ERRORLINE |
|
|
int errorLine TCL_DEPRECATED_API("use Tcl_GetErrorLine/Tcl_SetErrorLine"); |
|
|
|
|
|
|
|
|
|
|
|
#else |
|
|
int errorLineDontUse; |
|
|
#endif |
|
|
} |
|
|
#endif |
|
|
Tcl_Interp; |
|
|
|
|
|
typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler; |
|
|
typedef struct Tcl_Channel_ *Tcl_Channel; |
|
|
typedef struct Tcl_ChannelTypeVersion_ *Tcl_ChannelTypeVersion; |
|
|
typedef struct Tcl_Command_ *Tcl_Command; |
|
|
typedef struct Tcl_Condition_ *Tcl_Condition; |
|
|
typedef struct Tcl_Dict_ *Tcl_Dict; |
|
|
typedef struct Tcl_EncodingState_ *Tcl_EncodingState; |
|
|
typedef struct Tcl_Encoding_ *Tcl_Encoding; |
|
|
typedef struct Tcl_Event Tcl_Event; |
|
|
typedef struct Tcl_InterpState_ *Tcl_InterpState; |
|
|
typedef struct Tcl_LoadHandle_ *Tcl_LoadHandle; |
|
|
typedef struct Tcl_Mutex_ *Tcl_Mutex; |
|
|
typedef struct Tcl_Pid_ *Tcl_Pid; |
|
|
typedef struct Tcl_RegExp_ *Tcl_RegExp; |
|
|
typedef struct Tcl_ThreadDataKey_ *Tcl_ThreadDataKey; |
|
|
typedef struct Tcl_ThreadId_ *Tcl_ThreadId; |
|
|
typedef struct Tcl_TimerToken_ *Tcl_TimerToken; |
|
|
typedef struct Tcl_Trace_ *Tcl_Trace; |
|
|
typedef struct Tcl_Var_ *Tcl_Var; |
|
|
typedef struct Tcl_ZLibStream_ *Tcl_ZlibStream; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined _WIN32 |
|
|
typedef unsigned (__stdcall Tcl_ThreadCreateProc) (ClientData clientData); |
|
|
#else |
|
|
typedef void (Tcl_ThreadCreateProc) (ClientData clientData); |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined _WIN32 |
|
|
# define Tcl_ThreadCreateType unsigned __stdcall |
|
|
# define TCL_THREAD_CREATE_RETURN return 0 |
|
|
#else |
|
|
# define Tcl_ThreadCreateType void |
|
|
# define TCL_THREAD_CREATE_RETURN |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_THREAD_STACK_DEFAULT (0) |
|
|
#define TCL_THREAD_NOFLAGS (0000) |
|
|
|
|
|
#define TCL_THREAD_JOINABLE (0001) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_MATCH_NOCASE (1<<0) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_REG_BASIC 000000 |
|
|
#define TCL_REG_EXTENDED 000001 |
|
|
#define TCL_REG_ADVF 000002 |
|
|
#define TCL_REG_ADVANCED 000003 |
|
|
#define TCL_REG_QUOTE 000004 |
|
|
#define TCL_REG_NOCASE 000010 |
|
|
#define TCL_REG_NOSUB 000020 |
|
|
#define TCL_REG_EXPANDED 000040 |
|
|
|
|
|
#define TCL_REG_NLSTOP 000100 |
|
|
#define TCL_REG_NLANCH 000200 |
|
|
#define TCL_REG_NEWLINE 000300 |
|
|
#define TCL_REG_CANMATCH 001000 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_REG_NOTBOL 0001 |
|
|
#define TCL_REG_NOTEOL 0002 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Tcl_RegExpIndices { |
|
|
long start; |
|
|
|
|
|
long end; |
|
|
|
|
|
} Tcl_RegExpIndices; |
|
|
|
|
|
typedef struct Tcl_RegExpInfo { |
|
|
int nsubs; |
|
|
|
|
|
Tcl_RegExpIndices *matches; |
|
|
long extendStart; |
|
|
|
|
|
long reserved; |
|
|
} Tcl_RegExpInfo; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef Tcl_StatBuf *Tcl_Stat_; |
|
|
typedef struct stat *Tcl_OldStat_; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_OK 0 |
|
|
#define TCL_ERROR 1 |
|
|
#define TCL_RETURN 2 |
|
|
#define TCL_BREAK 3 |
|
|
#define TCL_CONTINUE 4 |
|
|
|
|
|
#define TCL_RESULT_SIZE 200 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_SUBST_COMMANDS 001 |
|
|
#define TCL_SUBST_VARIABLES 002 |
|
|
#define TCL_SUBST_BACKSLASHES 004 |
|
|
#define TCL_SUBST_ALL 007 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef enum { |
|
|
TCL_INT, TCL_DOUBLE, TCL_EITHER, TCL_WIDE_INT |
|
|
} Tcl_ValueType; |
|
|
|
|
|
typedef struct Tcl_Value { |
|
|
Tcl_ValueType type; |
|
|
|
|
|
long intValue; |
|
|
double doubleValue; |
|
|
Tcl_WideInt wideValue; |
|
|
} Tcl_Value; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct Tcl_Obj; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef int (Tcl_AppInitProc) (Tcl_Interp *interp); |
|
|
typedef int (Tcl_AsyncProc) (ClientData clientData, Tcl_Interp *interp, |
|
|
int code); |
|
|
typedef void (Tcl_ChannelProc) (ClientData clientData, int mask); |
|
|
typedef void (Tcl_CloseProc) (ClientData data); |
|
|
typedef void (Tcl_CmdDeleteProc) (ClientData clientData); |
|
|
typedef int (Tcl_CmdProc) (ClientData clientData, Tcl_Interp *interp, |
|
|
int argc, CONST84 char *argv[]); |
|
|
typedef void (Tcl_CmdTraceProc) (ClientData clientData, Tcl_Interp *interp, |
|
|
int level, char *command, Tcl_CmdProc *proc, |
|
|
ClientData cmdClientData, int argc, CONST84 char *argv[]); |
|
|
typedef int (Tcl_CmdObjTraceProc) (ClientData clientData, Tcl_Interp *interp, |
|
|
int level, const char *command, Tcl_Command commandInfo, int objc, |
|
|
struct Tcl_Obj *const *objv); |
|
|
typedef void (Tcl_CmdObjTraceDeleteProc) (ClientData clientData); |
|
|
typedef void (Tcl_DupInternalRepProc) (struct Tcl_Obj *srcPtr, |
|
|
struct Tcl_Obj *dupPtr); |
|
|
typedef int (Tcl_EncodingConvertProc) (ClientData clientData, const char *src, |
|
|
int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, |
|
|
int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); |
|
|
typedef void (Tcl_EncodingFreeProc) (ClientData clientData); |
|
|
typedef int (Tcl_EventProc) (Tcl_Event *evPtr, int flags); |
|
|
typedef void (Tcl_EventCheckProc) (ClientData clientData, int flags); |
|
|
typedef int (Tcl_EventDeleteProc) (Tcl_Event *evPtr, ClientData clientData); |
|
|
typedef void (Tcl_EventSetupProc) (ClientData clientData, int flags); |
|
|
typedef void (Tcl_ExitProc) (ClientData clientData); |
|
|
typedef void (Tcl_FileProc) (ClientData clientData, int mask); |
|
|
typedef void (Tcl_FileFreeProc) (ClientData clientData); |
|
|
typedef void (Tcl_FreeInternalRepProc) (struct Tcl_Obj *objPtr); |
|
|
typedef void (Tcl_FreeProc) (char *blockPtr); |
|
|
typedef void (Tcl_IdleProc) (ClientData clientData); |
|
|
typedef void (Tcl_InterpDeleteProc) (ClientData clientData, |
|
|
Tcl_Interp *interp); |
|
|
typedef int (Tcl_MathProc) (ClientData clientData, Tcl_Interp *interp, |
|
|
Tcl_Value *args, Tcl_Value *resultPtr); |
|
|
typedef void (Tcl_NamespaceDeleteProc) (ClientData clientData); |
|
|
typedef int (Tcl_ObjCmdProc) (ClientData clientData, Tcl_Interp *interp, |
|
|
int objc, struct Tcl_Obj *const *objv); |
|
|
typedef int (Tcl_PackageInitProc) (Tcl_Interp *interp); |
|
|
typedef int (Tcl_PackageUnloadProc) (Tcl_Interp *interp, int flags); |
|
|
typedef void (Tcl_PanicProc) (const char *format, ...); |
|
|
typedef void (Tcl_TcpAcceptProc) (ClientData callbackData, Tcl_Channel chan, |
|
|
char *address, int port); |
|
|
typedef void (Tcl_TimerProc) (ClientData clientData); |
|
|
typedef int (Tcl_SetFromAnyProc) (Tcl_Interp *interp, struct Tcl_Obj *objPtr); |
|
|
typedef void (Tcl_UpdateStringProc) (struct Tcl_Obj *objPtr); |
|
|
typedef char * (Tcl_VarTraceProc) (ClientData clientData, Tcl_Interp *interp, |
|
|
CONST84 char *part1, CONST84 char *part2, int flags); |
|
|
typedef void (Tcl_CommandTraceProc) (ClientData clientData, Tcl_Interp *interp, |
|
|
const char *oldName, const char *newName, int flags); |
|
|
typedef void (Tcl_CreateFileHandlerProc) (int fd, int mask, Tcl_FileProc *proc, |
|
|
ClientData clientData); |
|
|
typedef void (Tcl_DeleteFileHandlerProc) (int fd); |
|
|
typedef void (Tcl_AlertNotifierProc) (ClientData clientData); |
|
|
typedef void (Tcl_ServiceModeHookProc) (int mode); |
|
|
typedef ClientData (Tcl_InitNotifierProc) (void); |
|
|
typedef void (Tcl_FinalizeNotifierProc) (ClientData clientData); |
|
|
typedef void (Tcl_MainLoopProc) (void); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Tcl_ObjType { |
|
|
const char *name; |
|
|
Tcl_FreeInternalRepProc *freeIntRepProc; |
|
|
|
|
|
|
|
|
|
|
|
Tcl_DupInternalRepProc *dupIntRepProc; |
|
|
|
|
|
|
|
|
Tcl_UpdateStringProc *updateStringProc; |
|
|
|
|
|
|
|
|
Tcl_SetFromAnyProc *setFromAnyProc; |
|
|
|
|
|
|
|
|
|
|
|
} Tcl_ObjType; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Tcl_Obj { |
|
|
int refCount; |
|
|
char *bytes; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int length; |
|
|
|
|
|
const Tcl_ObjType *typePtr; |
|
|
|
|
|
|
|
|
|
|
|
union { |
|
|
long longValue; |
|
|
double doubleValue; |
|
|
void *otherValuePtr; |
|
|
|
|
|
Tcl_WideInt wideValue; |
|
|
struct { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void *ptr1; |
|
|
void *ptr2; |
|
|
} twoPtrValue; |
|
|
struct { |
|
|
|
|
|
void *ptr; |
|
|
unsigned long value; |
|
|
} ptrAndLongRep; |
|
|
} internalRep; |
|
|
} Tcl_Obj; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Tcl_IncrRefCount(Tcl_Obj *objPtr); |
|
|
void Tcl_DecrRefCount(Tcl_Obj *objPtr); |
|
|
int Tcl_IsShared(Tcl_Obj *objPtr); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Tcl_SavedResult { |
|
|
char *result; |
|
|
Tcl_FreeProc *freeProc; |
|
|
Tcl_Obj *objResultPtr; |
|
|
char *appendResult; |
|
|
int appendAvl; |
|
|
int appendUsed; |
|
|
char resultSpace[TCL_RESULT_SIZE+1]; |
|
|
} Tcl_SavedResult; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Tcl_Namespace { |
|
|
char *name; |
|
|
|
|
|
|
|
|
|
|
|
char *fullName; |
|
|
|
|
|
ClientData clientData; |
|
|
|
|
|
Tcl_NamespaceDeleteProc *deleteProc; |
|
|
|
|
|
|
|
|
struct Tcl_Namespace *parentPtr; |
|
|
|
|
|
|
|
|
|
|
|
} Tcl_Namespace; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Tcl_CallFrame { |
|
|
Tcl_Namespace *nsPtr; |
|
|
int dummy1; |
|
|
int dummy2; |
|
|
void *dummy3; |
|
|
void *dummy4; |
|
|
void *dummy5; |
|
|
int dummy6; |
|
|
void *dummy7; |
|
|
void *dummy8; |
|
|
int dummy9; |
|
|
void *dummy10; |
|
|
void *dummy11; |
|
|
void *dummy12; |
|
|
void *dummy13; |
|
|
} Tcl_CallFrame; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Tcl_CmdInfo { |
|
|
int isNativeObjectProc; |
|
|
|
|
|
|
|
|
|
|
|
Tcl_ObjCmdProc *objProc; |
|
|
ClientData objClientData; |
|
|
Tcl_CmdProc *proc; |
|
|
ClientData clientData; |
|
|
Tcl_CmdDeleteProc *deleteProc; |
|
|
|
|
|
|
|
|
ClientData deleteData; |
|
|
|
|
|
Tcl_Namespace *namespacePtr; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} Tcl_CmdInfo; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_DSTRING_STATIC_SIZE 200 |
|
|
typedef struct Tcl_DString { |
|
|
char *string; |
|
|
|
|
|
int length; |
|
|
|
|
|
int spaceAvl; |
|
|
|
|
|
char staticSpace[TCL_DSTRING_STATIC_SIZE]; |
|
|
|
|
|
|
|
|
} Tcl_DString; |
|
|
|
|
|
#define Tcl_DStringLength(dsPtr) ((dsPtr)->length) |
|
|
#define Tcl_DStringValue(dsPtr) ((dsPtr)->string) |
|
|
#define Tcl_DStringTrunc Tcl_DStringSetLength |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_MAX_PREC 17 |
|
|
#define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_INTEGER_SPACE 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_DONT_USE_BRACES 1 |
|
|
#define TCL_DONT_QUOTE_HASH 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_EXACT 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_NO_EVAL 0x010000 |
|
|
#define TCL_EVAL_GLOBAL 0x020000 |
|
|
#define TCL_EVAL_DIRECT 0x040000 |
|
|
#define TCL_EVAL_INVOKE 0x080000 |
|
|
#define TCL_CANCEL_UNWIND 0x100000 |
|
|
#define TCL_EVAL_NOERR 0x200000 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_VOLATILE ((Tcl_FreeProc *) 1) |
|
|
#define TCL_STATIC ((Tcl_FreeProc *) 0) |
|
|
#define TCL_DYNAMIC ((Tcl_FreeProc *) 3) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_GLOBAL_ONLY 1 |
|
|
#define TCL_NAMESPACE_ONLY 2 |
|
|
#define TCL_APPEND_VALUE 4 |
|
|
#define TCL_LIST_ELEMENT 8 |
|
|
#define TCL_TRACE_READS 0x10 |
|
|
#define TCL_TRACE_WRITES 0x20 |
|
|
#define TCL_TRACE_UNSETS 0x40 |
|
|
#define TCL_TRACE_DESTROYED 0x80 |
|
|
#define TCL_INTERP_DESTROYED 0x100 |
|
|
#define TCL_LEAVE_ERR_MSG 0x200 |
|
|
#define TCL_TRACE_ARRAY 0x800 |
|
|
#ifndef TCL_REMOVE_OBSOLETE_TRACES |
|
|
|
|
|
#define TCL_TRACE_OLD_STYLE 0x1000 |
|
|
#endif |
|
|
|
|
|
#define TCL_TRACE_RESULT_DYNAMIC 0x8000 |
|
|
#define TCL_TRACE_RESULT_OBJECT 0x10000 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_ENSEMBLE_PREFIX 0x02 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_TRACE_RENAME 0x2000 |
|
|
#define TCL_TRACE_DELETE 0x4000 |
|
|
|
|
|
#define TCL_ALLOW_INLINE_COMPILATION 0x20000 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if !defined(TCL_NO_DEPRECATED) |
|
|
# define TCL_PARSE_PART1 0x400 |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_LINK_INT 1 |
|
|
#define TCL_LINK_DOUBLE 2 |
|
|
#define TCL_LINK_BOOLEAN 3 |
|
|
#define TCL_LINK_STRING 4 |
|
|
#define TCL_LINK_WIDE_INT 5 |
|
|
#define TCL_LINK_CHAR 6 |
|
|
#define TCL_LINK_UCHAR 7 |
|
|
#define TCL_LINK_SHORT 8 |
|
|
#define TCL_LINK_USHORT 9 |
|
|
#define TCL_LINK_UINT 10 |
|
|
#define TCL_LINK_LONG 11 |
|
|
#define TCL_LINK_ULONG 12 |
|
|
#define TCL_LINK_FLOAT 13 |
|
|
#define TCL_LINK_WIDE_UINT 14 |
|
|
#define TCL_LINK_READ_ONLY 0x80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Tcl_HashKeyType Tcl_HashKeyType; |
|
|
typedef struct Tcl_HashTable Tcl_HashTable; |
|
|
typedef struct Tcl_HashEntry Tcl_HashEntry; |
|
|
|
|
|
typedef unsigned (Tcl_HashKeyProc) (Tcl_HashTable *tablePtr, void *keyPtr); |
|
|
typedef int (Tcl_CompareHashKeysProc) (void *keyPtr, Tcl_HashEntry *hPtr); |
|
|
typedef Tcl_HashEntry * (Tcl_AllocHashEntryProc) (Tcl_HashTable *tablePtr, |
|
|
void *keyPtr); |
|
|
typedef void (Tcl_FreeHashEntryProc) (Tcl_HashEntry *hPtr); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef TCL_HASH_KEY_STORE_HASH |
|
|
# define TCL_HASH_KEY_STORE_HASH 1 |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct Tcl_HashEntry { |
|
|
Tcl_HashEntry *nextPtr; |
|
|
|
|
|
Tcl_HashTable *tablePtr; |
|
|
#if TCL_HASH_KEY_STORE_HASH |
|
|
void *hash; |
|
|
|
|
|
|
|
|
#else |
|
|
Tcl_HashEntry **bucketPtr; |
|
|
|
|
|
|
|
|
#endif |
|
|
ClientData clientData; |
|
|
|
|
|
union { |
|
|
char *oneWordValue; |
|
|
Tcl_Obj *objPtr; |
|
|
int words[1]; |
|
|
|
|
|
|
|
|
char string[1]; |
|
|
|
|
|
} key; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_HASH_KEY_RANDOMIZE_HASH 0x1 |
|
|
#define TCL_HASH_KEY_SYSTEM_HASH 0x2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_HASH_KEY_TYPE_VERSION 1 |
|
|
struct Tcl_HashKeyType { |
|
|
int version; |
|
|
|
|
|
|
|
|
|
|
|
int flags; |
|
|
Tcl_HashKeyProc *hashKeyProc; |
|
|
|
|
|
|
|
|
|
|
|
Tcl_CompareHashKeysProc *compareKeysProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tcl_AllocHashEntryProc *allocEntryProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tcl_FreeHashEntryProc *freeEntryProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_SMALL_HASH_TABLE 4 |
|
|
struct Tcl_HashTable { |
|
|
Tcl_HashEntry **buckets; |
|
|
|
|
|
|
|
|
Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE]; |
|
|
|
|
|
|
|
|
int numBuckets; |
|
|
|
|
|
int numEntries; |
|
|
|
|
|
int rebuildSize; |
|
|
|
|
|
int downShift; |
|
|
|
|
|
|
|
|
int mask; |
|
|
int keyType; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tcl_HashEntry *(*findProc) (Tcl_HashTable *tablePtr, const char *key); |
|
|
Tcl_HashEntry *(*createProc) (Tcl_HashTable *tablePtr, const char *key, |
|
|
int *newPtr); |
|
|
const Tcl_HashKeyType *typePtr; |
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Tcl_HashSearch { |
|
|
Tcl_HashTable *tablePtr; |
|
|
int nextIndex; |
|
|
|
|
|
Tcl_HashEntry *nextEntryPtr; |
|
|
|
|
|
} Tcl_HashSearch; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_STRING_KEYS (0) |
|
|
#define TCL_ONE_WORD_KEYS (1) |
|
|
#define TCL_CUSTOM_TYPE_KEYS (-2) |
|
|
#define TCL_CUSTOM_PTR_KEYS (-1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct { |
|
|
void *next; |
|
|
|
|
|
int epoch; |
|
|
|
|
|
Tcl_Dict dictionaryPtr; |
|
|
} Tcl_DictSearch; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_DONT_WAIT (1<<1) |
|
|
#define TCL_WINDOW_EVENTS (1<<2) |
|
|
#define TCL_FILE_EVENTS (1<<3) |
|
|
#define TCL_TIMER_EVENTS (1<<4) |
|
|
#define TCL_IDLE_EVENTS (1<<5) |
|
|
#define TCL_ALL_EVENTS (~TCL_DONT_WAIT) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct Tcl_Event { |
|
|
Tcl_EventProc *proc; |
|
|
struct Tcl_Event *nextPtr; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef enum { |
|
|
TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, TCL_QUEUE_MARK |
|
|
} Tcl_QueuePosition; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_SERVICE_NONE 0 |
|
|
#define TCL_SERVICE_ALL 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Tcl_Time { |
|
|
long sec; |
|
|
long usec; |
|
|
} Tcl_Time; |
|
|
|
|
|
typedef void (Tcl_SetTimerProc) (CONST86 Tcl_Time *timePtr); |
|
|
typedef int (Tcl_WaitForEventProc) (CONST86 Tcl_Time *timePtr); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef void (Tcl_GetTimeProc) (Tcl_Time *timebuf, ClientData clientData); |
|
|
typedef void (Tcl_ScaleTimeProc) (Tcl_Time *timebuf, ClientData clientData); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_READABLE (1<<1) |
|
|
#define TCL_WRITABLE (1<<2) |
|
|
#define TCL_EXCEPTION (1<<3) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_STDIN (1<<1) |
|
|
#define TCL_STDOUT (1<<2) |
|
|
#define TCL_STDERR (1<<3) |
|
|
#define TCL_ENFORCE_MODE (1<<4) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_CLOSE_READ (1<<1) |
|
|
#define TCL_CLOSE_WRITE (1<<2) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_CLOSE2PROC ((Tcl_DriverCloseProc *) 1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_CHANNEL_VERSION_1 ((Tcl_ChannelTypeVersion) 0x1) |
|
|
#define TCL_CHANNEL_VERSION_2 ((Tcl_ChannelTypeVersion) 0x2) |
|
|
#define TCL_CHANNEL_VERSION_3 ((Tcl_ChannelTypeVersion) 0x3) |
|
|
#define TCL_CHANNEL_VERSION_4 ((Tcl_ChannelTypeVersion) 0x4) |
|
|
#define TCL_CHANNEL_VERSION_5 ((Tcl_ChannelTypeVersion) 0x5) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_CHANNEL_THREAD_INSERT (0) |
|
|
#define TCL_CHANNEL_THREAD_REMOVE (1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef int (Tcl_DriverBlockModeProc) (ClientData instanceData, int mode); |
|
|
typedef int (Tcl_DriverCloseProc) (ClientData instanceData, |
|
|
Tcl_Interp *interp); |
|
|
typedef int (Tcl_DriverClose2Proc) (ClientData instanceData, |
|
|
Tcl_Interp *interp, int flags); |
|
|
typedef int (Tcl_DriverInputProc) (ClientData instanceData, char *buf, |
|
|
int toRead, int *errorCodePtr); |
|
|
typedef int (Tcl_DriverOutputProc) (ClientData instanceData, |
|
|
CONST84 char *buf, int toWrite, int *errorCodePtr); |
|
|
typedef int (Tcl_DriverSeekProc) (ClientData instanceData, long offset, |
|
|
int mode, int *errorCodePtr); |
|
|
typedef int (Tcl_DriverSetOptionProc) (ClientData instanceData, |
|
|
Tcl_Interp *interp, const char *optionName, |
|
|
const char *value); |
|
|
typedef int (Tcl_DriverGetOptionProc) (ClientData instanceData, |
|
|
Tcl_Interp *interp, CONST84 char *optionName, |
|
|
Tcl_DString *dsPtr); |
|
|
typedef void (Tcl_DriverWatchProc) (ClientData instanceData, int mask); |
|
|
typedef int (Tcl_DriverGetHandleProc) (ClientData instanceData, |
|
|
int direction, ClientData *handlePtr); |
|
|
typedef int (Tcl_DriverFlushProc) (ClientData instanceData); |
|
|
typedef int (Tcl_DriverHandlerProc) (ClientData instanceData, |
|
|
int interestMask); |
|
|
typedef Tcl_WideInt (Tcl_DriverWideSeekProc) (ClientData instanceData, |
|
|
Tcl_WideInt offset, int mode, int *errorCodePtr); |
|
|
|
|
|
|
|
|
|
|
|
typedef void (Tcl_DriverThreadActionProc) (ClientData instanceData, |
|
|
int action); |
|
|
|
|
|
|
|
|
|
|
|
typedef int (Tcl_DriverTruncateProc) (ClientData instanceData, |
|
|
Tcl_WideInt length); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Tcl_ChannelType { |
|
|
const char *typeName; |
|
|
|
|
|
|
|
|
Tcl_ChannelTypeVersion version; |
|
|
|
|
|
Tcl_DriverCloseProc *closeProc; |
|
|
|
|
|
|
|
|
|
|
|
Tcl_DriverInputProc *inputProc; |
|
|
|
|
|
Tcl_DriverOutputProc *outputProc; |
|
|
|
|
|
Tcl_DriverSeekProc *seekProc; |
|
|
|
|
|
|
|
|
Tcl_DriverSetOptionProc *setOptionProc; |
|
|
|
|
|
Tcl_DriverGetOptionProc *getOptionProc; |
|
|
|
|
|
Tcl_DriverWatchProc *watchProc; |
|
|
|
|
|
|
|
|
Tcl_DriverGetHandleProc *getHandleProc; |
|
|
|
|
|
|
|
|
Tcl_DriverClose2Proc *close2Proc; |
|
|
|
|
|
|
|
|
|
|
|
Tcl_DriverBlockModeProc *blockModeProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tcl_DriverFlushProc *flushProc; |
|
|
|
|
|
|
|
|
Tcl_DriverHandlerProc *handlerProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tcl_DriverWideSeekProc *wideSeekProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tcl_DriverThreadActionProc *threadActionProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tcl_DriverTruncateProc *truncateProc; |
|
|
|
|
|
|
|
|
|
|
|
} Tcl_ChannelType; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_MODE_BLOCKING 0 |
|
|
#define TCL_MODE_NONBLOCKING 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef enum Tcl_PathType { |
|
|
TCL_PATH_ABSOLUTE, |
|
|
TCL_PATH_RELATIVE, |
|
|
TCL_PATH_VOLUME_RELATIVE |
|
|
} Tcl_PathType; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Tcl_GlobTypeData { |
|
|
int type; |
|
|
int perm; |
|
|
Tcl_Obj *macType; |
|
|
Tcl_Obj *macCreator; |
|
|
} Tcl_GlobTypeData; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_GLOB_TYPE_BLOCK (1<<0) |
|
|
#define TCL_GLOB_TYPE_CHAR (1<<1) |
|
|
#define TCL_GLOB_TYPE_DIR (1<<2) |
|
|
#define TCL_GLOB_TYPE_PIPE (1<<3) |
|
|
#define TCL_GLOB_TYPE_FILE (1<<4) |
|
|
#define TCL_GLOB_TYPE_LINK (1<<5) |
|
|
#define TCL_GLOB_TYPE_SOCK (1<<6) |
|
|
#define TCL_GLOB_TYPE_MOUNT (1<<7) |
|
|
|
|
|
#define TCL_GLOB_PERM_RONLY (1<<0) |
|
|
#define TCL_GLOB_PERM_HIDDEN (1<<1) |
|
|
#define TCL_GLOB_PERM_R (1<<2) |
|
|
#define TCL_GLOB_PERM_W (1<<3) |
|
|
#define TCL_GLOB_PERM_X (1<<4) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_UNLOAD_DETACH_FROM_INTERPRETER (1<<0) |
|
|
#define TCL_UNLOAD_DETACH_FROM_PROCESS (1<<1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef int (Tcl_FSStatProc) (Tcl_Obj *pathPtr, Tcl_StatBuf *buf); |
|
|
typedef int (Tcl_FSAccessProc) (Tcl_Obj *pathPtr, int mode); |
|
|
typedef Tcl_Channel (Tcl_FSOpenFileChannelProc) (Tcl_Interp *interp, |
|
|
Tcl_Obj *pathPtr, int mode, int permissions); |
|
|
typedef int (Tcl_FSMatchInDirectoryProc) (Tcl_Interp *interp, Tcl_Obj *result, |
|
|
Tcl_Obj *pathPtr, const char *pattern, Tcl_GlobTypeData *types); |
|
|
typedef Tcl_Obj * (Tcl_FSGetCwdProc) (Tcl_Interp *interp); |
|
|
typedef int (Tcl_FSChdirProc) (Tcl_Obj *pathPtr); |
|
|
typedef int (Tcl_FSLstatProc) (Tcl_Obj *pathPtr, Tcl_StatBuf *buf); |
|
|
typedef int (Tcl_FSCreateDirectoryProc) (Tcl_Obj *pathPtr); |
|
|
typedef int (Tcl_FSDeleteFileProc) (Tcl_Obj *pathPtr); |
|
|
typedef int (Tcl_FSCopyDirectoryProc) (Tcl_Obj *srcPathPtr, |
|
|
Tcl_Obj *destPathPtr, Tcl_Obj **errorPtr); |
|
|
typedef int (Tcl_FSCopyFileProc) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr); |
|
|
typedef int (Tcl_FSRemoveDirectoryProc) (Tcl_Obj *pathPtr, int recursive, |
|
|
Tcl_Obj **errorPtr); |
|
|
typedef int (Tcl_FSRenameFileProc) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr); |
|
|
typedef void (Tcl_FSUnloadFileProc) (Tcl_LoadHandle loadHandle); |
|
|
typedef Tcl_Obj * (Tcl_FSListVolumesProc) (void); |
|
|
|
|
|
struct utimbuf; |
|
|
typedef int (Tcl_FSUtimeProc) (Tcl_Obj *pathPtr, struct utimbuf *tval); |
|
|
typedef int (Tcl_FSNormalizePathProc) (Tcl_Interp *interp, Tcl_Obj *pathPtr, |
|
|
int nextCheckpoint); |
|
|
typedef int (Tcl_FSFileAttrsGetProc) (Tcl_Interp *interp, int index, |
|
|
Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef); |
|
|
typedef const char *CONST86 * (Tcl_FSFileAttrStringsProc) (Tcl_Obj *pathPtr, |
|
|
Tcl_Obj **objPtrRef); |
|
|
typedef int (Tcl_FSFileAttrsSetProc) (Tcl_Interp *interp, int index, |
|
|
Tcl_Obj *pathPtr, Tcl_Obj *objPtr); |
|
|
typedef Tcl_Obj * (Tcl_FSLinkProc) (Tcl_Obj *pathPtr, Tcl_Obj *toPtr, |
|
|
int linkType); |
|
|
typedef int (Tcl_FSLoadFileProc) (Tcl_Interp *interp, Tcl_Obj *pathPtr, |
|
|
Tcl_LoadHandle *handlePtr, Tcl_FSUnloadFileProc **unloadProcPtr); |
|
|
typedef int (Tcl_FSPathInFilesystemProc) (Tcl_Obj *pathPtr, |
|
|
ClientData *clientDataPtr); |
|
|
typedef Tcl_Obj * (Tcl_FSFilesystemPathTypeProc) (Tcl_Obj *pathPtr); |
|
|
typedef Tcl_Obj * (Tcl_FSFilesystemSeparatorProc) (Tcl_Obj *pathPtr); |
|
|
typedef void (Tcl_FSFreeInternalRepProc) (ClientData clientData); |
|
|
typedef ClientData (Tcl_FSDupInternalRepProc) (ClientData clientData); |
|
|
typedef Tcl_Obj * (Tcl_FSInternalToNormalizedProc) (ClientData clientData); |
|
|
typedef ClientData (Tcl_FSCreateInternalRepProc) (Tcl_Obj *pathPtr); |
|
|
|
|
|
typedef struct Tcl_FSVersion_ *Tcl_FSVersion; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_FILESYSTEM_VERSION_1 ((Tcl_FSVersion) 0x1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Tcl_Filesystem { |
|
|
const char *typeName; |
|
|
int structureLength; |
|
|
|
|
|
Tcl_FSVersion version; |
|
|
Tcl_FSPathInFilesystemProc *pathInFilesystemProc; |
|
|
|
|
|
|
|
|
|
|
|
Tcl_FSDupInternalRepProc *dupInternalRepProc; |
|
|
|
|
|
|
|
|
|
|
|
Tcl_FSFreeInternalRepProc *freeInternalRepProc; |
|
|
|
|
|
|
|
|
|
|
|
Tcl_FSInternalToNormalizedProc *internalToNormalizedProc; |
|
|
|
|
|
|
|
|
|
|
|
Tcl_FSCreateInternalRepProc *createInternalRepProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tcl_FSNormalizePathProc *normalizePathProc; |
|
|
|
|
|
|
|
|
|
|
|
Tcl_FSFilesystemPathTypeProc *filesystemPathTypeProc; |
|
|
|
|
|
|
|
|
Tcl_FSFilesystemSeparatorProc *filesystemSeparatorProc; |
|
|
|
|
|
|
|
|
Tcl_FSStatProc *statProc; |
|
|
|
|
|
Tcl_FSAccessProc *accessProc; |
|
|
|
|
|
|
|
|
Tcl_FSOpenFileChannelProc *openFileChannelProc; |
|
|
|
|
|
|
|
|
Tcl_FSMatchInDirectoryProc *matchInDirectoryProc; |
|
|
|
|
|
|
|
|
|
|
|
Tcl_FSUtimeProc *utimeProc; |
|
|
|
|
|
|
|
|
|
|
|
Tcl_FSLinkProc *linkProc; |
|
|
|
|
|
Tcl_FSListVolumesProc *listVolumesProc; |
|
|
|
|
|
|
|
|
|
|
|
Tcl_FSFileAttrStringsProc *fileAttrStringsProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tcl_FSFileAttrsGetProc *fileAttrsGetProc; |
|
|
|
|
|
|
|
|
Tcl_FSFileAttrsSetProc *fileAttrsSetProc; |
|
|
|
|
|
|
|
|
Tcl_FSCreateDirectoryProc *createDirectoryProc; |
|
|
|
|
|
|
|
|
Tcl_FSRemoveDirectoryProc *removeDirectoryProc; |
|
|
|
|
|
|
|
|
Tcl_FSDeleteFileProc *deleteFileProc; |
|
|
|
|
|
|
|
|
Tcl_FSCopyFileProc *copyFileProc; |
|
|
|
|
|
|
|
|
|
|
|
Tcl_FSRenameFileProc *renameFileProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tcl_FSCopyDirectoryProc *copyDirectoryProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tcl_FSLstatProc *lstatProc; |
|
|
|
|
|
Tcl_FSLoadFileProc *loadFileProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tcl_FSGetCwdProc *getCwdProc; |
|
|
|
|
|
|
|
|
|
|
|
Tcl_FSChdirProc *chdirProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} Tcl_Filesystem; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_CREATE_SYMBOLIC_LINK 0x01 |
|
|
#define TCL_CREATE_HARD_LINK 0x02 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Tcl_NotifierProcs { |
|
|
Tcl_SetTimerProc *setTimerProc; |
|
|
Tcl_WaitForEventProc *waitForEventProc; |
|
|
Tcl_CreateFileHandlerProc *createFileHandlerProc; |
|
|
Tcl_DeleteFileHandlerProc *deleteFileHandlerProc; |
|
|
Tcl_InitNotifierProc *initNotifierProc; |
|
|
Tcl_FinalizeNotifierProc *finalizeNotifierProc; |
|
|
Tcl_AlertNotifierProc *alertNotifierProc; |
|
|
Tcl_ServiceModeHookProc *serviceModeHookProc; |
|
|
} Tcl_NotifierProcs; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Tcl_Token { |
|
|
int type; |
|
|
|
|
|
const char *start; |
|
|
int size; |
|
|
int numComponents; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} Tcl_Token; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_TOKEN_WORD 1 |
|
|
#define TCL_TOKEN_SIMPLE_WORD 2 |
|
|
#define TCL_TOKEN_TEXT 4 |
|
|
#define TCL_TOKEN_BS 8 |
|
|
#define TCL_TOKEN_COMMAND 16 |
|
|
#define TCL_TOKEN_VARIABLE 32 |
|
|
#define TCL_TOKEN_SUB_EXPR 64 |
|
|
#define TCL_TOKEN_OPERATOR 128 |
|
|
#define TCL_TOKEN_EXPAND_WORD 256 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_PARSE_SUCCESS 0 |
|
|
#define TCL_PARSE_QUOTE_EXTRA 1 |
|
|
#define TCL_PARSE_BRACE_EXTRA 2 |
|
|
#define TCL_PARSE_MISSING_BRACE 3 |
|
|
#define TCL_PARSE_MISSING_BRACKET 4 |
|
|
#define TCL_PARSE_MISSING_PAREN 5 |
|
|
#define TCL_PARSE_MISSING_QUOTE 6 |
|
|
#define TCL_PARSE_MISSING_VAR_BRACE 7 |
|
|
#define TCL_PARSE_SYNTAX 8 |
|
|
#define TCL_PARSE_BAD_NUMBER 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define NUM_STATIC_TOKENS 20 |
|
|
|
|
|
typedef struct Tcl_Parse { |
|
|
const char *commentStart; |
|
|
|
|
|
int commentSize; |
|
|
|
|
|
|
|
|
|
|
|
const char *commandStart; |
|
|
|
|
|
int commandSize; |
|
|
|
|
|
|
|
|
|
|
|
int numWords; |
|
|
|
|
|
Tcl_Token *tokenPtr; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int numTokens; |
|
|
int tokensAvailable; |
|
|
|
|
|
int errorType; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const char *string; |
|
|
|
|
|
const char *end; |
|
|
|
|
|
Tcl_Interp *interp; |
|
|
|
|
|
const char *term; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int incomplete; |
|
|
|
|
|
|
|
|
|
|
|
Tcl_Token staticTokens[NUM_STATIC_TOKENS]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} Tcl_Parse; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Tcl_EncodingType { |
|
|
const char *encodingName; |
|
|
|
|
|
|
|
|
Tcl_EncodingConvertProc *toUtfProc; |
|
|
|
|
|
|
|
|
Tcl_EncodingConvertProc *fromUtfProc; |
|
|
|
|
|
|
|
|
Tcl_EncodingFreeProc *freeProc; |
|
|
|
|
|
|
|
|
ClientData clientData; |
|
|
|
|
|
int nullSize; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} Tcl_EncodingType; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_ENCODING_START 0x01 |
|
|
#define TCL_ENCODING_END 0x02 |
|
|
#define TCL_ENCODING_STOPONERROR 0x04 |
|
|
#define TCL_ENCODING_NO_TERMINATE 0x08 |
|
|
#define TCL_ENCODING_CHAR_LIMIT 0x10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_CONVERT_MULTIBYTE (-1) |
|
|
#define TCL_CONVERT_SYNTAX (-2) |
|
|
#define TCL_CONVERT_UNKNOWN (-3) |
|
|
#define TCL_CONVERT_NOSPACE (-4) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef TCL_UTF_MAX |
|
|
#define TCL_UTF_MAX 3 |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if TCL_UTF_MAX > 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef unsigned int Tcl_UniChar; |
|
|
#else |
|
|
typedef unsigned short Tcl_UniChar; |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Tcl_Config { |
|
|
const char *key; |
|
|
|
|
|
const char *value; |
|
|
|
|
|
} Tcl_Config; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_LIMIT_COMMANDS 0x01 |
|
|
#define TCL_LIMIT_TIME 0x02 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef void (Tcl_LimitHandlerProc) (ClientData clientData, Tcl_Interp *interp); |
|
|
typedef void (Tcl_LimitHandlerDeleteProc) (ClientData clientData); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct mp_int mp_int; |
|
|
#define MP_INT_DECLARED |
|
|
typedef unsigned int mp_digit; |
|
|
#define MP_DIGIT_DECLARED |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct { |
|
|
int type; |
|
|
const char *keyStr; |
|
|
|
|
|
void *srcPtr; |
|
|
|
|
|
void *dstPtr; |
|
|
|
|
|
const char *helpStr; |
|
|
|
|
|
ClientData clientData; |
|
|
} Tcl_ArgvInfo; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_ARGV_CONSTANT 15 |
|
|
#define TCL_ARGV_INT 16 |
|
|
#define TCL_ARGV_STRING 17 |
|
|
#define TCL_ARGV_REST 18 |
|
|
#define TCL_ARGV_FLOAT 19 |
|
|
#define TCL_ARGV_FUNC 20 |
|
|
#define TCL_ARGV_GENFUNC 21 |
|
|
#define TCL_ARGV_HELP 22 |
|
|
#define TCL_ARGV_END 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef int (Tcl_ArgvFuncProc)(ClientData clientData, Tcl_Obj *objPtr, |
|
|
void *dstPtr); |
|
|
typedef int (Tcl_ArgvGenFuncProc)(ClientData clientData, Tcl_Interp *interp, |
|
|
int objc, Tcl_Obj *const *objv, void *dstPtr); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_ARGV_AUTO_HELP \ |
|
|
{TCL_ARGV_HELP, "-help", NULL, NULL, \ |
|
|
"Print summary of command-line options and abort", NULL} |
|
|
#define TCL_ARGV_AUTO_REST \ |
|
|
{TCL_ARGV_REST, "--", NULL, NULL, \ |
|
|
"Marks the end of the options", NULL} |
|
|
#define TCL_ARGV_TABLE_END \ |
|
|
{TCL_ARGV_END, NULL, NULL, NULL, NULL, NULL} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_ZLIB_FORMAT_RAW 1 |
|
|
#define TCL_ZLIB_FORMAT_ZLIB 2 |
|
|
#define TCL_ZLIB_FORMAT_GZIP 4 |
|
|
#define TCL_ZLIB_FORMAT_AUTO 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_ZLIB_STREAM_DEFLATE 16 |
|
|
#define TCL_ZLIB_STREAM_INFLATE 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_ZLIB_COMPRESS_NONE 0 |
|
|
#define TCL_ZLIB_COMPRESS_FAST 1 |
|
|
#define TCL_ZLIB_COMPRESS_BEST 9 |
|
|
#define TCL_ZLIB_COMPRESS_DEFAULT (-1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_ZLIB_NO_FLUSH 0 |
|
|
#define TCL_ZLIB_FLUSH 2 |
|
|
#define TCL_ZLIB_FULLFLUSH 3 |
|
|
#define TCL_ZLIB_FINALIZE 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_LOAD_GLOBAL 1 |
|
|
#define TCL_LOAD_LAZY 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp, |
|
|
int result); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TCL_STUB_MAGIC ((int) 0xFCA3BACF) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const char * Tcl_InitStubs(Tcl_Interp *interp, const char *version, |
|
|
int exact); |
|
|
const char * TclTomMathInitializeStubs(Tcl_Interp *interp, |
|
|
const char *version, int epoch, int revision); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef USE_TCL_STUBS |
|
|
#define Tcl_InitStubs(interp, version, exact) \ |
|
|
Tcl_PkgInitStubsCheck(interp, version, exact) |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define Tcl_Main(argc, argv, proc) Tcl_MainEx(argc, argv, proc, \ |
|
|
((Tcl_CreateInterp)())) |
|
|
EXTERN void Tcl_MainEx(int argc, char **argv, |
|
|
Tcl_AppInitProc *appInitProc, Tcl_Interp *interp); |
|
|
EXTERN const char * Tcl_PkgInitStubsCheck(Tcl_Interp *interp, |
|
|
const char *version, int exact); |
|
|
EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "tclDecls.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(BUILD_tcl) |
|
|
# undef TCLAPI |
|
|
# define TCLAPI MODULE_SCOPE |
|
|
#endif |
|
|
|
|
|
#include "tclPlatDecls.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef TCL_MEM_DEBUG |
|
|
|
|
|
# define ckalloc(x) \ |
|
|
((void *) Tcl_DbCkalloc((unsigned)(x), __FILE__, __LINE__)) |
|
|
# define ckfree(x) \ |
|
|
Tcl_DbCkfree((char *)(x), __FILE__, __LINE__) |
|
|
# define ckrealloc(x,y) \ |
|
|
((void *) Tcl_DbCkrealloc((char *)(x), (unsigned)(y), __FILE__, __LINE__)) |
|
|
# define attemptckalloc(x) \ |
|
|
((void *) Tcl_AttemptDbCkalloc((unsigned)(x), __FILE__, __LINE__)) |
|
|
# define attemptckrealloc(x,y) \ |
|
|
((void *) Tcl_AttemptDbCkrealloc((char *)(x), (unsigned)(y), __FILE__, __LINE__)) |
|
|
|
|
|
#else |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# define ckalloc(x) \ |
|
|
((void *) Tcl_Alloc((unsigned)(x))) |
|
|
# define ckfree(x) \ |
|
|
Tcl_Free((char *)(x)) |
|
|
# define ckrealloc(x,y) \ |
|
|
((void *) Tcl_Realloc((char *)(x), (unsigned)(y))) |
|
|
# define attemptckalloc(x) \ |
|
|
((void *) Tcl_AttemptAlloc((unsigned)(x))) |
|
|
# define attemptckrealloc(x,y) \ |
|
|
((void *) Tcl_AttemptRealloc((char *)(x), (unsigned)(y))) |
|
|
# undef Tcl_InitMemory |
|
|
# define Tcl_InitMemory(x) |
|
|
# undef Tcl_DumpActiveMemory |
|
|
# define Tcl_DumpActiveMemory(x) |
|
|
# undef Tcl_ValidateAllMemory |
|
|
# define Tcl_ValidateAllMemory(x,y) |
|
|
|
|
|
#endif |
|
|
|
|
|
#ifdef TCL_MEM_DEBUG |
|
|
# define Tcl_IncrRefCount(objPtr) \ |
|
|
Tcl_DbIncrRefCount(objPtr, __FILE__, __LINE__) |
|
|
# define Tcl_DecrRefCount(objPtr) \ |
|
|
Tcl_DbDecrRefCount(objPtr, __FILE__, __LINE__) |
|
|
# define Tcl_IsShared(objPtr) \ |
|
|
Tcl_DbIsShared(objPtr, __FILE__, __LINE__) |
|
|
#else |
|
|
# define Tcl_IncrRefCount(objPtr) \ |
|
|
++(objPtr)->refCount |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# define Tcl_DecrRefCount(objPtr) \ |
|
|
do { \ |
|
|
Tcl_Obj *_objPtr = (objPtr); \ |
|
|
if (_objPtr->refCount-- <= 1) { \ |
|
|
TclFreeObj(_objPtr); \ |
|
|
} \ |
|
|
} while(0) |
|
|
# define Tcl_IsShared(objPtr) \ |
|
|
((objPtr)->refCount > 1) |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef TCL_MEM_DEBUG |
|
|
# undef Tcl_NewBignumObj |
|
|
# define Tcl_NewBignumObj(val) \ |
|
|
Tcl_DbNewBignumObj(val, __FILE__, __LINE__) |
|
|
# undef Tcl_NewBooleanObj |
|
|
# define Tcl_NewBooleanObj(val) \ |
|
|
Tcl_DbNewBooleanObj(val, __FILE__, __LINE__) |
|
|
# undef Tcl_NewByteArrayObj |
|
|
# define Tcl_NewByteArrayObj(bytes, len) \ |
|
|
Tcl_DbNewByteArrayObj(bytes, len, __FILE__, __LINE__) |
|
|
# undef Tcl_NewDoubleObj |
|
|
# define Tcl_NewDoubleObj(val) \ |
|
|
Tcl_DbNewDoubleObj(val, __FILE__, __LINE__) |
|
|
# undef Tcl_NewIntObj |
|
|
# define Tcl_NewIntObj(val) \ |
|
|
Tcl_DbNewLongObj(val, __FILE__, __LINE__) |
|
|
# undef Tcl_NewListObj |
|
|
# define Tcl_NewListObj(objc, objv) \ |
|
|
Tcl_DbNewListObj(objc, objv, __FILE__, __LINE__) |
|
|
# undef Tcl_NewLongObj |
|
|
# define Tcl_NewLongObj(val) \ |
|
|
Tcl_DbNewLongObj(val, __FILE__, __LINE__) |
|
|
# undef Tcl_NewObj |
|
|
# define Tcl_NewObj() \ |
|
|
Tcl_DbNewObj(__FILE__, __LINE__) |
|
|
# undef Tcl_NewStringObj |
|
|
# define Tcl_NewStringObj(bytes, len) \ |
|
|
Tcl_DbNewStringObj(bytes, len, __FILE__, __LINE__) |
|
|
# undef Tcl_NewWideIntObj |
|
|
# define Tcl_NewWideIntObj(val) \ |
|
|
Tcl_DbNewWideIntObj(val, __FILE__, __LINE__) |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define Tcl_GetHashValue(h) ((h)->clientData) |
|
|
#define Tcl_SetHashValue(h, value) ((h)->clientData = (ClientData) (value)) |
|
|
#define Tcl_GetHashKey(tablePtr, h) \ |
|
|
((void *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS || \ |
|
|
(tablePtr)->keyType == TCL_CUSTOM_PTR_KEYS) \ |
|
|
? (h)->key.oneWordValue \ |
|
|
: (h)->key.string)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#undef Tcl_FindHashEntry |
|
|
#define Tcl_FindHashEntry(tablePtr, key) \ |
|
|
(*((tablePtr)->findProc))(tablePtr, (const char *)(key)) |
|
|
#undef Tcl_CreateHashEntry |
|
|
#define Tcl_CreateHashEntry(tablePtr, key, newPtr) \ |
|
|
(*((tablePtr)->createProc))(tablePtr, (const char *)(key), newPtr) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef TCL_THREADS |
|
|
#undef Tcl_MutexLock |
|
|
#define Tcl_MutexLock(mutexPtr) |
|
|
#undef Tcl_MutexUnlock |
|
|
#define Tcl_MutexUnlock(mutexPtr) |
|
|
#undef Tcl_MutexFinalize |
|
|
#define Tcl_MutexFinalize(mutexPtr) |
|
|
#undef Tcl_ConditionNotify |
|
|
#define Tcl_ConditionNotify(condPtr) |
|
|
#undef Tcl_ConditionWait |
|
|
#define Tcl_ConditionWait(condPtr, mutexPtr, timePtr) |
|
|
#undef Tcl_ConditionFinalize |
|
|
#define Tcl_ConditionFinalize(condPtr) |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef TCL_NO_DEPRECATED |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# define Tcl_Ckalloc Tcl_Alloc |
|
|
# define Tcl_Ckfree Tcl_Free |
|
|
# define Tcl_Ckrealloc Tcl_Realloc |
|
|
# define Tcl_Return Tcl_SetResult |
|
|
# define Tcl_TildeSubst Tcl_TranslateFileName |
|
|
#if !defined(__APPLE__) |
|
|
# define panic Tcl_Panic |
|
|
#endif |
|
|
# define panicVA Tcl_PanicVA |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern Tcl_AppInitProc Tcl_AppInit; |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
|
} |
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|