Subversion Repositories Vertical

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 11
Line 36... Line 36...
36
 * is 7.6b2, TCL_RELEASE_SERIAL is 2.  It restarts at 1 whenever the
36
 * is 7.6b2, TCL_RELEASE_SERIAL is 2.  It restarts at 1 whenever the
37
 * release level is changed, except for the final release which is 0
37
 * release level is changed, except for the final release which is 0
38
 * (the first patch will start at 1).
38
 * (the first patch will start at 1).
39
 */
39
 */
40
 
40
 
41
#define TCL_MAJOR_VERSION 8
41
#define TCL_MAJOR_VERSION   8
42
#define TCL_MINOR_VERSION 0
42
#define TCL_MINOR_VERSION   0
43
#define TCL_RELEASE_LEVEL 2
43
#define TCL_RELEASE_LEVEL   2
44
#define TCL_RELEASE_SERIAL 4
44
#define TCL_RELEASE_SERIAL  4
45
 
45
 
46
#define TCL_VERSION "8.0"
46
#define TCL_VERSION         "8.0"
47
#define TCL_PATCH_LEVEL "8.0.4"
47
#define TCL_PATCH_LEVEL     "8.0.4"
48
 
48
 
49
/*
49
/*
50
 * The following definitions set up the proper options for Windows
50
 * The following definitions set up the proper options for Windows
51
 * compilers.  We use this method because there is no autoconf equivalent.
51
 * compilers.  We use this method because there is no autoconf equivalent.
52
 */
52
 */
53
 
53
 
54
#ifndef __WIN32__
54
#ifndef __WIN32__
55
#if defined(_WIN32) || defined(WIN32)
55
#   if defined(_WIN32) || defined(WIN32)
56
#define __WIN32__
56
#       define __WIN32__
57
#endif
57
#   endif
58
#endif
58
#endif
59
 
59
 
60
#ifdef __WIN32__
60
#ifdef __WIN32__
61
#ifndef STRICT
61
#   ifndef STRICT
62
#define STRICT
62
#       define STRICT
63
#endif
63
#   endif
64
#ifndef USE_PROTOTYPE
64
#   ifndef USE_PROTOTYPE
65
#define USE_PROTOTYPE 1
65
#       define USE_PROTOTYPE 1
66
#endif
66
#   endif
67
#ifndef HAS_STDARG
67
#   ifndef HAS_STDARG
68
#define HAS_STDARG 1
68
#       define HAS_STDARG 1
69
#endif
69
#   endif
70
#ifndef USE_PROTOTYPE
70
#   ifndef USE_PROTOTYPE
71
#define USE_PROTOTYPE 1
71
#       define USE_PROTOTYPE 1
72
#endif
72
#   endif
73
#ifndef USE_TCLALLOC
73
#   ifndef USE_TCLALLOC
74
#define USE_TCLALLOC 1
74
#       define USE_TCLALLOC 1
75
#endif
75
#   endif
76
#endif /* __WIN32__ */
76
#endif /* __WIN32__ */
77
 
77
 
78
/*
78
/*
79
 * The following definitions set up the proper options for Macintosh
79
 * The following definitions set up the proper options for Macintosh
80
 * compilers.  We use this method because there is no autoconf equivalent.
80
 * compilers.  We use this method because there is no autoconf equivalent.
81
 */
81
 */
82
 
82
 
83
#ifdef MAC_TCL
83
#ifdef MAC_TCL
84
#ifndef HAS_STDARG
84
#   ifndef HAS_STDARG
85
#define HAS_STDARG 1
85
#       define HAS_STDARG 1
86
#endif
86
#   endif
87
#ifndef USE_TCLALLOC
87
#   ifndef USE_TCLALLOC
88
#define USE_TCLALLOC 1
88
#       define USE_TCLALLOC 1
89
#endif
89
#   endif
90
#ifndef NO_STRERROR
90
#   ifndef NO_STRERROR
91
#define NO_STRERROR 1
91
#       define NO_STRERROR 1
92
#endif
92
#   endif
93
#endif
93
#endif
94
 
94
 
95
/*
95
/*
96
 * Utility macros: STRINGIFY takes an argument and wraps it in "" (double
96
 * Utility macros: STRINGIFY takes an argument and wraps it in "" (double
97
 * quotation marks), JOIN joins two arguments.
97
 * quotation marks), JOIN joins two arguments.
98
 */
98
 */
99
 
99
 
100
#define VERBATIM(x) x
100
#define VERBATIM(x) x
101
#ifdef _MSC_VER
101
#ifdef _MSC_VER
102
#define STRINGIFY(x) STRINGIFY1 (x)
102
# define STRINGIFY(x) STRINGIFY1(x)
103
#define STRINGIFY1(x) #x
-
 
104
#define JOIN(a, b) JOIN1 (a, b)
-
 
105
#define JOIN1(a, b) a##b
-
 
106
#else
-
 
107
#ifdef RESOURCE_INCLUDED
-
 
108
#define STRINGIFY(x) STRINGIFY1 (x)
-
 
109
#define STRINGIFY1(x) #x
103
# define STRINGIFY1(x) #x
110
#define JOIN(a, b) JOIN1 (a, b)
104
# define JOIN(a,b) JOIN1(a,b)
111
#define JOIN1(a, b) a##b
105
# define JOIN1(a,b) a##b
112
#else
-
 
113
#ifdef __STDC__
-
 
114
#define STRINGIFY(x) #x
-
 
115
#define JOIN(a, b) a##b
-
 
116
#else
106
#else
-
 
107
# ifdef RESOURCE_INCLUDED
-
 
108
#  define STRINGIFY(x) STRINGIFY1(x)
-
 
109
#  define STRINGIFY1(x) #x
-
 
110
#  define JOIN(a,b) JOIN1(a,b)
-
 
111
#  define JOIN1(a,b) a##b
-
 
112
# else
-
 
113
#  ifdef __STDC__
-
 
114
#   define STRINGIFY(x) #x
-
 
115
#   define JOIN(a,b) a##b
-
 
116
#  else
117
#define STRINGIFY(x) "x"
117
#   define STRINGIFY(x) "x"
118
#define JOIN(a, b) VERBATIM (a) VERBATIM (b)
118
#   define JOIN(a,b) VERBATIM(a)VERBATIM(b)
119
#endif
119
#  endif
120
#endif
120
# endif
121
#endif
121
#endif
122
 
122
 
123
/*
123
/*
124
 * A special definition used to allow this header file to be included
124
 * A special definition used to allow this header file to be included
125
 * in resource files so that they can get obtain version information from
125
 * in resource files so that they can get obtain version information from
126
 * this file.  Resource compilers don't like all the C stuff, like typedefs
126
 * this file.  Resource compilers don't like all the C stuff, like typedefs
127
 * and procedure declarations, that occur below.
127
 * and procedure declarations, that occur below.
128
 */
128
 */
129
 
129
 
Line 142... Line 142...
142
 * string for use in the function definition.  TCL_VARARGS_START
142
 * string for use in the function definition.  TCL_VARARGS_START
143
 * initializes the va_list data structure and returns the first argument.
143
 * initializes the va_list data structure and returns the first argument.
144
 */
144
 */
145
 
145
 
146
#if defined(__STDC__) || defined(HAS_STDARG)
146
#if defined(__STDC__) || defined(HAS_STDARG)
147
#define TCL_VARARGS(type, name) (type name, ...)
147
#   define TCL_VARARGS(type, name) (type name, ...)
148
#define TCL_VARARGS_DEF(type, name) (type name, ...)
148
#   define TCL_VARARGS_DEF(type, name) (type name, ...)
149
#define TCL_VARARGS_START(type, name, list) (va_start (list, name), name)
149
#   define TCL_VARARGS_START(type, name, list) (va_start(list, name), name)
150
#else
-
 
151
#ifdef __cplusplus
-
 
152
#define TCL_VARARGS(type, name) (type name, ...)
-
 
153
#define TCL_VARARGS_DEF(type, name) (type va_alist, ...)
-
 
154
#else
150
#else
-
 
151
#   ifdef __cplusplus
-
 
152
#       define TCL_VARARGS(type, name) (type name, ...)
-
 
153
#       define TCL_VARARGS_DEF(type, name) (type va_alist, ...)
-
 
154
#   else
155
#define TCL_VARARGS(type, name) ()
155
#       define TCL_VARARGS(type, name) ()
156
#define TCL_VARARGS_DEF(type, name) (va_alist)
156
#       define TCL_VARARGS_DEF(type, name) (va_alist)
157
#endif
157
#   endif
158
#define TCL_VARARGS_START(type, name, list) (va_start (list), va_arg (list, type))
158
#   define TCL_VARARGS_START(type, name, list) \
-
 
159
        (va_start(list), va_arg(list, type))
159
#endif
160
#endif
160
 
161
 
161
/*
162
/*
162
 * Macros used to declare a function to be exported by a DLL.
163
 * Macros used to declare a function to be exported by a DLL.
163
 * Used by Windows, maps to no-op declarations on non-Windows systems.
164
 * Used by Windows, maps to no-op declarations on non-Windows systems.
Line 169... Line 170...
169
 * for sources that are to be placed in the library. See BUILD_tcl in this
170
 * for sources that are to be placed in the library. See BUILD_tcl in this
170
 * file for an example of how the macro is to be used.
171
 * file for an example of how the macro is to be used.
171
 */
172
 */
172
 
173
 
173
#ifdef __WIN32__
174
#ifdef __WIN32__
174
#ifdef STATIC_BUILD
175
# ifdef STATIC_BUILD
175
#define DLLIMPORT
176
#  define DLLIMPORT
176
#define DLLEXPORT
177
#  define DLLEXPORT
177
#else
178
# else
178
#ifdef _MSC_VER
179
#  ifdef _MSC_VER
179
#define DLLIMPORT __declspec(dllimport)
180
#   define DLLIMPORT __declspec(dllimport)
180
#define DLLEXPORT __declspec(dllexport)
181
#   define DLLEXPORT __declspec(dllexport)
181
#else
182
#  else
182
#define DLLIMPORT
183
#   define DLLIMPORT
183
#define DLLEXPORT
184
#   define DLLEXPORT
184
#endif
185
#  endif
185
#endif
186
# endif
186
#else
187
#else
187
#define DLLIMPORT
188
# define DLLIMPORT
188
#define DLLEXPORT
189
# define DLLEXPORT
189
#endif
190
#endif
190
 
191
 
191
#ifdef TCL_STORAGE_CLASS
192
#ifdef TCL_STORAGE_CLASS
192
#undef TCL_STORAGE_CLASS
193
# undef TCL_STORAGE_CLASS
193
#endif
194
#endif
194
#ifdef BUILD_tcl
195
#ifdef BUILD_tcl
195
#define TCL_STORAGE_CLASS DLLEXPORT
196
# define TCL_STORAGE_CLASS DLLEXPORT
196
#else
197
#else
197
#define TCL_STORAGE_CLASS DLLIMPORT
198
# define TCL_STORAGE_CLASS DLLIMPORT
198
#endif
199
#endif
199
 
200
 
200
/*
201
/*
201
 * Definitions that allow this header file to be used either with or
202
 * Definitions that allow this header file to be used either with or
202
 * without ANSI C features like function prototypes.
203
 * without ANSI C features like function prototypes.
203
 */
204
 */
204
 
205
 
205
#undef _ANSI_ARGS_
206
#undef _ANSI_ARGS_
206
#undef CONST
207
#undef CONST
207
 
208
 
208
#if ((defined(__STDC__) || defined(SABER)) && !defined(NO_PROTOTYPE)) ||                      \
209
#if ((defined(__STDC__) || defined(SABER)) && !defined(NO_PROTOTYPE)) || defined(__cplusplus) || defined(USE_PROTOTYPE)
209
    defined(__cplusplus) || defined(USE_PROTOTYPE)
-
 
210
#define _USING_PROTOTYPES_ 1
210
#   define _USING_PROTOTYPES_ 1
211
#define _ANSI_ARGS_(x) x
211
#   define _ANSI_ARGS_(x)       x
212
#define CONST const
212
#   define CONST const
213
#else
213
#else
214
#define _ANSI_ARGS_(x) ()
214
#   define _ANSI_ARGS_(x)       ()
215
#define CONST
215
#   define CONST
216
#endif
216
#endif
217
 
217
 
218
#ifdef __cplusplus
218
#ifdef __cplusplus
219
#define EXTERN extern "C" TCL_STORAGE_CLASS
219
#   define EXTERN extern "C" TCL_STORAGE_CLASS
220
#else
220
#else
221
#define EXTERN extern TCL_STORAGE_CLASS
221
#   define EXTERN extern TCL_STORAGE_CLASS
222
#endif
222
#endif
223
 
223
 
224
/*
224
/*
225
 * Macro to use instead of "void" for arguments that must have
225
 * Macro to use instead of "void" for arguments that must have
226
 * type "void *" in ANSI C;  maps them to type "char *" in
226
 * type "void *" in ANSI C;  maps them to type "char *" in
227
 * non-ANSI systems.
227
 * non-ANSI systems.
228
 */
228
 */
229
#ifndef __WIN32__
229
#ifndef __WIN32__
230
#ifndef VOID
230
#ifndef VOID
231
#ifdef __STDC__
231
#   ifdef __STDC__
232
#define VOID void
232
#       define VOID void
233
#else
233
#   else
234
#define VOID char
234
#       define VOID char
235
#endif
235
#   endif
236
#endif
236
#endif
237
#else /* __WIN32__ */
237
#else /* __WIN32__ */
238
/*
238
/*
239
 * The following code is copied from winnt.h
239
 * The following code is copied from winnt.h
240
 */
240
 */
Line 253... Line 253...
253
#ifndef NULL
253
#ifndef NULL
254
#define NULL 0
254
#define NULL 0
255
#endif
255
#endif
256
 
256
 
257
#ifndef _CLIENTDATA
257
#ifndef _CLIENTDATA
258
#if defined(__STDC__) || defined(__cplusplus)
258
#   if defined(__STDC__) || defined(__cplusplus)
259
typedef void *ClientData;
259
    typedef void *ClientData;
260
#else
260
#   else
261
typedef int *ClientData;
261
    typedef int *ClientData;
262
#endif /* __STDC__ */
262
#   endif /* __STDC__ */
263
#define _CLIENTDATA
263
#define _CLIENTDATA
264
#endif
264
#endif
265
 
265
 
266
/*
266
/*
267
 * Data structures defined opaquely in this module. The definitions below
267
 * Data structures defined opaquely in this module. The definitions below
Line 271... Line 271...
271
 * The interpreter result is either an object or a string, and the two
271
 * The interpreter result is either an object or a string, and the two
272
 * values are kept consistent unless some C code sets interp->result
272
 * values are kept consistent unless some C code sets interp->result
273
 * directly. Programmers should use either the procedure Tcl_GetObjResult()
273
 * directly. Programmers should use either the procedure Tcl_GetObjResult()
274
 * or Tcl_GetStringResult() to read the interpreter's result. See the
274
 * or Tcl_GetStringResult() to read the interpreter's result. See the
275
 * SetResult man page for details.
275
 * SetResult man page for details.
276
 *
276
 *
277
 * Note: any change to the Tcl_Interp definition below must be mirrored
277
 * Note: any change to the Tcl_Interp definition below must be mirrored
278
 * in the "real" definition in tclInt.h.
278
 * in the "real" definition in tclInt.h.
279
 *
279
 *
280
 * Note: Tcl_ObjCmdProc procedures do not directly set result and freeProc.
280
 * Note: Tcl_ObjCmdProc procedures do not directly set result and freeProc.
281
 * Instead, they set a Tcl_Obj member in the "real" structure that can be
281
 * Instead, they set a Tcl_Obj member in the "real" structure that can be
282
 * accessed with Tcl_GetObjResult() and Tcl_SetObjResult().
282
 * accessed with Tcl_GetObjResult() and Tcl_SetObjResult().
283
 */
283
 */
284
 
284
 
285
typedef struct Tcl_Interp
285
typedef struct Tcl_Interp {
286
{
-
 
287
        char *result; /* If the last command returned a string
286
    char *result;               /* If the last command returned a string
288
                       * result, this points to it. */
287
                                 * result, this points to it. */
289
        void(*freeProc) _ANSI_ARGS_ ((char *blockPtr));
288
    void (*freeProc) _ANSI_ARGS_((char *blockPtr));
290
        /* Zero means the string result is
289
                                /* Zero means the string result is
291
         * statically allocated. TCL_DYNAMIC means
290
                                 * statically allocated. TCL_DYNAMIC means
292
         * it was allocated with ckalloc and should
291
                                 * it was allocated with ckalloc and should
293
         * be freed with ckfree. Other values give
292
                                 * be freed with ckfree. Other values give
294
         * the address of procedure to invoke to
293
                                 * the address of procedure to invoke to
295
         * free the result. Tcl_Eval must free it
294
                                 * free the result. Tcl_Eval must free it
296
         * before executing next command. */
295
                                 * before executing next command. */
297
        int errorLine; /* When TCL_ERROR is returned, this gives
296
    int errorLine;              /* When TCL_ERROR is returned, this gives
298
                        * the line number within the command where
297
                                 * the line number within the command where
299
                        * the error occurred (1 if first line). */
298
                                 * the error occurred (1 if first line). */
300
} Tcl_Interp;
299
} Tcl_Interp;
301
 
300
 
302
typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler;
301
typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler;
303
typedef struct Tcl_Channel_ *Tcl_Channel;
302
typedef struct Tcl_Channel_ *Tcl_Channel;
304
typedef struct Tcl_Command_ *Tcl_Command;
303
typedef struct Tcl_Command_ *Tcl_Command;
Line 312... Line 311...
312
/*
311
/*
313
 * When a TCL command returns, the interpreter contains a result from the
312
 * When a TCL command returns, the interpreter contains a result from the
314
 * command. Programmers are strongly encouraged to use one of the
313
 * command. Programmers are strongly encouraged to use one of the
315
 * procedures Tcl_GetObjResult() or Tcl_GetStringResult() to read the
314
 * procedures Tcl_GetObjResult() or Tcl_GetStringResult() to read the
316
 * interpreter's result. See the SetResult man page for details. Besides
315
 * interpreter's result. See the SetResult man page for details. Besides
317
 * this result, the command procedure returns an integer code, which is
316
 * this result, the command procedure returns an integer code, which is
318
 * one of the following:
317
 * one of the following:
319
 *
318
 *
320
 * TCL_OK               Command completed normally; the interpreter's
319
 * TCL_OK               Command completed normally; the interpreter's
321
 *                      result contains the command's result.
320
 *                      result contains the command's result.
322
 * TCL_ERROR            The command couldn't be completed successfully;
321
 * TCL_ERROR            The command couldn't be completed successfully;
Line 328... Line 327...
328
 *                      be exited; the interpreter's result is meaningless.
327
 *                      be exited; the interpreter's result is meaningless.
329
 * TCL_CONTINUE         Go on to the next iteration of the current loop;
328
 * TCL_CONTINUE         Go on to the next iteration of the current loop;
330
 *                      the interpreter's result is meaningless.
329
 *                      the interpreter's result is meaningless.
331
 */
330
 */
332
 
331
 
333
#define TCL_OK 0
332
#define TCL_OK          0
334
#define TCL_ERROR 1
333
#define TCL_ERROR       1
335
#define TCL_RETURN 2
334
#define TCL_RETURN      2
336
#define TCL_BREAK 3
335
#define TCL_BREAK       3
337
#define TCL_CONTINUE 4
336
#define TCL_CONTINUE    4
338
 
337
 
339
#define TCL_RESULT_SIZE 200
338
#define TCL_RESULT_SIZE 200
340
 
339
 
341
/*
340
/*
342
 * Argument descriptors for math function callbacks in expressions:
341
 * Argument descriptors for math function callbacks in expressions:
343
 */
342
 */
344
 
343
 
345
typedef enum
-
 
