]> git.zerfleddert.de Git - micropolis/blob - src/tclx/src/tclxtend.h
338e7f9ddefbdcce972d345fd10186e86ea685e9
[micropolis] / src / tclx / src / tclxtend.h
1 /*
2 * tclExtend.h
3 *
4 * External declarations for the extended Tcl library.
5 *-----------------------------------------------------------------------------
6 * Copyright 1992 Karl Lehenbauer and Mark Diekhans.
7 *
8 * Permission to use, copy, modify, and distribute this software and its
9 * documentation for any purpose and without fee is hereby granted, provided
10 * that the above copyright notice appear in all copies. Karl Lehenbauer and
11 * Mark Diekhans make no representations about the suitability of this
12 * software for any purpose. It is provided "as is" without express or
13 * implied warranty.
14 *-----------------------------------------------------------------------------
15 * $Id: tclExtend.h,v 2.0 1992/10/16 04:51:29 markd Rel $
16 *-----------------------------------------------------------------------------
17 */
18
19 #ifndef TCLEXTEND_H
20 #define TCLEXTEND_H
21
22 #include <stdio.h>
23 #include "tcl.h"
24
25 /*
26 * Version suffix for extended Tcl, this is appended to the standard Tcl
27 * version to form the actual extended Tcl version.
28 */
29
30 #define TCL_EXTD_VERSION_SUFFIX "c" /* 6.1c, 6.2c or 6.3c */
31
32 #ifdef MSDOS
33 #define TCL_NO_ITIMER
34 #define TCL_NO_FILE_LOCKING
35 #define TCL_IEEE_FP_MATH
36 #define TCL_32_BIT_RANDOM
37 #define TCL_POSIX_SIG
38 #define TCL_TM_GMTOFF
39 #endif
40
41 typedef void *void_pt;
42
43 /*
44 * Flags for Tcl shell startup.
45 */
46 #define TCLSH_QUICK_STARTUP 1 /* Don't process default & init files. */
47 #define TCLSH_ABORT_STARTUP_ERR 2 /* Abort on an error. */
48 #define TCLSH_NO_INIT_FILE 4 /* Don't process the init file. */
49
50 /*
51 * These globals are used by the infox command. Should be set by main.
52 */
53
54 extern char *tclxVersion; /* Extended Tcl version number. */
55 extern int tclxPatchlevel; /* Extended Tcl patch level. */
56
57 extern char *tclAppName; /* Application name */
58 extern char *tclAppLongname; /* Long, natural language application name */
59 extern char *tclAppVersion; /* Version number of the application */
60
61 /*
62 * If set to be a pointer to the procedure Tcl_RecordAndEval, will link in
63 * history. Should be set by main.
64 */
65 extern int (*tclShellCmdEvalProc) ();
66
67 /*
68 * If non-zero, a signal was received. Normally signals are handled in
69 * Tcl_Eval, but if an application does not return to eval for some period
70 * of time, then this should be checked and Tcl_CheckForSignal called if
71 * this is set.
72 */
73 extern int tclReceivedSignal;
74
75 /*
76 * Exported Extended Tcl functions.
77 */
78
79 EXTERN int
80 Tcl_CheckForSignal _ANSI_ARGS_((Tcl_Interp *interp,
81 int cmdResultCode));
82
83 EXTERN void
84 Tcl_CommandLoop _ANSI_ARGS_((Tcl_Interp *interp,
85 FILE *inFile,
86 FILE *outFile,
87 int (*evalProc) (),
88 unsigned options));
89
90 EXTERN Tcl_Interp *
91 Tcl_CreateExtendedInterp ();
92
93 EXTERN char *
94 Tcl_DeleteKeyedListField _ANSI_ARGS_((Tcl_Interp *interp,
95 CONST char *fieldName,
96 CONST char *keyedList));
97 EXTERN char *
98 Tcl_DownShift _ANSI_ARGS_((char *targetStr,
99 CONST char *sourceStr));
100 EXTERN void
101 Tcl_ErrorAbort _ANSI_ARGS_((Tcl_Interp *interp,
102 int exitCode));
103
104 EXTERN char *
105 Tcl_UpShift _ANSI_ARGS_((char *targetStr,
106 CONST char *sourceStr));
107
108 EXTERN int
109 Tcl_GetKeyedListField _ANSI_ARGS_((Tcl_Interp *interp,
110 CONST char *fieldName,
111 CONST char *keyedList,
112 char **fieldValuePtr));
113
114 int
115 Tcl_GetKeyedListKeys _ANSI_ARGS_((Tcl_Interp *interp,
116 CONST char *subFieldName,
117 CONST char *keyedList,
118 int *keyesArgcPtr,
119 char ***keyesArgvPtr));
120
121 EXTERN int
122 Tcl_GetLong _ANSI_ARGS_((Tcl_Interp *interp,
123 CONST char *string,
124 long *longPtr));
125
126 EXTERN int
127 Tcl_GetUnsigned _ANSI_ARGS_((Tcl_Interp *interp,
128 CONST char *string,
129 unsigned *unsignedPtr));
130
131 EXTERN char *
132 Tcl_SetKeyedListField _ANSI_ARGS_((Tcl_Interp *interp,
133 CONST char *fieldName,
134 CONST char *fieldvalue,
135 CONST char *keyedList));
136
137 EXTERN int
138 Tcl_StrToLong _ANSI_ARGS_((CONST char *string,
139 int base,
140 long *longPtr));
141
142 EXTERN int
143 Tcl_StrToInt _ANSI_ARGS_((CONST char *string,
144 int base,
145 int *intPtr));
146
147 EXTERN int
148 Tcl_StrToUnsigned _ANSI_ARGS_((CONST char *string,
149 int base,
150 unsigned *unsignedPtr));
151
152 EXTERN int
153 Tcl_StrToDouble _ANSI_ARGS_((CONST char *string,
154 double *doublePtr));
155
156 EXTERN void_pt
157 Tcl_HandleAlloc _ANSI_ARGS_((void_pt headerPtr,
158 char *handlePtr));
159
160 EXTERN void
161 Tcl_HandleFree _ANSI_ARGS_((void_pt headerPtr,
162 void_pt entryPtr));
163
164 EXTERN void_pt
165 Tcl_HandleTblInit _ANSI_ARGS_((CONST char *handleBase,
166 int entrySize,
167 int initEntries));
168
169 EXTERN void
170 Tcl_HandleTblRelease _ANSI_ARGS_((void_pt headerPtr));
171
172 EXTERN int
173 Tcl_HandleTblUseCount _ANSI_ARGS_((void_pt headerPtr,
174 int amount));
175
176 EXTERN void_pt
177 Tcl_HandleWalk _ANSI_ARGS_((void_pt headerPtr,
178 int *walkKeyPtr));
179
180 EXTERN void
181 Tcl_WalkKeyToHandle _ANSI_ARGS_((void_pt headerPtr,
182 int walkKey,
183 char *handlePtr));
184
185 EXTERN void_pt
186 Tcl_HandleXlate _ANSI_ARGS_((Tcl_Interp *interp,
187 void_pt headerPtr,
188 CONST char *handle));
189
190 EXTERN int
191 Tcl_MathError _ANSI_ARGS_((char *functionName,
192 int errorType));
193
194 EXTERN void
195 Tcl_Startup _ANSI_ARGS_((Tcl_Interp *interp,
196 int argc,
197 CONST char **argv,
198 CONST char *defaultFile,
199 unsigned options));
200
201 EXTERN int
202 Tcl_ShellEnvInit _ANSI_ARGS_((Tcl_Interp *interp,
203 unsigned options,
204 CONST char *programName,
205 int argc,
206 CONST char **argv,
207 int interactive,
208 CONST char *defaultFile));
209
210 EXTERN int
211 Tcl_System _ANSI_ARGS_((Tcl_Interp *interp,
212 char *command));
213
214 #endif
Impressum, Datenschutz