]>
cvs.zerfleddert.de Git - micropolis/blob - src/tclx/src/tclxcret.c
4 * Contains a routine to create an interpreter and initialize all the Extended
5 * Tcl commands. It is is a seperate file so that an application may create
6 * the interpreter and add in only a subset of the Extended Tcl commands.
7 *-----------------------------------------------------------------------------
8 * Copyright 1992 Karl Lehenbauer and Mark Diekhans.
10 * Permission to use, copy, modify, and distribute this software and its
11 * documentation for any purpose and without fee is hereby granted, provided
12 * that the above copyright notice appear in all copies. Karl Lehenbauer and
13 * Mark Diekhans make no representations about the suitability of this
14 * software for any purpose. It is provided "as is" without express or
16 *-----------------------------------------------------------------------------
17 * $Id: tclXcreate.c,v 2.0 1992/10/16 04:50:33 markd Rel $
18 *-----------------------------------------------------------------------------
26 * This is a little kludge to make sure matherr is brought in from the Tcl
27 * library if it is not already defined. This could be done on the link line,
28 * but this makes sure it happens. This is a global so optimizers don't thow
29 * away the assignment to it.
31 static int (*bringInMathErr
)() = matherr
;
35 *-----------------------------------------------------------------------------
37 * Tcl_CreateExtendedInterp --
39 * Create a new TCL command interpreter and initialize all of the
40 * extended Tcl commands..
43 * The return value is a token for the interpreter.
44 *-----------------------------------------------------------------------------
47 Tcl_CreateExtendedInterp ()
51 interp
= Tcl_CreateInterp ();
54 * from tclCkalloc.c (now part of the UCB Tcl).
57 Tcl_InitMemory (interp
);
63 Tcl_CreateCommand (interp
, "bsearch", Tcl_BsearchCmd
,
64 (ClientData
)NULL
, (void (*)())NULL
);
69 Tcl_CreateCommand (interp
, "chgrp", Tcl_ChgrpCmd
, (ClientData
)NULL
,
71 Tcl_CreateCommand (interp
, "chmod", Tcl_ChmodCmd
, (ClientData
)NULL
,
73 Tcl_CreateCommand (interp
, "chown", Tcl_ChownCmd
, (ClientData
)NULL
,
79 Tcl_CreateCommand (interp
, "getclock", Tcl_GetclockCmd
,
80 (ClientData
)NULL
, (void (*)())NULL
);
81 Tcl_CreateCommand (interp
, "fmtclock", Tcl_FmtclockCmd
,
82 (ClientData
)NULL
, (void (*)())NULL
);
87 Tcl_CreateCommand (interp
, "convertclock", Tcl_ConvertclockCmd
,
88 (ClientData
)NULL
, (void (*)())NULL
);
93 Tcl_CreateCommand (interp
, "commandloop", Tcl_CommandloopCmd
,
94 (ClientData
)NULL
, (void (*)())NULL
);
99 Tcl_InitDebug (interp
);
104 Tcl_CreateCommand (interp
, "dup", Tcl_DupCmd
,
105 (ClientData
) NULL
, (void (*)())NULL
);
107 * from tclXtclXfcntl.c
109 Tcl_CreateCommand (interp
, "fcntl", Tcl_FcntlCmd
,
110 (ClientData
) NULL
, (void (*)())NULL
);
113 * from tclXfilecmds.c
115 Tcl_CreateCommand (interp
, "pipe", Tcl_PipeCmd
,
116 (ClientData
) NULL
, (void (*)())NULL
);
117 Tcl_CreateCommand (interp
, "copyfile", Tcl_CopyfileCmd
,
118 (ClientData
) NULL
, (void (*)())NULL
);
119 Tcl_CreateCommand (interp
, "fstat", Tcl_FstatCmd
,
120 (ClientData
) NULL
, (void (*)())NULL
);
121 Tcl_CreateCommand (interp
, "lgets", Tcl_LgetsCmd
,
122 (ClientData
) NULL
, (void (*)())NULL
);
123 Tcl_CreateCommand (interp
, "flock", Tcl_FlockCmd
,
124 (ClientData
) NULL
, (void (*)())NULL
);
125 Tcl_CreateCommand (interp
, "funlock", Tcl_FunlockCmd
,
126 (ClientData
) NULL
, (void (*)())NULL
);
129 * from tclXfilescan.c
131 Tcl_InitFilescan (interp
);
136 Tcl_CreateCommand(interp
, "acos", Tcl_AcosCmd
,
137 (ClientData
)NULL
, (void (*)())NULL
);
138 Tcl_CreateCommand(interp
, "asin", Tcl_AsinCmd
,
139 (ClientData
)NULL
, (void (*)())NULL
);
140 Tcl_CreateCommand(interp
, "atan", Tcl_AtanCmd
,
141 (ClientData
)NULL
, (void (*)())NULL
);
142 Tcl_CreateCommand(interp
, "cos", Tcl_CosCmd
,
143 (ClientData
)NULL
, (void (*)())NULL
);
144 Tcl_CreateCommand(interp
, "sin", Tcl_SinCmd
,
145 (ClientData
)NULL
, (void (*)())NULL
);
146 Tcl_CreateCommand(interp
, "tan", Tcl_TanCmd
,
147 (ClientData
)NULL
, (void (*)())NULL
);
148 Tcl_CreateCommand(interp
, "cosh", Tcl_CoshCmd
,
149 (ClientData
)NULL
, (void (*)())NULL
);
150 Tcl_CreateCommand(interp
, "sinh", Tcl_SinhCmd
,
151 (ClientData
)NULL
, (void (*)())NULL
);
152 Tcl_CreateCommand(interp
, "tanh", Tcl_TanhCmd
,
153 (ClientData
)NULL
, (void (*)())NULL
);
154 Tcl_CreateCommand(interp
, "exp", Tcl_ExpCmd
,
155 (ClientData
)NULL
, (void (*)())NULL
);
156 Tcl_CreateCommand(interp
, "log", Tcl_LogCmd
,
157 (ClientData
)NULL
, (void (*)())NULL
);
158 Tcl_CreateCommand(interp
, "log10", Tcl_Log10Cmd
,
159 (ClientData
)NULL
, (void (*)())NULL
);
160 Tcl_CreateCommand(interp
, "sqrt", Tcl_SqrtCmd
,
161 (ClientData
)NULL
, (void (*)())NULL
);
162 Tcl_CreateCommand(interp
, "fabs", Tcl_FabsCmd
,
163 (ClientData
)NULL
, (void (*)())NULL
);
164 Tcl_CreateCommand(interp
, "floor", Tcl_FloorCmd
,
165 (ClientData
)NULL
, (void (*)())NULL
);
166 Tcl_CreateCommand(interp
, "ceil", Tcl_CeilCmd
,
167 (ClientData
)NULL
, (void (*)())NULL
);
168 Tcl_CreateCommand(interp
, "fmod", Tcl_FmodCmd
,
169 (ClientData
)NULL
, (void (*)())NULL
);
170 Tcl_CreateCommand(interp
, "pow", Tcl_PowCmd
,
171 (ClientData
)NULL
, (void (*)())NULL
);
176 Tcl_CreateCommand(interp
, "echo", Tcl_EchoCmd
,
177 (ClientData
)NULL
, (void (*)())NULL
);
178 Tcl_CreateCommand(interp
, "infox", Tcl_InfoxCmd
,
179 (ClientData
)NULL
, (void (*)())NULL
);
180 Tcl_CreateCommand(interp
, "loop", Tcl_LoopCmd
,
181 (ClientData
)NULL
, (void (*)())NULL
);
186 Tcl_CreateCommand (interp
, "id", Tcl_IdCmd
,
187 (ClientData
)NULL
, (void (*)())NULL
);
192 Tcl_CreateCommand(interp
, "keyldel", Tcl_KeyldelCmd
,
193 (ClientData
)NULL
, (void (*)())NULL
);
194 Tcl_CreateCommand(interp
, "keylget", Tcl_KeylgetCmd
,
195 (ClientData
)NULL
, (void (*)())NULL
);
196 Tcl_CreateCommand(interp
, "keylkeys", Tcl_KeylkeysCmd
,
197 (ClientData
)NULL
, (void (*)())NULL
);
198 Tcl_CreateCommand(interp
, "keylset", Tcl_KeylsetCmd
,
199 (ClientData
)NULL
, (void (*)())NULL
);
204 Tcl_CreateCommand(interp
, "lvarcat", Tcl_LvarcatCmd
,
205 (ClientData
)NULL
, (void (*)())NULL
);
206 Tcl_CreateCommand(interp
, "lvarpop", Tcl_LvarpopCmd
,
207 (ClientData
)NULL
, (void (*)())NULL
);
208 Tcl_CreateCommand(interp
, "lvarpush", Tcl_LvarpushCmd
,
209 (ClientData
)NULL
, (void (*)())NULL
);
210 Tcl_CreateCommand(interp
, "lempty", Tcl_LemptyCmd
,
211 (ClientData
)NULL
, (void (*)())NULL
);
215 Tcl_CreateCommand (interp
, "max", Tcl_MaxCmd
, (ClientData
)NULL
,
217 Tcl_CreateCommand (interp
, "min", Tcl_MinCmd
, (ClientData
)NULL
,
219 Tcl_CreateCommand (interp
, "random", Tcl_RandomCmd
, (ClientData
)NULL
,
225 Tcl_InitMsgCat (interp
);
230 Tcl_CreateCommand (interp
, "execl", Tcl_ExeclCmd
, (ClientData
)NULL
,
232 Tcl_CreateCommand (interp
, "fork", Tcl_ForkCmd
, (ClientData
)NULL
,
234 Tcl_CreateCommand (interp
, "wait", Tcl_WaitCmd
, (ClientData
)NULL
,
240 Tcl_InitProfile (interp
);
245 Tcl_CreateCommand (interp
, "select", Tcl_SelectCmd
,
246 (ClientData
) NULL
, (void (*)())NULL
);
251 Tcl_InitSignalHandling (interp
);
256 Tcl_CreateCommand(interp
, "cindex", Tcl_CindexCmd
,
257 (ClientData
)NULL
, (void (*)())NULL
);
258 Tcl_CreateCommand(interp
, "clength", Tcl_ClengthCmd
,
259 (ClientData
)NULL
, (void (*)())NULL
);
260 Tcl_CreateCommand(interp
, "crange", Tcl_CrangeCmd
,
261 (ClientData
)NULL
, (void (*)())NULL
);
262 Tcl_CreateCommand(interp
, "csubstr", Tcl_CrangeCmd
,
263 (ClientData
)NULL
, (void (*)())NULL
);
264 Tcl_CreateCommand(interp
, "replicate", Tcl_ReplicateCmd
,
265 (ClientData
)NULL
, (void (*)())NULL
);
266 Tcl_CreateCommand (interp
, "translit", Tcl_TranslitCmd
, (ClientData
)NULL
,
268 Tcl_CreateCommand (interp
, "ctype", Tcl_CtypeCmd
,
269 (ClientData
)NULL
, (void (*)())NULL
);
274 Tcl_CreateCommand (interp
, "demand_load", Tcl_Demand_loadCmd
,
275 (ClientData
)NULL
, (void (*)())NULL
);
276 Tcl_CreateCommand (interp
, "loadlibindex", Tcl_LoadlibindexCmd
,
277 (ClientData
)NULL
, (void (*)())NULL
);
280 * from tclXunixcmds.c
282 Tcl_CreateCommand (interp
, "system", Tcl_SystemCmd
, (ClientData
)NULL
,
284 Tcl_CreateCommand (interp
, "times", Tcl_TimesCmd
, (ClientData
)NULL
,
286 Tcl_CreateCommand (interp
, "umask", Tcl_UmaskCmd
, (ClientData
)NULL
,
288 Tcl_CreateCommand (interp
, "link", Tcl_LinkCmd
, (ClientData
)NULL
,
290 Tcl_CreateCommand (interp
, "unlink", Tcl_UnlinkCmd
, (ClientData
)NULL
,
292 Tcl_CreateCommand (interp
, "mkdir", Tcl_MkdirCmd
, (ClientData
)NULL
,
294 Tcl_CreateCommand (interp
, "rmdir", Tcl_RmdirCmd
, (ClientData
)NULL
,
296 Tcl_CreateCommand (interp
, "alarm", Tcl_AlarmCmd
, (ClientData
)NULL
,
298 Tcl_CreateCommand (interp
, "sleep", Tcl_SleepCmd
, (ClientData
)NULL
,