346
{
-
 
347
        TCL_INT,
-
 
348
        TCL_DOUBLE,
-
 
349
        TCL_EITHER
-
 
350
} Tcl_ValueType;
344
typedef enum {TCL_INT, TCL_DOUBLE, TCL_EITHER} Tcl_ValueType;
351
typedef struct Tcl_Value
345
typedef struct Tcl_Value {
352
{
-
 
353
        Tcl_ValueType type; /* Indicates intValue or doubleValue is
346
    Tcl_ValueType type;         /* Indicates intValue or doubleValue is
354
                             * valid, or both. */
347
                                 * valid, or both. */
355
        long intValue;      /* Integer value. */
348
    long intValue;              /* Integer value. */
356
        double doubleValue; /* Double-precision floating value. */
349
    double doubleValue;         /* Double-precision floating value. */
357
} Tcl_Value;
350
} Tcl_Value;
358
 
351
 
359
/*
352
/*
360
 * Forward declaration of Tcl_Obj to prevent an error when the forward
353
 * Forward declaration of Tcl_Obj to prevent an error when the forward
361
 * reference to Tcl_Obj is encountered in the procedure types declared
354
 * reference to Tcl_Obj is encountered in the procedure types declared
362
 * below.
355
 * below.
363
 */
356
 */
364
 
357
 
365
struct Tcl_Obj;
358
struct Tcl_Obj;
366
 
359
 
367
/*
360
/*
368
 * Procedure types defined by Tcl:
361
 * Procedure types defined by Tcl:
369
 */
362
 */
370
 
363
 
371
typedef int(Tcl_AppInitProc) _ANSI_ARGS_ ((Tcl_Interp * interp));
364
typedef int (Tcl_AppInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
372
typedef int(Tcl_AsyncProc) _ANSI_ARGS_ ((ClientData clientData, Tcl_Interp *interp, int code));
365
typedef int (Tcl_AsyncProc) _ANSI_ARGS_((ClientData clientData,
-
 
366
        Tcl_Interp *interp, int code));
373
typedef void(Tcl_ChannelProc) _ANSI_ARGS_ ((ClientData clientData, int mask));
367
typedef void (Tcl_ChannelProc) _ANSI_ARGS_((ClientData clientData, int mask));
374
typedef void(Tcl_CloseProc) _ANSI_ARGS_ ((ClientData data));
368
typedef void (Tcl_CloseProc) _ANSI_ARGS_((ClientData data));
375
typedef void(Tcl_CmdDeleteProc) _ANSI_ARGS_ ((ClientData clientData));
369
typedef void (Tcl_CmdDeleteProc) _ANSI_ARGS_((ClientData clientData));
376
typedef int(Tcl_CmdProc)
370
typedef int (Tcl_CmdProc) _ANSI_ARGS_((ClientData clientData,
377
    _ANSI_ARGS_ ((ClientData clientData, Tcl_Interp *interp, int argc, char *argv[]));
371
        Tcl_Interp *interp, int argc, char *argv[]));
378
typedef void(Tcl_CmdTraceProc) _ANSI_ARGS_ (
372
typedef void (Tcl_CmdTraceProc) _ANSI_ARGS_((ClientData clientData,
379
    (ClientData clientData,
-
 
380
     Tcl_Interp *interp,
-
 
381
     int level,
-
 
382
     char *command,
-
 
383
     Tcl_CmdProc *proc,
373
        Tcl_Interp *interp, int level, char *command, Tcl_CmdProc *proc,
384
     ClientData cmdClientData,
374
        ClientData cmdClientData, int argc, char *argv[]));
385
     int argc,
-
 
386
     char *argv[]));
-
 
387
typedef void(Tcl_DupInternalRepProc)
375
typedef void (Tcl_DupInternalRepProc) _ANSI_ARGS_((struct Tcl_Obj *srcPtr,
388
    _ANSI_ARGS_ ((struct Tcl_Obj * srcPtr, struct Tcl_Obj *dupPtr));
376
        struct Tcl_Obj *dupPtr));
389
typedef int(Tcl_EventProc) _ANSI_ARGS_ ((Tcl_Event * evPtr, int flags));
377
typedef int (Tcl_EventProc) _ANSI_ARGS_((Tcl_Event *evPtr, int flags));
390
typedef void(Tcl_EventCheckProc) _ANSI_ARGS_ ((ClientData clientData, int flags));
378
typedef void (Tcl_EventCheckProc) _ANSI_ARGS_((ClientData clientData,
-
 
379
        int flags));
391
typedef int(Tcl_EventDeleteProc) _ANSI_ARGS_ ((Tcl_Event * evPtr, ClientData clientData));
380
typedef int (Tcl_EventDeleteProc) _ANSI_ARGS_((Tcl_Event *evPtr,
-
 
381
        ClientData clientData));
392
typedef void(Tcl_EventSetupProc) _ANSI_ARGS_ ((ClientData clientData, int flags));
382
typedef void (Tcl_EventSetupProc) _ANSI_ARGS_((ClientData clientData,
-
 
383
        int flags));
393
typedef void(Tcl_ExitProc) _ANSI_ARGS_ ((ClientData clientData));
384
typedef void (Tcl_ExitProc) _ANSI_ARGS_((ClientData clientData));
394
typedef void(Tcl_FileProc) _ANSI_ARGS_ ((ClientData clientData, int mask));
385
typedef void (Tcl_FileProc) _ANSI_ARGS_((ClientData clientData, int mask));
395
typedef void(Tcl_FileFreeProc) _ANSI_ARGS_ ((ClientData clientData));
386
typedef void (Tcl_FileFreeProc) _ANSI_ARGS_((ClientData clientData));
396
typedef void(Tcl_FreeInternalRepProc) _ANSI_ARGS_ ((struct Tcl_Obj * objPtr));
387
typedef void (Tcl_FreeInternalRepProc) _ANSI_ARGS_((struct Tcl_Obj *objPtr));
397
typedef void(Tcl_FreeProc) _ANSI_ARGS_ ((char *blockPtr));
388
typedef void (Tcl_FreeProc) _ANSI_ARGS_((char *blockPtr));
398
typedef void(Tcl_IdleProc) _ANSI_ARGS_ ((ClientData clientData));
389
typedef void (Tcl_IdleProc) _ANSI_ARGS_((ClientData clientData));
399
typedef void(Tcl_InterpDeleteProc) _ANSI_ARGS_ ((ClientData clientData, Tcl_Interp *interp));
390
typedef void (Tcl_InterpDeleteProc) _ANSI_ARGS_((ClientData clientData,
-
 
391
        Tcl_Interp *interp));
400
typedef int(Tcl_MathProc) _ANSI_ARGS_ (
392
typedef int (Tcl_MathProc) _ANSI_ARGS_((ClientData clientData,
401
    (ClientData clientData, Tcl_Interp *interp, Tcl_Value *args, Tcl_Value *resultPtr));
393
        Tcl_Interp *interp, Tcl_Value *args, Tcl_Value *resultPtr));
402
typedef void(Tcl_NamespaceDeleteProc) _ANSI_ARGS_ ((ClientData clientData));
394
typedef void (Tcl_NamespaceDeleteProc) _ANSI_ARGS_((ClientData clientData));
403
typedef int(Tcl_ObjCmdProc) _ANSI_ARGS_ (
395
typedef int (Tcl_ObjCmdProc) _ANSI_ARGS_((ClientData clientData,
404
    (ClientData clientData, Tcl_Interp *interp, int objc, struct Tcl_Obj *CONST objv[]));
396
        Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST objv[]));
405
typedef int(Tcl_PackageInitProc) _ANSI_ARGS_ ((Tcl_Interp * interp));
397
typedef int (Tcl_PackageInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
406
typedef void(Tcl_TcpAcceptProc)
398
typedef void (Tcl_TcpAcceptProc) _ANSI_ARGS_((ClientData callbackData,
407
    _ANSI_ARGS_ ((ClientData callbackData, Tcl_Channel chan, char *address, int port));
399
        Tcl_Channel chan, char *address, int port));
408
typedef void(Tcl_TimerProc) _ANSI_ARGS_ ((ClientData clientData));
400
typedef void (Tcl_TimerProc) _ANSI_ARGS_((ClientData clientData));
409
typedef int(Tcl_SetFromAnyProc) _ANSI_ARGS_ ((Tcl_Interp * interp, struct Tcl_Obj *objPtr));
401
typedef int (Tcl_SetFromAnyProc) _ANSI_ARGS_((Tcl_Interp *interp,
-
 
402
        struct Tcl_Obj *objPtr));
410
typedef void(Tcl_UpdateStringProc) _ANSI_ARGS_ ((struct Tcl_Obj * objPtr));
403
typedef void (Tcl_UpdateStringProc) _ANSI_ARGS_((struct Tcl_Obj *objPtr));
411
typedef char *(Tcl_VarTraceProc) _ANSI_ARGS_ (
404
typedef char *(Tcl_VarTraceProc) _ANSI_ARGS_((ClientData clientData,
412
    (ClientData clientData, Tcl_Interp *interp, char *part1, char *part2, int flags));
405
        Tcl_Interp *interp, char *part1, char *part2, int flags));
413
 
406
 
414
/*
407
/*
415
 * The following structure represents a type of object, which is a
408
 * The following structure represents a type of object, which is a
416
 * particular internal representation for an object plus a set of
409
 * particular internal representation for an object plus a set of
417
 * procedures that provide standard operations on objects of that type.
410
 * procedures that provide standard operations on objects of that type.
418
 */
411
 */
419
 
412
 
420
typedef struct Tcl_ObjType
413
typedef struct Tcl_ObjType {
421
{
-
 
422
        char *name; /* Name of the type, e.g. "int". */
414
    char *name;                 /* Name of the type, e.g. "int". */
423
        Tcl_FreeInternalRepProc *freeIntRepProc;
415
    Tcl_FreeInternalRepProc *freeIntRepProc;
424
        /* Called to free any storage for the type's
416
                                /* Called to free any storage for the type's
425
         * internal rep. NULL if the internal rep
417
                                 * internal rep. NULL if the internal rep
426
         * does not need freeing. */
418
                                 * does not need freeing. */
427
        Tcl_DupInternalRepProc *dupIntRepProc;
419
    Tcl_DupInternalRepProc *dupIntRepProc;
428
        /* Called to create a new object as a copy
420
                                /* Called to create a new object as a copy
429
         * of an existing object. */
421
                                 * of an existing object. */
430
        Tcl_UpdateStringProc *updateStringProc;
422
    Tcl_UpdateStringProc *updateStringProc;
431
        /* Called to update the string rep from the
423
                                /* Called to update the string rep from the
432
         * type's internal representation. */
424
                                 * type's internal representation. */
433
        Tcl_SetFromAnyProc *setFromAnyProc;
425
    Tcl_SetFromAnyProc *setFromAnyProc;
434
        /* Called to convert the object's internal
426
                                /* Called to convert the object's internal
435
         * rep to this type. Frees the internal rep
427
                                 * rep to this type. Frees the internal rep
436
         * of the old type. Returns TCL_ERROR on
428
                                 * of the old type. Returns TCL_ERROR on
437
         * failure. */
429
                                 * failure. */
438
} Tcl_ObjType;
430
} Tcl_ObjType;
439
 
431
 
440
/*
432
/*
441
 * One of the following structures exists for each object in the Tcl
433
 * One of the following structures exists for each object in the Tcl
442
 * system. An object stores a value as either a string, some internal
434
 * system. An object stores a value as either a string, some internal
443
 * representation, or both.
435
 * representation, or both.
444
 */
436
 */
445
 
437
 
446
typedef struct Tcl_Obj
438
typedef struct Tcl_Obj {
447
{
-
 
448
        int refCount;         /* When 0 the object will be freed. */
439
    int refCount;               /* When 0 the object will be freed. */
449
        char *bytes;          /* This points to the first byte of the
440
    char *bytes;                /* This points to the first byte of the
450
                               * object's string representation. The array
441
                                 * object's string representation. The array
451
                               * must be followed by a null byte (i.e., at
442
                                 * must be followed by a null byte (i.e., at
452
                               * offset length) but may also contain
443
                                 * offset length) but may also contain
453
                               * embedded null characters. The array's
444
                                 * embedded null characters. The array's
454
                               * storage is allocated by ckalloc. NULL
445
                                 * storage is allocated by ckalloc. NULL
455
                               * means the string rep is invalid and must
446
                                 * means the string rep is invalid and must
456
                               * be regenerated from the internal rep.
447
                                 * be regenerated from the internal rep.
457
                               * Clients should use Tcl_GetStringFromObj
448
                                 * Clients should use Tcl_GetStringFromObj
458
                               * to get a pointer to the byte array as a
449
                                 * to get a pointer to the byte array as a
459
                               * readonly value. */
450
                                 * readonly value. */
460
        int length;           /* The number of bytes at *bytes, not
451
    int length;                 /* The number of bytes at *bytes, not
461
                               * including the terminating null. */
452
                                 * including the terminating null. */
462
        Tcl_ObjType *typePtr; /* Denotes the object's type. Always
453
    Tcl_ObjType *typePtr;       /* Denotes the object's type. Always
463
                               * corresponds to the type of the object's
454
                                 * corresponds to the type of the object's
464
                               * internal rep. NULL indicates the object
455
                                 * internal rep. NULL indicates the object
465
                               * has no internal rep (has no type). */
456
                                 * has no internal rep (has no type). */
466
        union
-
 
467
        {                            /* The internal representation: */
457
    union {                     /* The internal representation: */
468
                long longValue;      /*   - an long integer value */
458
        long longValue;         /*   - an long integer value */
469
                double doubleValue;  /*   - a double-precision floating value */
459
        double doubleValue;     /*   - a double-precision floating value */
470
                VOID *otherValuePtr; /*   - another, type-specific value */
460
        VOID *otherValuePtr;    /*   - another, type-specific value */
471
                struct
-
 
472
                { /*   - internal rep as two pointers */
461
        struct {                /*   - internal rep as two pointers */
473
                        VOID *ptr1;
462
            VOID *ptr1;
474
                        VOID *ptr2;
463
            VOID *ptr2;
475
                } twoPtrValue;
464
        } twoPtrValue;
476
        } internalRep;
465
    } internalRep;
477
} Tcl_Obj;
466
} Tcl_Obj;
478
 
467
 
479
/*
468
/*
480
 * Macros to increment and decrement a Tcl_Obj's reference count, and to
469
 * Macros to increment and decrement a Tcl_Obj's reference count, and to
481
 * test whether an object is shared (i.e. has reference count > 1).
470
 * test whether an object is shared (i.e. has reference count > 1).
Line 485... Line 474...
485
 * definition. Note also that Tcl_DecrRefCount() refers to the parameter
474
 * definition. Note also that Tcl_DecrRefCount() refers to the parameter
486
 * "obj" twice. This means that you should avoid calling it with an
475
 * "obj" twice. This means that you should avoid calling it with an
487
 * expression that is expensive to compute or has side effects.
476
 * expression that is expensive to compute or has side effects.
488
 */
477
 */
489
 
478
 
490
EXTERN void Tcl_IncrRefCount _ANSI_ARGS_ ((Tcl_Obj * objPtr));
479
EXTERN void             Tcl_IncrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr));
491
EXTERN void Tcl_DecrRefCount _ANSI_ARGS_ ((Tcl_Obj * objPtr));
480
EXTERN void             Tcl_DecrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr));
492
EXTERN int Tcl_IsShared _ANSI_ARGS_ ((Tcl_Obj * objPtr));
481
EXTERN int              Tcl_IsShared _ANSI_ARGS_((Tcl_Obj *objPtr));
493
 
482
 
494
#ifdef TCL_MEM_DEBUG
483
#ifdef TCL_MEM_DEBUG
-
 
484
#   define Tcl_IncrRefCount(objPtr) \
495
#define Tcl_IncrRefCount(objPtr) Tcl_DbIncrRefCount (objPtr, __FILE__, __LINE__)
485
        Tcl_DbIncrRefCount(objPtr, __FILE__, __LINE__)
-
 
486
#   define Tcl_DecrRefCount(objPtr) \
496
#define Tcl_DecrRefCount(objPtr) Tcl_DbDecrRefCount (objPtr, __FILE__, __LINE__)
487
        Tcl_DbDecrRefCount(objPtr, __FILE__, __LINE__)
-
 
488
#   define Tcl_IsShared(objPtr) \
497
#define Tcl_IsShared(objPtr) Tcl_DbIsShared (objPtr, __FILE__, __LINE__)
489
        Tcl_DbIsShared(objPtr, __FILE__, __LINE__)
498
#else
490
#else
499
#define Tcl_IncrRefCount(objPtr) ++(objPtr)->refCount
491
#   define Tcl_IncrRefCount(objPtr) \
-
 
492
        ++(objPtr)->refCount
500
#define Tcl_DecrRefCount(objPtr)                                                              \
493
#   define Tcl_DecrRefCount(objPtr) \
501
        if (--(objPtr)->refCount <= 0)                                                        \
494
        if (--(objPtr)->refCount <= 0) TclFreeObj(objPtr)
502
        TclFreeObj (objPtr)
495
#   define Tcl_IsShared(objPtr) \
503
#define Tcl_IsShared(objPtr) ((objPtr)->refCount > 1)
496
        ((objPtr)->refCount > 1)
504
#endif
497
#endif
505
 
498
 
506
/*
499
/*
507
 * Macros and definitions that help to debug the use of Tcl objects.
500
 * Macros and definitions that help to debug the use of Tcl objects.
508
 * When TCL_MEM_DEBUG is defined, the Tcl_New* declarations are
501
 * When TCL_MEM_DEBUG is defined, the Tcl_New* declarations are
509
 * overridden to call debugging versions of the object creation procedures.
502
 * overridden to call debugging versions of the object creation procedures.
510
 */
503
 */
511
 
504
 
512
EXTERN Tcl_Obj *Tcl_NewBooleanObj _ANSI_ARGS_ ((int boolValue));
505
EXTERN Tcl_Obj *        Tcl_NewBooleanObj _ANSI_ARGS_((int boolValue));
513
EXTERN Tcl_Obj *Tcl_NewDoubleObj _ANSI_ARGS_ ((double doubleValue));
506
EXTERN Tcl_Obj *        Tcl_NewDoubleObj _ANSI_ARGS_((double doubleValue));
514
EXTERN Tcl_Obj *Tcl_NewIntObj _ANSI_ARGS_ ((int intValue));
507
EXTERN Tcl_Obj *        Tcl_NewIntObj _ANSI_ARGS_((int intValue));
515
EXTERN Tcl_Obj *Tcl_NewListObj _ANSI_ARGS_ ((int objc, Tcl_Obj *CONST objv[]));
508
EXTERN Tcl_Obj *        Tcl_NewListObj _ANSI_ARGS_((int objc,
-
 
509
                            Tcl_Obj *CONST objv[]));
516
EXTERN Tcl_Obj *Tcl_NewLongObj _ANSI_ARGS_ ((long longValue));
510
EXTERN Tcl_Obj *        Tcl_NewLongObj _ANSI_ARGS_((long longValue));
517
EXTERN Tcl_Obj *Tcl_NewObj _ANSI_ARGS_ ((void) );
511
EXTERN Tcl_Obj *        Tcl_NewObj _ANSI_ARGS_((void));
518
EXTERN Tcl_Obj *Tcl_NewStringObj _ANSI_ARGS_ ((char *bytes, int length));
512
EXTERN Tcl_Obj *        Tcl_NewStringObj _ANSI_ARGS_((char *bytes,
-
 
513
                            int length));
519
 
514
 
520
#ifdef TCL_MEM_DEBUG
515
#ifdef TCL_MEM_DEBUG
-
 
516
#  define Tcl_NewBooleanObj(val) \
521
#define Tcl_NewBooleanObj(val) Tcl_DbNewBooleanObj (val, __FILE__, __LINE__)
517
     Tcl_DbNewBooleanObj(val, __FILE__, __LINE__)
-
 
518
#  define Tcl_NewDoubleObj(val) \
522
#define Tcl_NewDoubleObj(val) Tcl_DbNewDoubleObj (val, __FILE__, __LINE__)
519
     Tcl_DbNewDoubleObj(val, __FILE__, __LINE__)
-
 
520
#  define Tcl_NewIntObj(val) \
523
#define Tcl_NewIntObj(val) Tcl_DbNewLongObj (val, __FILE__, __LINE__)
521
     Tcl_DbNewLongObj(val, __FILE__, __LINE__)
