Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
att
GitHub Repository: att/ast
Path: blob/master/src/lib/libtksh/include/tcl.h
1810 views
1
/*
2
* tcl.h --
3
*
4
* This header file describes the externally-visible facilities
5
* of the Tcl interpreter.
6
*
7
* Copyright (c) 1987-1994 The Regents of the University of California.
8
* Copyright (c) 1994-1996 Sun Microsystems, Inc.
9
*
10
* See the file "license.terms" for information on usage and redistribution
11
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
12
*
13
* SCCS: @(#) tcl.h 1.285 97/01/29 13:04:49
14
*/
15
16
#ifndef _TCL
17
#define _TCL
18
19
#include <ast.h>
20
21
/*
22
* When version numbers change here, must also go into the following files
23
* and update the version numbers:
24
*
25
* library/init.tcl
26
* unix/configure.in
27
* unix/Makefile.in
28
* unix/pkginfo
29
* win/makefile.bc
30
* win/makefile.vc
31
*
32
* The release level should be 0 for alpha, 1 for beta, and 2 for
33
* final/patch. The release serial value is the number that follows the
34
* "a", "b", or "p" in the patch level; for example, if the patch level
35
* is 7.6b2, TCL_RELEASE_SERIAL is 2. It restarts at 1 whenever the
36
* release level is changed, except for the final release which is 0
37
* (the first patch will start at 1).
38
*/
39
40
#define TCL_MAJOR_VERSION 7
41
#define TCL_MINOR_VERSION 6
42
#define TCL_RELEASE_LEVEL 2
43
#define TCL_RELEASE_SERIAL 2
44
45
#define TCL_VERSION "7.6"
46
#define TCL_PATCH_LEVEL "7.6p2"
47
48
/*
49
* The following definitions set up the proper options for Windows
50
* compilers. We use this method because there is no autoconf equivalent.
51
*/
52
53
#if !defined(_UWIN) && !defined(__CYGWIN__) && (defined(__WIN32__) || defined(_WIN32) || defined(WIN32))
54
#define WIN_TCL 1
55
#endif
56
57
#ifdef WIN_TCL
58
# ifndef STRICT
59
# define STRICT
60
# endif
61
# ifndef USE_PROTOTYPE
62
# define USE_PROTOTYPE 1
63
# endif
64
# ifndef HAS_STDARG
65
# define HAS_STDARG 1
66
# endif
67
# ifndef USE_PROTOTYPE
68
# define USE_PROTOTYPE 1
69
# endif
70
# ifndef USE_TCLALLOC
71
# define USE_TCLALLOC 1
72
# endif
73
# ifndef STRINGIFY
74
# define STRINGIFY(x) STRINGIFY1(x)
75
# define STRINGIFY1(x) #x
76
# endif
77
#endif /* WIN_TCL */
78
79
/*
80
* The following definitions set up the proper options for Macintosh
81
* compilers. We use this method because there is no autoconf equivalent.
82
*/
83
84
#ifdef MAC_TCL
85
# ifndef HAS_STDARG
86
# define HAS_STDARG 1
87
# endif
88
# ifndef USE_TCLALLOC
89
# define USE_TCLALLOC 1
90
# endif
91
# ifndef NO_STRERROR
92
# define NO_STRERROR 1
93
# endif
94
#endif
95
96
/*
97
* A special definition used to allow this header file to be included
98
* in resource files so that they can get obtain version information from
99
* this file. Resource compilers don't like all the C stuff, like typedefs
100
* and procedure declarations, that occur below.
101
*/
102
103
#ifndef RESOURCE_INCLUDED
104
105
#ifndef BUFSIZ
106
#include <stdio.h>
107
#endif
108
109
/*
110
* Definitions that allow Tcl functions with variable numbers of
111
* arguments to be used with either varargs.h or stdarg.h. TCL_VARARGS
112
* is used in procedure prototypes. TCL_VARARGS_DEF is used to declare
113
* the arguments in a function definiton: it takes the type and name of
114
* the first argument and supplies the appropriate argument declaration
115
* string for use in the function definition. TCL_VARARGS_START
116
* initializes the va_list data structure and returns the first argument.
117
*/
118
119
#if defined(__STDC__) || defined(HAS_STDARG)
120
# define TCL_VARARGS(type, name) (type name, ...)
121
# define TCL_VARARGS_DEF(type, name) (type name, ...)
122
# define TCL_VARARGS_START(type, name, list) (va_start(list, name), name)
123
#else
124
# ifdef __cplusplus
125
# define TCL_VARARGS(type, name) (type name, ...)
126
# define TCL_VARARGS_DEF(type, name) (type va_alist, ...)
127
# else
128
# define TCL_VARARGS(type, name) ()
129
# define TCL_VARARGS_DEF(type, name) (va_alist)
130
# endif
131
# define TCL_VARARGS_START(type, name, list) \
132
(va_start(list), va_arg(list, type))
133
#endif
134
135
/*
136
* Definitions that allow this header file to be used either with or
137
* without ANSI C features like function prototypes.
138
*/
139
140
#undef _ANSI_ARGS_
141
#undef CONST
142
143
#if ((defined(__STDC__) || defined(SABER)) && !defined(NO_PROTOTYPE)) || defined(__cplusplus) || defined(USE_PROTOTYPE)
144
# define _USING_PROTOTYPES_ 1
145
# define _ANSI_ARGS_(x) x
146
# define CONST const
147
#else
148
# define _ANSI_ARGS_(x) ()
149
# define CONST
150
#endif
151
152
#if _BLD_tcl && defined(__EXPORT__)
153
#define extern __EXPORT__
154
#endif
155
156
#ifdef __cplusplus
157
# define EXTERN extern "C"
158
#else
159
# define EXTERN extern
160
#endif
161
162
/*
163
* Macro to use instead of "void" for arguments that must have
164
* type "void *" in ANSI C; maps them to type "char *" in
165
* non-ANSI systems.
166
*/
167
#ifndef WIN_TCL
168
#ifndef VOID
169
# ifdef __STDC__
170
# define VOID void
171
# else
172
# define VOID char
173
# endif
174
#endif
175
#else /* WIN_TCL */
176
/*
177
* The following code is copied from winnt.h
178
*/
179
#ifndef VOID
180
#define VOID void
181
typedef char CHAR;
182
typedef short SHORT;
183
typedef long LONG;
184
#endif
185
#endif /* WIN_TCL */
186
187
/*
188
* Miscellaneous declarations.
189
*/
190
191
#ifndef NULL
192
#define NULL 0
193
#endif
194
195
#ifndef _CLIENTDATA
196
# if defined(__STDC__) || defined(__cplusplus)
197
typedef void *ClientData;
198
# else
199
typedef int *ClientData;
200
# endif /* __STDC__ */
201
#define _CLIENTDATA
202
#endif
203
204
/*
205
* Data structures defined opaquely in this module. The definitions
206
* below just provide dummy types. A few fields are made visible in
207
* Tcl_Interp structures, namely those for returning string values.
208
* Note: any change to the Tcl_Interp definition below must be mirrored
209
* in the "real" definition in tclInt.h.
210
*/
211
212
typedef struct Tcl_Interp{
213
char *result; /* Points to result string returned by last
214
* command. */
215
void (*freeProc) _ANSI_ARGS_((char *blockPtr));
216
/* Zero means result is statically allocated.
217
* TCL_DYNAMIC means result was allocated with
218
* ckalloc and should be freed with ckfree.
219
* Other values give address of procedure
220
* to invoke to free the result. Must be
221
* freed by Tcl_Eval before executing next
222
* command. */
223
int errorLine; /* When TCL_ERROR is returned, this gives
224
* the line number within the command where
225
* the error occurred (1 means first line). */
226
} Tcl_Interp;
227
228
typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler;
229
typedef struct Tcl_Command_ *Tcl_Command;
230
typedef struct Tcl_Event Tcl_Event;
231
typedef struct Tcl_File_ *Tcl_File;
232
typedef struct Tcl_Channel_ *Tcl_Channel;
233
typedef struct Tcl_RegExp_ *Tcl_RegExp;
234
typedef struct Tcl_TimerToken_ *Tcl_TimerToken;
235
typedef struct Tcl_Trace_ *Tcl_Trace;
236
237
/*
238
* When a TCL command returns, the string pointer interp->result points to
239
* a string containing return information from the command. In addition,
240
* the command procedure returns an integer value, which is one of the
241
* following:
242
*
243
* TCL_OK Command completed normally; interp->result contains
244
* the command's result.
245
* TCL_ERROR The command couldn't be completed successfully;
246
* interp->result describes what went wrong.
247
* TCL_RETURN The command requests that the current procedure
248
* return; interp->result contains the procedure's
249
* return value.
250
* TCL_BREAK The command requests that the innermost loop
251
* be exited; interp->result is meaningless.
252
* TCL_CONTINUE Go on to the next iteration of the current loop;
253
* interp->result is meaningless.
254
*/
255
256
#define TCL_OK 0
257
#define TCL_ERROR 1
258
#define TCL_RETURN 2
259
#define TCL_BREAK 3
260
#define TCL_CONTINUE 4
261
262
#define TCL_RESULT_SIZE 200
263
264
/*
265
* Argument descriptors for math function callbacks in expressions:
266
*/
267
268
typedef enum {TCL_INT, TCL_DOUBLE, TCL_EITHER} Tcl_ValueType;
269
typedef struct Tcl_Value {
270
Tcl_ValueType type; /* Indicates intValue or doubleValue is
271
* valid, or both. */
272
long intValue; /* Integer value. */
273
double doubleValue; /* Double-precision floating value. */
274
} Tcl_Value;
275
276
/*
277
* Procedure types defined by Tcl:
278
*/
279
280
typedef int (Tcl_AppInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
281
typedef int (Tcl_AsyncProc) _ANSI_ARGS_((ClientData clientData,
282
Tcl_Interp *interp, int code));
283
typedef void (Tcl_ChannelProc) _ANSI_ARGS_((ClientData clientData, int mask));
284
typedef void (Tcl_CloseProc) _ANSI_ARGS_((ClientData data));
285
typedef void (Tcl_CmdDeleteProc) _ANSI_ARGS_((ClientData clientData));
286
typedef int (Tcl_CmdProc) _ANSI_ARGS_((ClientData clientData,
287
Tcl_Interp *interp, int argc, char *argv[]));
288
typedef void (Tcl_CmdTraceProc) _ANSI_ARGS_((ClientData clientData,
289
Tcl_Interp *interp, int level, char *command, Tcl_CmdProc *proc,
290
ClientData cmdClientData, int argc, char *argv[]));
291
typedef int (Tcl_EventProc) _ANSI_ARGS_((Tcl_Event *evPtr, int flags));
292
typedef void (Tcl_EventCheckProc) _ANSI_ARGS_((ClientData clientData,
293
int flags));
294
typedef int (Tcl_EventDeleteProc) _ANSI_ARGS_((Tcl_Event *evPtr,
295
ClientData clientData));
296
typedef void (Tcl_EventSetupProc) _ANSI_ARGS_((ClientData clientData,
297
int flags));
298
typedef void (Tcl_ExitProc) _ANSI_ARGS_((ClientData clientData));
299
typedef void (Tcl_FileProc) _ANSI_ARGS_((ClientData clientData, int mask));
300
typedef void (Tcl_FileFreeProc) _ANSI_ARGS_((ClientData clientData));
301
typedef void (Tcl_FreeProc) _ANSI_ARGS_((char *blockPtr));
302
typedef void (Tcl_IdleProc) _ANSI_ARGS_((ClientData clientData));
303
typedef void (Tcl_InterpDeleteProc) _ANSI_ARGS_((ClientData clientData,
304
Tcl_Interp *interp));
305
typedef int (Tcl_MathProc) _ANSI_ARGS_((ClientData clientData,
306
Tcl_Interp *interp, Tcl_Value *args, Tcl_Value *resultPtr));
307
typedef int (Tcl_PackageInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
308
typedef void (Tcl_TcpAcceptProc) _ANSI_ARGS_((ClientData callbackData,
309
Tcl_Channel chan, char *address, int port));
310
typedef void (Tcl_TimerProc) _ANSI_ARGS_((ClientData clientData));
311
typedef char *(Tcl_VarTraceProc) _ANSI_ARGS_((ClientData clientData,
312
Tcl_Interp *interp, char *part1, char *part2, int flags));
313
314
/*
315
* The structure returned by Tcl_GetCmdInfo and passed into
316
* Tcl_SetCmdInfo:
317
*/
318
319
typedef struct Tcl_CmdInfo {
320
Tcl_CmdProc *proc; /* Procedure to implement command. */
321
ClientData clientData; /* ClientData passed to proc. */
322
Tcl_CmdDeleteProc *deleteProc; /* Procedure to call when command
323
* is deleted. */
324
ClientData deleteData; /* Value to pass to deleteProc (usually
325
* the same as clientData). */
326
} Tcl_CmdInfo;
327
328
/*
329
* The structure defined below is used to hold dynamic strings. The only
330
* field that clients should use is the string field, and they should
331
* never modify it.
332
*/
333
334
#define TCL_DSTRING_STATIC_SIZE 200
335
typedef struct Tcl_DString {
336
char *string; /* Points to beginning of string: either
337
* staticSpace below or a malloc'ed array. */
338
int length; /* Number of non-NULL characters in the
339
* string. */
340
int spaceAvl; /* Total number of bytes available for the
341
* string and its terminating NULL char. */
342
char staticSpace[TCL_DSTRING_STATIC_SIZE];
343
/* Space to use in common case where string
344
* is small. */
345
} Tcl_DString;
346
347
#define Tcl_DStringLength(dsPtr) ((dsPtr)->length)
348
#define Tcl_DStringValue(dsPtr) ((dsPtr)->string)
349
#define Tcl_DStringTrunc Tcl_DStringSetLength
350
351
/*
352
* Definitions for the maximum number of digits of precision that may
353
* be specified in the "tcl_precision" variable, and the number of
354
* characters of buffer space required by Tcl_PrintDouble.
355
*/
356
357
#define TCL_MAX_PREC 17
358
#define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10)
359
360
/*
361
* Flag that may be passed to Tcl_ConvertElement to force it not to
362
* output braces (careful! if you change this flag be sure to change
363
* the definitions at the front of tclUtil.c).
364
*/
365
366
#define TCL_DONT_USE_BRACES 1
367
368
/*
369
* Flag values passed to Tcl_RecordAndEval.
370
* WARNING: these bit choices must not conflict with the bit choices
371
* for evalFlag bits in tclInt.h!!
372
*/
373
374
#define TCL_NO_EVAL 0x10000
375
#define TCL_EVAL_GLOBAL 0x20000
376
377
/*
378
* Special freeProc values that may be passed to Tcl_SetResult (see
379
* the man page for details):
380
*/
381
382
#define TCL_VOLATILE ((Tcl_FreeProc *) 1)
383
#define TCL_STATIC ((Tcl_FreeProc *) 0)
384
#define TCL_DYNAMIC ((Tcl_FreeProc *) 3)
385
386
/*
387
* Flag values passed to variable-related procedures.
388
*/
389
390
#define TCL_GLOBAL_ONLY 1
391
#define TCL_APPEND_VALUE 2
392
#define TCL_LIST_ELEMENT 4
393
#define TCL_TRACE_READS 0x10
394
#define TCL_TRACE_WRITES 0x20
395
#define TCL_TRACE_UNSETS 0x40
396
#define TCL_TRACE_DESTROYED 0x80
397
#define TCL_INTERP_DESTROYED 0x100
398
#define TCL_LEAVE_ERR_MSG 0x200
399
400
/*
401
* Types for linked variables:
402
*/
403
404
#define TCL_LINK_INT 1
405
#define TCL_LINK_DOUBLE 2
406
#define TCL_LINK_BOOLEAN 3
407
#define TCL_LINK_STRING 4
408
#define TCL_LINK_READ_ONLY 0x80
409
410
/*
411
* The following declarations either map ckalloc and ckfree to
412
* malloc and free, or they map them to procedures with all sorts
413
* of debugging hooks defined in tclCkalloc.c.
414
*/
415
416
EXTERN char * Tcl_Alloc _ANSI_ARGS_((unsigned int size));
417
EXTERN void Tcl_Free _ANSI_ARGS_((char *ptr));
418
EXTERN char * Tcl_Realloc _ANSI_ARGS_((char *ptr,
419
unsigned int size));
420
421
#ifdef TCL_MEM_DEBUG
422
423
# define Tcl_Alloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
424
# define Tcl_Free(x) Tcl_DbCkfree(x, __FILE__, __LINE__)
425
# define Tcl_Realloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
426
# define ckalloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
427
# define ckfree(x) Tcl_DbCkfree(x, __FILE__, __LINE__)
428
# define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
429
430
EXTERN int Tcl_DumpActiveMemory _ANSI_ARGS_((char *fileName));
431
EXTERN void Tcl_ValidateAllMemory _ANSI_ARGS_((char *file,
432
int line));
433
434
#else
435
436
# if USE_TCLALLOC
437
# define ckalloc(x) Tcl_Alloc(x)
438
# define ckfree(x) Tcl_Free(x)
439
# define ckrealloc(x,y) Tcl_Realloc(x,y)
440
# else
441
# define ckalloc(x) malloc(x)
442
# define ckfree(x) free(x)
443
# define ckrealloc(x,y) realloc(x,y)
444
# endif
445
# define Tcl_DumpActiveMemory(x)
446
# define Tcl_ValidateAllMemory(x,y)
447
448
#endif /* TCL_MEM_DEBUG */
449
450
/*
451
* Macro to free result of interpreter.
452
*/
453
454
#define Tcl_FreeResult(interp) \
455
if ((interp)->freeProc != 0) { \
456
if (((interp)->freeProc == TCL_DYNAMIC) \
457
|| ((interp)->freeProc == (Tcl_FreeProc *) free)) { \
458
ckfree((interp)->result); \
459
} else { \
460
(*(interp)->freeProc)((interp)->result); \
461
} \
462
(interp)->freeProc = 0; \
463
}
464
465
/*
466
* Forward declaration of Tcl_HashTable. Needed by some C++ compilers
467
* to prevent errors when the forward reference to Tcl_HashTable is
468
* encountered in the Tcl_HashEntry structure.
469
*/
470
471
#ifdef __cplusplus
472
struct Tcl_HashTable;
473
#endif
474
475
/*
476
* Structure definition for an entry in a hash table. No-one outside
477
* Tcl should access any of these fields directly; use the macros
478
* defined below.
479
*/
480
481
typedef struct Tcl_HashEntry {
482
struct Tcl_HashEntry *nextPtr; /* Pointer to next entry in this
483
* hash bucket, or NULL for end of
484
* chain. */
485
struct Tcl_HashTable *tablePtr; /* Pointer to table containing entry. */
486
struct Tcl_HashEntry **bucketPtr; /* Pointer to bucket that points to
487
* first entry in this entry's chain:
488
* used for deleting the entry. */
489
ClientData clientData; /* Application stores something here
490
* with Tcl_SetHashValue. */
491
union { /* Key has one of these forms: */
492
char *oneWordValue; /* One-word value for key. */
493
int words[1]; /* Multiple integer words for key.
494
* The actual size will be as large
495
* as necessary for this table's
496
* keys. */
497
char string[4]; /* String for key. The actual size
498
* will be as large as needed to hold
499
* the key. */
500
} key; /* MUST BE LAST FIELD IN RECORD!! */
501
} Tcl_HashEntry;
502
503
/*
504
* Structure definition for a hash table. Must be in tcl.h so clients
505
* can allocate space for these structures, but clients should never
506
* access any fields in this structure.
507
*/
508
509
#define TCL_SMALL_HASH_TABLE 4
510
typedef struct Tcl_HashTable {
511
Tcl_HashEntry **buckets; /* Pointer to bucket array. Each
512
* element points to first entry in
513
* bucket's hash chain, or NULL. */
514
Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
515
/* Bucket array used for small tables
516
* (to avoid mallocs and frees). */
517
int numBuckets; /* Total number of buckets allocated
518
* at **bucketPtr. */
519
int numEntries; /* Total number of entries present
520
* in table. */
521
int rebuildSize; /* Enlarge table when numEntries gets
522
* to be this large. */
523
int downShift; /* Shift count used in hashing
524
* function. Designed to use high-
525
* order bits of randomized keys. */
526
int mask; /* Mask value used in hashing
527
* function. */
528
int keyType; /* Type of keys used in this table.
529
* It's either TCL_STRING_KEYS,
530
* TCL_ONE_WORD_KEYS, or an integer
531
* giving the number of ints that
532
* is the size of the key.
533
*/
534
Tcl_HashEntry *(*findProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
535
char *key));
536
Tcl_HashEntry *(*createProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
537
char *key, int *newPtr));
538
} Tcl_HashTable;
539
540
/*
541
* Structure definition for information used to keep track of searches
542
* through hash tables:
543
*/
544
545
typedef struct Tcl_HashSearch {
546
Tcl_HashTable *tablePtr; /* Table being searched. */
547
int nextIndex; /* Index of next bucket to be
548
* enumerated after present one. */
549
Tcl_HashEntry *nextEntryPtr; /* Next entry to be enumerated in the
550
* the current bucket. */
551
} Tcl_HashSearch;
552
553
/*
554
* Acceptable key types for hash tables:
555
*/
556
557
#define TCL_STRING_KEYS 0
558
#define TCL_ONE_WORD_KEYS 1
559
560
/*
561
* Macros for clients to use to access fields of hash entries:
562
*/
563
564
#define Tcl_GetHashValue(h) ((h)->clientData)
565
#define Tcl_SetHashValue(h, value) ((h)->clientData = (ClientData) (value))
566
#define Tcl_GetHashKey(tablePtr, h) \
567
((char *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS) ? (h)->key.oneWordValue \
568
: (h)->key.string))
569
570
/*
571
* Macros to use for clients to use to invoke find and create procedures
572
* for hash tables:
573
*/
574
575
#define Tcl_FindHashEntry(tablePtr, key) \
576
(*((tablePtr)->findProc))(tablePtr, key)
577
#define Tcl_CreateHashEntry(tablePtr, key, newPtr) \
578
(*((tablePtr)->createProc))(tablePtr, key, newPtr)
579
580
/*
581
* Flag values to pass to Tcl_DoOneEvent to disable searches
582
* for some kinds of events:
583
*/
584
585
#define TCL_DONT_WAIT (1<<1)
586
#define TCL_WINDOW_EVENTS (1<<2)
587
#define TCL_FILE_EVENTS (1<<3)
588
#define TCL_TIMER_EVENTS (1<<4)
589
#define TCL_IDLE_EVENTS (1<<5) /* WAS 0x10 ???? */
590
#define TCL_ALL_EVENTS (~TCL_DONT_WAIT)
591
592
/*
593
* The following structure defines a generic event for the Tcl event
594
* system. These are the things that are queued in calls to Tcl_QueueEvent
595
* and serviced later by Tcl_DoOneEvent. There can be many different
596
* kinds of events with different fields, corresponding to window events,
597
* timer events, etc. The structure for a particular event consists of
598
* a Tcl_Event header followed by additional information specific to that
599
* event.
600
*/
601
602
struct Tcl_Event {
603
Tcl_EventProc *proc; /* Procedure to call to service this event. */
604
struct Tcl_Event *nextPtr; /* Next in list of pending events, or NULL. */
605
};
606
607
/*
608
* Positions to pass to Tk_QueueEvent:
609
*/
610
611
typedef enum {
612
TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, TCL_QUEUE_MARK
613
} Tcl_QueuePosition;
614
615
/*
616
* The following structure keeps is used to hold a time value, either as
617
* an absolute time (the number of seconds from the epoch) or as an
618
* elapsed time. On Unix systems the epoch is Midnight Jan 1, 1970 GMT.
619
* On Macintosh systems the epoch is Midnight Jan 1, 1904 GMT.
620
*/
621
622
typedef struct Tcl_Time {
623
long sec; /* Seconds. */
624
long usec; /* Microseconds. */
625
} Tcl_Time;
626
627
/*
628
* Bits to pass to Tcl_CreateFileHandler and Tcl_CreateChannelHandler
629
* to indicate what sorts of events are of interest:
630
*/
631
632
#define TCL_READABLE (1<<1)
633
#define TCL_WRITABLE (1<<2)
634
#define TCL_EXCEPTION (1<<3)
635
636
/*
637
* Flag values to pass to Tcl_OpenCommandChannel to indicate the
638
* disposition of the stdio handles. TCL_STDIN, TCL_STDOUT, TCL_STDERR,
639
* are also used in Tcl_GetStdChannel.
640
*/
641
642
#define TCL_STDIN (1<<1)
643
#define TCL_STDOUT (1<<2)
644
#define TCL_STDERR (1<<3)
645
#define TCL_ENFORCE_MODE (1<<4)
646
647
/*
648
* Typedefs for the various operations in a channel type:
649
*/
650
651
typedef int (Tcl_DriverBlockModeProc) _ANSI_ARGS_((ClientData instanceData,
652
int mode));
653
typedef int (Tcl_DriverCloseProc) _ANSI_ARGS_((ClientData instanceData,
654
Tcl_Interp *interp));
655
typedef int (Tcl_DriverInputProc) _ANSI_ARGS_((ClientData instanceData,
656
char *buf, int toRead, int *errorCodePtr));
657
typedef int (Tcl_DriverOutputProc) _ANSI_ARGS_((ClientData instanceData,
658
char *buf, int toWrite, int *errorCodePtr));
659
typedef int (Tcl_DriverSeekProc) _ANSI_ARGS_((ClientData instanceData,
660
long offset, int mode, int *errorCodePtr));
661
typedef int (Tcl_DriverSetOptionProc) _ANSI_ARGS_((
662
ClientData instanceData, Tcl_Interp *interp,
663
char *optionName, char *value));
664
typedef int (Tcl_DriverGetOptionProc) _ANSI_ARGS_((
665
ClientData instanceData, char *optionName,
666
Tcl_DString *dsPtr));
667
typedef void (Tcl_DriverWatchChannelProc) _ANSI_ARGS_((
668
ClientData instanceData, int mask));
669
typedef int (Tcl_DriverChannelReadyProc) _ANSI_ARGS_((
670
ClientData instanceData, int mask));
671
typedef Tcl_File (Tcl_DriverGetFileProc) _ANSI_ARGS_((ClientData instanceData,
672
int mask));
673
674
/*
675
* Enum for different end of line translation and recognition modes.
676
*/
677
678
typedef enum Tcl_EolTranslation {
679
TCL_TRANSLATE_AUTO, /* Eol == \r, \n and \r\n. */
680
TCL_TRANSLATE_CR, /* Eol == \r. */
681
TCL_TRANSLATE_LF, /* Eol == \n. */
682
TCL_TRANSLATE_CRLF /* Eol == \r\n. */
683
} Tcl_EolTranslation;
684
685
/*
686
* struct Tcl_ChannelType:
687
*
688
* One such structure exists for each type (kind) of channel.
689
* It collects together in one place all the functions that are
690
* part of the specific channel type.
691
*/
692
693
typedef struct Tcl_ChannelType {
694
char *typeName; /* The name of the channel type in Tcl
695
* commands. This storage is owned by
696
* channel type. */
697
Tcl_DriverBlockModeProc *blockModeProc;
698
/* Set blocking mode for the
699
* raw channel. May be NULL. */
700
Tcl_DriverCloseProc *closeProc; /* Procedure to call to close
701
* the channel. */
702
Tcl_DriverInputProc *inputProc; /* Procedure to call for input
703
* on channel. */
704
Tcl_DriverOutputProc *outputProc; /* Procedure to call for output
705
* on channel. */
706
Tcl_DriverSeekProc *seekProc; /* Procedure to call to seek
707
* on the channel. May be NULL. */
708
Tcl_DriverSetOptionProc *setOptionProc;
709
/* Set an option on a channel. */
710
Tcl_DriverGetOptionProc *getOptionProc;
711
/* Get an option from a channel. */
712
Tcl_DriverWatchChannelProc *watchChannelProc;
713
/* Set up the notifier to watch
714
* for events on this channel. */
715
Tcl_DriverChannelReadyProc *channelReadyProc;
716
/* Check for events of interest on
717
* this channel. */
718
Tcl_DriverGetFileProc *getFileProc; /* Get a Tcl_File from the channel
719
* or NULL if not supported. */
720
} Tcl_ChannelType;
721
722
/*
723
* The following flags determine whether the blockModeProc above should
724
* set the channel into blocking or nonblocking mode. They are passed
725
* as arguments to the blockModeProc procedure in the above structure.
726
*/
727
728
#define TCL_MODE_BLOCKING 0 /* Put channel into blocking mode. */
729
#define TCL_MODE_NONBLOCKING 1 /* Put channel into nonblocking
730
* mode. */
731
732
/*
733
* Types for file handles:
734
*/
735
736
#define TCL_UNIX_FD 1
737
#define TCL_MAC_FILE 2
738
#define TCL_MAC_SOCKET 3
739
#define TCL_WIN_PIPE 4
740
#define TCL_WIN_FILE 5
741
#define TCL_WIN_SOCKET 6
742
#define TCL_WIN_CONSOLE 7
743
#define TCL_WIN32S_PIPE 8
744
745
/*
746
* Enum for different types of file paths.
747
*/
748
749
typedef enum Tcl_PathType {
750
TCL_PATH_ABSOLUTE,
751
TCL_PATH_RELATIVE,
752
TCL_PATH_VOLUME_RELATIVE
753
} Tcl_PathType;
754
755
/*
756
* The following interface is exported for backwards compatibility, but
757
* is only implemented on Unix. Portable applications should use
758
* Tcl_OpenCommandChannel, instead.
759
*/
760
761
EXTERN int Tcl_CreatePipeline _ANSI_ARGS_((Tcl_Interp *interp,
762
int argc, char **argv, int **pidArrayPtr,
763
int *inPipePtr, int *outPipePtr,
764
int *errFilePtr));
765
766
/*
767
* Exported Tcl procedures:
768
*/
769
770
EXTERN void Tcl_AddErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
771
char *message));
772
EXTERN void Tcl_AllowExceptions _ANSI_ARGS_((Tcl_Interp *interp));
773
EXTERN void Tcl_AppendElement _ANSI_ARGS_((Tcl_Interp *interp,
774
char *string));
775
EXTERN void Tcl_AppendResult _ANSI_ARGS_(
776
TCL_VARARGS(Tcl_Interp *,interp));
777
EXTERN int Tcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp));
778
EXTERN Tcl_AsyncHandler Tcl_AsyncCreate _ANSI_ARGS_((Tcl_AsyncProc *proc,
779
ClientData clientData));
780
EXTERN void Tcl_AsyncDelete _ANSI_ARGS_((Tcl_AsyncHandler async));
781
EXTERN int Tcl_AsyncInvoke _ANSI_ARGS_((Tcl_Interp *interp,
782
int code));
783
EXTERN void Tcl_AsyncMark _ANSI_ARGS_((Tcl_AsyncHandler async));
784
EXTERN int Tcl_AsyncReady _ANSI_ARGS_((void));
785
EXTERN void Tcl_BackgroundError _ANSI_ARGS_((Tcl_Interp *interp));
786
EXTERN char Tcl_Backslash _ANSI_ARGS_((char *src,
787
int *readPtr));
788
EXTERN void Tcl_CallWhenDeleted _ANSI_ARGS_((Tcl_Interp *interp,
789
Tcl_InterpDeleteProc *proc,
790
ClientData clientData));
791
EXTERN void Tcl_CancelIdleCall _ANSI_ARGS_((Tcl_IdleProc *idleProc,
792
ClientData clientData));
793
#define Tcl_Ckalloc Tcl_Alloc
794
#define Tcl_Ckfree Tcl_Free
795
#define Tcl_Ckrealloc Tcl_Realloc
796
EXTERN int Tcl_Close _ANSI_ARGS_((Tcl_Interp *interp,
797
Tcl_Channel chan));
798
EXTERN int Tcl_CommandComplete _ANSI_ARGS_((char *cmd));
799
EXTERN char * Tcl_Concat _ANSI_ARGS_((int argc, char **argv));
800
EXTERN int Tcl_ConvertElement _ANSI_ARGS_((char *src,
801
char *dst, int flags));
802
EXTERN int Tcl_CreateAlias _ANSI_ARGS_((Tcl_Interp *slave,
803
char *slaveCmd, Tcl_Interp *target,
804
char *targetCmd, int argc, char **argv));
805
EXTERN Tcl_Channel Tcl_CreateChannel _ANSI_ARGS_((
806
Tcl_ChannelType *typePtr, char *chanName,
807
ClientData instanceData, int mask));
808
EXTERN void Tcl_CreateChannelHandler _ANSI_ARGS_((
809
Tcl_Channel chan, int mask,
810
Tcl_ChannelProc *proc, ClientData clientData));
811
EXTERN void Tcl_CreateCloseHandler _ANSI_ARGS_((
812
Tcl_Channel chan, Tcl_CloseProc *proc,
813
ClientData clientData));
814
EXTERN Tcl_Command Tcl_CreateCommand _ANSI_ARGS_((Tcl_Interp *interp,
815
char *cmdName, Tcl_CmdProc *proc,
816
ClientData clientData,
817
Tcl_CmdDeleteProc *deleteProc));
818
EXTERN void Tcl_CreateEventSource _ANSI_ARGS_((
819
Tcl_EventSetupProc *setupProc, Tcl_EventCheckProc
820
*checkProc, ClientData clientData));
821
EXTERN void Tcl_CreateExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
822
ClientData clientData));
823
EXTERN void Tcl_CreateFileHandler _ANSI_ARGS_((
824
Tcl_File file, int mask, Tcl_FileProc *proc,
825
ClientData clientData));
826
EXTERN Tcl_Interp * Tcl_CreateInterp _ANSI_ARGS_((void));
827
EXTERN void Tcl_CreateMathFunc _ANSI_ARGS_((Tcl_Interp *interp,
828
char *name, int numArgs, Tcl_ValueType *argTypes,
829
Tcl_MathProc *proc, ClientData clientData));
830
EXTERN void Tcl_CreateModalTimeout _ANSI_ARGS_((int milliseconds,
831
Tcl_TimerProc *proc, ClientData clientData));
832
EXTERN Tcl_Interp *Tcl_CreateSlave _ANSI_ARGS_((Tcl_Interp *interp,
833
char *slaveName, int isSafe));
834
EXTERN Tcl_TimerToken Tcl_CreateTimerHandler _ANSI_ARGS_((int milliseconds,
835
Tcl_TimerProc *proc, ClientData clientData));
836
EXTERN Tcl_Trace Tcl_CreateTrace _ANSI_ARGS_((Tcl_Interp *interp,
837
int level, Tcl_CmdTraceProc *proc,
838
ClientData clientData));
839
EXTERN char * Tcl_DbCkalloc _ANSI_ARGS_((unsigned int size,
840
char *file, int line));
841
EXTERN int Tcl_DbCkfree _ANSI_ARGS_((char *ptr,
842
char *file, int line));
843
EXTERN char * Tcl_DbCkrealloc _ANSI_ARGS_((char *ptr,
844
unsigned int size, char *file, int line));
845
EXTERN void Tcl_DeleteAssocData _ANSI_ARGS_((Tcl_Interp *interp,
846
char *name));
847
EXTERN int Tcl_DeleteCommand _ANSI_ARGS_((Tcl_Interp *interp,
848
char *cmdName));
849
EXTERN void Tcl_DeleteChannelHandler _ANSI_ARGS_((
850
Tcl_Channel chan, Tcl_ChannelProc *proc,
851
ClientData clientData));
852
EXTERN void Tcl_DeleteCloseHandler _ANSI_ARGS_((
853
Tcl_Channel chan, Tcl_CloseProc *proc,
854
ClientData clientData));
855
EXTERN void Tcl_DeleteEventSource _ANSI_ARGS_((
856
Tcl_EventSetupProc *setupProc,
857
Tcl_EventCheckProc *checkProc,
858
ClientData clientData));
859
EXTERN void Tcl_DeleteEvents _ANSI_ARGS_((
860
Tcl_EventDeleteProc *proc,
861
ClientData clientData));
862
EXTERN void Tcl_DeleteExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
863
ClientData clientData));
864
EXTERN void Tcl_DeleteFileHandler _ANSI_ARGS_((
865
Tcl_File file));
866
EXTERN void Tcl_DeleteHashEntry _ANSI_ARGS_((
867
Tcl_HashEntry *entryPtr));
868
EXTERN void Tcl_DeleteHashTable _ANSI_ARGS_((
869
Tcl_HashTable *tablePtr));
870
EXTERN void Tcl_DeleteInterp _ANSI_ARGS_((Tcl_Interp *interp));
871
EXTERN void Tcl_DeleteModalTimeout _ANSI_ARGS_((
872
Tcl_TimerProc *proc, ClientData clientData));
873
EXTERN void Tcl_DeleteTimerHandler _ANSI_ARGS_((
874
Tcl_TimerToken token));
875
EXTERN void Tcl_DeleteTrace _ANSI_ARGS_((Tcl_Interp *interp,
876
Tcl_Trace trace));
877
EXTERN void Tcl_DetachPids _ANSI_ARGS_((int numPids, int *pidPtr));
878
EXTERN void Tcl_DontCallWhenDeleted _ANSI_ARGS_((
879
Tcl_Interp *interp, Tcl_InterpDeleteProc *proc,
880
ClientData clientData));
881
EXTERN int Tcl_DoOneEvent _ANSI_ARGS_((int flags));
882
EXTERN void Tcl_DoWhenIdle _ANSI_ARGS_((Tcl_IdleProc *proc,
883
ClientData clientData));
884
EXTERN char * Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString *dsPtr,
885
char *string, int length));
886
EXTERN char * Tcl_DStringAppendElement _ANSI_ARGS_((
887
Tcl_DString *dsPtr, char *string));
888
EXTERN void Tcl_DStringEndSublist _ANSI_ARGS_((Tcl_DString *dsPtr));
889
EXTERN void Tcl_DStringFree _ANSI_ARGS_((Tcl_DString *dsPtr));
890
EXTERN void Tcl_DStringGetResult _ANSI_ARGS_((Tcl_Interp *interp,
891
Tcl_DString *dsPtr));
892
EXTERN void Tcl_DStringInit _ANSI_ARGS_((Tcl_DString *dsPtr));
893
EXTERN void Tcl_DStringResult _ANSI_ARGS_((Tcl_Interp *interp,
894
Tcl_DString *dsPtr));
895
EXTERN void Tcl_DStringSetLength _ANSI_ARGS_((Tcl_DString *dsPtr,
896
int length));
897
EXTERN void Tcl_DStringStartSublist _ANSI_ARGS_((
898
Tcl_DString *dsPtr));
899
EXTERN int Tcl_Eof _ANSI_ARGS_((Tcl_Channel chan));
900
EXTERN char * Tcl_ErrnoId _ANSI_ARGS_((void));
901
EXTERN char * Tcl_ErrnoMsg _ANSI_ARGS_((int err));
902
EXTERN int Tcl_Eval _ANSI_ARGS_((Tcl_Interp *interp, char *cmd));
903
EXTERN int Tcl_EvalFile _ANSI_ARGS_((Tcl_Interp *interp,
904
char *fileName));
905
EXTERN void Tcl_EventuallyFree _ANSI_ARGS_((ClientData clientData,
906
Tcl_FreeProc *freeProc));
907
EXTERN void Tcl_Exit _ANSI_ARGS_((int status));
908
EXTERN int Tcl_ExprBoolean _ANSI_ARGS_((Tcl_Interp *interp,
909
char *string, int *ptr));
910
EXTERN int Tcl_ExprDouble _ANSI_ARGS_((Tcl_Interp *interp,
911
char *string, double *ptr));
912
EXTERN int Tcl_ExprLong _ANSI_ARGS_((Tcl_Interp *interp,
913
char *string, long *ptr));
914
EXTERN int Tcl_ExprString _ANSI_ARGS_((Tcl_Interp *interp,
915
char *string));
916
EXTERN int Tcl_FileReady _ANSI_ARGS_((Tcl_File file,
917
int mask));
918
EXTERN void Tcl_FindExecutable _ANSI_ARGS_((char *argv0));
919
EXTERN Tcl_HashEntry * Tcl_FirstHashEntry _ANSI_ARGS_((
920
Tcl_HashTable *tablePtr,
921
Tcl_HashSearch *searchPtr));
922
EXTERN int Tcl_Flush _ANSI_ARGS_((Tcl_Channel chan));
923
EXTERN void Tcl_FreeFile _ANSI_ARGS_((
924
Tcl_File file));
925
EXTERN int Tcl_GetAlias _ANSI_ARGS_((Tcl_Interp *interp,
926
char *slaveCmd, Tcl_Interp **targetInterpPtr,
927
char **targetCmdPtr, int *argcPtr,
928
char ***argvPtr));
929
EXTERN ClientData Tcl_GetAssocData _ANSI_ARGS_((Tcl_Interp *interp,
930
char *name, Tcl_InterpDeleteProc **procPtr));
931
EXTERN int Tcl_GetBoolean _ANSI_ARGS_((Tcl_Interp *interp,
932
char *string, int *boolPtr));
933
EXTERN Tcl_Channel Tcl_GetChannel _ANSI_ARGS_((Tcl_Interp *interp,
934
char *chanName, int *modePtr));
935
EXTERN int Tcl_GetChannelBufferSize _ANSI_ARGS_((
936
Tcl_Channel chan));
937
EXTERN Tcl_File Tcl_GetChannelFile _ANSI_ARGS_((Tcl_Channel chan,
938
int direction));
939
EXTERN ClientData Tcl_GetChannelInstanceData _ANSI_ARGS_((
940
Tcl_Channel chan));
941
EXTERN int Tcl_GetChannelMode _ANSI_ARGS_((Tcl_Channel chan));
942
EXTERN char * Tcl_GetChannelName _ANSI_ARGS_((Tcl_Channel chan));
943
EXTERN int Tcl_GetChannelOption _ANSI_ARGS_((Tcl_Channel chan,
944
char *optionName, Tcl_DString *dsPtr));
945
EXTERN Tcl_ChannelType * Tcl_GetChannelType _ANSI_ARGS_((Tcl_Channel chan));
946
EXTERN int Tcl_GetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
947
char *cmdName, Tcl_CmdInfo *infoPtr));
948
EXTERN char * Tcl_GetCommandName _ANSI_ARGS_((Tcl_Interp *interp,
949
Tcl_Command command));
950
EXTERN char * Tcl_GetCwd _ANSI_ARGS_((char *buf, int len));
951
EXTERN int Tcl_GetDouble _ANSI_ARGS_((Tcl_Interp *interp,
952
char *string, double *doublePtr));
953
EXTERN int Tcl_GetErrno _ANSI_ARGS_((void));
954
EXTERN Tcl_File Tcl_GetFile _ANSI_ARGS_((ClientData fileData,
955
int type));
956
EXTERN ClientData Tcl_GetFileInfo _ANSI_ARGS_((Tcl_File file,
957
int *typePtr));
958
EXTERN char * Tcl_GetHostName _ANSI_ARGS_((void));
959
EXTERN int Tcl_GetInt _ANSI_ARGS_((Tcl_Interp *interp,
960
char *string, int *intPtr));
961
EXTERN int Tcl_GetInterpPath _ANSI_ARGS_((Tcl_Interp *askInterp,
962
Tcl_Interp *slaveInterp));
963
EXTERN Tcl_Interp *Tcl_GetMaster _ANSI_ARGS_((Tcl_Interp *interp));
964
EXTERN ClientData Tcl_GetNotifierData _ANSI_ARGS_((Tcl_File file,
965
Tcl_FileFreeProc **freeProcPtr));
966
EXTERN int Tcl_GetOpenFile _ANSI_ARGS_((Tcl_Interp *interp,
967
char *string, int write, int checkUsage,
968
ClientData *filePtr));
969
EXTERN Tcl_PathType Tcl_GetPathType _ANSI_ARGS_((char *path));
970
EXTERN int Tcl_Gets _ANSI_ARGS_((Tcl_Channel chan,
971
Tcl_DString *dsPtr));
972
EXTERN Tcl_Interp *Tcl_GetSlave _ANSI_ARGS_((Tcl_Interp *interp,
973
char *slaveName));
974
EXTERN Tcl_Channel Tcl_GetStdChannel _ANSI_ARGS_((int type));
975
EXTERN char * Tcl_GetVar _ANSI_ARGS_((Tcl_Interp *interp,
976
char *varName, int flags));
977
EXTERN char * Tcl_GetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
978
char *part1, char *part2, int flags));
979
EXTERN int Tcl_GlobalEval _ANSI_ARGS_((Tcl_Interp *interp,
980
char *command));
981
EXTERN char * Tcl_HashStats _ANSI_ARGS_((Tcl_HashTable *tablePtr));
982
EXTERN int Tcl_Init _ANSI_ARGS_((Tcl_Interp *interp));
983
EXTERN void Tcl_InitHashTable _ANSI_ARGS_((Tcl_HashTable *tablePtr,
984
int keyType));
985
EXTERN void Tcl_InitMemory _ANSI_ARGS_((Tcl_Interp *interp));
986
EXTERN int Tcl_InputBlocked _ANSI_ARGS_((Tcl_Channel chan));
987
EXTERN int Tcl_InputBuffered _ANSI_ARGS_((Tcl_Channel chan));
988
EXTERN int Tcl_InterpDeleted _ANSI_ARGS_((Tcl_Interp *interp));
989
EXTERN int Tcl_IsSafe _ANSI_ARGS_((Tcl_Interp *interp));
990
EXTERN char * Tcl_JoinPath _ANSI_ARGS_((int argc, char **argv,
991
Tcl_DString *resultPtr));
992
EXTERN int Tcl_LinkVar _ANSI_ARGS_((Tcl_Interp *interp,
993
char *varName, char *addr, int type));
994
EXTERN void Tcl_Main _ANSI_ARGS_((int argc, char **argv,
995
Tcl_AppInitProc *appInitProc));
996
EXTERN Tcl_Channel Tcl_MakeFileChannel _ANSI_ARGS_((ClientData inFile,
997
ClientData outFile, int mode));
998
EXTERN int Tcl_MakeSafe _ANSI_ARGS_((Tcl_Interp *interp));
999
EXTERN Tcl_Channel Tcl_MakeTcpClientChannel _ANSI_ARGS_((
1000
ClientData tcpSocket));
1001
EXTERN char * Tcl_Merge _ANSI_ARGS_((int argc, char **argv));
1002
EXTERN Tcl_HashEntry * Tcl_NextHashEntry _ANSI_ARGS_((
1003
Tcl_HashSearch *searchPtr));
1004
EXTERN Tcl_Channel Tcl_OpenCommandChannel _ANSI_ARGS_((
1005
Tcl_Interp *interp, int argc, char **argv,
1006
int flags));
1007
EXTERN Tcl_Channel Tcl_OpenFileChannel _ANSI_ARGS_((Tcl_Interp *interp,
1008
char *fileName, char *modeString,
1009
int permissions));
1010
EXTERN Tcl_Channel Tcl_OpenTcpClient _ANSI_ARGS_((Tcl_Interp *interp,
1011
int port, char *address, char *myaddr,
1012
int myport, int async));
1013
EXTERN Tcl_Channel Tcl_OpenTcpServer _ANSI_ARGS_((Tcl_Interp *interp,
1014
int port, char *host,
1015
Tcl_TcpAcceptProc *acceptProc,
1016
ClientData callbackData));
1017
EXTERN char * Tcl_ParseVar _ANSI_ARGS_((Tcl_Interp *interp,
1018
char *string, char **termPtr));
1019
EXTERN int Tcl_PkgProvide _ANSI_ARGS_((Tcl_Interp *interp,
1020
char *name, char *version));
1021
EXTERN char * Tcl_PkgRequire _ANSI_ARGS_((Tcl_Interp *interp,
1022
char *name, char *version, int exact));
1023
EXTERN char * Tcl_PosixError _ANSI_ARGS_((Tcl_Interp *interp));
1024
EXTERN void Tcl_Preserve _ANSI_ARGS_((ClientData data));
1025
EXTERN void Tcl_PrintDouble _ANSI_ARGS_((Tcl_Interp *interp,
1026
double value, char *dst));
1027
EXTERN int Tcl_PutEnv _ANSI_ARGS_((CONST char *string));
1028
EXTERN void Tcl_QueueEvent _ANSI_ARGS_((Tcl_Event *evPtr,
1029
Tcl_QueuePosition position));
1030
EXTERN int Tcl_Read _ANSI_ARGS_((Tcl_Channel chan,
1031
char *bufPtr, int toRead));
1032
EXTERN void Tcl_ReapDetachedProcs _ANSI_ARGS_((void));
1033
EXTERN int Tcl_RecordAndEval _ANSI_ARGS_((Tcl_Interp *interp,
1034
char *cmd, int flags));
1035
EXTERN Tcl_RegExp Tcl_RegExpCompile _ANSI_ARGS_((Tcl_Interp *interp,
1036
char *string));
1037
EXTERN int Tcl_RegExpExec _ANSI_ARGS_((Tcl_Interp *interp,
1038
Tcl_RegExp regexp, char *string, char *start));
1039
EXTERN int Tcl_RegExpMatch _ANSI_ARGS_((Tcl_Interp *interp,
1040
char *string, char *pattern));
1041
EXTERN void Tcl_RegExpRange _ANSI_ARGS_((Tcl_RegExp regexp,
1042
int index, char **startPtr, char **endPtr));
1043
EXTERN void Tcl_RegisterChannel _ANSI_ARGS_((Tcl_Interp *interp,
1044
Tcl_Channel chan));
1045
EXTERN void Tcl_Release _ANSI_ARGS_((ClientData clientData));
1046
EXTERN void Tcl_ResetResult _ANSI_ARGS_((Tcl_Interp *interp));
1047
#define Tcl_Return Tcl_SetResult
1048
EXTERN int Tcl_ScanElement _ANSI_ARGS_((char *string,
1049
int *flagPtr));
1050
EXTERN int Tcl_Seek _ANSI_ARGS_((Tcl_Channel chan,
1051
int offset, int mode));
1052
EXTERN void Tcl_SetAssocData _ANSI_ARGS_((Tcl_Interp *interp,
1053
char *name, Tcl_InterpDeleteProc *proc,
1054
ClientData clientData));
1055
EXTERN void Tcl_SetChannelBufferSize _ANSI_ARGS_((
1056
Tcl_Channel chan, int sz));
1057
EXTERN int Tcl_SetChannelOption _ANSI_ARGS_((
1058
Tcl_Interp *interp, Tcl_Channel chan,
1059
char *optionName, char *newValue));
1060
EXTERN int Tcl_SetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
1061
char *cmdName, Tcl_CmdInfo *infoPtr));
1062
EXTERN void Tcl_SetErrno _ANSI_ARGS_((int err));
1063
EXTERN void Tcl_SetErrorCode _ANSI_ARGS_(
1064
TCL_VARARGS(Tcl_Interp *,interp));
1065
EXTERN void Tcl_SetMaxBlockTime _ANSI_ARGS_((Tcl_Time *timePtr));
1066
EXTERN void Tcl_SetNotifierData _ANSI_ARGS_((Tcl_File file,
1067
Tcl_FileFreeProc *freeProcPtr, ClientData data));
1068
EXTERN void Tcl_SetPanicProc _ANSI_ARGS_((void (*proc)
1069
_ANSI_ARGS_(TCL_VARARGS(char *, format))));
1070
EXTERN int Tcl_SetRecursionLimit _ANSI_ARGS_((Tcl_Interp *interp,
1071
int depth));
1072
EXTERN void Tcl_SetResult _ANSI_ARGS_((Tcl_Interp *interp,
1073
char *string, Tcl_FreeProc *freeProc));
1074
EXTERN void Tcl_SetStdChannel _ANSI_ARGS_((Tcl_Channel channel,
1075
int type));
1076
EXTERN char * Tcl_SetVar _ANSI_ARGS_((Tcl_Interp *interp,
1077
char *varName, char *newValue, int flags));
1078
EXTERN char * Tcl_SetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1079
char *part1, char *part2, char *newValue,
1080
int flags));
1081
EXTERN char * Tcl_SignalId _ANSI_ARGS_((int sig));
1082
EXTERN char * Tcl_SignalMsg _ANSI_ARGS_((int sig));
1083
EXTERN void Tcl_Sleep _ANSI_ARGS_((int ms));
1084
EXTERN void Tcl_SourceRCFile _ANSI_ARGS_((Tcl_Interp *interp));
1085
EXTERN int Tcl_SplitList _ANSI_ARGS_((Tcl_Interp *interp,
1086
char *list, int *argcPtr, char ***argvPtr));
1087
EXTERN void Tcl_SplitPath _ANSI_ARGS_((char *path,
1088
int *argcPtr, char ***argvPtr));
1089
EXTERN void Tcl_StaticPackage _ANSI_ARGS_((Tcl_Interp *interp,
1090
char *pkgName, Tcl_PackageInitProc *initProc,
1091
Tcl_PackageInitProc *safeInitProc));
1092
EXTERN int Tcl_StringMatch _ANSI_ARGS_((char *string,
1093
char *pattern));
1094
EXTERN int Tcl_Tell _ANSI_ARGS_((Tcl_Channel chan));
1095
#define Tcl_TildeSubst Tcl_TranslateFileName
1096
EXTERN int Tcl_TraceVar _ANSI_ARGS_((Tcl_Interp *interp,
1097
char *varName, int flags, Tcl_VarTraceProc *proc,
1098
ClientData clientData));
1099
EXTERN int Tcl_TraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1100
char *part1, char *part2, int flags,
1101
Tcl_VarTraceProc *proc, ClientData clientData));
1102
EXTERN char * Tcl_TranslateFileName _ANSI_ARGS_((Tcl_Interp *interp,
1103
char *name, Tcl_DString *bufferPtr));
1104
EXTERN void Tcl_UnlinkVar _ANSI_ARGS_((Tcl_Interp *interp,
1105
char *varName));
1106
EXTERN int Tcl_UnregisterChannel _ANSI_ARGS_((Tcl_Interp *interp,
1107
Tcl_Channel chan));
1108
EXTERN int Tcl_UnsetVar _ANSI_ARGS_((Tcl_Interp *interp,
1109
char *varName, int flags));
1110
EXTERN int Tcl_UnsetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1111
char *part1, char *part2, int flags));
1112
EXTERN void Tcl_UntraceVar _ANSI_ARGS_((Tcl_Interp *interp,
1113
char *varName, int flags, Tcl_VarTraceProc *proc,
1114
ClientData clientData));
1115
EXTERN void Tcl_UntraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1116
char *part1, char *part2, int flags,
1117
Tcl_VarTraceProc *proc, ClientData clientData));
1118
EXTERN void Tcl_UpdateLinkedVar _ANSI_ARGS_((Tcl_Interp *interp,
1119
char *varName));
1120
EXTERN int Tcl_UpVar _ANSI_ARGS_((Tcl_Interp *interp,
1121
char *frameName, char *varName,
1122
char *localName, int flags));
1123
EXTERN int Tcl_UpVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1124
char *frameName, char *part1, char *part2,
1125
char *localName, int flags));
1126
EXTERN int Tcl_VarEval _ANSI_ARGS_(
1127
TCL_VARARGS(Tcl_Interp *,interp));
1128
EXTERN ClientData Tcl_VarTraceInfo _ANSI_ARGS_((Tcl_Interp *interp,
1129
char *varName, int flags,
1130
Tcl_VarTraceProc *procPtr,
1131
ClientData prevClientData));
1132
EXTERN ClientData Tcl_VarTraceInfo2 _ANSI_ARGS_((Tcl_Interp *interp,
1133
char *part1, char *part2, int flags,
1134
Tcl_VarTraceProc *procPtr,
1135
ClientData prevClientData));
1136
EXTERN int Tcl_WaitForEvent _ANSI_ARGS_((Tcl_Time *timePtr));
1137
EXTERN int Tcl_WaitPid _ANSI_ARGS_((int pid, int *statPtr,
1138
int options));
1139
EXTERN void Tcl_WatchFile _ANSI_ARGS_((Tcl_File file,
1140
int mask));
1141
EXTERN int Tcl_Write _ANSI_ARGS_((Tcl_Channel chan,
1142
char *s, int slen));
1143
1144
#endif /* RESOURCE_INCLUDED */
1145
1146
#undef extern
1147
1148
#endif /* _TCL */
1149
1150