Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
att
GitHub Repository: att/ast
Path: blob/master/src/lib/libtksh/include/tclInt.h
1810 views
1
2
/* NOTE:
3
*
4
* All the files in this directory are directly from the Tcl distribution
5
* with one exception: the Tcl_InfoCmd has been deleted from tclCmdIL.c
6
* and the replacement is in the tksh directory.
7
*/
8
9
#define xxxcommandTable commandTable
10
#define xxxpatLengths patLengths
11
#define xxxregexps regexps
12
#define xxxpatterns patterns
13
#include "tkshlib.h"
14
typedef struct Command {
15
Tcl_HashEntry *hPtr; /* Pointer to the hash table entry in
16
* interp->commandTable that refers to
17
* this command. Used to get a command's
18
* name from its Tcl_Command handle. */
19
Tcl_CmdProc *proc; /* Procedure to process command. */
20
ClientData clientData; /* Arbitrary value to pass to proc. */
21
Tcl_CmdDeleteProc *deleteProc;
22
/* Procedure to invoke when deleting
23
* command. */
24
ClientData deleteData; /* Arbitrary value to pass to deleteProc
25
* (usually the same as clientData). */
26
} Command;
27
28
29
#define MAX_MATH_ARGS 5
30
typedef struct MathFunc {
31
int numArgs; /* Number of arguments for function. */
32
Tcl_ValueType argTypes[MAX_MATH_ARGS];
33
/* Acceptable types for each argument. */
34
Tcl_MathProc *proc; /* Procedure that implements this function. */
35
ClientData clientData; /* Additional argument to pass to the function
36
* when invoking it. */
37
} MathFunc;
38
39
extern void TclExprFloatError _ANSI_ARGS_((Tcl_Interp *interp,
40
double value));
41
42
#define EXPR_INITIALIZED 0x10
43
44
#ifdef NO_FLOAT_H
45
#undef NO_FLOAT_H
46
#endif
47
48
#ifdef NO_STDLIB_H
49
#undef NO_STDLIB_H
50
#endif
51
52
#if 0
53
extern double strtod();
54
/* Bug in sprintf */
55
#ifdef sprintf
56
#undef sprintf
57
#endif
58
#endif
59
60
/* Don't want to use sh_write */
61
#ifdef write
62
#undef write
63
#endif
64
65
#define NSUBEXP 50
66
typedef struct regexp {
67
char *startp[NSUBEXP];
68
char *endp[NSUBEXP];
69
char regstart; /* Internal use only. */
70
char reganch; /* Internal use only. */
71
char *regmust; /* Internal use only. */
72
int regmlen; /* Internal use only. */
73
char program[1]; /* Unwarranted chumminess with compiler. */
74
} regexp;
75
76
EXTERN regexp *TclRegComp _ANSI_ARGS_((char *exp));
77
EXTERN int TclRegExec _ANSI_ARGS_((regexp *prog, char *string, char *start));
78
EXTERN void TclRegSub _ANSI_ARGS_((regexp *prog, char *source, char *dest));
79
EXTERN void TclRegError _ANSI_ARGS_((char *msg));
80
EXTERN char *TclGetRegError _ANSI_ARGS_((void));
81
82