-
 
522
#  define Tcl_NewListObj(objc, objv) \
524
#define Tcl_NewListObj(objc, objv) Tcl_DbNewListObj (objc, objv, __FILE__, __LINE__)
523
     Tcl_DbNewListObj(objc, objv, __FILE__, __LINE__)
-
 
524
#  define Tcl_NewLongObj(val) \
525
#define Tcl_NewLongObj(val) Tcl_DbNewLongObj (val, __FILE__, __LINE__)
525
     Tcl_DbNewLongObj(val, __FILE__, __LINE__)
-
 
526
#  define Tcl_NewObj() \
526
#define Tcl_NewObj() Tcl_DbNewObj (__FILE__, __LINE__)
527
     Tcl_DbNewObj(__FILE__, __LINE__)
-
 
528
#  define Tcl_NewStringObj(bytes, len) \
527
#define Tcl_NewStringObj(bytes, len) Tcl_DbNewStringObj (bytes, len, __FILE__, __LINE__)
529
     Tcl_DbNewStringObj(bytes, len, __FILE__, __LINE__)
528
#endif /* TCL_MEM_DEBUG */
530
#endif /* TCL_MEM_DEBUG */
529
 
531
 
530
/*
532
/*
531
 * The following definitions support Tcl's namespace facility.
533
 * The following definitions support Tcl's namespace facility.
532
 * Note: the first five fields must match exactly the fields in a
534
 * Note: the first five fields must match exactly the fields in a
533
 * Namespace structure (see tcl.h).
535
 * Namespace structure (see tcl.h).
534
 */
536
 */
535
 
537
 
536
typedef struct Tcl_Namespace
538
typedef struct Tcl_Namespace {
537
{
-
 
538
        char *name;            /* The namespace's name within its parent
539
    char *name;                 /* The namespace's name within its parent
539
                                * namespace. This contains no ::'s. The
540
                                 * namespace. This contains no ::'s. The
540
                                * name of the global namespace is ""
541
                                 * name of the global namespace is ""
541
                                * although "::" is an synonym. */
542
                                 * although "::" is an synonym. */
542
        char *fullName;        /* The namespace's fully qualified name.
543
    char *fullName;             /* The namespace's fully qualified name.
543
                                * This starts with ::. */
544
                                 * This starts with ::. */
544
        ClientData clientData; /* Arbitrary value associated with this
545
    ClientData clientData;      /* Arbitrary value associated with this
545
                                * namespace. */
546
                                 * namespace. */
546
        Tcl_NamespaceDeleteProc *deleteProc;
547
    Tcl_NamespaceDeleteProc* deleteProc;
547
        /* Procedure invoked when deleting the
548
                                /* Procedure invoked when deleting the
548
         * namespace to, e.g., free clientData. */
549
                                 * namespace to, e.g., free clientData. */
549
        struct Tcl_Namespace *parentPtr;
550
    struct Tcl_Namespace* parentPtr;
550
        /* Points to the namespace that contains
551
                                /* Points to the namespace that contains
551
         * this one. NULL if this is the global
552
                                 * this one. NULL if this is the global
552
         * namespace. */
553
                                 * namespace. */
553
} Tcl_Namespace;
554
} Tcl_Namespace;
554
 
555
 
555
/*
556
/*
556
 * The following structure represents a call frame, or activation record.
557
 * The following structure represents a call frame, or activation record.
557
 * A call frame defines a naming context for a procedure call: its local
558
 * A call frame defines a naming context for a procedure call: its local
Line 559... Line 560...
559
 * variables; often the global :: namespace). A call frame can also define
560
 * variables; often the global :: namespace). A call frame can also define
560
 * the naming context for a namespace eval or namespace inscope command:
561
 * the naming context for a namespace eval or namespace inscope command:
561
 * the namespace in which the command's code should execute. The
562
 * the namespace in which the command's code should execute. The
562
 * Tcl_CallFrame structures exist only while procedures or namespace
563
 * Tcl_CallFrame structures exist only while procedures or namespace
563
 * eval/inscope's are being executed, and provide a Tcl call stack.
564
 * eval/inscope's are being executed, and provide a Tcl call stack.
564
 *
565
 *
565
 * A call frame is initialized and pushed using Tcl_PushCallFrame and
566
 * A call frame is initialized and pushed using Tcl_PushCallFrame and
566
 * popped using Tcl_PopCallFrame. Storage for a Tcl_CallFrame must be
567
 * popped using Tcl_PopCallFrame. Storage for a Tcl_CallFrame must be
567
 * provided by the Tcl_PushCallFrame caller, and callers typically allocate
568
 * provided by the Tcl_PushCallFrame caller, and callers typically allocate
568
 * them on the C call stack for efficiency. For this reason, Tcl_CallFrame
569
 * them on the C call stack for efficiency. For this reason, Tcl_CallFrame
569
 * is defined as a structure and not as an opaque token. However, most
570
 * is defined as a structure and not as an opaque token. However, most
Line 572... Line 573...
572
 *
573
 *
573
 * WARNING!! The structure definition must be kept consistent with the
574
 * WARNING!! The structure definition must be kept consistent with the
574
 * CallFrame structure in tclInt.h. If you change one, change the other.
575
 * CallFrame structure in tclInt.h. If you change one, change the other.
575
 */
576
 */
576
 
577
 
577
typedef struct Tcl_CallFrame
578
typedef struct Tcl_CallFrame {
578
{
-
 
579
        Tcl_Namespace *nsPtr;
579
    Tcl_Namespace *nsPtr;
580
        int dummy1;
580
    int dummy1;
581
        int dummy2;
581
    int dummy2;
582
        char *dummy3;
582
    char *dummy3;
583
        char *dummy4;
583
    char *dummy4;
584
        char *dummy5;
584
    char *dummy5;
585
        int dummy6;
585
    int dummy6;
586
        char *dummy7;
586
    char *dummy7;
587
        char *dummy8;
587
    char *dummy8;
588
        int dummy9;
588
    int dummy9;
589
        char *dummy10;
589
    char* dummy10;
590
} Tcl_CallFrame;
590
} Tcl_CallFrame;
591
 
591
 
592
/*
592
/*
593
 * Information about commands that is returned by Tcl_GetCommandInfo and
593
 * Information about commands that is returned by Tcl_GetCommandInfo and
594
 * passed to Tcl_SetCommandInfo. objProc is an objc/objv object-based
594
 * passed to Tcl_SetCommandInfo. objProc is an objc/objv object-based
Line 601... Line 601...
601
 * 0 if a string-based procedure was registered by Tcl_CreateCommand.
601
 * 0 if a string-based procedure was registered by Tcl_CreateCommand.
602
 * The other procedure is typically set to a compatibility wrapper that
602
 * The other procedure is typically set to a compatibility wrapper that
603
 * does string-to-object or object-to-string argument conversions then
603
 * does string-to-object or object-to-string argument conversions then
604
 * calls the other procedure.
604
 * calls the other procedure.
605
 */
605
 */
606
 
606
     
607
typedef struct Tcl_CmdInfo
607
typedef struct Tcl_CmdInfo {
608
{
-
 
609
        int isNativeObjectProc;   /* 1 if objProc was registered by a call to
608
    int isNativeObjectProc;      /* 1 if objProc was registered by a call to
610
                                   * Tcl_CreateObjCommand; 0 otherwise.
609
                                  * Tcl_CreateObjCommand; 0 otherwise.
611
                                   * Tcl_SetCmdInfo does not modify this
610
                                  * Tcl_SetCmdInfo does not modify this
612
                                   * field. */
611
                                  * field. */
613
        Tcl_ObjCmdProc *objProc;  /* Command's object-based procedure. */
612
    Tcl_ObjCmdProc *objProc;     /* Command's object-based procedure. */
614
        ClientData objClientData; /* ClientData for object proc. */
613
    ClientData objClientData;    /* ClientData for object proc. */
615
        Tcl_CmdProc *proc;        /* Command's string-based procedure. */
614
    Tcl_CmdProc *proc;           /* Command's string-based procedure. */
616
        ClientData clientData;    /* ClientData for string proc. */
615
    ClientData clientData;       /* ClientData for string proc. */
617
        Tcl_CmdDeleteProc *deleteProc;
616
    Tcl_CmdDeleteProc *deleteProc;
618
        /* Procedure to call when command is
617
                                 /* Procedure to call when command is
619
         * deleted. */
618
                                  * deleted. */
620
        ClientData deleteData;       /* Value to pass to deleteProc (usually
619
    ClientData deleteData;       /* Value to pass to deleteProc (usually
621
                                      * the same as clientData). */
620
                                  * the same as clientData). */
622
        Tcl_Namespace *namespacePtr; /* Points to the namespace that contains
621
    Tcl_Namespace *namespacePtr; /* Points to the namespace that contains
623
                                      * this command. Note that Tcl_SetCmdInfo
622
                                  * this command. Note that Tcl_SetCmdInfo
624
                                      * will not change a command's namespace;
623
                                  * will not change a command's namespace;
625
                                      * use Tcl_RenameCommand to do that. */
624
                                  * use Tcl_RenameCommand to do that. */
626
 
625
 
627
} Tcl_CmdInfo;
626
} Tcl_CmdInfo;
628
 
627
 
629
/*
628
/*
630
 * The structure defined below is used to hold dynamic strings.  The only
629
 * The structure defined below is used to hold dynamic strings.  The only
631
 * field that clients should use is the string field, and they should
630
 * field that clients should use is the string field, and they should
632
 * never modify it.
631
 * never modify it.
633
 */
632
 */
634
 
633
 
635
#define TCL_DSTRING_STATIC_SIZE 200
634
#define TCL_DSTRING_STATIC_SIZE 200
636
typedef struct Tcl_DString
635
typedef struct Tcl_DString {
637
{
-
 
638
        char *string; /* Points to beginning of string:  either
636
    char *string;               /* Points to beginning of string:  either
639
                       * staticSpace below or a malloced array. */
637
                                 * staticSpace below or a malloced array. */
640
        int length;   /* Number of non-NULL characters in the
638
    int length;                 /* Number of non-NULL characters in the
641
                       * string. */
639
                                 * string. */
642
        int spaceAvl; /* Total number of bytes available for the
640
    int spaceAvl;               /* Total number of bytes available for the
643
                       * string and its terminating NULL char. */
641
                                 * string and its terminating NULL char. */
644
        char staticSpace[TCL_DSTRING_STATIC_SIZE];
642
    char staticSpace[TCL_DSTRING_STATIC_SIZE];
645
        /* Space to use in common case where string
643
                                /* Space to use in common case where string
646
         * is small. */
644
                                 * is small. */
647
} Tcl_DString;
645
} Tcl_DString;
648
 
646
 
649
#define Tcl_DStringLength(dsPtr) ((dsPtr)->length)
647
#define Tcl_DStringLength(dsPtr) ((dsPtr)->length)
650
#define Tcl_DStringValue(dsPtr) ((dsPtr)->string)
648
#define Tcl_DStringValue(dsPtr) ((dsPtr)->string)
651
#define Tcl_DStringTrunc Tcl_DStringSetLength
649
#define Tcl_DStringTrunc Tcl_DStringSetLength
Line 653... Line 651...
653
/*
651
/*
654
 * Definitions for the maximum number of digits of precision that may
652
 * Definitions for the maximum number of digits of precision that may
655
 * be specified in the "tcl_precision" variable, and the number of
653
 * be specified in the "tcl_precision" variable, and the number of
656
 * characters of buffer space required by Tcl_PrintDouble.
654
 * characters of buffer space required by Tcl_PrintDouble.
657
 */
655
 */
658
 
656
 
659
#define TCL_MAX_PREC 17
657
#define TCL_MAX_PREC 17
660
#define TCL_DOUBLE_SPACE (TCL_MAX_PREC + 10)
658
#define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10)
661
 
659
 
662
/*
660
/*
663
 * Flag that may be passed to Tcl_ConvertElement to force it not to
661
 * Flag that may be passed to Tcl_ConvertElement to force it not to
664
 * output braces (careful!  if you change this flag be sure to change
662
 * output braces (careful!  if you change this flag be sure to change
665
 * the definitions at the front of tclUtil.c).
663
 * the definitions at the front of tclUtil.c).
666
 */
664
 */
667
 
665
 
668
#define TCL_DONT_USE_BRACES 1
666
#define TCL_DONT_USE_BRACES     1
669
 
667
 
670
/*
668
/*
671
 * Flag that may be passed to Tcl_GetIndexFromObj to force it to disallow
669
 * Flag that may be passed to Tcl_GetIndexFromObj to force it to disallow
672
 * abbreviated strings.
670
 * abbreviated strings.
673
 */
671
 */
674
 
672
 
675
#define TCL_EXACT 1
673
#define TCL_EXACT       1
676
 
674
 
677
/*
675
/*
678
 * Flag values passed to Tcl_RecordAndEval.
676
 * Flag values passed to Tcl_RecordAndEval.
679
 * WARNING: these bit choices must not conflict with the bit choices
677
 * WARNING: these bit choices must not conflict with the bit choices
680
 * for evalFlag bits in tclInt.h!!
678
 * for evalFlag bits in tclInt.h!!
681
 */
679
 */
682
 
680
 
683
#define TCL_NO_EVAL 0x10000
681
#define TCL_NO_EVAL             0x10000
684
#define TCL_EVAL_GLOBAL 0x20000
682
#define TCL_EVAL_GLOBAL         0x20000
685
 
683
 
686
/*
684
/*
687
 * Special freeProc values that may be passed to Tcl_SetResult (see
685
 * Special freeProc values that may be passed to Tcl_SetResult (see
688
 * the man page for details):
686
 * the man page for details):
689
 */
687
 */
690
 
688
 
691
#define TCL_VOLATILE ((Tcl_FreeProc *) 1)
689
#define TCL_VOLATILE    ((Tcl_FreeProc *) 1)
692
#define TCL_STATIC ((Tcl_FreeProc *) 0)
690
#define TCL_STATIC      ((Tcl_FreeProc *) 0)
693
#define TCL_DYNAMIC ((Tcl_FreeProc *) 3)
691
#define TCL_DYNAMIC     ((Tcl_FreeProc *) 3)
694
 
692
 
695
/*
693
/*
696
 * Flag values passed to variable-related procedures.
694
 * Flag values passed to variable-related procedures.
697
 */
695
 */
698
 
696
 
699
#define TCL_GLOBAL_ONLY 1
697
#define TCL_GLOBAL_ONLY          1
700
#define TCL_NAMESPACE_ONLY 2
698
#define TCL_NAMESPACE_ONLY       2
701
#define TCL_APPEND_VALUE 4
699
#define TCL_APPEND_VALUE         4
702
#define TCL_LIST_ELEMENT 8
700
#define TCL_LIST_ELEMENT         8
703
#define TCL_TRACE_READS 0x10
701
#define TCL_TRACE_READS          0x10
704
#define TCL_TRACE_WRITES 0x20
702
#define TCL_TRACE_WRITES         0x20
705
#define TCL_TRACE_UNSETS 0x40
703
#define TCL_TRACE_UNSETS         0x40
706
#define TCL_TRACE_DESTROYED 0x80
704
#define TCL_TRACE_DESTROYED      0x80
707
#define TCL_INTERP_DESTROYED 0x100
705
#define TCL_INTERP_DESTROYED     0x100
708
#define TCL_LEAVE_ERR_MSG 0x200
706
#define TCL_LEAVE_ERR_MSG        0x200
709
#define TCL_PARSE_PART1 0x400
707
#define TCL_PARSE_PART1          0x400
710
 
708
 
711
/*
709
/*
712
 * Types for linked variables:
710
 * Types for linked variables:
713
 */
711
 */
714
 
712
 
715
#define TCL_LINK_INT 1
713
#define TCL_LINK_INT            1
716
#define TCL_LINK_DOUBLE 2
714
#define TCL_LINK_DOUBLE         2
717
#define TCL_LINK_BOOLEAN 3
715
#define TCL_LINK_BOOLEAN        3
718
#define TCL_LINK_STRING 4
716
#define TCL_LINK_STRING         4
719
#define TCL_LINK_READ_ONLY 0x80
717
#define TCL_LINK_READ_ONLY      0x80
720
 
718
 
721
/*
719
/*
722
 * The following declarations either map ckalloc and ckfree to
720
 * The following declarations either map ckalloc and ckfree to
723
 * malloc and free, or they map them to procedures with all sorts
721
 * malloc and free, or they map them to procedures with all sorts
724
 * of debugging hooks defined in tclCkalloc.c.
722
 * of debugging hooks defined in tclCkalloc.c.
725
 */
723
 */
726
 
724
 
727
EXTERN char *Tcl_Alloc _ANSI_ARGS_ ((unsigned int size));
725
EXTERN char *           Tcl_Alloc _ANSI_ARGS_((unsigned int size));
728
EXTERN void Tcl_Free _ANSI_ARGS_ ((char *ptr));
726
EXTERN void             Tcl_Free _ANSI_ARGS_((char *ptr));
729
EXTERN char *Tcl_Realloc _ANSI_ARGS_ ((char *ptr, unsigned int size));
727
EXTERN char *           Tcl_Realloc _ANSI_ARGS_((char *ptr,
-
 
728
                            unsigned int size));
730
 
729
 
731
#ifdef TCL_MEM_DEBUG
730
#ifdef TCL_MEM_DEBUG
732
 
731
 
733
#define Tcl_Alloc(x) Tcl_DbCkalloc (x, __FILE__, __LINE__)
732
#  define Tcl_Alloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
734
#define Tcl_Free(x) Tcl_DbCkfree (x, __FILE__, __LINE__)
733
#  define Tcl_Free(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
735
#define Tcl_Realloc(x, y) Tcl_DbCkrealloc ((x), (y), __FILE__, __LINE__)
734
#  define Tcl_Realloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
736
#define ckalloc(x) Tcl_DbCkalloc (x, __FILE__, __LINE__)
735
#  define ckalloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
737
#define ckfree(x) Tcl_DbCkfree (x, __FILE__, __LINE__)
736
#  define ckfree(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
738
#define ckrealloc(x, y) Tcl_DbCkrealloc ((x), (y), __FILE__, __LINE__)
737
#  define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
739
 
738
 
740
EXTERN int Tcl_DumpActiveMemory _ANSI_ARGS_ ((char *fileName));
739
EXTERN int              Tcl_DumpActiveMemory _ANSI_ARGS_((char *fileName));
741
EXTERN void Tcl_ValidateAllMemory _ANSI_ARGS_ ((char *file, int line));
740
EXTERN void             Tcl_ValidateAllMemory _ANSI_ARGS_((char *file,
-
 
741
                            int line));
742
 
742
 
743
#else
743
#else
744
 
744
 
745
/* CYGNUS LOCAL: Always use TCLALLOC.  This means that calls to malloc
745
/* CYGNUS LOCAL: Always use TCLALLOC.  This means that calls to malloc
746
   will always be checked to make sure that malloc succeeded.
746
   will always be checked to make sure that malloc succeeded.
Line 752... Line 752...
752
#ifndef USE_TCLALLOC
752
#ifndef USE_TCLALLOC
753
#define USE_TCLALLOC 1
753
#define USE_TCLALLOC 1
754
#endif
754
#endif
755
/* END CYGNUS LOCAL */
755
/* END CYGNUS LOCAL */
756
 
756
 
757
#if USE_TCLALLOC
757
#  if USE_TCLALLOC
758
#define ckalloc(x) Tcl_Alloc (x)
758
#     define ckalloc(x) Tcl_Alloc(x)
759
#define ckfree(x) Tcl_Free (x)
759
#     define ckfree(x) Tcl_Free(x)
760
#define ckrealloc(x, y) Tcl_Realloc (x, y)
760
#     define ckrealloc(x,y) Tcl_Realloc(x,y)
761
#else
761
#  else
762
#define ckalloc(x) malloc (x)
762
#     define ckalloc(x) malloc(x)
763
#define ckfree(x) free (x)
763
#     define ckfree(x)  free(x)
764
#define ckrealloc(x, y) realloc (x, y)
764
#     define ckrealloc(x,y) realloc(x,y)
765
#endif
765
#  endif
766
#define Tcl_DumpActiveMemory(x)
766
#  define Tcl_DumpActiveMemory(x)
767
#define Tcl_ValidateAllMemory(x, y)
767
#  define Tcl_ValidateAllMemory(x,y)
768
 
768
 
769
#endif /* TCL_MEM_DEBUG */
769
#endif /* TCL_MEM_DEBUG */
770
 
770
 
771
/*
771
/*
772
 * Forward declaration of Tcl_HashTable.  Needed by some C++ compilers
772
 * Forward declaration of Tcl_HashTable.  Needed by some C++ compilers
Line 782... Line 782...
782
 * Structure definition for an entry in a hash table.  No-one outside
782
 * Structure definition for an entry in a hash table.  No-one outside
783
 * Tcl should access any of these fields directly;  use the macros
783
 * Tcl should access any of these fields directly;  use the macros
784
 * defined below.
784
 * defined below.
785
 */
785
 */
786
 
786
 
787
typedef struct Tcl_HashEntry
787
typedef struct Tcl_HashEntry {
788
{
-
 
789
        struct Tcl_HashEntry *nextPtr;    /* Pointer to next entry in this
788
    struct Tcl_HashEntry *nextPtr;      /* Pointer to next entry in this
790
                                           * hash bucket, or NULL for end of
789
                                         * hash bucket, or NULL for end of
791
                                           * chain. */
790
                                         * chain. */
792
        struct Tcl_HashTable *tablePtr;   /* Pointer to table containing entry. */
791
    struct Tcl_HashTable *tablePtr;     /* Pointer to table containing entry. */
793
        struct Tcl_HashEntry **bucketPtr; /* Pointer to bucket that points to
792
    struct Tcl_HashEntry **bucketPtr;   /* Pointer to bucket that points to
794
                                           * first entry in this entry's chain:
793
                                         * first entry in this entry's chain:
795
                                           * used for deleting the entry. */
794
                                         * used for deleting the entry. */
796
        ClientData clientData;            /* Application stores something here
795
    ClientData clientData;              /* Application stores something here
797
                                           * with Tcl_SetHashValue. */
796
                                         * with Tcl_SetHashValue. */
798
        union
-
 
799
        {                           /* Key has one of these forms: */
797
    union {                             /* Key has one of these forms: */
800
                char *oneWordValue; /* One-word value for key. */
798
        char *oneWordValue;             /* One-word value for key. */
801
                int words[1];       /* Multiple integer words for key.
799
        int words[1];                   /* Multiple integer words for key.
802
                                     * The actual size will be as large
800
                                         * The actual size will be as large
803
                                     * as necessary for this table's
801
                                         * as necessary for this table's
804
                                     * keys. */
802
                                         * keys. */
805
                char string[4];     /* String for key.  The actual size
803
        char string[4];                 /* String for key.  The actual size
806
                                     * will be as large as needed to hold
804
                                         * will be as large as needed to hold
807
                                     * the key. */
805
                                         * the key. */
808
        } key;                      /* MUST BE LAST FIELD IN RECORD!! */
806
    } key;                              /* MUST BE LAST FIELD IN RECORD!! */
809
} Tcl_HashEntry;
807
} Tcl_HashEntry;
810
 
808
 
811
/*
809
/*
812
 * Structure definition for a hash table.  Must be in tcl.h so clients
810
 * Structure definition for a hash table.  Must be in tcl.h so clients
813
 * can allocate space for these structures, but clients should never
811
 * can allocate space for these structures, but clients should never
814
 * access any fields in this structure.
812
 * access any fields in this structure.
815
 */
813
 */
816
 
814
 
817
#define TCL_SMALL_HASH_TABLE 4
815
#define TCL_SMALL_HASH_TABLE 4
818
typedef struct Tcl_HashTable
816
typedef struct Tcl_HashTable {
819
{
-
 
820
        Tcl_HashEntry **buckets; /* Pointer to bucket array.  Each
817
    Tcl_HashEntry **buckets;            /* Pointer to bucket array.  Each
821
                                  * element points to first entry in
818
                                         * element points to first entry in
822
                                  * bucket's hash chain, or NULL. */
819
                                         * bucket's hash chain, or NULL. */
823
        Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
820
    Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
824
        /* Bucket array used for small tables
821
                                        /* Bucket array used for small tables
825
         * (to avoid mallocs and frees). */
822
                                         * (to avoid mallocs and frees). */
826
        int numBuckets;  /* Total number of buckets allocated
823
    int numBuckets;                     /* Total number of buckets allocated
827
                          * at **bucketPtr. */
824
                                         * at **bucketPtr. */
828
        int numEntries;  /* Total number of entries present
825
    int numEntries;                     /* Total number of entries present
829
                          * in table. */
826
                                         * in table. */
830
        int rebuildSize; /* Enlarge table when numEntries gets
827
    int rebuildSize;                    /* Enlarge table when numEntries gets
831
                          * to be this large. */
828
                                         * to be this large. */
832
        int downShift;   /* Shift count used in hashing
829
    int downShift;                      /* Shift count used in hashing
833
                          * function.  Designed to use high-
830
                                         * function.  Designed to use high-
834
                          * order bits of randomized keys. */
831
                                         * order bits of randomized keys. */
835
        int mask;        /* Mask value used in hashing
832
    int mask;                           /* Mask value used in hashing
836
                          * function. */
833
                                         * function. */
837
        int keyType;     /* Type of keys used in this table.
834
    int keyType;                        /* Type of keys used in this table.
838
                          * It's either TCL_STRING_KEYS,
835
                                         * It's either TCL_STRING_KEYS,
839
                          * TCL_ONE_WORD_KEYS, or an integer
836
                                         * TCL_ONE_WORD_KEYS, or an integer
840
                          * giving the number of ints that
837
                                         * giving the number of ints that
841
                          * is the size of the key.
838
                                         * is the size of the key.
842
                          */
839
                                         */
843
        Tcl_HashEntry *(*findProc)
840
    Tcl_HashEntry *(*findProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
844
            _ANSI_ARGS_ ((struct Tcl_HashTable * tablePtr, CONST char *key));
841
            CONST char *key));
845
        Tcl_HashEntry *(*createProc)
842
    Tcl_HashEntry *(*createProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
846
            _ANSI_ARGS_ ((struct Tcl_HashTable * tablePtr, CONST char *key, int *newPtr));
843
            CONST char *key, int *newPtr));
847
} Tcl_HashTable;
844
} Tcl_HashTable;
848
 
845
 
849
/*
846
/*
850
 * Structure definition for information used to keep track of searches
847
 * Structure definition for information used to keep track of searches
851
 * through hash tables:
848
 * through hash tables:
852
 */
849
 */
853
 
850
 
854
typedef struct Tcl_HashSearch
851
typedef struct Tcl_HashSearch {
855
{
-
 
856
        Tcl_HashTable *tablePtr;     /* Table being searched. */
852
    Tcl_HashTable *tablePtr;            /* Table being searched. */
857
        int nextIndex;               /* Index of next bucket to be
853
    int nextIndex;                      /* Index of next bucket to be
858
                                      * enumerated after present one. */
854
                                         * enumerated after present one. */
859
        Tcl_HashEntry *nextEntryPtr; /* Next entry to be enumerated in the
855
    Tcl_HashEntry *nextEntryPtr;        /* Next entry to be enumerated in the
860
                                      * the current bucket. */
856
                                         * the current bucket. */
861
} Tcl_HashSearch;
857
} Tcl_HashSearch;
862
 
858
 
863
/*
859
/*
864
 * Acceptable key types for hash tables:
860
 * Acceptable key types for hash tables:
865
 */
861
 */
866
 
862
 
867
#define TCL_STRING_KEYS 0
863
#define TCL_STRING_KEYS         0
868
#define TCL_ONE_WORD_KEYS 1
864
#define TCL_ONE_WORD_KEYS       1
869
 
865
 
870
/*
866
/*
871
 * Macros for clients to use to access fields of hash entries:
867
 * Macros for clients to use to access fields of hash entries:
872
 */
868
 */
873
 
869
 
874
#define Tcl_GetHashValue(h) ((h)->clientData)
870
#define Tcl_GetHashValue(h) ((h)->clientData)
875
#define Tcl_SetHashValue(h, value) ((h)->clientData = (ClientData) (value))
871
#define Tcl_SetHashValue(h, value) ((h)->clientData = (ClientData) (value))
876
#define Tcl_GetHashKey(tablePtr, h)                                                           \
872
#define Tcl_GetHashKey(tablePtr, h) \
877
        ((char                                                                                \
-
 
878
              *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS) ? (h)->key.oneWordValue : (h)->key.string))
873
    ((char *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS) ? (h)->key.oneWordValue \
-
 
874
                                                : (h)->key.string))
879
 
875
 
880
/*
876
/*
881
 * Macros to use for clients to use to invoke find and create procedures
877
 * Macros to use for clients to use to invoke find and create procedures
882
 * for hash tables:
878
 * for hash tables:
883
 */
879
 */
884
 
880
 
885
#define Tcl_FindHashEntry(tablePtr, key) (*((tablePtr)->findProc)) (tablePtr, key)
881
#define Tcl_FindHashEntry(tablePtr, key) \
-
 
882
        (*((tablePtr)->findProc))(tablePtr, key)
886
#define Tcl_CreateHashEntry(tablePtr, key, newPtr)                                            \
883
#define Tcl_CreateHashEntry(tablePtr, key, newPtr) \
887
        (*((tablePtr)->createProc)) (tablePtr, key, newPtr)
884
        (*((tablePtr)->createProc))(tablePtr, key, newPtr)
888
 
885
 
889
/*
886
/*
890
 * Flag values to pass to Tcl_DoOneEvent to disable searches
887
 * Flag values to pass to Tcl_DoOneEvent to disable searches
891
 * for some kinds of events:
888
 * for some kinds of events:
892
 */
889
 */
893
 
890
 
894
#define TCL_DONT_WAIT (1 << 1)
891
#define TCL_DONT_WAIT           (1<<1)
895
#define TCL_WINDOW_EVENTS (1 << 2)
892
#define TCL_WINDOW_EVENTS       (1<<2)
896
#define TCL_FILE_EVENTS (1 << 3)
893
#define TCL_FILE_EVENTS         (1<<3)
897
#define TCL_TIMER_EVENTS (1 << 4)
894
#define TCL_TIMER_EVENTS        (1<<4)
898
#define TCL_IDLE_EVENTS (1 << 5) /* WAS 0x10 ???? */
895
#define TCL_IDLE_EVENTS         (1<<5)  /* WAS 0x10 ???? */
899
#define TCL_ALL_EVENTS (~TCL_DONT_WAIT)
896
#define TCL_ALL_EVENTS          (~TCL_DONT_WAIT)
900
 
897
 
901
/*
898
/*
902
 * The following structure defines a generic event for the Tcl event
899
 * The following structure defines a generic event for the Tcl event
903
 * system.  These are the things that are queued in calls to Tcl_QueueEvent
900
 * system.  These are the things that are queued in calls to Tcl_QueueEvent
904
 * and serviced later by Tcl_DoOneEvent.  There can be many different
901
 * and serviced later by Tcl_DoOneEvent.  There can be many different
Line 906... Line 903...
906
 * timer events, etc.  The structure for a particular event consists of
903
 * timer events, etc.  The structure for a particular event consists of
907
 * a Tcl_Event header followed by additional information specific to that
904
 * a Tcl_Event header followed by additional information specific to that
908
 * event.
905
 * event.
909
 */
906
 */
910
 
907
 
911
struct Tcl_Event
908
struct Tcl_Event {
912
{
-
 
913
        Tcl_EventProc *proc;       /* Procedure to call to service this event. */
909
    Tcl_EventProc *proc;        /* Procedure to call to service this event. */
914
        struct Tcl_Event *nextPtr; /* Next in list of pending events, or NULL. */
910
    struct Tcl_Event *nextPtr;  /* Next in list of pending events, or NULL. */
915
};
911
};
916
 
912
 
917
/*
913
/*
918
 * Positions to pass to Tcl_QueueEvent:
914
 * Positions to pass to Tcl_QueueEvent:
919
 */
915
 */
920
 
916
 
921
typedef enum
917
typedef enum {
922
{
-
 
923
        TCL_QUEUE_TAIL,
-
 
924
        TCL_QUEUE_HEAD,
918
    TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, TCL_QUEUE_MARK
925
        TCL_QUEUE_MARK
-
 
926
} Tcl_QueuePosition;
919
} Tcl_QueuePosition;
927
 
920
 
928
/*
921
/*
929
 * Values to pass to Tcl_SetServiceMode to specify the behavior of notifier
922
 * Values to pass to Tcl_SetServiceMode to specify the behavior of notifier
930
 * event routines.
923
 * event routines.
Line 938... Line 931...
938
 * an absolute time (the number of seconds from the epoch) or as an
931
 * an absolute time (the number of seconds from the epoch) or as an
939
 * elapsed time. On Unix systems the epoch is Midnight Jan 1, 1970 GMT.
932
 * elapsed time. On Unix systems the epoch is Midnight Jan 1, 1970 GMT.
940
 * On Macintosh systems the epoch is Midnight Jan 1, 1904 GMT.
933
 * On Macintosh systems the epoch is Midnight Jan 1, 1904 GMT.
941
 */
934
 */
942
 
935
 
943
typedef struct Tcl_Time
936
typedef struct Tcl_Time {
944
{
-
 
945
        long sec;  /* Seconds. */
937
    long sec;                   /* Seconds. */
946
        long usec; /* Microseconds. */
938
    long usec;                  /* Microseconds. */
947
} Tcl_Time;
939
} Tcl_Time;
948
 
940
 
949
/*
941
/*
950
 * Bits to pass to Tcl_CreateFileHandler and Tcl_CreateChannelHandler
942
 * Bits to pass to Tcl_CreateFileHandler and Tcl_CreateChannelHandler
951
 * to indicate what sorts of events are of interest:
943
 * to indicate what sorts of events are of interest:
952
 */
944
 */
953
 
945
 
954
#define TCL_READABLE (1 << 1)
946
#define TCL_READABLE    (1<<1)
955
#define TCL_WRITABLE (1 << 2)
947
#define TCL_WRITABLE    (1<<2)
956
#define TCL_EXCEPTION (1 << 3)
948
#define TCL_EXCEPTION   (1<<3)
957
 
949
 
958
/*
950
/*
959
 * Flag values to pass to Tcl_OpenCommandChannel to indicate the
951
 * Flag values to pass to Tcl_OpenCommandChannel to indicate the
960
 * disposition of the stdio handles.  TCL_STDIN, TCL_STDOUT, TCL_STDERR,
952
 * disposition of the stdio handles.  TCL_STDIN, TCL_STDOUT, TCL_STDERR,
961
 * are also used in Tcl_GetStdChannel.
953
 * are also used in Tcl_GetStdChannel.
962
 */
954
 */
963
 
955
 
964
#define TCL_STDIN (1 << 1)
956
#define TCL_STDIN               (1<<1)  
965
#define TCL_STDOUT (1 << 2)
957
#define TCL_STDOUT              (1<<2)
966
#define TCL_STDERR (1 << 3)
958
#define TCL_STDERR              (1<<3)
967
#define TCL_ENFORCE_MODE (1 << 4)
959
#define TCL_ENFORCE_MODE        (1<<4)
968
 
960
 
969
/*
961
/*
970
 * Typedefs for the various operations in a channel type:
962
 * Typedefs for the various operations in a channel type:
971
 */
963
 */
972
 
964
 
973
typedef int(Tcl_DriverBlockModeProc) _ANSI_ARGS_ ((ClientData instanceData, int mode));
965
typedef int     (Tcl_DriverBlockModeProc) _ANSI_ARGS_((
-
 
966
                    ClientData instanceData, int mode));
974
typedef int(Tcl_DriverCloseProc) _ANSI_ARGS_ ((ClientData instanceData, Tcl_Interp *interp));
967
typedef int     (Tcl_DriverCloseProc) _ANSI_ARGS_((ClientData instanceData,
-
 
968
                    Tcl_Interp *interp));
975
typedef int(Tcl_DriverInputProc)
969
typedef int     (Tcl_DriverInputProc) _ANSI_ARGS_((ClientData instanceData,
976
    _ANSI_ARGS_ ((ClientData instanceData, char *buf, int toRead, int *errorCodePtr));
970
                    char *buf, int toRead, int *errorCodePtr));
977
typedef int(Tcl_DriverOutputProc)
971
typedef int     (Tcl_DriverOutputProc) _ANSI_ARGS_((ClientData instanceData,
978
    _ANSI_ARGS_ ((ClientData instanceData, char *buf, int toWrite, int *errorCodePtr));
972
                    char *buf, int toWrite, int *errorCodePtr));
979
typedef int(Tcl_DriverSeekProc)
973
typedef int     (Tcl_DriverSeekProc) _ANSI_ARGS_((ClientData instanceData,
980
    _ANSI_ARGS_ ((ClientData instanceData, long offset, int mode, int *errorCodePtr));
974
                    long offset, int mode, int *errorCodePtr));
981
typedef int(Tcl_DriverSetOptionProc)
975
typedef int     (Tcl_DriverSetOptionProc) _ANSI_ARGS_((
982
    _ANSI_ARGS_ ((ClientData instanceData, Tcl_Interp *interp, char *optionName, char *value));
976
                    ClientData instanceData, Tcl_Interp *interp,
-
 
977
                    char *optionName, char *value));
983
typedef int(Tcl_DriverGetOptionProc) _ANSI_ARGS_ (
978
typedef int     (Tcl_DriverGetOptionProc) _ANSI_ARGS_((
984
    (ClientData instanceData, Tcl_Interp *interp, char *optionName, Tcl_DString *dsPtr));
979
                    ClientData instanceData, Tcl_Interp *interp,
-
 
980
                    char *optionName, Tcl_DString *dsPtr));
985
typedef void(Tcl_DriverWatchProc) _ANSI_ARGS_ ((ClientData instanceData, int mask));
981
typedef void    (Tcl_DriverWatchProc) _ANSI_ARGS_((
-
 
982
                    ClientData instanceData, int mask));
986
typedef int(Tcl_DriverGetHandleProc)
983
typedef int     (Tcl_DriverGetHandleProc) _ANSI_ARGS_((
987
    _ANSI_ARGS_ ((ClientData instanceData, int direction, ClientData *handlePtr));
984
                    ClientData instanceData, int direction,
-
 
985
                    ClientData *handlePtr));
988
 
986
 
989
/*
987
/*
990
 * Enum for different end of line translation and recognition modes.
988
 * Enum for different end of line translation and recognition modes.
991
 */
989
 */
992
 
990
 
993
typedef enum Tcl_EolTranslation
991
typedef enum Tcl_EolTranslation {
994
{
-
 
995
        TCL_TRANSLATE_AUTO, /* Eol == \r, \n and \r\n. */
992
    TCL_TRANSLATE_AUTO,                 /* Eol == \r, \n and \r\n. */
996
        TCL_TRANSLATE_CR,   /* Eol == \r. */
993
    TCL_TRANSLATE_CR,                   /* Eol == \r. */
997
        TCL_TRANSLATE_LF,   /* Eol == \n. */
994
    TCL_TRANSLATE_LF,                   /* Eol == \n. */
998
        TCL_TRANSLATE_CRLF  /* Eol == \r\n. */
995
    TCL_TRANSLATE_CRLF                  /* Eol == \r\n. */
999
} Tcl_EolTranslation;
996
} Tcl_EolTranslation;
1000
 
997
 
1001
/*
998
/*
1002
 * struct Tcl_ChannelType:
999
 * struct Tcl_ChannelType:
1003
 *
1000
 *
1004
 * One such structure exists for each type (kind) of channel.
1001
 * One such structure exists for each type (kind) of channel.
1005
 * It collects together in one place all the functions that are
1002
 * It collects together in one place all the functions that are
1006
 * part of the specific channel type.
1003
 * part of the specific channel type.
1007
 */
1004
 */
1008
 
1005
 
1009
typedef struct Tcl_ChannelType
1006
typedef struct Tcl_ChannelType {
1010
{
-
 
1011
        char *typeName; /* The name of the channel type in Tcl
1007
    char *typeName;                     /* The name of the channel type in Tcl
1012
                         * commands. This storage is owned by
1008
                                         * commands. This storage is owned by
1013
                         * channel type. */
1009
                                         * channel type. */
1014
        Tcl_DriverBlockModeProc *blockModeProc;
1010
    Tcl_DriverBlockModeProc *blockModeProc;
1015
        /* Set blocking mode for the
1011
                                        /* Set blocking mode for the
1016
         * raw channel. May be NULL. */
1012
                                         * raw channel. May be NULL. */
1017
        Tcl_DriverCloseProc *closeProc;   /* Procedure to call to close
1013
    Tcl_DriverCloseProc *closeProc;     /* Procedure to call to close
1018
                                           * the channel. */
1014
                                         * the channel. */
1019
        Tcl_DriverInputProc *inputProc;   /* Procedure to call for input
1015
    Tcl_DriverInputProc *inputProc;     /* Procedure to call for input
1020
                                           * on channel. */
1016
                                         * on channel. */
1021
        Tcl_DriverOutputProc *outputProc; /* Procedure to call for output
1017
    Tcl_DriverOutputProc *outputProc;   /* Procedure to call for output
1022
                                           * on channel. */
1018
                                         * on channel. */
1023
        Tcl_DriverSeekProc *seekProc;     /* Procedure to call to seek
1019
    Tcl_DriverSeekProc *seekProc;       /* Procedure to call to seek
1024
                                           * on the channel. May be NULL. */
1020
                                         * on the channel. May be NULL. */
1025
        Tcl_DriverSetOptionProc *setOptionProc;
1021
    Tcl_DriverSetOptionProc *setOptionProc;
1026
        /* Set an option on a channel. */
1022
                                        /* Set an option on a channel. */
1027
        Tcl_DriverGetOptionProc *getOptionProc;
1023
    Tcl_DriverGetOptionProc *getOptionProc;
1028
        /* Get an option from a channel. */
1024
                                        /* Get an option from a channel. */
1029
        Tcl_DriverWatchProc *watchProc; /* Set up the notifier to watch
1025
    Tcl_DriverWatchProc *watchProc;     /* Set up the notifier to watch
1030
                                         * for events on this channel. */
1026
                                         * for events on this channel. */
1031
        Tcl_DriverGetHandleProc *getHandleProc;
1027
    Tcl_DriverGetHandleProc *getHandleProc;
1032
        /* Get an OS handle from the channel
1028
                                        /* Get an OS handle from the channel
1033
         * or NULL if not supported. */
1029
                                         * or NULL if not supported. */
1034
        VOID *reserved; /* reserved for future expansion */
1030
    VOID *reserved;                     /* reserved for future expansion */
1035
} Tcl_ChannelType;
1031
} Tcl_ChannelType;
1036
 
1032
 
1037
/*
1033
/*
1038
 * The following flags determine whether the blockModeProc above should
1034
 * The following flags determine whether the blockModeProc above should
1039
 * set the channel into blocking or nonblocking mode. They are passed
1035
 * set the channel into blocking or nonblocking mode. They are passed
1040
 * as arguments to the blockModeProc procedure in the above structure.
1036
 * as arguments to the blockModeProc procedure in the above structure.
1041
 */
1037
 */
1042
 
1038
 
1043
#define TCL_MODE_BLOCKING 0 /* Put channel into blocking mode. */
1039
#define TCL_MODE_BLOCKING 0             /* Put channel into blocking mode. */
1044
#define TCL_MODE_NONBLOCKING                                                                  \
1040
#define TCL_MODE_NONBLOCKING 1          /* Put channel into nonblocking
1045
        1 /* Put channel into nonblocking                                                     \
-
 
1046
           * mode. */
1041
                                         * mode. */
1047
 
1042
 
1048
/*
1043
/*
1049
 * Enum for different types of file paths.
1044
 * Enum for different types of file paths.
1050
 */
1045
 */
1051
 
1046
 
1052
typedef enum Tcl_PathType
1047
typedef enum Tcl_PathType {
1053
{
-
 
1054
        TCL_PATH_ABSOLUTE,
1048
    TCL_PATH_ABSOLUTE,
1055
        TCL_PATH_RELATIVE,
1049
    TCL_PATH_RELATIVE,
1056
        TCL_PATH_VOLUME_RELATIVE
1050
    TCL_PATH_VOLUME_RELATIVE
1057
} Tcl_PathType;
1051
} Tcl_PathType;
1058
 
1052
 
1059
/*
1053
/*
1060
 * Exported Tcl procedures:
1054
 * Exported Tcl procedures:
1061
 */
1055
 */
1062
 
1056
 
1063
EXTERN void Tcl_AddErrorInfo _ANSI_ARGS_ ((Tcl_Interp * interp, char *message));
1057
EXTERN void             Tcl_AddErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1058
                            char *message));
1064
EXTERN void Tcl_AddObjErrorInfo _ANSI_ARGS_ ((Tcl_Interp * interp, char *message, int length));
1059
EXTERN void             Tcl_AddObjErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1060
                            char *message, int length));
1065
EXTERN void Tcl_AllowExceptions _ANSI_ARGS_ ((Tcl_Interp * interp));
1061
EXTERN void             Tcl_AllowExceptions _ANSI_ARGS_((Tcl_Interp *interp));
1066
EXTERN int Tcl_AppendAllObjTypes _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *objPtr));
1062
EXTERN int              Tcl_AppendAllObjTypes _ANSI_ARGS_((
-
 
1063
                            Tcl_Interp *interp, Tcl_Obj *objPtr));
1067
EXTERN void Tcl_AppendElement _ANSI_ARGS_ ((Tcl_Interp * interp, char *string));
1064
EXTERN void             Tcl_AppendElement _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1065
                            char *string));
1068
EXTERN void Tcl_AppendResult _ANSI_ARGS_ (TCL_VARARGS (Tcl_Interp *, interp));
1066
EXTERN void             Tcl_AppendResult _ANSI_ARGS_(
-
 
1067
                            TCL_VARARGS(Tcl_Interp *,interp));
1069
EXTERN void Tcl_AppendToObj _ANSI_ARGS_ ((Tcl_Obj * objPtr, char *bytes, int length));
1068
EXTERN void             Tcl_AppendToObj _ANSI_ARGS_((Tcl_Obj *objPtr,
-
 
1069
                            char *bytes, int length));
1070
EXTERN void Tcl_AppendStringsToObj _ANSI_ARGS_ (TCL_VARARGS (Tcl_Obj *, interp));
1070
EXTERN void             Tcl_AppendStringsToObj _ANSI_ARGS_(
-
 
1071
                            TCL_VARARGS(Tcl_Obj *,interp));
1071
EXTERN int Tcl_AppInit _ANSI_ARGS_ ((Tcl_Interp * interp));
1072
EXTERN int              Tcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp));
1072
EXTERN Tcl_AsyncHandler Tcl_AsyncCreate
1073
EXTERN Tcl_AsyncHandler Tcl_AsyncCreate _ANSI_ARGS_((Tcl_AsyncProc *proc,
1073
    _ANSI_ARGS_ ((Tcl_AsyncProc * proc, ClientData clientData));
1074
                            ClientData clientData));
1074
EXTERN void Tcl_AsyncDelete _ANSI_ARGS_ ((Tcl_AsyncHandler async));
1075
EXTERN void             Tcl_AsyncDelete _ANSI_ARGS_((Tcl_AsyncHandler async));
1075
EXTERN int Tcl_AsyncInvoke _ANSI_ARGS_ ((Tcl_Interp * interp, int code));
1076
EXTERN int              Tcl_AsyncInvoke _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1077
                            int code));
1076
EXTERN void Tcl_AsyncMark _ANSI_ARGS_ ((Tcl_AsyncHandler async));
1078
EXTERN void             Tcl_AsyncMark _ANSI_ARGS_((Tcl_AsyncHandler async));
1077
EXTERN int Tcl_AsyncReady _ANSI_ARGS_ ((void) );
1079
EXTERN int              Tcl_AsyncReady _ANSI_ARGS_((void));
1078
EXTERN void Tcl_BackgroundError _ANSI_ARGS_ ((Tcl_Interp * interp));
1080
EXTERN void             Tcl_BackgroundError _ANSI_ARGS_((Tcl_Interp *interp));
1079
EXTERN char Tcl_Backslash _ANSI_ARGS_ ((CONST char *src, int *readPtr));
1081
EXTERN char             Tcl_Backslash _ANSI_ARGS_((CONST char *src,
-
 
1082
                            int *readPtr));
1080
EXTERN int Tcl_BadChannelOption
1083
EXTERN int              Tcl_BadChannelOption _ANSI_ARGS_((Tcl_Interp *interp,
1081
    _ANSI_ARGS_ ((Tcl_Interp * interp, char *optionName, char *optionList));
1084
                            char *optionName, char *optionList));
1082
EXTERN void Tcl_CallWhenDeleted
1085
EXTERN void             Tcl_CallWhenDeleted _ANSI_ARGS_((Tcl_Interp *interp,
1083
    _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_InterpDeleteProc *proc, ClientData clientData));
1086
                            Tcl_InterpDeleteProc *proc,
-
 
1087
                            ClientData clientData));
1084
EXTERN void Tcl_CancelIdleCall _ANSI_ARGS_ ((Tcl_IdleProc * idleProc, ClientData clientData));
1088
EXTERN void             Tcl_CancelIdleCall _ANSI_ARGS_((Tcl_IdleProc *idleProc,
-
 
1089
                            ClientData clientData));
1085
#define Tcl_Ckalloc Tcl_Alloc
1090
#define Tcl_Ckalloc Tcl_Alloc
1086
#define Tcl_Ckfree Tcl_Free
1091
#define Tcl_Ckfree Tcl_Free
1087
#define Tcl_Ckrealloc Tcl_Realloc
1092
#define Tcl_Ckrealloc Tcl_Realloc
1088
EXTERN int Tcl_Close _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Channel chan));
1093
EXTERN int              Tcl_Close _ANSI_ARGS_((Tcl_Interp *interp,
1089
EXTERN int Tcl_CommandComplete _ANSI_ARGS_ ((char *cmd));
1094
                            Tcl_Channel chan));
1090
EXTERN char *Tcl_Concat _ANSI_ARGS_ ((int argc, char **argv));
1095
EXTERN int              Tcl_CommandComplete _ANSI_ARGS_((char *cmd));
1091
EXTERN Tcl_Obj *Tcl_ConcatObj _ANSI_ARGS_ ((int objc, Tcl_Obj *CONST objv[]));
1096
EXTERN char *           Tcl_Concat _ANSI_ARGS_((int argc, char **argv));
1092
EXTERN int Tcl_ConvertCountedElement
1097
EXTERN Tcl_Obj *        Tcl_ConcatObj _ANSI_ARGS_((int objc,
1093
    _ANSI_ARGS_ ((CONST char *src, int length, char *dst, int flags));
1098
                            Tcl_Obj *CONST objv[]));
1094
EXTERN int Tcl_ConvertElement _ANSI_ARGS_ ((CONST char *src, char *dst, int flags));
1099
EXTERN int              Tcl_ConvertCountedElement _ANSI_ARGS_((CONST char *src,
1095
EXTERN int Tcl_ConvertToType
1100
                            int length, char *dst, int flags));
1096
    _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *objPtr, Tcl_ObjType *typePtr));
1101
EXTERN int              Tcl_ConvertElement _ANSI_ARGS_((CONST char *src,
1097
EXTERN int Tcl_CreateAlias _ANSI_ARGS_ (
1102
                            char *dst, int flags));
1098
    (Tcl_Interp * slave,
1103
EXTERN int              Tcl_ConvertToType _ANSI_ARGS_((Tcl_Interp *interp,
1099
     char *slaveCmd,
1104
                            Tcl_Obj *objPtr, Tcl_ObjType *typePtr));
1100
     Tcl_Interp *target,
1105
EXTERN int              Tcl_CreateAlias _ANSI_ARGS_((Tcl_Interp *slave,
1101
     char *targetCmd,
1106
                            char *slaveCmd, Tcl_Interp *target,
1102
     int argc,
1107
                            char *targetCmd, int argc, char **argv));
1103
     char **argv));
1108
EXTERN int              Tcl_CreateAliasObj _ANSI_ARGS_((Tcl_Interp *slave,
1104
EXTERN int Tcl_CreateAliasObj _ANSI_ARGS_ (
1109
                            char *slaveCmd, Tcl_Interp *target,
1105
    (Tcl_Interp * slave,
1110
                            char *targetCmd, int objc,
1106
     char *slaveCmd,
1111
                            Tcl_Obj *CONST objv[]));
1107
     Tcl_Interp *target,
1112
EXTERN Tcl_Channel      Tcl_CreateChannel _ANSI_ARGS_((
1108
     char *targetCmd,
1113
                            Tcl_ChannelType *typePtr, char *chanName,
1109
     int objc,
1114
                            ClientData instanceData, int mask));
1110
     Tcl_Obj *CONST objv[]));
1115
EXTERN void             Tcl_CreateChannelHandler _ANSI_ARGS_((
1111
EXTERN Tcl_Channel Tcl_CreateChannel _ANSI_ARGS_ (
1116
                            Tcl_Channel chan, int mask,
1112
    (Tcl_ChannelType * typePtr, char *chanName, ClientData instanceData, int mask));
1117
                            Tcl_ChannelProc *proc, ClientData clientData));
1113
EXTERN void Tcl_CreateChannelHandler
1118
EXTERN void             Tcl_CreateCloseHandler _ANSI_ARGS_((
1114
    _ANSI_ARGS_ ((Tcl_Channel chan, int mask, Tcl_ChannelProc *proc, ClientData clientData));
1119
                            Tcl_Channel chan, Tcl_CloseProc *proc,
1115
EXTERN void Tcl_CreateCloseHandler
1120
                            ClientData clientData));
1116
    _ANSI_ARGS_ ((Tcl_Channel chan, Tcl_CloseProc *proc, ClientData clientData));
1121
EXTERN Tcl_Command      Tcl_CreateCommand _ANSI_ARGS_((Tcl_Interp *interp,
1117
EXTERN Tcl_Command Tcl_CreateCommand _ANSI_ARGS_ (
1122
                            char *cmdName, Tcl_CmdProc *proc,
1118
    (Tcl_Interp * interp,
1123
                            ClientData clientData,
1119
     char *cmdName,
1124
                            Tcl_CmdDeleteProc *deleteProc));
1120
     Tcl_CmdProc *proc,
1125
EXTERN void             Tcl_CreateEventSource _ANSI_ARGS_((
1121
     ClientData clientData,
1126
                            Tcl_EventSetupProc *setupProc,
1122
     Tcl_CmdDeleteProc *deleteProc));
1127
                            Tcl_EventCheckProc *checkProc,
1123
EXTERN void Tcl_CreateEventSource _ANSI_ARGS_ (
1128
                            ClientData clientData));
1124
    (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc *checkProc, ClientData clientData));
1129
EXTERN void             Tcl_CreateExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
1125
EXTERN void Tcl_CreateExitHandler _ANSI_ARGS_ ((Tcl_ExitProc * proc, ClientData clientData));
1130
                            ClientData clientData));
1126
EXTERN void Tcl_CreateFileHandler
1131
EXTERN void             Tcl_CreateFileHandler _ANSI_ARGS_((
1127
    _ANSI_ARGS_ ((int fd, int mask, Tcl_FileProc *proc, ClientData clientData));
1132
                            int fd, int mask, Tcl_FileProc *proc,
1128
EXTERN Tcl_Interp *Tcl_CreateInterp _ANSI_ARGS_ ((void) );
1133
                            ClientData clientData));
1129
EXTERN void Tcl_CreateMathFunc _ANSI_ARGS_ (
1134
EXTERN Tcl_Interp *     Tcl_CreateInterp _ANSI_ARGS_((void));
1130
    (Tcl_Interp * interp,
1135
EXTERN void             Tcl_CreateMathFunc _ANSI_ARGS_((Tcl_Interp *interp,
1131
     char *name,
1136
                            char *name, int numArgs, Tcl_ValueType *argTypes,
1132
     int numArgs,
1137
                            Tcl_MathProc *proc, ClientData clientData));
1133
     Tcl_ValueType *argTypes,
1138
EXTERN Tcl_Command      Tcl_CreateObjCommand _ANSI_ARGS_((
1134
     Tcl_MathProc *proc,
1139
                            Tcl_Interp *interp, char *cmdName,
1135
     ClientData clientData));
1140
                            Tcl_ObjCmdProc *proc, ClientData clientData,
1136
EXTERN Tcl_Command Tcl_CreateObjCommand _ANSI_ARGS_ (
1141
                            Tcl_CmdDeleteProc *deleteProc));
1137
    (Tcl_Interp * interp,
1142
EXTERN Tcl_Interp *     Tcl_CreateSlave _ANSI_ARGS_((Tcl_Interp *interp,
1138
     char *cmdName,
1143
                            char *slaveName, int isSafe));
1139
     Tcl_ObjCmdProc *proc,
1144
EXTERN Tcl_TimerToken   Tcl_CreateTimerHandler _ANSI_ARGS_((int milliseconds,
1140
     ClientData clientData,
1145
                            Tcl_TimerProc *proc, ClientData clientData));
1141
     Tcl_CmdDeleteProc *deleteProc));
1146
EXTERN Tcl_Trace        Tcl_CreateTrace _ANSI_ARGS_((Tcl_Interp *interp,
1142
EXTERN Tcl_Interp *
1147
                            int level, Tcl_CmdTraceProc *proc,
1143
    Tcl_CreateSlave _ANSI_ARGS_ ((Tcl_Interp * interp, char *slaveName, int isSafe));
1148
                            ClientData clientData));
1144
EXTERN Tcl_TimerToken Tcl_CreateTimerHandler
1149
EXTERN char *           Tcl_DbCkalloc _ANSI_ARGS_((unsigned int size,
1145
    _ANSI_ARGS_ ((int milliseconds, Tcl_TimerProc *proc, ClientData clientData));
1150
                            char *file, int line));
1146
EXTERN Tcl_Trace Tcl_CreateTrace _ANSI_ARGS_ (
1151
EXTERN int              Tcl_DbCkfree _ANSI_ARGS_((char *ptr,
1147
    (Tcl_Interp * interp, int level, Tcl_CmdTraceProc *proc, ClientData clientData));
1152
                            char *file, int line));
1148
EXTERN char *Tcl_DbCkalloc _ANSI_ARGS_ ((unsigned int size, char *file, int line));
1153
EXTERN char *           Tcl_DbCkrealloc _ANSI_ARGS_((char *ptr,
1149
EXTERN int Tcl_DbCkfree _ANSI_ARGS_ ((char *ptr, char *file, int line));
1154
                            unsigned int size, char *file, int line));
1150
EXTERN char *
1155
EXTERN void             Tcl_DbDecrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr,
1151
    Tcl_DbCkrealloc _ANSI_ARGS_ ((char *ptr, unsigned int size, char *file, int line));
1156
                            char *file, int line));
1152
EXTERN void Tcl_DbDecrRefCount _ANSI_ARGS_ ((Tcl_Obj * objPtr, char *file, int line));
1157
EXTERN void             Tcl_DbIncrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr,
1153
EXTERN void Tcl_DbIncrRefCount _ANSI_ARGS_ ((Tcl_Obj * objPtr, char *file, int line));
1158
                            char *file, int line));
1154
EXTERN int Tcl_DbIsShared _ANSI_ARGS_ ((Tcl_Obj * objPtr, char *file, int line));
1159
EXTERN int              Tcl_DbIsShared _ANSI_ARGS_((Tcl_Obj *objPtr,
1155
EXTERN Tcl_Obj *Tcl_DbNewBooleanObj _ANSI_ARGS_ ((int boolValue, char *file, int line));
1160
                            char *file, int line));
1156
EXTERN Tcl_Obj *Tcl_DbNewDoubleObj _ANSI_ARGS_ ((double doubleValue, char *file, int line));
1161
EXTERN Tcl_Obj *        Tcl_DbNewBooleanObj _ANSI_ARGS_((int boolValue,
1157
EXTERN Tcl_Obj *
1162
                            char *file, int line));
1158
    Tcl_DbNewListObj _ANSI_ARGS_ ((int objc, Tcl_Obj *CONST objv[], char *file, int line));
1163
EXTERN Tcl_Obj *        Tcl_DbNewDoubleObj _ANSI_ARGS_((double doubleValue,
1159
EXTERN Tcl_Obj *Tcl_DbNewLongObj _ANSI_ARGS_ ((long longValue, char *file, int line));
1164
                            char *file, int line));
1160
EXTERN Tcl_Obj *Tcl_DbNewObj _ANSI_ARGS_ ((char *file, int line));
1165
EXTERN Tcl_Obj *        Tcl_DbNewListObj _ANSI_ARGS_((int objc,
1161
EXTERN Tcl_Obj *
1166
                            Tcl_Obj *CONST objv[], char *file, int line));
1162
    Tcl_DbNewStringObj _ANSI_ARGS_ ((char *bytes, int length, char *file, int line));
1167
EXTERN Tcl_Obj *        Tcl_DbNewLongObj _ANSI_ARGS_((long longValue,
1163
EXTERN void Tcl_DeleteAssocData _ANSI_ARGS_ ((Tcl_Interp * interp, char *name));
1168
                            char *file, int line));
1164
EXTERN int Tcl_DeleteCommand _ANSI_ARGS_ ((Tcl_Interp * interp, char *cmdName));
1169
EXTERN Tcl_Obj *        Tcl_DbNewObj _ANSI_ARGS_((char *file, int line));
1165
EXTERN int Tcl_DeleteCommandFromToken _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Command command));
1170
EXTERN Tcl_Obj *        Tcl_DbNewStringObj _ANSI_ARGS_((char *bytes,
1166
EXTERN void Tcl_DeleteChannelHandler
1171
                            int length, char *file, int line));
1167
    _ANSI_ARGS_ ((Tcl_Channel chan, Tcl_ChannelProc *proc, ClientData clientData));
1172
EXTERN void             Tcl_DeleteAssocData _ANSI_ARGS_((Tcl_Interp *interp,
1168
EXTERN void Tcl_DeleteCloseHandler
1173
                            char *name));
1169
    _ANSI_ARGS_ ((Tcl_Channel chan, Tcl_CloseProc *proc, ClientData clientData));
1174
EXTERN int              Tcl_DeleteCommand _ANSI_ARGS_((Tcl_Interp *interp,
1170
EXTERN void Tcl_DeleteEvents _ANSI_ARGS_ ((Tcl_EventDeleteProc * proc, ClientData clientData));
1175
                            char *cmdName));
1171
EXTERN void Tcl_DeleteEventSource _ANSI_ARGS_ (
1176
EXTERN int              Tcl_DeleteCommandFromToken _ANSI_ARGS_((
1172
    (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc *checkProc, ClientData clientData));
1177
                            Tcl_Interp *interp, Tcl_Command command));
1173
EXTERN void Tcl_DeleteExitHandler _ANSI_ARGS_ ((Tcl_ExitProc * proc, ClientData clientData));
1178
EXTERN void             Tcl_DeleteChannelHandler _ANSI_ARGS_((
1174
EXTERN void Tcl_DeleteFileHandler _ANSI_ARGS_ ((int fd));
1179
                            Tcl_Channel chan, Tcl_ChannelProc *proc,
1175
EXTERN void Tcl_DeleteHashEntry _ANSI_ARGS_ ((Tcl_HashEntry * entryPtr));
1180
                            ClientData clientData));
1176
EXTERN void Tcl_DeleteHashTable _ANSI_ARGS_ ((Tcl_HashTable * tablePtr));
1181
EXTERN void             Tcl_DeleteCloseHandler _ANSI_ARGS_((
1177
EXTERN void Tcl_DeleteInterp _ANSI_ARGS_ ((Tcl_Interp * interp));
1182
                            Tcl_Channel chan, Tcl_CloseProc *proc,
1178
EXTERN void Tcl_DeleteTimerHandler _ANSI_ARGS_ ((Tcl_TimerToken token));
1183
                            ClientData clientData));
1179
EXTERN void Tcl_DeleteTrace _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Trace trace));
1184
EXTERN void             Tcl_DeleteEvents _ANSI_ARGS_((
1180
EXTERN void Tcl_DetachPids _ANSI_ARGS_ ((int numPids, Tcl_Pid *pidPtr));
1185
                            Tcl_EventDeleteProc *proc,
1181
EXTERN void Tcl_DontCallWhenDeleted
1186
                            ClientData clientData));
1182
    _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_InterpDeleteProc *proc, ClientData clientData));
1187
EXTERN void             Tcl_DeleteEventSource _ANSI_ARGS_((
1183
EXTERN int Tcl_DoOneEvent _ANSI_ARGS_ ((int flags));
1188
                            Tcl_EventSetupProc *setupProc,
1184
EXTERN void Tcl_DoWhenIdle _ANSI_ARGS_ ((Tcl_IdleProc * proc, ClientData clientData));
1189
                            Tcl_EventCheckProc *checkProc,
1185
EXTERN char *
1190
                            ClientData clientData));
1186
    Tcl_DStringAppend _ANSI_ARGS_ ((Tcl_DString * dsPtr, CONST char *string, int length));
1191
EXTERN void             Tcl_DeleteExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
1187
EXTERN char *Tcl_DStringAppendElement _ANSI_ARGS_ ((Tcl_DString * dsPtr, CONST char *string));
1192
                            ClientData clientData));
1188
EXTERN void Tcl_DStringEndSublist _ANSI_ARGS_ ((Tcl_DString * dsPtr));
1193
EXTERN void             Tcl_DeleteFileHandler _ANSI_ARGS_((int fd));
1189
EXTERN void Tcl_DStringFree _ANSI_ARGS_ ((Tcl_DString * dsPtr));
1194
EXTERN void             Tcl_DeleteHashEntry _ANSI_ARGS_((
1190
EXTERN void Tcl_DStringGetResult _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_DString *dsPtr));
1195
                            Tcl_HashEntry *entryPtr));
1191
EXTERN void Tcl_DStringInit _ANSI_ARGS_ ((Tcl_DString * dsPtr));
1196
EXTERN void             Tcl_DeleteHashTable _ANSI_ARGS_((
1192
EXTERN void Tcl_DStringResult _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_DString *dsPtr));
1197
                            Tcl_HashTable *tablePtr));
1193
EXTERN void Tcl_DStringSetLength _ANSI_ARGS_ ((Tcl_DString * dsPtr, int length));
1198
EXTERN void             Tcl_DeleteInterp _ANSI_ARGS_((Tcl_Interp *interp));
1194
EXTERN void Tcl_DStringStartSublist _ANSI_ARGS_ ((Tcl_DString * dsPtr));
1199
EXTERN void             Tcl_DeleteTimerHandler _ANSI_ARGS_((
1195
EXTERN Tcl_Obj *Tcl_DuplicateObj _ANSI_ARGS_ ((Tcl_Obj * objPtr));
1200
                            Tcl_TimerToken token));
1196
EXTERN int Tcl_Eof _ANSI_ARGS_ ((Tcl_Channel chan));
1201
EXTERN void             Tcl_DeleteTrace _ANSI_ARGS_((Tcl_Interp *interp,
1197
EXTERN char *Tcl_ErrnoId _ANSI_ARGS_ ((void) );
1202
                            Tcl_Trace trace));
1198
EXTERN char *Tcl_ErrnoMsg _ANSI_ARGS_ ((int err));
1203
EXTERN void             Tcl_DetachPids _ANSI_ARGS_((int numPids, Tcl_Pid *pidPtr));
1199
EXTERN int Tcl_Eval _ANSI_ARGS_ ((Tcl_Interp * interp, char *string));
1204
EXTERN void             Tcl_DontCallWhenDeleted _ANSI_ARGS_((
1200
EXTERN int Tcl_EvalFile _ANSI_ARGS_ ((Tcl_Interp * interp, char *fileName));
1205
                            Tcl_Interp *interp, Tcl_InterpDeleteProc *proc,
1201
EXTERN void Tcl_EventuallyFree _ANSI_ARGS_ ((ClientData clientData, Tcl_FreeProc *freeProc));
1206
                            ClientData clientData));
1202
EXTERN int Tcl_EvalObj _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *objPtr));
1207
EXTERN int              Tcl_DoOneEvent _ANSI_ARGS_((int flags));
1203
EXTERN void Tcl_Exit _ANSI_ARGS_ ((int status));
1208
EXTERN void             Tcl_DoWhenIdle _ANSI_ARGS_((Tcl_IdleProc *proc,
1204
EXTERN int
1209
                            ClientData clientData));
1205
    Tcl_ExposeCommand _ANSI_ARGS_ ((Tcl_Interp * interp, char *hiddenCmdToken, char *cmdName));
1210
EXTERN char *           Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString *dsPtr,
1206
EXTERN int Tcl_ExprBoolean _ANSI_ARGS_ ((Tcl_Interp * interp, char *string, int *ptr));
1211
                            CONST char *string, int length));
1207
EXTERN int Tcl_ExprBooleanObj _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *objPtr, int *ptr));
1212
EXTERN char *           Tcl_DStringAppendElement _ANSI_ARGS_((
1208
EXTERN int Tcl_ExprDouble _ANSI_ARGS_ ((Tcl_Interp * interp, char *string, double *ptr));
1213
                            Tcl_DString *dsPtr, CONST char *string));
1209
EXTERN int Tcl_ExprDoubleObj _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *objPtr, double *ptr));
1214
EXTERN void             Tcl_DStringEndSublist _ANSI_ARGS_((Tcl_DString *dsPtr));
1210
EXTERN int Tcl_ExprLong _ANSI_ARGS_ ((Tcl_Interp * interp, char *string, long *ptr));
1215
EXTERN void             Tcl_DStringFree _ANSI_ARGS_((Tcl_DString *dsPtr));
1211
EXTERN int Tcl_ExprLongObj _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *objPtr, long *ptr));
1216
EXTERN void             Tcl_DStringGetResult _ANSI_ARGS_((Tcl_Interp *interp,
1212
EXTERN int
1217
                            Tcl_DString *dsPtr));
1213
    Tcl_ExprObj _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *objPtr, Tcl_Obj **resultPtrPtr));
1218
EXTERN void             Tcl_DStringInit _ANSI_ARGS_((Tcl_DString *dsPtr));
1214
EXTERN int Tcl_ExprString _ANSI_ARGS_ ((Tcl_Interp * interp, char *string));
1219
EXTERN void             Tcl_DStringResult _ANSI_ARGS_((Tcl_Interp *interp,
1215
EXTERN void Tcl_Finalize _ANSI_ARGS_ ((void) );
1220
                            Tcl_DString *dsPtr));
1216
EXTERN void Tcl_FindExecutable _ANSI_ARGS_ ((char *argv0));
1221
EXTERN void             Tcl_DStringSetLength _ANSI_ARGS_((Tcl_DString *dsPtr,
1217
EXTERN Tcl_HashEntry *
1222
                            int length));
1218
    Tcl_FirstHashEntry _ANSI_ARGS_ ((Tcl_HashTable * tablePtr, Tcl_HashSearch *searchPtr));
1223
EXTERN void             Tcl_DStringStartSublist _ANSI_ARGS_((
1219
EXTERN int Tcl_Flush _ANSI_ARGS_ ((Tcl_Channel chan));
1224
                            Tcl_DString *dsPtr));
1220
EXTERN void TclFreeObj _ANSI_ARGS_ ((Tcl_Obj * objPtr));
1225
EXTERN Tcl_Obj *        Tcl_DuplicateObj _ANSI_ARGS_((Tcl_Obj *objPtr));
1221
EXTERN void Tcl_FreeResult _ANSI_ARGS_ ((Tcl_Interp * interp));
1226
EXTERN int              Tcl_Eof _ANSI_ARGS_((Tcl_Channel chan));
1222
EXTERN int Tcl_GetAlias _ANSI_ARGS_ (
1227
EXTERN char *           Tcl_ErrnoId _ANSI_ARGS_((void));
1223
    (Tcl_Interp * interp,
1228
EXTERN char *           Tcl_ErrnoMsg _ANSI_ARGS_((int err));
1224
     char *slaveCmd,
1229
EXTERN int              Tcl_Eval _ANSI_ARGS_((Tcl_Interp *interp,
1225
     Tcl_Interp **targetInterpPtr,
1230
                            char *string));
1226
     char **targetCmdPtr,
1231
EXTERN int              Tcl_EvalFile _ANSI_ARGS_((Tcl_Interp *interp,
1227
     int *argcPtr,
1232
                            char *fileName));
1228
     char ***argvPtr));
1233
EXTERN void             Tcl_EventuallyFree _ANSI_ARGS_((ClientData clientData,
1229
EXTERN int Tcl_GetAliasObj _ANSI_ARGS_ (
1234
                            Tcl_FreeProc *freeProc));
1230
    (Tcl_Interp * interp,
1235
EXTERN int              Tcl_EvalObj _ANSI_ARGS_((Tcl_Interp *interp,
1231
     char *slaveCmd,
1236
                            Tcl_Obj *objPtr));
1232
     Tcl_Interp **targetInterpPtr,
1237
EXTERN void             Tcl_Exit _ANSI_ARGS_((int status));
1233
     char **targetCmdPtr,
1238
EXTERN int              Tcl_ExposeCommand _ANSI_ARGS_((Tcl_Interp *interp,
1234
     int *objcPtr,
1239
                            char *hiddenCmdToken, char *cmdName));
1235
     Tcl_Obj ***objv));
1240
EXTERN int              Tcl_ExprBoolean _ANSI_ARGS_((Tcl_Interp *interp,
1236
EXTERN ClientData Tcl_GetAssocData
1241
                            char *string, int *ptr));
1237
    _ANSI_ARGS_ ((Tcl_Interp * interp, char *name, Tcl_InterpDeleteProc **procPtr));
1242
EXTERN int              Tcl_ExprBooleanObj _ANSI_ARGS_((Tcl_Interp *interp,
1238
EXTERN int Tcl_GetBoolean _ANSI_ARGS_ ((Tcl_Interp * interp, char *string, int *boolPtr));
1243
                            Tcl_Obj *objPtr, int *ptr));
1239
EXTERN int
1244
EXTERN int              Tcl_ExprDouble _ANSI_ARGS_((Tcl_Interp *interp,
1240
    Tcl_GetBooleanFromObj _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *objPtr, int *boolPtr));
1245
                            char *string, double *ptr));
1241
EXTERN Tcl_Channel Tcl_GetChannel
1246
EXTERN int              Tcl_ExprDoubleObj _ANSI_ARGS_((Tcl_Interp *interp,
1242
    _ANSI_ARGS_ ((Tcl_Interp * interp, char *chanName, int *modePtr));
1247
                            Tcl_Obj *objPtr, double *ptr));
1243
EXTERN int Tcl_GetChannelBufferSize _ANSI_ARGS_ ((Tcl_Channel chan));
1248
EXTERN int              Tcl_ExprLong _ANSI_ARGS_((Tcl_Interp *interp,
1244
EXTERN int Tcl_GetChannelHandle
1249
                            char *string, long *ptr));
1245
    _ANSI_ARGS_ ((Tcl_Channel chan, int direction, ClientData *handlePtr));
1250
EXTERN int              Tcl_ExprLongObj _ANSI_ARGS_((Tcl_Interp *interp,
1246
EXTERN ClientData Tcl_GetChannelInstanceData _ANSI_ARGS_ ((Tcl_Channel chan));
1251
                            Tcl_Obj *objPtr, long *ptr));
1247
EXTERN int Tcl_GetChannelMode _ANSI_ARGS_ ((Tcl_Channel chan));
1252
EXTERN int              Tcl_ExprObj _ANSI_ARGS_((Tcl_Interp *interp,
1248
EXTERN char *Tcl_GetChannelName _ANSI_ARGS_ ((Tcl_Channel chan));
1253
                            Tcl_Obj *objPtr, Tcl_Obj **resultPtrPtr));
1249
EXTERN int Tcl_GetChannelOption _ANSI_ARGS_ (
1254
EXTERN int              Tcl_ExprString _ANSI_ARGS_((Tcl_Interp *interp,
1250
    (Tcl_Interp * interp, Tcl_Channel chan, char *optionName, Tcl_DString *dsPtr));
1255
                            char *string));
1251
EXTERN Tcl_ChannelType *Tcl_GetChannelType _ANSI_ARGS_ ((Tcl_Channel chan));
1256
EXTERN void             Tcl_Finalize _ANSI_ARGS_((void));
1252
EXTERN int Tcl_GetCommandInfo
1257
EXTERN void             Tcl_FindExecutable _ANSI_ARGS_((char *argv0));
1253
    _ANSI_ARGS_ ((Tcl_Interp * interp, char *cmdName, Tcl_CmdInfo *infoPtr));
1258
EXTERN Tcl_HashEntry *  Tcl_FirstHashEntry _ANSI_ARGS_((
1254
EXTERN char *Tcl_GetCommandName _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Command command));
1259
                            Tcl_HashTable *tablePtr,
1255
EXTERN int Tcl_GetDouble _ANSI_ARGS_ ((Tcl_Interp * interp, char *string, double *doublePtr));
1260
                            Tcl_HashSearch *searchPtr));
1256
EXTERN int Tcl_GetDoubleFromObj
1261
EXTERN int              Tcl_Flush _ANSI_ARGS_((Tcl_Channel chan));
1257
    _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *objPtr, double *doublePtr));
1262
EXTERN void             TclFreeObj _ANSI_ARGS_((Tcl_Obj *objPtr));
1258
EXTERN int Tcl_GetErrno _ANSI_ARGS_ ((void) );
1263
EXTERN void             Tcl_FreeResult _ANSI_ARGS_((Tcl_Interp *interp));
1259
EXTERN char *Tcl_GetHostName _ANSI_ARGS_ ((void) );
1264
EXTERN int              Tcl_GetAlias _ANSI_ARGS_((Tcl_Interp *interp,
1260
EXTERN int Tcl_GetIndexFromObj _ANSI_ARGS_ (
1265
                            char *slaveCmd, Tcl_Interp **targetInterpPtr,
1261
    (Tcl_Interp * interp,
1266
                            char **targetCmdPtr, int *argcPtr,
1262
     Tcl_Obj *objPtr,
1267
                            char ***argvPtr));
1263
     char **tablePtr,
1268
EXTERN int              Tcl_GetAliasObj _ANSI_ARGS_((Tcl_Interp *interp,
1264
     char *msg,
1269
                            char *slaveCmd, Tcl_Interp **targetInterpPtr,
1265
     int flags,
1270
                            char **targetCmdPtr, int *objcPtr,
1266
     int *indexPtr));
1271
                            Tcl_Obj ***objv));
1267
EXTERN int Tcl_GetInt _ANSI_ARGS_ ((Tcl_Interp * interp, char *string, int *intPtr));
1272
EXTERN ClientData       Tcl_GetAssocData _ANSI_ARGS_((Tcl_Interp *interp,
1268
EXTERN int Tcl_GetInterpPath _ANSI_ARGS_ ((Tcl_Interp * askInterp, Tcl_Interp *slaveInterp));
1273
                            char *name, Tcl_InterpDeleteProc **procPtr));
1269
EXTERN int Tcl_GetIntFromObj _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *objPtr, int *intPtr));
1274
EXTERN int              Tcl_GetBoolean _ANSI_ARGS_((Tcl_Interp *interp,
1270
EXTERN int
1275
                            char *string, int *boolPtr));
1271
    Tcl_GetLongFromObj _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *objPtr, long *longPtr));
1276
EXTERN int              Tcl_GetBooleanFromObj _ANSI_ARGS_((
1272
EXTERN Tcl_Interp *Tcl_GetMaster _ANSI_ARGS_ ((Tcl_Interp * interp));
1277
                            Tcl_Interp *interp, Tcl_Obj *objPtr,
1273
EXTERN CONST char *Tcl_GetNameOfExecutable _ANSI_ARGS_ ((void) );
1278
                            int *boolPtr));
1274
EXTERN Tcl_Obj *Tcl_GetObjResult _ANSI_ARGS_ ((Tcl_Interp * interp));
1279
EXTERN Tcl_Channel      Tcl_GetChannel _ANSI_ARGS_((Tcl_Interp *interp,
1275
EXTERN Tcl_ObjType *Tcl_GetObjType _ANSI_ARGS_ ((char *typeName));
1280
                            char *chanName, int *modePtr));
1276
EXTERN int Tcl_GetOpenFile _ANSI_ARGS_ (
1281
EXTERN int              Tcl_GetChannelBufferSize _ANSI_ARGS_((
1277
    (Tcl_Interp * interp, char *string, int write, int checkUsage, ClientData *filePtr));
1282
                            Tcl_Channel chan));
1278
EXTERN Tcl_PathType Tcl_GetPathType _ANSI_ARGS_ ((char *path));
1283
EXTERN int              Tcl_GetChannelHandle _ANSI_ARGS_((Tcl_Channel chan,
1279
EXTERN int Tcl_Gets _ANSI_ARGS_ ((Tcl_Channel chan, Tcl_DString *dsPtr));
1284
                            int direction, ClientData *handlePtr));
1280
EXTERN int Tcl_GetsObj _ANSI_ARGS_ ((Tcl_Channel chan, Tcl_Obj *objPtr));
1285
EXTERN ClientData       Tcl_GetChannelInstanceData _ANSI_ARGS_((
1281
EXTERN int Tcl_GetServiceMode _ANSI_ARGS_ ((void) );
1286
                            Tcl_Channel chan));
1282
EXTERN Tcl_Interp *Tcl_GetSlave _ANSI_ARGS_ ((Tcl_Interp * interp, char *slaveName));
1287
EXTERN int              Tcl_GetChannelMode _ANSI_ARGS_((Tcl_Channel chan));
1283
EXTERN Tcl_Channel Tcl_GetStdChannel _ANSI_ARGS_ ((int type));
1288
EXTERN char *           Tcl_GetChannelName _ANSI_ARGS_((Tcl_Channel chan));
1284
EXTERN char *Tcl_GetStringFromObj _ANSI_ARGS_ ((Tcl_Obj * objPtr, int *lengthPtr));
1289
EXTERN int              Tcl_GetChannelOption _ANSI_ARGS_((Tcl_Interp *interp,
1285
EXTERN char *Tcl_GetStringResult _ANSI_ARGS_ ((Tcl_Interp * interp));
1290
                            Tcl_Channel chan, char *optionName,
1286
EXTERN char *Tcl_GetVar _ANSI_ARGS_ ((Tcl_Interp * interp, char *varName, int flags));
1291
                            Tcl_DString *dsPtr));
1287
EXTERN char *
1292
EXTERN Tcl_ChannelType * Tcl_GetChannelType _ANSI_ARGS_((Tcl_Channel chan));
1288
    Tcl_GetVar2 _ANSI_ARGS_ ((Tcl_Interp * interp, char *part1, char *part2, int flags));
1293
EXTERN int              Tcl_GetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
1289
EXTERN int Tcl_GlobalEval _ANSI_ARGS_ ((Tcl_Interp * interp, char *command));
1294
                            char *cmdName, Tcl_CmdInfo *infoPtr));
1290
EXTERN int Tcl_GlobalEvalObj _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *objPtr));
1295
EXTERN char *           Tcl_GetCommandName _ANSI_ARGS_((Tcl_Interp *interp,
1291
EXTERN char *Tcl_HashStats _ANSI_ARGS_ ((Tcl_HashTable * tablePtr));
1296
                            Tcl_Command command));
1292
EXTERN int
1297
EXTERN int              Tcl_GetDouble _ANSI_ARGS_((Tcl_Interp *interp,
1293
    Tcl_HideCommand _ANSI_ARGS_ ((Tcl_Interp * interp, char *cmdName, char *hiddenCmdToken));
1298
                            char *string, double *doublePtr));
1294
EXTERN int Tcl_Init _ANSI_ARGS_ ((Tcl_Interp * interp));
1299
EXTERN int              Tcl_GetDoubleFromObj _ANSI_ARGS_((
1295
EXTERN void Tcl_InitHashTable _ANSI_ARGS_ ((Tcl_HashTable * tablePtr, int keyType));
1300
                            Tcl_Interp *interp, Tcl_Obj *objPtr,
1296
EXTERN void Tcl_InitMemory _ANSI_ARGS_ ((Tcl_Interp * interp));
1301
                            double *doublePtr));
1297
EXTERN int Tcl_InputBlocked _ANSI_ARGS_ ((Tcl_Channel chan));
1302
EXTERN int              Tcl_GetErrno _ANSI_ARGS_((void));
1298
EXTERN int Tcl_InputBuffered _ANSI_ARGS_ ((Tcl_Channel chan));
1303
EXTERN char *           Tcl_GetHostName _ANSI_ARGS_((void));
1299
EXTERN int Tcl_InterpDeleted _ANSI_ARGS_ ((Tcl_Interp * interp));
1304
EXTERN int              Tcl_GetIndexFromObj _ANSI_ARGS_((Tcl_Interp *interp,
1300
EXTERN int Tcl_IsSafe _ANSI_ARGS_ ((Tcl_Interp * interp));
1305
                            Tcl_Obj *objPtr, char **tablePtr, char *msg,
1301
EXTERN void Tcl_InvalidateStringRep _ANSI_ARGS_ ((Tcl_Obj * objPtr));
1306
                            int flags, int *indexPtr));
1302
EXTERN char *Tcl_JoinPath _ANSI_ARGS_ ((int argc, char **argv, Tcl_DString *resultPtr));
1307
EXTERN int              Tcl_GetInt _ANSI_ARGS_((Tcl_Interp *interp,
1303
EXTERN int
1308
                            char *string, int *intPtr));
1304
    Tcl_LinkVar _ANSI_ARGS_ ((Tcl_Interp * interp, char *varName, char *addr, int type));
1309
EXTERN int              Tcl_GetInterpPath _ANSI_ARGS_((Tcl_Interp *askInterp,
1305
EXTERN int Tcl_ListObjAppendList
1310
                            Tcl_Interp *slaveInterp));
1306
    _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *listPtr, Tcl_Obj *elemListPtr));
1311
EXTERN int              Tcl_GetIntFromObj _ANSI_ARGS_((Tcl_Interp *interp,
1307
EXTERN int Tcl_ListObjAppendElement
1312
                            Tcl_Obj *objPtr, int *intPtr));
1308
    _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *listPtr, Tcl_Obj *objPtr));
1313
EXTERN int              Tcl_GetLongFromObj _ANSI_ARGS_((Tcl_Interp *interp,
1309
EXTERN int Tcl_ListObjGetElements
1314
                            Tcl_Obj *objPtr, long *longPtr));
1310
    _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *listPtr, int *objcPtr, Tcl_Obj ***objvPtr));
1315
EXTERN Tcl_Interp *     Tcl_GetMaster _ANSI_ARGS_((Tcl_Interp *interp));
1311
EXTERN int Tcl_ListObjIndex
1316
EXTERN CONST char *     Tcl_GetNameOfExecutable _ANSI_ARGS_((void));
1312
    _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *listPtr, int index, Tcl_Obj **objPtrPtr));
1317
EXTERN Tcl_Obj *        Tcl_GetObjResult _ANSI_ARGS_((Tcl_Interp *interp));
1313
EXTERN int
1318
EXTERN Tcl_ObjType *    Tcl_GetObjType _ANSI_ARGS_((char *typeName));
1314
    Tcl_ListObjLength _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *listPtr, int *intPtr));
1319
EXTERN int              Tcl_GetOpenFile _ANSI_ARGS_((Tcl_Interp *interp,
1315
EXTERN int Tcl_ListObjReplace _ANSI_ARGS_ (
1320
                            char *string, int write, int checkUsage,
1316
    (Tcl_Interp * interp,
1321
                            ClientData *filePtr));
1317
     Tcl_Obj *listPtr,
1322
EXTERN Tcl_PathType     Tcl_GetPathType _ANSI_ARGS_((char *path));
1318
     int first,
1323
EXTERN int              Tcl_Gets _ANSI_ARGS_((Tcl_Channel chan,
1319
     int count,
1324
                            Tcl_DString *dsPtr));
1320
     int objc,
1325
EXTERN int              Tcl_GetsObj _ANSI_ARGS_((Tcl_Channel chan,
1321
     Tcl_Obj *CONST objv[]));
1326
                            Tcl_Obj *objPtr));
1322
EXTERN void Tcl_Main _ANSI_ARGS_ ((int argc, char **argv, Tcl_AppInitProc *appInitProc));
1327
EXTERN int              Tcl_GetServiceMode _ANSI_ARGS_((void));
1323
EXTERN Tcl_Channel Tcl_MakeFileChannel _ANSI_ARGS_ ((ClientData handle, int mode));
1328
EXTERN Tcl_Interp *     Tcl_GetSlave _ANSI_ARGS_((Tcl_Interp *interp,
1324
EXTERN int Tcl_MakeSafe _ANSI_ARGS_ ((Tcl_Interp * interp));
1329
                            char *slaveName));
1325
EXTERN Tcl_Channel Tcl_MakeTcpClientChannel _ANSI_ARGS_ ((ClientData tcpSocket));
1330
EXTERN Tcl_Channel      Tcl_GetStdChannel _ANSI_ARGS_((int type));
1326
EXTERN char *Tcl_Merge _ANSI_ARGS_ ((int argc, char **argv));
1331
EXTERN char *           Tcl_GetStringFromObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1327
EXTERN Tcl_HashEntry *Tcl_NextHashEntry _ANSI_ARGS_ ((Tcl_HashSearch * searchPtr));
1332
                            int *lengthPtr));
1328
EXTERN void Tcl_NotifyChannel _ANSI_ARGS_ ((Tcl_Channel channel, int mask));
1333
EXTERN char *           Tcl_GetStringResult _ANSI_ARGS_((Tcl_Interp *interp));
1329
EXTERN Tcl_Obj *Tcl_ObjGetVar2
1334
EXTERN char *           Tcl_GetVar _ANSI_ARGS_((Tcl_Interp *interp,
1330
    _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, int flags));
1335
                            char *varName, int flags));
1331
EXTERN Tcl_Obj *Tcl_ObjSetVar2 _ANSI_ARGS_ (
1336
EXTERN char *           Tcl_GetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1332
    (Tcl_Interp * interp,
1337
                            char *part1, char *part2, int flags));
1333
     Tcl_Obj *part1Ptr,
1338
EXTERN int              Tcl_GlobalEval _ANSI_ARGS_((Tcl_Interp *interp,
1334
     Tcl_Obj *part2Ptr,
1339
                            char *command));
1335
     Tcl_Obj *newValuePtr,
1340
EXTERN int              Tcl_GlobalEvalObj _ANSI_ARGS_((Tcl_Interp *interp,
1336
     int flags));
1341
                            Tcl_Obj *objPtr));
1337
EXTERN Tcl_Channel Tcl_OpenCommandChannel
1342
EXTERN char *           Tcl_HashStats _ANSI_ARGS_((Tcl_HashTable *tablePtr));
1338
    _ANSI_ARGS_ ((Tcl_Interp * interp, int argc, char **argv, int flags));
1343
EXTERN int              Tcl_HideCommand _ANSI_ARGS_((Tcl_Interp *interp,
1339
EXTERN Tcl_Channel Tcl_OpenFileChannel
1344
                            char *cmdName, char *hiddenCmdToken));
1340
    _ANSI_ARGS_ ((Tcl_Interp * interp, char *fileName, char *modeString, int permissions));
1345
EXTERN int              Tcl_Init _ANSI_ARGS_((Tcl_Interp *interp));
1341
EXTERN Tcl_Channel Tcl_OpenTcpClient _ANSI_ARGS_ (
1346
EXTERN void             Tcl_InitHashTable _ANSI_ARGS_((Tcl_HashTable *tablePtr,
1342
    (Tcl_Interp * interp, int port, char *address, char *myaddr, int myport, int async));
1347
                            int keyType));
1343
EXTERN Tcl_Channel Tcl_OpenTcpServer _ANSI_ARGS_ (
1348
EXTERN void             Tcl_InitMemory _ANSI_ARGS_((Tcl_Interp *interp));
1344
    (Tcl_Interp * interp,
1349
EXTERN int              Tcl_InputBlocked _ANSI_ARGS_((Tcl_Channel chan));
1345
     int port,
1350
EXTERN int              Tcl_InputBuffered _ANSI_ARGS_((Tcl_Channel chan));
1346
     char *host,
1351
EXTERN int              Tcl_InterpDeleted _ANSI_ARGS_((Tcl_Interp *interp));
1347
     Tcl_TcpAcceptProc *acceptProc,
1352
EXTERN int              Tcl_IsSafe _ANSI_ARGS_((Tcl_Interp *interp));
1348
     ClientData callbackData));
1353
EXTERN void             Tcl_InvalidateStringRep _ANSI_ARGS_((
1349
EXTERN char *Tcl_ParseVar _ANSI_ARGS_ ((Tcl_Interp * interp, char *string, char **termPtr));
1354
                            Tcl_Obj *objPtr));
1350
EXTERN int Tcl_PkgProvide _ANSI_ARGS_ ((Tcl_Interp * interp, char *name, char *version));
1355
EXTERN char *           Tcl_JoinPath _ANSI_ARGS_((int argc, char **argv,
1351
EXTERN char *
1356
                            Tcl_DString *resultPtr));
1352
    Tcl_PkgRequire _ANSI_ARGS_ ((Tcl_Interp * interp, char *name, char *version, int exact));
1357
EXTERN int              Tcl_LinkVar _ANSI_ARGS_((Tcl_Interp *interp,
1353
EXTERN char *Tcl_PosixError _ANSI_ARGS_ ((Tcl_Interp * interp));
1358
                            char *varName, char *addr, int type));
1354
EXTERN void Tcl_Preserve _ANSI_ARGS_ ((ClientData data));
1359
EXTERN int              Tcl_ListObjAppendList _ANSI_ARGS_((
1355
EXTERN void Tcl_PrintDouble _ANSI_ARGS_ ((Tcl_Interp * interp, double value, char *dst));
1360
                            Tcl_Interp *interp, Tcl_Obj *listPtr,
1356
EXTERN int Tcl_PutEnv _ANSI_ARGS_ ((CONST char *string));
1361
                            Tcl_Obj *elemListPtr));
1357
EXTERN void Tcl_QueueEvent _ANSI_ARGS_ ((Tcl_Event * evPtr, Tcl_QueuePosition position));
1362
EXTERN int              Tcl_ListObjAppendElement _ANSI_ARGS_((
1358
EXTERN int Tcl_Read _ANSI_ARGS_ ((Tcl_Channel chan, char *bufPtr, int toRead));
1363
                            Tcl_Interp *interp, Tcl_Obj *listPtr,
1359
EXTERN void Tcl_ReapDetachedProcs _ANSI_ARGS_ ((void) );
1364
                            Tcl_Obj *objPtr));
1360
EXTERN int Tcl_RecordAndEval _ANSI_ARGS_ ((Tcl_Interp * interp, char *cmd, int flags));
1365
EXTERN int              Tcl_ListObjGetElements _ANSI_ARGS_((
1361
EXTERN int
1366
                            Tcl_Interp *interp, Tcl_Obj *listPtr,
1362
    Tcl_RecordAndEvalObj _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *cmdPtr, int flags));
1367
                            int *objcPtr, Tcl_Obj ***objvPtr));
1363
EXTERN Tcl_RegExp Tcl_RegExpCompile _ANSI_ARGS_ ((Tcl_Interp * interp, char *string));
1368
EXTERN int              Tcl_ListObjIndex _ANSI_ARGS_((Tcl_Interp *interp,
1364
EXTERN int Tcl_RegExpExec
1369
                            Tcl_Obj *listPtr, int index,
1365
    _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_RegExp regexp, char *string, char *start));
1370
                            Tcl_Obj **objPtrPtr));
1366
EXTERN int Tcl_RegExpMatch _ANSI_ARGS_ ((Tcl_Interp * interp, char *string, char *pattern));
1371
EXTERN int              Tcl_ListObjLength _ANSI_ARGS_((Tcl_Interp *interp,
1367
EXTERN void Tcl_RegExpRange
1372
                            Tcl_Obj *listPtr, int *intPtr));
1368
    _ANSI_ARGS_ ((Tcl_RegExp regexp, int index, char **startPtr, char **endPtr));
1373
EXTERN int              Tcl_ListObjReplace _ANSI_ARGS_((Tcl_Interp *interp,
1369
EXTERN void Tcl_RegisterChannel _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Channel chan));
1374
                            Tcl_Obj *listPtr, int first, int count,
1370
EXTERN void Tcl_RegisterObjType _ANSI_ARGS_ ((Tcl_ObjType * typePtr));
1375
                            int objc, Tcl_Obj *CONST objv[]));
1371
EXTERN void Tcl_Release _ANSI_ARGS_ ((ClientData clientData));
1376
EXTERN void             Tcl_Main _ANSI_ARGS_((int argc, char **argv,
1372
EXTERN void Tcl_ResetResult _ANSI_ARGS_ ((Tcl_Interp * interp));
1377
                            Tcl_AppInitProc *appInitProc));
-
 
1378
EXTERN Tcl_Channel      Tcl_MakeFileChannel _ANSI_ARGS_((ClientData handle,
-
 
1379
                            int mode));
-
 
1380
EXTERN int              Tcl_MakeSafe _ANSI_ARGS_((Tcl_Interp *interp));
-
 
1381
EXTERN Tcl_Channel      Tcl_MakeTcpClientChannel _ANSI_ARGS_((
-
 
1382
                            ClientData tcpSocket));
-
 
1383
EXTERN char *           Tcl_Merge _ANSI_ARGS_((int argc, char **argv));
-
 
1384
EXTERN Tcl_HashEntry *  Tcl_NextHashEntry _ANSI_ARGS_((
-
 
1385
                            Tcl_HashSearch *searchPtr));
-
 
1386
EXTERN void             Tcl_NotifyChannel _ANSI_ARGS_((Tcl_Channel channel,
-
 
1387
                            int mask));
-
 
1388
EXTERN Tcl_Obj *        Tcl_ObjGetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1389
                            Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
-
 
1390
                            int flags));
-
 
1391
EXTERN Tcl_Obj *        Tcl_ObjSetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1392
                            Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
-
 
1393
                            Tcl_Obj *newValuePtr, int flags));
-
 
1394
EXTERN Tcl_Channel      Tcl_OpenCommandChannel _ANSI_ARGS_((
-
 
1395
                            Tcl_Interp *interp, int argc, char **argv,
-
 
1396
                            int flags));
-
 
1397
EXTERN Tcl_Channel      Tcl_OpenFileChannel _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1398
                            char *fileName, char *modeString,
-
 
1399
                            int permissions));
-
 
1400
EXTERN Tcl_Channel      Tcl_OpenTcpClient _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1401
                            int port, char *address, char *myaddr,
-
 
1402
                            int myport, int async));
-
 
1403
EXTERN Tcl_Channel      Tcl_OpenTcpServer _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1404
                            int port, char *host,
-
 
1405
                            Tcl_TcpAcceptProc *acceptProc,
-
 
1406
                            ClientData callbackData));
-
 
1407
EXTERN char *           Tcl_ParseVar _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1408
                            char *string, char **termPtr));
-
 
1409
EXTERN int              Tcl_PkgProvide _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1410
                            char *name, char *version));
-
 
1411
EXTERN char *           Tcl_PkgRequire _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1412
                            char *name, char *version, int exact));
-
 
1413
EXTERN char *           Tcl_PosixError _ANSI_ARGS_((Tcl_Interp *interp));
-
 
1414
EXTERN void             Tcl_Preserve _ANSI_ARGS_((ClientData data));
-
 
1415
EXTERN void             Tcl_PrintDouble _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1416
                            double value, char *dst));
-
 
1417
EXTERN int              Tcl_PutEnv _ANSI_ARGS_((CONST char *string));
-
 
1418
EXTERN void             Tcl_QueueEvent _ANSI_ARGS_((Tcl_Event *evPtr,
-
 
1419
                            Tcl_QueuePosition position));
-
 
1420
EXTERN int              Tcl_Read _ANSI_ARGS_((Tcl_Channel chan,
-
 
1421
                            char *bufPtr, int toRead));
-
 
1422
EXTERN void             Tcl_ReapDetachedProcs _ANSI_ARGS_((void));
-
 
1423
EXTERN int              Tcl_RecordAndEval _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1424
                            char *cmd, int flags));
-
 
1425
EXTERN int              Tcl_RecordAndEvalObj _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1426
                            Tcl_Obj *cmdPtr, int flags));
-
 
1427
EXTERN Tcl_RegExp       Tcl_RegExpCompile _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1428
                            char *string));
-
 
1429
EXTERN int              Tcl_RegExpExec _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1430
                            Tcl_RegExp regexp, char *string, char *start));
-
 
1431
EXTERN int              Tcl_RegExpMatch _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1432
                            char *string, char *pattern));
-
 
1433
EXTERN void             Tcl_RegExpRange _ANSI_ARGS_((Tcl_RegExp regexp,
-
 
1434
                            int index, char **startPtr, char **endPtr));
-
 
1435
EXTERN void             Tcl_RegisterChannel _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1436
                            Tcl_Channel chan));
-
 
1437
EXTERN void             Tcl_RegisterObjType _ANSI_ARGS_((
-
 
1438
                            Tcl_ObjType *typePtr));
-
 
1439
EXTERN void             Tcl_Release _ANSI_ARGS_((ClientData clientData));
-
 
1440
EXTERN void             Tcl_ResetResult _ANSI_ARGS_((Tcl_Interp *interp));
1373
#define Tcl_Return Tcl_SetResult
1441
#define Tcl_Return Tcl_SetResult
1374
EXTERN int Tcl_ScanCountedElement _ANSI_ARGS_ ((CONST char *string, int length, int *flagPtr));
1442
EXTERN int              Tcl_ScanCountedElement _ANSI_ARGS_((CONST char *string,
-
 
1443
                            int length, int *flagPtr));
1375
EXTERN int Tcl_ScanElement _ANSI_ARGS_ ((CONST char *string, int *flagPtr));
1444
EXTERN int              Tcl_ScanElement _ANSI_ARGS_((CONST char *string,
-
 
1445
                            int *flagPtr));
1376
EXTERN int Tcl_Seek _ANSI_ARGS_ ((Tcl_Channel chan, int offset, int mode));
1446
EXTERN int              Tcl_Seek _ANSI_ARGS_((Tcl_Channel chan,
-
 
1447
                            int offset, int mode));
1377
EXTERN int Tcl_ServiceAll _ANSI_ARGS_ ((void) );
1448
EXTERN int              Tcl_ServiceAll _ANSI_ARGS_((void));
1378
EXTERN int Tcl_ServiceEvent _ANSI_ARGS_ ((int flags));
1449
EXTERN int              Tcl_ServiceEvent _ANSI_ARGS_((int flags));
1379
EXTERN void Tcl_SetAssocData _ANSI_ARGS_ (
1450
EXTERN void             Tcl_SetAssocData _ANSI_ARGS_((Tcl_Interp *interp,
1380
    (Tcl_Interp * interp, char *name, Tcl_InterpDeleteProc *proc, ClientData clientData));
1451
                            char *name, Tcl_InterpDeleteProc *proc,
-
 
1452
                            ClientData clientData));
1381
EXTERN void Tcl_SetBooleanObj _ANSI_ARGS_ ((Tcl_Obj * objPtr, int boolValue));
1453
EXTERN void             Tcl_SetBooleanObj _ANSI_ARGS_((Tcl_Obj *objPtr,
-
 
1454
                            int boolValue));
1382
EXTERN void Tcl_SetChannelBufferSize _ANSI_ARGS_ ((Tcl_Channel chan, int sz));
1455
EXTERN void             Tcl_SetChannelBufferSize _ANSI_ARGS_((
-
 
1456
                            Tcl_Channel chan, int sz));
1383
EXTERN int Tcl_SetChannelOption
1457
EXTERN int              Tcl_SetChannelOption _ANSI_ARGS_((
-
 
1458
                            Tcl_Interp *interp, Tcl_Channel chan,
1384
    _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Channel chan, char *optionName, char *newValue));
1459
                            char *optionName, char *newValue));
1385
EXTERN int Tcl_SetCommandInfo
1460
EXTERN int              Tcl_SetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
1386
    _ANSI_ARGS_ ((Tcl_Interp * interp, char *cmdName, Tcl_CmdInfo *infoPtr));
1461
                            char *cmdName, Tcl_CmdInfo *infoPtr));
1387
EXTERN void Tcl_SetDoubleObj _ANSI_ARGS_ ((Tcl_Obj * objPtr, double doubleValue));
1462
EXTERN void             Tcl_SetDoubleObj _ANSI_ARGS_((Tcl_Obj *objPtr,
-
 
1463
                            double doubleValue));
1388
EXTERN void Tcl_SetErrno _ANSI_ARGS_ ((int err));
1464
EXTERN void             Tcl_SetErrno _ANSI_ARGS_((int err));
1389
EXTERN void Tcl_SetErrorCode _ANSI_ARGS_ (TCL_VARARGS (Tcl_Interp *, arg1));
1465
EXTERN void             Tcl_SetErrorCode _ANSI_ARGS_(
-
 
1466
                            TCL_VARARGS(Tcl_Interp *,arg1));
1390
EXTERN void Tcl_SetIntObj _ANSI_ARGS_ ((Tcl_Obj * objPtr, int intValue));
1467
EXTERN void             Tcl_SetIntObj _ANSI_ARGS_((Tcl_Obj *objPtr,
-
 
1468
                            int intValue));
1391
EXTERN void Tcl_SetListObj _ANSI_ARGS_ ((Tcl_Obj * objPtr, int objc, Tcl_Obj *CONST objv[]));
1469
EXTERN void             Tcl_SetListObj _ANSI_ARGS_((Tcl_Obj *objPtr,
-
 
1470
                            int objc, Tcl_Obj *CONST objv[]));
1392
EXTERN void Tcl_SetLongObj _ANSI_ARGS_ ((Tcl_Obj * objPtr, long longValue));
1471
EXTERN void             Tcl_SetLongObj _ANSI_ARGS_((Tcl_Obj *objPtr,
-
 
1472
                            long longValue));
1393
EXTERN void Tcl_SetMaxBlockTime _ANSI_ARGS_ ((Tcl_Time * timePtr));
1473
EXTERN void             Tcl_SetMaxBlockTime _ANSI_ARGS_((Tcl_Time *timePtr));
1394
EXTERN void Tcl_SetObjErrorCode _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *errorObjPtr));
1474
EXTERN void             Tcl_SetObjErrorCode _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1475
                            Tcl_Obj *errorObjPtr));
1395
EXTERN void Tcl_SetObjLength _ANSI_ARGS_ ((Tcl_Obj * objPtr, int length));
1476
EXTERN void             Tcl_SetObjLength _ANSI_ARGS_((Tcl_Obj *objPtr,
-
 
1477
                            int length));
1396
EXTERN void Tcl_SetObjResult _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Obj *resultObjPtr));
1478
EXTERN void             Tcl_SetObjResult _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1479
                            Tcl_Obj *resultObjPtr));
1397
EXTERN void Tcl_SetPanicProc _ANSI_ARGS_ ((void(*proc)
1480
EXTERN void             Tcl_SetPanicProc _ANSI_ARGS_((void (*proc)
1398
                                               _ANSI_ARGS_ (TCL_VARARGS (char *, format))));
1481
                            _ANSI_ARGS_(TCL_VARARGS(char *, format))));
1399
EXTERN int Tcl_SetRecursionLimit _ANSI_ARGS_ ((Tcl_Interp * interp, int depth));
1482
EXTERN int              Tcl_SetRecursionLimit _ANSI_ARGS_((Tcl_Interp *interp,
1400
EXTERN void
1483
                            int depth));
-
 
1484
EXTERN void             Tcl_SetResult _ANSI_ARGS_((Tcl_Interp *interp,
1401
    Tcl_SetResult _ANSI_ARGS_ ((Tcl_Interp * interp, char *string, Tcl_FreeProc *freeProc));
1485
                            char *string, Tcl_FreeProc *freeProc));
1402
EXTERN int Tcl_SetServiceMode _ANSI_ARGS_ ((int mode));
1486
EXTERN int              Tcl_SetServiceMode _ANSI_ARGS_((int mode));
1403
EXTERN void Tcl_SetStdChannel _ANSI_ARGS_ ((Tcl_Channel channel, int type));
1487
EXTERN void             Tcl_SetStdChannel _ANSI_ARGS_((Tcl_Channel channel,
-
 
1488
                            int type));
1404
EXTERN void Tcl_SetStringObj _ANSI_ARGS_ ((Tcl_Obj * objPtr, char *bytes, int length));
1489
EXTERN void             Tcl_SetStringObj _ANSI_ARGS_((Tcl_Obj *objPtr,
-
 
1490
                            char *bytes, int length));
1405
EXTERN void Tcl_SetTimer _ANSI_ARGS_ ((Tcl_Time * timePtr));
1491
EXTERN void             Tcl_SetTimer _ANSI_ARGS_((Tcl_Time *timePtr));
1406
EXTERN char *
1492
EXTERN char *           Tcl_SetVar _ANSI_ARGS_((Tcl_Interp *interp,
1407
    Tcl_SetVar _ANSI_ARGS_ ((Tcl_Interp * interp, char *varName, char *newValue, int flags));
1493
                            char *varName, char *newValue, int flags));
1408
EXTERN char *Tcl_SetVar2
1494
EXTERN char *           Tcl_SetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1409
    _ANSI_ARGS_ ((Tcl_Interp * interp, char *part1, char *part2, char *newValue, int flags));
1495
                            char *part1, char *part2, char *newValue,
-
 
1496
                            int flags));
1410
EXTERN char *Tcl_SignalId _ANSI_ARGS_ ((int sig));
1497
EXTERN char *           Tcl_SignalId _ANSI_ARGS_((int sig));
1411
EXTERN char *Tcl_SignalMsg _ANSI_ARGS_ ((int sig));
1498
EXTERN char *           Tcl_SignalMsg _ANSI_ARGS_((int sig));
1412
EXTERN void Tcl_Sleep _ANSI_ARGS_ ((int ms));
1499
EXTERN void             Tcl_Sleep _ANSI_ARGS_((int ms));
1413
EXTERN void Tcl_SourceRCFile _ANSI_ARGS_ ((Tcl_Interp * interp));
1500
EXTERN void             Tcl_SourceRCFile _ANSI_ARGS_((Tcl_Interp *interp));
1414
EXTERN int Tcl_SplitList
1501
EXTERN int              Tcl_SplitList _ANSI_ARGS_((Tcl_Interp *interp,
1415
    _ANSI_ARGS_ ((Tcl_Interp * interp, char *list, int *argcPtr, char ***argvPtr));
1502
                            char *list, int *argcPtr, char ***argvPtr));
1416
EXTERN void Tcl_SplitPath _ANSI_ARGS_ ((char *path, int *argcPtr, char ***argvPtr));
1503
EXTERN void             Tcl_SplitPath _ANSI_ARGS_((char *path,
1417
EXTERN void Tcl_StaticPackage _ANSI_ARGS_ (
1504
                            int *argcPtr, char ***argvPtr));
1418
    (Tcl_Interp * interp,
1505
EXTERN void             Tcl_StaticPackage _ANSI_ARGS_((Tcl_Interp *interp,
1419
     char *pkgName,
-
 
1420
     Tcl_PackageInitProc *initProc,
1506
                            char *pkgName, Tcl_PackageInitProc *initProc,
1421
     Tcl_PackageInitProc *safeInitProc));
1507
                            Tcl_PackageInitProc *safeInitProc));
1422
EXTERN int Tcl_StringMatch _ANSI_ARGS_ ((char *string, char *pattern));
1508
EXTERN int              Tcl_StringMatch _ANSI_ARGS_((char *string,
-
 
1509
                            char *pattern));
1423
EXTERN int Tcl_Tell _ANSI_ARGS_ ((Tcl_Channel chan));
1510
EXTERN int              Tcl_Tell _ANSI_ARGS_((Tcl_Channel chan));
1424
#define Tcl_TildeSubst Tcl_TranslateFileName
1511
#define Tcl_TildeSubst Tcl_TranslateFileName
1425
EXTERN int Tcl_TraceVar _ANSI_ARGS_ (
1512
EXTERN int              Tcl_TraceVar _ANSI_ARGS_((Tcl_Interp *interp,
1426
    (Tcl_Interp * interp,
-
 
1427
     char *varName,
-
 
1428
     int flags,
-
 
1429
     Tcl_VarTraceProc *proc,
1513
                            char *varName, int flags, Tcl_VarTraceProc *proc,
1430
     ClientData clientData));
1514
                            ClientData clientData));
1431
EXTERN int Tcl_TraceVar2 _ANSI_ARGS_ (
1515
EXTERN int              Tcl_TraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1432
    (Tcl_Interp * interp,
-
 
1433
     char *part1,
-
 
1434
     char *part2,
1516
                            char *part1, char *part2, int flags,
1435
     int flags,
-
 
1436
     Tcl_VarTraceProc *proc,
-
 
1437
     ClientData clientData));
1517
                            Tcl_VarTraceProc *proc, ClientData clientData));
1438
EXTERN char *Tcl_TranslateFileName
1518
EXTERN char *           Tcl_TranslateFileName _ANSI_ARGS_((Tcl_Interp *interp,
1439
    _ANSI_ARGS_ ((Tcl_Interp * interp, char *name, Tcl_DString *bufferPtr));
1519
                            char *name, Tcl_DString *bufferPtr));
1440
EXTERN int Tcl_Ungets _ANSI_ARGS_ ((Tcl_Channel chan, char *str, int len, int atHead));
1520
EXTERN int              Tcl_Ungets _ANSI_ARGS_((Tcl_Channel chan, char *str,
-
 
1521
                            int len, int atHead));
1441
EXTERN void Tcl_UnlinkVar _ANSI_ARGS_ ((Tcl_Interp * interp, char *varName));
1522
EXTERN void             Tcl_UnlinkVar _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1523
                            char *varName));
1442
EXTERN int Tcl_UnregisterChannel _ANSI_ARGS_ ((Tcl_Interp * interp, Tcl_Channel chan));
1524
EXTERN int              Tcl_UnregisterChannel _ANSI_ARGS_((Tcl_Interp *interp,
-
 
1525
                            Tcl_Channel chan));
1443
EXTERN int Tcl_UnsetVar _ANSI_ARGS_ ((Tcl_Interp * interp, char *varName, int flags));
1526
EXTERN int              Tcl_UnsetVar _ANSI_ARGS_((Tcl_Interp *interp,
1444
EXTERN int
1527
                            char *varName, int flags));
1445
    Tcl_UnsetVar2 _ANSI_ARGS_ ((Tcl_Interp * interp, char *part1, char *part2, int flags));
1528
EXTERN int              Tcl_UnsetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1446
EXTERN void Tcl_UntraceVar _ANSI_ARGS_ (
1529
                            char *part1, char *part2, int flags));
1447
    (Tcl_Interp * interp,
1530
EXTERN void             Tcl_UntraceVar _ANSI_ARGS_((Tcl_Interp *interp,
1448
     char *varName,
-
 
1449
     int flags,
-
 
1450
     Tcl_VarTraceProc *proc,
1531
                            char *varName, int flags, Tcl_VarTraceProc *proc,
1451
     ClientData clientData));
1532
                            ClientData clientData));
1452
EXTERN void Tcl_UntraceVar2 _ANSI_ARGS_ (
1533
EXTERN void             Tcl_UntraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1453
    (Tcl_Interp * interp,
-
 
1454
     char *part1,
-
 
1455
     char *part2,
1534
                            char *part1, char *part2, int flags,
1456
     int flags,
-
 
1457
     Tcl_VarTraceProc *proc,
-
 
1458
     ClientData clientData));
1535
                            Tcl_VarTraceProc *proc, ClientData clientData));
1459
EXTERN void Tcl_UpdateLinkedVar _ANSI_ARGS_ ((Tcl_Interp * interp, char *varName));
1536
EXTERN void             Tcl_UpdateLinkedVar _ANSI_ARGS_((Tcl_Interp *interp,
1460
EXTERN int Tcl_UpVar _ANSI_ARGS_ (
1537
                            char *varName));
1461
    (Tcl_Interp * interp, char *frameName, char *varName, char *localName, int flags));
-
 
1462
EXTERN int Tcl_UpVar2 _ANSI_ARGS_ (
1538
EXTERN int              Tcl_UpVar _ANSI_ARGS_((Tcl_Interp *interp,
1463
    (Tcl_Interp * interp,
1539
                            char *frameName, char *varName,
1464
     char *frameName,
1540
                            char *localName, int flags));
1465
     char *part1,
1541
EXTERN int              Tcl_UpVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1466
     char *part2,
1542
                            char *frameName, char *part1, char *part2,
1467
     char *localName,
1543
                            char *localName, int flags));
1468
     int flags));
1544
EXTERN int              Tcl_VarEval _ANSI_ARGS_(
1469
EXTERN int Tcl_VarEval _ANSI_ARGS_ (TCL_VARARGS (Tcl_Interp *, interp));
1545
                            TCL_VARARGS(Tcl_Interp *,interp));
1470
EXTERN ClientData Tcl_VarTraceInfo _ANSI_ARGS_ (
1546
EXTERN ClientData       Tcl_VarTraceInfo _ANSI_ARGS_((Tcl_Interp *interp,
1471
    (Tcl_Interp * interp,
-
 
1472
     char *varName,
1547
                            char *varName, int flags,
1473
     int flags,
-
 
1474
     Tcl_VarTraceProc *procPtr,
1548
                            Tcl_VarTraceProc *procPtr,
1475
     ClientData prevClientData));
1549
                            ClientData prevClientData));
1476
EXTERN ClientData Tcl_VarTraceInfo2 _ANSI_ARGS_ (
1550
EXTERN ClientData       Tcl_VarTraceInfo2 _ANSI_ARGS_((Tcl_Interp *interp,
1477
    (Tcl_Interp * interp,
-
 
1478
     char *part1,
-
 
1479
     char *part2,
1551
                            char *part1, char *part2, int flags,
1480
     int flags,
-
 
1481
     Tcl_VarTraceProc *procPtr,
1552
                            Tcl_VarTraceProc *procPtr,
1482
     ClientData prevClientData));
1553
                            ClientData prevClientData));
1483
EXTERN int Tcl_WaitForEvent _ANSI_ARGS_ ((Tcl_Time * timePtr));
1554
EXTERN int              Tcl_WaitForEvent _ANSI_ARGS_((Tcl_Time *timePtr));
1484
EXTERN Tcl_Pid Tcl_WaitPid _ANSI_ARGS_ ((Tcl_Pid pid, int *statPtr, int options));
1555
EXTERN Tcl_Pid          Tcl_WaitPid _ANSI_ARGS_((Tcl_Pid pid, int *statPtr,
-
 
1556
                            int options));
1485
EXTERN int Tcl_Write _ANSI_ARGS_ ((Tcl_Channel chan, char *s, int slen));
1557
EXTERN int              Tcl_Write _ANSI_ARGS_((Tcl_Channel chan,
-
 
1558
                            char *s, int slen));
1486
EXTERN void Tcl_WrongNumArgs
1559
EXTERN void             Tcl_WrongNumArgs _ANSI_ARGS_((Tcl_Interp *interp,
1487
    _ANSI_ARGS_ ((Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], char *message));
1560
                            int objc, Tcl_Obj *CONST objv[], char *message));
1488
 
1561
 
1489
#endif /* RESOURCE_INCLUDED */
1562
#endif /* RESOURCE_INCLUDED */
1490
 
1563
 
1491
#undef TCL_STORAGE_CLASS
1564
#undef TCL_STORAGE_CLASS
1492
#define TCL_STORAGE_CLASS DLLIMPORT
1565
#define TCL_STORAGE_CLASS DLLIMPORT