Compare commits
18
Commits
main
...
dev-stubs-branch
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a1c2688cd | ||
|
|
78fd70c5b6 | ||
|
|
c7b784c5fc | ||
|
|
c86147049b | ||
|
|
f3c491e201 | ||
|
|
aaf123580e | ||
|
|
4848a73bb6 | ||
|
|
bd758c72b2 | ||
|
|
d6cca28612 | ||
|
|
14f3bca0ec | ||
|
|
b0edcae8f8 | ||
|
|
18dc5e90a9 | ||
|
|
8f454748c9 | ||
|
|
e0ebc1eba1 | ||
|
|
27b44243dd | ||
|
|
0f95a59075 | ||
|
|
7c8b031c9b | ||
|
|
cac8266789 |
@@ -0,0 +1,246 @@
|
||||
1999-03-09 <stanton@GASPODE>
|
||||
|
||||
* Regenerated stub interfaces.
|
||||
|
||||
* tools/genStubs.tcl: Reorganized code to support mixed generic
|
||||
and platform specific tables.
|
||||
|
||||
* generic/tclInt.decls: Removed TclCompile*Cmd routines from the
|
||||
table.
|
||||
|
||||
* generic/tcl.decls: Moved old Unix fd handler routines into
|
||||
generic table and modified stubs ordering to match the plus patch.
|
||||
|
||||
* win/tclWinChan.c (FileSeekProc): Fixed bug where errors during
|
||||
seeking were not getting propagated.
|
||||
|
||||
1999-03-08 <stanton@GASPODE>
|
||||
|
||||
* generic/tclDecls.h:
|
||||
* generic/tclStubs.c:
|
||||
* generic/tclStubInit.c:
|
||||
* generic/tcl.decls: Removed Tcl_InitMemory().
|
||||
|
||||
* generic/tcl.h: Changed TCL_STUB_MAGIC to break binary
|
||||
compatibility with plus patch version, since the tables don't
|
||||
match.
|
||||
|
||||
1999-03-08 <stanton@GASPODE>
|
||||
|
||||
* win/tclWinInt.h:
|
||||
* generic/tclInt.h:
|
||||
* generic/tclIntDecls.h:
|
||||
* generic/tclIntPlatDecls.h:
|
||||
* generic/tclIntPlatStubs.c:
|
||||
* generic/tclIntStubs.c:
|
||||
* generic/tclStubInit.c:
|
||||
* generic/tclInt.decls: Removed initialization and finalization
|
||||
routines from the stub table since these should never be called by
|
||||
an extension.
|
||||
|
||||
1999-03-06 <stanton@GASPODE>
|
||||
|
||||
* unix/Makefile.in:
|
||||
* generic/tcl.decls:
|
||||
* generic/tclCompile.h:
|
||||
* generic/tclCompileDecls.h:
|
||||
* generic/tclCompileStubs.c:
|
||||
* generic/tclDecls.h:
|
||||
* generic/tclInt.decls:
|
||||
* generic/tclInt.h:
|
||||
* generic/tclStubInit.c: Removed tclCompile.h functions. Moved
|
||||
TclGetAuxDataType to tclInt.h so it is available for use by
|
||||
the TclPro Byte Compiler loader.
|
||||
|
||||
1999-03-05 <stanton@GASPODE>
|
||||
|
||||
* unix/configure.in: Applied patch from Jan Nijtmans to fix the
|
||||
following problems:
|
||||
- There seems to be a HP-UX-11 already, which behaves
|
||||
identical to HP-UX-10.
|
||||
- For 64-bit IRIX, SHLIB_LD_LIBS should be set to
|
||||
'${LIBS}'. This also has the side-effect that SHLIB_LD
|
||||
doesn't need the -rpath option any more: it is already part
|
||||
of ${LIBS}
|
||||
- Fix Linux to use the -rpath option.
|
||||
- On Solaris, LD_SEARCH_FLAGS can only be used with the
|
||||
linker, not with the compiler, because the "-Wl," part is
|
||||
missing.
|
||||
- The TCL_LD_SEARCH_FLAGS should be used in static executables
|
||||
as well as dynamically linked ones. Otherwise, static
|
||||
executables have a different search strategy for dynamically
|
||||
loadable stub-enabled extensions than executables using
|
||||
shared libraries. This effects extensions which load other
|
||||
libraries in turn.
|
||||
|
||||
* generic/tclCompile.h:
|
||||
* generic/tclStubInit.c:
|
||||
* generic/tclCompileDecls.h:
|
||||
* generic/tclCompileStubs.c:
|
||||
* generic/tclInt.decls: Added functions from tclCompile.h into a
|
||||
new tclCompile interface.
|
||||
|
||||
* generic/tclStubs.c:
|
||||
* generic/tclDecls.h:
|
||||
* generic/tcl.decls: Added Tcl_InitMemory.
|
||||
|
||||
* generic/tclStubLib.c: Changed to define USE_TCL_STUBS and
|
||||
USE_TCL_STUB_PROCS automatically.
|
||||
|
||||
* unix/Makefile.in: Changes to get stubs mechanism working.
|
||||
|
||||
* generic/tclGetDate.y: Updated to reflect tclDate.c changes.
|
||||
|
||||
* tools/genStubs.tcl:
|
||||
* generic/tclProc.c:
|
||||
* generic/tclStubInit.c:
|
||||
* generic/tclTest.c:
|
||||
* unix/tclUnixFile.c:
|
||||
* unix/tclUnixPort.h: lint
|
||||
|
||||
* win/makefile.vc:
|
||||
* generic/tclAlloc.c: Changed USE_NATIVEMALLOC to USE_NATIVE_MALLOC.
|
||||
|
||||
1999-03-03 <stanton@GASPODE>
|
||||
|
||||
* unix/tclUnixTime.c: Added TclpGetDate and TclStrftime.
|
||||
|
||||
* unix/tclUnixSock.c: Added TclHasSockets.
|
||||
|
||||
* unix/tclUnixPort.h: Eliminated various Tclp* macros that have
|
||||
been replaced with function defintions.
|
||||
|
||||
* win/tclWinInt.h:
|
||||
* win/tclWin32Dll.c:
|
||||
* unix/tclUnixInit.c: Added TclpCheckStackSpace.
|
||||
|
||||
* unix/tclUnixFile.c:
|
||||
* mac/tclMacShLib.exp:
|
||||
* mac/tclMacFile.c:
|
||||
* generic/tclFileName.c:
|
||||
* win/tclWinFile.c: Renamed TclpGetUserHome back to
|
||||
TclGetUserHome for patch level compatibility.
|
||||
|
||||
* unix/tclUnixFile.c: Added TclpAccess and TclpState.
|
||||
|
||||
* win/tclWinPort.h:
|
||||
* mac/tclMacPort.h:
|
||||
* mac/tclMacInt.h:
|
||||
* mac/tclMac.h:
|
||||
* generic/tcl.decls: Added Mac specific declarations.
|
||||
|
||||
* mac/tclMacChan.c: Added stub implementation of
|
||||
Tcl_MakeFileChannel that doesn't do anything. This could be
|
||||
implemented at a later date.
|
||||
|
||||
* generic/tclStubLib.c: Added internal interface hooks.
|
||||
|
||||
* generic/tclStubs.c:
|
||||
* generic/tclStubInit.c: Added undefs for all of the TCL_MEM_DEBUG
|
||||
macros to avoid conflicts with the stub names.
|
||||
|
||||
* generic/tclStubInit.c:
|
||||
* generic/tclInt.h:
|
||||
* generic/tclInt.decls: Moved some declarations out of the generic
|
||||
and into the platform specific sections. Added missing
|
||||
declarations and Mac specific declarations.
|
||||
|
||||
* win/tclWinTime.c:
|
||||
* unix/tclUnixTime.c:
|
||||
* mac/tclMacTime.c:
|
||||
* generic/tclInt.h:
|
||||
* generic/tclDate.c:
|
||||
* generic/tclClock.c: Created a new opaque TclpTime_t type so
|
||||
generic functions that depend on the format of time_t can appear
|
||||
in the generic header files.
|
||||
|
||||
* unix/Makefile.in:
|
||||
* generic/tclAlloc.c: Changed so stub versions of TclpAlloc,
|
||||
etc. are generated when TCL_MEM_DEBUG is not defined.
|
||||
|
||||
* generic/tclStubInit.c:
|
||||
* generic/tclPanic.c:
|
||||
* generic/tcl.h:
|
||||
* generic/tcl.decls: renamed Tcl_Panic back to panic to avoid
|
||||
incompatibilities in a patch release.
|
||||
|
||||
1999-03-02 <stanton@GASPODE>
|
||||
|
||||
* unix/Makefile.in:
|
||||
* unix/configure.in:
|
||||
* unix/ldAix: Enhanced AIX shared library support.
|
||||
|
||||
* win/tclWinSock.c: Removed a bunch of extraneous PASCAL FAR
|
||||
attributes from internal functions.
|
||||
|
||||
* win/tclWinReg.c: Changed registry package to use stubs mechanism
|
||||
so it no longer depends on the specific version of Tcl.
|
||||
|
||||
* doc/AddErrInfo.3:
|
||||
* doc/Eval.3:
|
||||
* doc/PkgRequire.3:
|
||||
* doc/SetResult.3:
|
||||
* doc/StringObj.3:
|
||||
* generic/tcl.h:
|
||||
* generic/tclBasic.c:
|
||||
* generic/tclPanic.c:
|
||||
* generic/tclStringObj.c:
|
||||
* generic/tclUtil.c:
|
||||
* unix/mkLinks: Added va_list versions of all VARARGS
|
||||
functions so they can be invoked from the stub functions.
|
||||
|
||||
* doc/package.n:
|
||||
* doc/PkgRequire.3:
|
||||
* generic/tclPkg.c: Added Tcl_PkgProvideEx, Tcl_RequireEx,
|
||||
Tcl_PresentEx, and Tcl_PkgPresent. Added "package present"
|
||||
command.
|
||||
|
||||
* generic/tclFileName.c:
|
||||
* mac/tclMacFile.c:
|
||||
* mac/tclMacShLib.exp:
|
||||
* unix/tclUnixFile.c:
|
||||
* win/tclWinFile.c: Changed so TclGetUserHome is defined on
|
||||
all platforms, even though it is currently a noop on mac and
|
||||
windows, and renamed it to TclpGetUserHome.
|
||||
|
||||
* generic/tclCkalloc.c: Added stub versions of memory checking
|
||||
functions when compiling without TCL_MEM_DEBUG.
|
||||
|
||||
* doc/ByteArrObj.3:
|
||||
* generic/tcl.h:
|
||||
* generic/tclBinary.c:
|
||||
* generic/tclObj.c: Ported the 8.1 ByteArray type back to 8.0.
|
||||
|
||||
* generic/tcl.decls:
|
||||
* generic/tcl.h:
|
||||
* generic/tclBasic.c:
|
||||
* generic/tclDecls.h:
|
||||
* generic/tclInt.decls:
|
||||
* generic/tclInt.h:
|
||||
* generic/tclIntDecls.h:
|
||||
* generic/tclIntPlatDecls.h:
|
||||
* generic/tclIntPlatStubs.c:
|
||||
* generic/tclIntStubs.c:
|
||||
* generic/tclPlatDecls.h:
|
||||
* generic/tclPlatStubs.c:
|
||||
* generic/tclStubInit.c:
|
||||
* generic/tclStubLib.c:
|
||||
* generic/tclStubs.c:
|
||||
* tools/genStubs.tcl:
|
||||
* unix/configure.in:
|
||||
* unix/Makefile.in:
|
||||
* unix/tclConfig.sh.in:
|
||||
* win/makefile.vc:
|
||||
* win/tclWinPort.h: Added Tcl stubs implementation. There are
|
||||
now two new macros USE_TCL_STUBS and USE_TCL_STUB_PROCS that
|
||||
enable use of stubs and disable stub macros respectively. All of
|
||||
the public and private function declarations from tcl.h and
|
||||
tclInt.h have moved into the *.decls files and the *Stubs.c and
|
||||
*Decls.h files are generated using the genStubs.tcl script.
|
||||
|
||||
1999-02-27 <stanton@GASPODE>
|
||||
|
||||
* generic/tclPanic.c:
|
||||
* generic/panic.c: renamed panic to Tcl_Panic, added macro for
|
||||
backwards compatibility, renamed file to tclPanic.c
|
||||
|
||||
+10
-2
@@ -5,13 +5,13 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
'\" RCS: @(#) $Id: AddErrInfo.3,v 1.2 1998/09/14 18:39:45 stanton Exp $
|
||||
'\" RCS: @(#) $Id: AddErrInfo.3,v 1.2.4.1 1999/03/03 00:38:36 stanton Exp $
|
||||
'\"
|
||||
.so man.macros
|
||||
.TH Tcl_AddErrorInfo 3 7.5 Tcl "Tcl Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_AddObjErrorInfo, Tcl_AddErrorInfo, Tcl_SetErrorCode, Tcl_PosixError \- record information about errors
|
||||
Tcl_AddObjErrorInfo, Tcl_AddErrorInfo, Tcl_SetErrorCode, Tcl_SetErrorCodeVA, Tcl_PosixError \- record information about errors
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -24,6 +24,8 @@ Tcl_AddObjErrorInfo, Tcl_AddErrorInfo, Tcl_SetErrorCode, Tcl_PosixError \- recor
|
||||
.sp
|
||||
\fBTcl_SetErrorCode\fR(\fIinterp, element, element, ... \fB(char *) NULL\fR)
|
||||
.sp
|
||||
\fBTcl_SetErrorCodeVA\fR(\fIinterp, argList\fR)
|
||||
.sp
|
||||
char *
|
||||
\fBTcl_PosixError\fR(\fIinterp\fR)
|
||||
.SH ARGUMENTS
|
||||
@@ -47,6 +49,9 @@ This variable \fBerrorCode\fR will be set to this value.
|
||||
.AP char *element in
|
||||
String to record as one element of \fBerrorCode\fR variable.
|
||||
Last \fIelement\fR argument must be NULL.
|
||||
.AP va_list argList in
|
||||
An argument list which must have been initialised using
|
||||
\fBTCL_VARARGS_START\fR, and cleared using \fBva_end\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
@@ -118,6 +123,9 @@ The procedure \fBTcl_SetErrorCode\fR is also used to set the
|
||||
record instead of an object. Otherwise, it is similar to
|
||||
\fBTcl_SetObjErrorCode\fR in behavior.
|
||||
.PP
|
||||
\fBTcl_SetErrorCodeVA\fR is the same as \fBTcl_SetErrorCode\fR except that
|
||||
instead of taking a variable number of arguments it takes an argument list.
|
||||
.PP
|
||||
\fBTcl_PosixError\fR
|
||||
sets the \fBerrorCode\fR variable after an error in a POSIX kernel call.
|
||||
It reads the value of the \fBerrno\fR C variable and calls
|
||||
|
||||
+11
-2
@@ -5,13 +5,13 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
'\" RCS: @(#) $Id: Eval.3,v 1.2 1998/09/14 18:39:48 stanton Exp $
|
||||
'\" RCS: @(#) $Id: Eval.3,v 1.2.4.1 1999/03/03 00:38:36 stanton Exp $
|
||||
'\"
|
||||
.so man.macros
|
||||
.TH Tcl_Eval 3 7.0 Tcl "Tcl Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_Eval, Tcl_VarEval, Tcl_EvalFile, Tcl_GlobalEval \- execute Tcl commands
|
||||
Tcl_Eval, Tcl_VarEval, Tcl_VarEvalVA, Tcl_EvalFile, Tcl_GlobalEval \- execute Tcl commands
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -23,6 +23,9 @@ int
|
||||
\fBTcl_VarEval\fR(\fIinterp, string, string, ... \fB(char *) NULL\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_VarEvalVA\fR(\fIinterp, argList\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_EvalFile\fR(\fIinterp, fileName\fR)
|
||||
.sp
|
||||
int
|
||||
@@ -37,6 +40,9 @@ Command (or sequence of commands) to execute. Must be in writable
|
||||
memory (\fBTcl_Eval\fR makes temporary modifications to the command).
|
||||
.AP char *string in
|
||||
String forming part of Tcl command.
|
||||
.AP va_list argList in
|
||||
An argument list which must have been initialised using
|
||||
\fBTCL_VARARGS_START\fR, and cleared using \fBva_end\fR.
|
||||
.AP char *fileName in
|
||||
Name of file containing Tcl command string.
|
||||
.BE
|
||||
@@ -76,6 +82,9 @@ It returns the result of the command and also modifies
|
||||
The last argument to \fBTcl_VarEval\fR must be NULL to indicate the end
|
||||
of arguments.
|
||||
.PP
|
||||
\fBTcl_VarEvalVA\fR is the same as \fBTcl_VarEval\fR except that
|
||||
instead of taking a variable number of arguments it takes an argument list.
|
||||
.PP
|
||||
\fBTcl_EvalFile\fR reads the file given by \fIfileName\fR and evaluates
|
||||
its contents as a Tcl command by calling \fBTcl_Eval\fR. It returns
|
||||
a standard Tcl result that reflects the result of evaluating the file.
|
||||
|
||||
+37
-9
@@ -4,13 +4,13 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
'\" RCS: @(#) $Id: PkgRequire.3,v 1.2 1998/09/14 18:39:49 stanton Exp $
|
||||
'\" RCS: @(#) $Id: PkgRequire.3,v 1.2.4.1 1999/03/03 00:38:37 stanton Exp $
|
||||
'\"
|
||||
.so man.macros
|
||||
.TH Tcl_PkgRequire 3 7.5 Tcl "Tcl Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_PkgRequire, Tcl_PkgProvide \- package version control
|
||||
Tcl_PkgRequire, Tcl_PkgRequireEx, Tcl_PkgPresent, Tcl_PkgPresentEx, Tcl_PkgProvide, Tcl_PkgProvideEx \- package version control
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -18,10 +18,22 @@ Tcl_PkgRequire, Tcl_PkgProvide \- package version control
|
||||
char *
|
||||
\fBTcl_PkgRequire\fR(\fIinterp, name, version, exact\fR)
|
||||
.sp
|
||||
char *
|
||||
\fBTcl_PkgRequireEx\fR(\fIinterp, name, version, exact, clientDataPtr\fR)
|
||||
.sp
|
||||
char *
|
||||
\fBTcl_PkgPresent\fR(\fIinterp, name, version, exact\fR)
|
||||
.sp
|
||||
char *
|
||||
\fBTcl_PkgPresentEx\fR(\fIinterp, name, version, exact, clientDataPtr\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_PkgProvide\fR(\fIinterp, name, version\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_PkgProvideEx\fR(\fIinterp, name, version, clientData\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_FreeProc clientData
|
||||
.AS Tcl_FreeProc clientDataPtr
|
||||
.AP Tcl_Interp *interp in
|
||||
Interpreter where package is needed or available.
|
||||
.AP char *name in
|
||||
@@ -35,25 +47,41 @@ Non-zero means that only the particular version specified by
|
||||
Zero means that newer versions than \fIversion\fR are also
|
||||
acceptable as long as they have the same major version number
|
||||
as \fIversion\fR.
|
||||
.AP ClientData clientData in
|
||||
Arbitrary value to be associated with the package.
|
||||
.AP ClientData *clientDataPtr out
|
||||
Pointer to place to store the value associated with the matching
|
||||
package. It is only changed if the pointer is not NULL and the
|
||||
function completed successfully.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
These procedures provide C-level interfaces to Tcl's package and
|
||||
version management facilities.
|
||||
.PP
|
||||
\fBTcl_PkgRequire\fR is equivalent to the \fBpackage require\fR
|
||||
command, \fBTcl_PkgPresent\fR is equivalent to the \fBpackage present\fR
|
||||
command, and \fBTcl_PkgProvide\fR is equivalent to the
|
||||
\fBpackage provide\fR command.
|
||||
.PP
|
||||
See the documentation for the Tcl commands for details on what these
|
||||
procedures do.
|
||||
If \fBTcl_PkgRequire\fR completes successfully it returns a pointer
|
||||
to the version string for the version of the package that is provided
|
||||
in the interpreter (which may be different than \fIversion\fR); if
|
||||
an error occurs it returns NULL and leaves an error message in
|
||||
\fIinterp->result\fR.
|
||||
.PP
|
||||
If \fBTcl_PkgPresent\fR or \fBTcl_PkgRequire\fR complete successfully
|
||||
they return a pointer to the version string for the version of the package
|
||||
that is provided in the interpreter (which may be different than
|
||||
\fIversion\fR); if an error occurs they return NULL and leave an error
|
||||
message in \fIinterp->result\fR.
|
||||
.PP
|
||||
\fBTcl_PkgProvide\fR returns TCL_OK if it completes successfully;
|
||||
if an error occurs it returns TCL_ERROR and leaves an error message
|
||||
in \fIinterp->result\fR.
|
||||
.PP
|
||||
\fBTcl_PkgProvideEx\fR, \fBTcl_PkgPresentEx\fR and \fBTcl_PkgRequireEx\fR
|
||||
allow the setting and retrieving of the client data associated with
|
||||
the package. In all other respects they are equivalent to the matching
|
||||
functions.
|
||||
|
||||
.SH KEYWORDS
|
||||
package, provide, require, version
|
||||
package, present, provide, require, version
|
||||
|
||||
+10
-2
@@ -5,13 +5,13 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
'\" RCS: @(#) $Id: SetResult.3,v 1.2 1998/09/14 18:39:50 stanton Exp $
|
||||
'\" RCS: @(#) $Id: SetResult.3,v 1.2.4.1 1999/03/03 00:38:37 stanton Exp $
|
||||
'\"
|
||||
.so man.macros
|
||||
.TH Tcl_SetResult 3 7.5 Tcl "Tcl Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_SetObjResult, Tcl_GetObjResult, Tcl_SetResult, Tcl_GetStringResult, Tcl_AppendResult, Tcl_AppendElement, Tcl_ResetResult \- manipulate Tcl result
|
||||
Tcl_SetObjResult, Tcl_GetObjResult, Tcl_SetResult, Tcl_GetStringResult, Tcl_AppendResult, Tcl_AppendResultVA, Tcl_AppendElement, Tcl_ResetResult \- manipulate Tcl result
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -28,6 +28,8 @@ char *
|
||||
.sp
|
||||
\fBTcl_AppendResult\fR(\fIinterp, string, string, ... , \fB(char *) NULL\fR)
|
||||
.sp
|
||||
\fBTcl_AppendResultVA\fR(\fIinterp, argList\fR)
|
||||
.sp
|
||||
\fBTcl_AppendElement\fR(\fIinterp, string\fR)
|
||||
.sp
|
||||
\fBTcl_ResetResult\fR(\fIinterp\fR)
|
||||
@@ -46,6 +48,9 @@ appended to the existing result.
|
||||
Address of procedure to call to release storage at
|
||||
\fIstring\fR, or \fBTCL_STATIC\fR, \fBTCL_DYNAMIC\fR, or
|
||||
\fBTCL_VOLATILE\fR.
|
||||
.AP va_list argList in
|
||||
An argument list which must have been initialised using
|
||||
\fBTCL_VARARGS_START\fR, and cleared using \fBva_end\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
@@ -137,6 +142,9 @@ to a string, if necessary, before appending the argument strings.
|
||||
Any number of \fIstring\fR arguments may be passed in a single
|
||||
call; the last argument in the list must be a NULL pointer.
|
||||
.PP
|
||||
\fBTcl_AppendResultVA\fR is the same as \fBTcl_AppendResult\fR except that
|
||||
instead of taking a variable number of arguments it takes an argument list.
|
||||
.PP
|
||||
\fBTcl_AppendElement\fR is similar to \fBTcl_AppendResult\fR in
|
||||
that it allows results to be built up in pieces.
|
||||
However, \fBTcl_AppendElement\fR takes only a single \fIstring\fR
|
||||
|
||||
+11
-2
@@ -4,13 +4,13 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
'\" RCS: @(#) $Id: StringObj.3,v 1.2 1998/09/14 18:39:50 stanton Exp $
|
||||
'\" RCS: @(#) $Id: StringObj.3,v 1.2.4.1 1999/03/03 00:38:37 stanton Exp $
|
||||
'\"
|
||||
.so man.macros
|
||||
.TH Tcl_StringObj 3 8.0 Tcl "Tcl Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_NewStringObj, Tcl_SetStringObj, Tcl_GetStringFromObj, Tcl_AppendToObj, Tcl_AppendStringsToObj, Tcl_SetObjLength, TclConcatObj \- manipulate Tcl objects as strings
|
||||
Tcl_NewStringObj, Tcl_SetStringObj, Tcl_GetStringFromObj, Tcl_AppendToObj, Tcl_AppendStringsToObj, Tcl_AppendStringsToObjVA, Tcl_SetObjLength, TclConcatObj \- manipulate Tcl objects as strings
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -27,6 +27,8 @@ char *
|
||||
.sp
|
||||
\fBTcl_AppendStringsToObj\fR(\fIobjPtr, string, string, ... \fB(char *) NULL\fR)
|
||||
.sp
|
||||
\fBTcl_AppendStringsToObjVA\fR(\fIobjPtr, argList\fR)
|
||||
.sp
|
||||
\fBTcl_SetObjLength\fR(\fIobjPtr, newLength\fR)
|
||||
.sp
|
||||
Tcl_Obj *
|
||||
@@ -49,6 +51,9 @@ If non-NULL, the location where \fBTcl_GetStringFromObj\fR will store
|
||||
the the length of an object's string representation.
|
||||
.AP char *string in
|
||||
Null-terminated string value to append to \fIobjPtr\fR.
|
||||
.AP va_list argList in
|
||||
An argument list which must have been initialised using
|
||||
\fBTCL_VARARGS_START\fR, and cleared using \fBva_end\fR.
|
||||
.AP int newLength in
|
||||
New length for the string value of \fIobjPtr\fR, not including the
|
||||
final NULL character.
|
||||
@@ -99,6 +104,10 @@ values may contain internal null characters). Any number of
|
||||
\fIstring\fR arguments may be provided, but the last argument
|
||||
must be a NULL pointer to indicate the end of the list.
|
||||
.PP
|
||||
\fBTcl_AppendStringsToObjVA\fR is the same as \fBTcl_AppendStringsToObj\fR
|
||||
except that instead of taking a variable number of arguments it takes an
|
||||
argument list.
|
||||
.PP
|
||||
The \fBTcl_SetObjLength\fR procedure changes the length of the
|
||||
string value of its \fIobjPtr\fR argument. If the \fInewLength\fR
|
||||
argument is greater than the space allocated for the object's
|
||||
|
||||
+6
-1
@@ -4,7 +4,7 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
'\" RCS: @(#) $Id: package.n,v 1.2 1998/09/14 18:39:54 stanton Exp $
|
||||
'\" RCS: @(#) $Id: package.n,v 1.2.4.1 1999/03/03 00:38:37 stanton Exp $
|
||||
'\"
|
||||
.so man.macros
|
||||
.TH package n 7.5 Tcl "Tcl Built-In Commands"
|
||||
@@ -17,6 +17,7 @@ package \- Facilities for package loading and version control
|
||||
\fBpackage forget \fIpackage\fR
|
||||
\fBpackage ifneeded \fIpackage version\fR ?\fIscript\fR?
|
||||
\fBpackage names\fR
|
||||
\fBpackage present \fR?\fB\-exact\fR? \fIpackage \fR?\fIversion\fR?
|
||||
\fBpackage provide \fIpackage \fR?\fIversion\fR?
|
||||
\fBpackage require \fR?\fB\-exact\fR? \fIpackage \fR?\fIversion\fR?
|
||||
\fBpackage unknown \fR?\fIcommand\fR?
|
||||
@@ -75,6 +76,10 @@ interpreter for which a version has been provided (via
|
||||
script is available.
|
||||
The order of elements in the list is arbitrary.
|
||||
.TP
|
||||
\fBpackage present \fR?\fB\-exact\fR? \fIpackage \fR?\fIversion\fR?
|
||||
This command is equivalent to \fBpackage require\fR except that it
|
||||
does not try and load the package if it is not already loaded.
|
||||
.TP
|
||||
\fBpackage provide \fIpackage \fR?\fIversion\fR?
|
||||
This command is invoked to indicate that version \fIversion\fR
|
||||
of package \fIpackage\fR is now present in the interpreter.
|
||||
|
||||
+556
-489
File diff suppressed because it is too large
Load Diff
+90
-547
@@ -12,7 +12,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tcl.h,v 1.33 1999/02/03 02:58:25 stanton Exp $
|
||||
* RCS: @(#) $Id: tcl.h,v 1.33.4.4 1999/03/10 05:50:24 stanton Exp $
|
||||
*/
|
||||
|
||||
#ifndef _TCL
|
||||
@@ -151,10 +151,14 @@
|
||||
*/
|
||||
|
||||
#if defined(__STDC__) || defined(HAS_STDARG)
|
||||
# include <stdarg.h>
|
||||
|
||||
# define TCL_VARARGS(type, name) (type name, ...)
|
||||
# define TCL_VARARGS_DEF(type, name) (type name, ...)
|
||||
# define TCL_VARARGS_START(type, name, list) (va_start(list, name), name)
|
||||
#else
|
||||
# include <varargs.h>
|
||||
|
||||
# ifdef __cplusplus
|
||||
# define TCL_VARARGS(type, name) (type name, ...)
|
||||
# define TCL_VARARGS_DEF(type, name) (type va_alist, ...)
|
||||
@@ -172,43 +176,51 @@
|
||||
* The default build on windows is for a DLL, which causes the DLLIMPORT
|
||||
* and DLLEXPORT macros to be nonempty. To build a static library, the
|
||||
* macro STATIC_BUILD should be defined.
|
||||
* The support follows the convention that a macro called BUILD_xxxx, where
|
||||
* xxxx is the name of a library we are building, is set on the compile line
|
||||
* for sources that are to be placed in the library. See BUILD_tcl in this
|
||||
* file for an example of how the macro is to be used.
|
||||
*/
|
||||
|
||||
#ifdef __WIN32__
|
||||
# ifdef STATIC_BUILD
|
||||
# define DLLIMPORT
|
||||
# define DLLEXPORT
|
||||
# else
|
||||
# if defined(_MSC_VER) || (defined(__GNUC__) && defined(__declspec))
|
||||
# define DLLIMPORT __declspec(dllimport)
|
||||
# define DLLEXPORT __declspec(dllexport)
|
||||
# else
|
||||
# define DLLIMPORT
|
||||
# define DLLEXPORT
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
#ifdef STATIC_BUILD
|
||||
# define DLLIMPORT
|
||||
# define DLLEXPORT
|
||||
#else
|
||||
# if defined(__WIN32__) && (defined(_MSC_VER) || (defined(__GNUC__) && defined(__declspec)))
|
||||
# define DLLIMPORT __declspec(dllimport)
|
||||
# define DLLEXPORT __declspec(dllexport)
|
||||
# else
|
||||
# define DLLIMPORT
|
||||
# define DLLEXPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef TCL_STORAGE_CLASS
|
||||
# undef TCL_STORAGE_CLASS
|
||||
#endif
|
||||
/*
|
||||
* These macros are used to control whether functions are being declared for
|
||||
* import or export. If a function is being declared while it is being built
|
||||
* to be included in a shared library, then it should have the DLLEXPORT
|
||||
* storage class. If is being declared for use by a module that is going to
|
||||
* link against the shared library, then it should have the DLLIMPORT storage
|
||||
* class. If the symbol is beind declared for a static build or for use from a
|
||||
* stub library, then the storage class should be empty.
|
||||
*
|
||||
* The convention is that a macro called BUILD_xxxx, where xxxx is the
|
||||
* name of a library we are building, is set on the compile line for sources
|
||||
* that are to be placed in the library. When this macro is set, the
|
||||
* storage class will be set to DLLEXPORT. At the end of the header file, the
|
||||
* storage class will be reset to DLLIMPORt.
|
||||
*/
|
||||
|
||||
#undef TCL_STORAGE_CLASS
|
||||
#ifdef BUILD_tcl
|
||||
# define TCL_STORAGE_CLASS DLLEXPORT
|
||||
#else
|
||||
# define TCL_STORAGE_CLASS DLLIMPORT
|
||||
# ifdef USE_TCL_STUBS
|
||||
# define TCL_STORAGE_CLASS
|
||||
# else
|
||||
# define TCL_STORAGE_CLASS DLLIMPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Definitions that allow this header file to be used either with or
|
||||
* without ANSI C features like function prototypes.
|
||||
*/
|
||||
* without ANSI C features like function prototypes. */
|
||||
|
||||
#undef _ANSI_ARGS_
|
||||
#undef CONST
|
||||
@@ -402,6 +414,7 @@ typedef void (Tcl_NamespaceDeleteProc) _ANSI_ARGS_((ClientData clientData));
|
||||
typedef int (Tcl_ObjCmdProc) _ANSI_ARGS_((ClientData clientData,
|
||||
Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST objv[]));
|
||||
typedef int (Tcl_PackageInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
typedef void (Tcl_PanicProc) _ANSI_ARGS_(TCL_VARARGS(char *, format));
|
||||
typedef void (Tcl_TcpAcceptProc) _ANSI_ARGS_((ClientData callbackData,
|
||||
Tcl_Channel chan, char *address, int port));
|
||||
typedef void (Tcl_TimerProc) _ANSI_ARGS_((ClientData clientData));
|
||||
@@ -509,19 +522,11 @@ EXTERN int Tcl_IsShared _ANSI_ARGS_((Tcl_Obj *objPtr));
|
||||
* overridden to call debugging versions of the object creation procedures.
|
||||
*/
|
||||
|
||||
EXTERN Tcl_Obj * Tcl_NewBooleanObj _ANSI_ARGS_((int boolValue));
|
||||
EXTERN Tcl_Obj * Tcl_NewDoubleObj _ANSI_ARGS_((double doubleValue));
|
||||
EXTERN Tcl_Obj * Tcl_NewIntObj _ANSI_ARGS_((int intValue));
|
||||
EXTERN Tcl_Obj * Tcl_NewListObj _ANSI_ARGS_((int objc,
|
||||
Tcl_Obj *CONST objv[]));
|
||||
EXTERN Tcl_Obj * Tcl_NewLongObj _ANSI_ARGS_((long longValue));
|
||||
EXTERN Tcl_Obj * Tcl_NewObj _ANSI_ARGS_((void));
|
||||
EXTERN Tcl_Obj * Tcl_NewStringObj _ANSI_ARGS_((char *bytes,
|
||||
int length));
|
||||
|
||||
#ifdef TCL_MEM_DEBUG
|
||||
# define Tcl_NewBooleanObj(val) \
|
||||
Tcl_DbNewBooleanObj(val, __FILE__, __LINE__)
|
||||
# define Tcl_NewByteArrayObj(bytes, len) \
|
||||
Tcl_DbNewByteArrayObj(bytes, len, __FILE__, __LINE__)
|
||||
# define Tcl_NewDoubleObj(val) \
|
||||
Tcl_DbNewDoubleObj(val, __FILE__, __LINE__)
|
||||
# define Tcl_NewIntObj(val) \
|
||||
@@ -729,11 +734,6 @@ typedef struct Tcl_DString {
|
||||
* of debugging hooks defined in tclCkalloc.c.
|
||||
*/
|
||||
|
||||
EXTERN char * Tcl_Alloc _ANSI_ARGS_((unsigned int size));
|
||||
EXTERN void Tcl_Free _ANSI_ARGS_((char *ptr));
|
||||
EXTERN char * Tcl_Realloc _ANSI_ARGS_((char *ptr,
|
||||
unsigned int size));
|
||||
|
||||
#ifdef TCL_MEM_DEBUG
|
||||
|
||||
# define Tcl_Alloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
|
||||
@@ -743,10 +743,6 @@ EXTERN char * Tcl_Realloc _ANSI_ARGS_((char *ptr,
|
||||
# define ckfree(x) Tcl_DbCkfree(x, __FILE__, __LINE__)
|
||||
# define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
|
||||
|
||||
EXTERN int Tcl_DumpActiveMemory _ANSI_ARGS_((char *fileName));
|
||||
EXTERN void Tcl_ValidateAllMemory _ANSI_ARGS_((char *file,
|
||||
int line));
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
@@ -769,7 +765,7 @@ EXTERN void Tcl_ValidateAllMemory _ANSI_ARGS_((char *file,
|
||||
# define Tcl_DumpActiveMemory(x)
|
||||
# define Tcl_ValidateAllMemory(x,y)
|
||||
|
||||
#endif /* TCL_MEM_DEBUG */
|
||||
#endif /* !TCL_MEM_DEBUG */
|
||||
|
||||
/*
|
||||
* Forward declaration of Tcl_HashTable. Needed by some C++ compilers
|
||||
@@ -1054,515 +1050,59 @@ typedef enum Tcl_PathType {
|
||||
} Tcl_PathType;
|
||||
|
||||
/*
|
||||
* Exported Tcl procedures:
|
||||
* These function have been renamed. The old names are deprecated, but we
|
||||
* define these macros for backwards compatibilty.
|
||||
*/
|
||||
|
||||
EXTERN void Tcl_AddErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *message));
|
||||
EXTERN void Tcl_AddObjErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *message, int length));
|
||||
EXTERN void Tcl_AllowExceptions _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN int Tcl_AppendAllObjTypes _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, Tcl_Obj *objPtr));
|
||||
EXTERN void Tcl_AppendElement _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string));
|
||||
EXTERN void Tcl_AppendResult _ANSI_ARGS_(
|
||||
TCL_VARARGS(Tcl_Interp *,interp));
|
||||
EXTERN void Tcl_AppendToObj _ANSI_ARGS_((Tcl_Obj *objPtr,
|
||||
char *bytes, int length));
|
||||
EXTERN void Tcl_AppendStringsToObj _ANSI_ARGS_(
|
||||
TCL_VARARGS(Tcl_Obj *,interp));
|
||||
EXTERN Tcl_AsyncHandler Tcl_AsyncCreate _ANSI_ARGS_((Tcl_AsyncProc *proc,
|
||||
ClientData clientData));
|
||||
EXTERN void Tcl_AsyncDelete _ANSI_ARGS_((Tcl_AsyncHandler async));
|
||||
EXTERN int Tcl_AsyncInvoke _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
int code));
|
||||
EXTERN void Tcl_AsyncMark _ANSI_ARGS_((Tcl_AsyncHandler async));
|
||||
EXTERN int Tcl_AsyncReady _ANSI_ARGS_((void));
|
||||
EXTERN void Tcl_BackgroundError _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN char Tcl_Backslash _ANSI_ARGS_((CONST char *src,
|
||||
int *readPtr));
|
||||
EXTERN int Tcl_BadChannelOption _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *optionName, char *optionList));
|
||||
EXTERN void Tcl_CallWhenDeleted _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_InterpDeleteProc *proc,
|
||||
ClientData clientData));
|
||||
EXTERN void Tcl_CancelIdleCall _ANSI_ARGS_((Tcl_IdleProc *idleProc,
|
||||
ClientData clientData));
|
||||
#define Tcl_Ckalloc Tcl_Alloc
|
||||
#define Tcl_Ckfree Tcl_Free
|
||||
#define Tcl_Ckrealloc Tcl_Realloc
|
||||
EXTERN int Tcl_Close _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Channel chan));
|
||||
EXTERN int Tcl_CommandComplete _ANSI_ARGS_((char *cmd));
|
||||
EXTERN char * Tcl_Concat _ANSI_ARGS_((int argc, char **argv));
|
||||
EXTERN Tcl_Obj * Tcl_ConcatObj _ANSI_ARGS_((int objc,
|
||||
Tcl_Obj *CONST objv[]));
|
||||
EXTERN int Tcl_ConvertCountedElement _ANSI_ARGS_((CONST char *src,
|
||||
int length, char *dst, int flags));
|
||||
EXTERN int Tcl_ConvertElement _ANSI_ARGS_((CONST char *src,
|
||||
char *dst, int flags));
|
||||
EXTERN int Tcl_ConvertToType _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *objPtr, Tcl_ObjType *typePtr));
|
||||
EXTERN int Tcl_CreateAlias _ANSI_ARGS_((Tcl_Interp *slave,
|
||||
char *slaveCmd, Tcl_Interp *target,
|
||||
char *targetCmd, int argc, char **argv));
|
||||
EXTERN int Tcl_CreateAliasObj _ANSI_ARGS_((Tcl_Interp *slave,
|
||||
char *slaveCmd, Tcl_Interp *target,
|
||||
char *targetCmd, int objc,
|
||||
Tcl_Obj *CONST objv[]));
|
||||
EXTERN Tcl_Channel Tcl_CreateChannel _ANSI_ARGS_((
|
||||
Tcl_ChannelType *typePtr, char *chanName,
|
||||
ClientData instanceData, int mask));
|
||||
EXTERN void Tcl_CreateChannelHandler _ANSI_ARGS_((
|
||||
Tcl_Channel chan, int mask,
|
||||
Tcl_ChannelProc *proc, ClientData clientData));
|
||||
EXTERN void Tcl_CreateCloseHandler _ANSI_ARGS_((
|
||||
Tcl_Channel chan, Tcl_CloseProc *proc,
|
||||
ClientData clientData));
|
||||
EXTERN Tcl_Command Tcl_CreateCommand _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *cmdName, Tcl_CmdProc *proc,
|
||||
ClientData clientData,
|
||||
Tcl_CmdDeleteProc *deleteProc));
|
||||
EXTERN void Tcl_CreateEventSource _ANSI_ARGS_((
|
||||
Tcl_EventSetupProc *setupProc,
|
||||
Tcl_EventCheckProc *checkProc,
|
||||
ClientData clientData));
|
||||
EXTERN void Tcl_CreateExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
|
||||
ClientData clientData));
|
||||
EXTERN void Tcl_CreateFileHandler _ANSI_ARGS_((
|
||||
int fd, int mask, Tcl_FileProc *proc,
|
||||
ClientData clientData));
|
||||
EXTERN Tcl_Interp * Tcl_CreateInterp _ANSI_ARGS_((void));
|
||||
EXTERN void Tcl_CreateMathFunc _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *name, int numArgs, Tcl_ValueType *argTypes,
|
||||
Tcl_MathProc *proc, ClientData clientData));
|
||||
EXTERN Tcl_Command Tcl_CreateObjCommand _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, char *cmdName,
|
||||
Tcl_ObjCmdProc *proc, ClientData clientData,
|
||||
Tcl_CmdDeleteProc *deleteProc));
|
||||
EXTERN Tcl_Interp * Tcl_CreateSlave _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *slaveName, int isSafe));
|
||||
EXTERN Tcl_TimerToken Tcl_CreateTimerHandler _ANSI_ARGS_((int milliseconds,
|
||||
Tcl_TimerProc *proc, ClientData clientData));
|
||||
EXTERN Tcl_Trace Tcl_CreateTrace _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
int level, Tcl_CmdTraceProc *proc,
|
||||
ClientData clientData));
|
||||
EXTERN char * Tcl_DbCkalloc _ANSI_ARGS_((unsigned int size,
|
||||
char *file, int line));
|
||||
EXTERN int Tcl_DbCkfree _ANSI_ARGS_((char *ptr,
|
||||
char *file, int line));
|
||||
EXTERN char * Tcl_DbCkrealloc _ANSI_ARGS_((char *ptr,
|
||||
unsigned int size, char *file, int line));
|
||||
EXTERN void Tcl_DbDecrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr,
|
||||
char *file, int line));
|
||||
EXTERN void Tcl_DbIncrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr,
|
||||
char *file, int line));
|
||||
EXTERN int Tcl_DbIsShared _ANSI_ARGS_((Tcl_Obj *objPtr,
|
||||
char *file, int line));
|
||||
EXTERN Tcl_Obj * Tcl_DbNewBooleanObj _ANSI_ARGS_((int boolValue,
|
||||
char *file, int line));
|
||||
EXTERN Tcl_Obj * Tcl_DbNewDoubleObj _ANSI_ARGS_((double doubleValue,
|
||||
char *file, int line));
|
||||
EXTERN Tcl_Obj * Tcl_DbNewListObj _ANSI_ARGS_((int objc,
|
||||
Tcl_Obj *CONST objv[], char *file, int line));
|
||||
EXTERN Tcl_Obj * Tcl_DbNewLongObj _ANSI_ARGS_((long longValue,
|
||||
char *file, int line));
|
||||
EXTERN Tcl_Obj * Tcl_DbNewObj _ANSI_ARGS_((char *file, int line));
|
||||
EXTERN Tcl_Obj * Tcl_DbNewStringObj _ANSI_ARGS_((char *bytes,
|
||||
int length, char *file, int line));
|
||||
EXTERN void Tcl_DeleteAssocData _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *name));
|
||||
EXTERN int Tcl_DeleteCommand _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *cmdName));
|
||||
EXTERN int Tcl_DeleteCommandFromToken _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, Tcl_Command command));
|
||||
EXTERN void Tcl_DeleteChannelHandler _ANSI_ARGS_((
|
||||
Tcl_Channel chan, Tcl_ChannelProc *proc,
|
||||
ClientData clientData));
|
||||
EXTERN void Tcl_DeleteCloseHandler _ANSI_ARGS_((
|
||||
Tcl_Channel chan, Tcl_CloseProc *proc,
|
||||
ClientData clientData));
|
||||
EXTERN void Tcl_DeleteEvents _ANSI_ARGS_((
|
||||
Tcl_EventDeleteProc *proc,
|
||||
ClientData clientData));
|
||||
EXTERN void Tcl_DeleteEventSource _ANSI_ARGS_((
|
||||
Tcl_EventSetupProc *setupProc,
|
||||
Tcl_EventCheckProc *checkProc,
|
||||
ClientData clientData));
|
||||
EXTERN void Tcl_DeleteExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
|
||||
ClientData clientData));
|
||||
EXTERN void Tcl_DeleteFileHandler _ANSI_ARGS_((int fd));
|
||||
EXTERN void Tcl_DeleteHashEntry _ANSI_ARGS_((
|
||||
Tcl_HashEntry *entryPtr));
|
||||
EXTERN void Tcl_DeleteHashTable _ANSI_ARGS_((
|
||||
Tcl_HashTable *tablePtr));
|
||||
EXTERN void Tcl_DeleteInterp _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN void Tcl_DeleteTimerHandler _ANSI_ARGS_((
|
||||
Tcl_TimerToken token));
|
||||
EXTERN void Tcl_DeleteTrace _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Trace trace));
|
||||
EXTERN void Tcl_DetachPids _ANSI_ARGS_((int numPids, Tcl_Pid *pidPtr));
|
||||
EXTERN void Tcl_DontCallWhenDeleted _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, Tcl_InterpDeleteProc *proc,
|
||||
ClientData clientData));
|
||||
EXTERN int Tcl_DoOneEvent _ANSI_ARGS_((int flags));
|
||||
EXTERN void Tcl_DoWhenIdle _ANSI_ARGS_((Tcl_IdleProc *proc,
|
||||
ClientData clientData));
|
||||
EXTERN char * Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString *dsPtr,
|
||||
CONST char *string, int length));
|
||||
EXTERN char * Tcl_DStringAppendElement _ANSI_ARGS_((
|
||||
Tcl_DString *dsPtr, CONST char *string));
|
||||
EXTERN void Tcl_DStringEndSublist _ANSI_ARGS_((Tcl_DString *dsPtr));
|
||||
EXTERN void Tcl_DStringFree _ANSI_ARGS_((Tcl_DString *dsPtr));
|
||||
EXTERN void Tcl_DStringGetResult _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_DString *dsPtr));
|
||||
EXTERN void Tcl_DStringInit _ANSI_ARGS_((Tcl_DString *dsPtr));
|
||||
EXTERN void Tcl_DStringResult _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_DString *dsPtr));
|
||||
EXTERN void Tcl_DStringSetLength _ANSI_ARGS_((Tcl_DString *dsPtr,
|
||||
int length));
|
||||
EXTERN void Tcl_DStringStartSublist _ANSI_ARGS_((
|
||||
Tcl_DString *dsPtr));
|
||||
EXTERN Tcl_Obj * Tcl_DuplicateObj _ANSI_ARGS_((Tcl_Obj *objPtr));
|
||||
EXTERN int Tcl_Eof _ANSI_ARGS_((Tcl_Channel chan));
|
||||
EXTERN char * Tcl_ErrnoId _ANSI_ARGS_((void));
|
||||
EXTERN char * Tcl_ErrnoMsg _ANSI_ARGS_((int err));
|
||||
EXTERN int Tcl_Eval _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string));
|
||||
EXTERN int Tcl_EvalFile _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *fileName));
|
||||
EXTERN void Tcl_EventuallyFree _ANSI_ARGS_((ClientData clientData,
|
||||
Tcl_FreeProc *freeProc));
|
||||
EXTERN int Tcl_EvalObj _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *objPtr));
|
||||
EXTERN void Tcl_Exit _ANSI_ARGS_((int status));
|
||||
EXTERN int Tcl_ExposeCommand _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *hiddenCmdToken, char *cmdName));
|
||||
EXTERN int Tcl_ExprBoolean _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, int *ptr));
|
||||
EXTERN int Tcl_ExprBooleanObj _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *objPtr, int *ptr));
|
||||
EXTERN int Tcl_ExprDouble _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, double *ptr));
|
||||
EXTERN int Tcl_ExprDoubleObj _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *objPtr, double *ptr));
|
||||
EXTERN int Tcl_ExprLong _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, long *ptr));
|
||||
EXTERN int Tcl_ExprLongObj _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *objPtr, long *ptr));
|
||||
EXTERN int Tcl_ExprObj _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *objPtr, Tcl_Obj **resultPtrPtr));
|
||||
EXTERN int Tcl_ExprString _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string));
|
||||
EXTERN void Tcl_Finalize _ANSI_ARGS_((void));
|
||||
EXTERN void Tcl_FindExecutable _ANSI_ARGS_((char *argv0));
|
||||
EXTERN Tcl_HashEntry * Tcl_FirstHashEntry _ANSI_ARGS_((
|
||||
Tcl_HashTable *tablePtr,
|
||||
Tcl_HashSearch *searchPtr));
|
||||
EXTERN int Tcl_Flush _ANSI_ARGS_((Tcl_Channel chan));
|
||||
EXTERN void TclFreeObj _ANSI_ARGS_((Tcl_Obj *objPtr));
|
||||
EXTERN void Tcl_FreeResult _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN int Tcl_GetAlias _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *slaveCmd, Tcl_Interp **targetInterpPtr,
|
||||
char **targetCmdPtr, int *argcPtr,
|
||||
char ***argvPtr));
|
||||
EXTERN int Tcl_GetAliasObj _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *slaveCmd, Tcl_Interp **targetInterpPtr,
|
||||
char **targetCmdPtr, int *objcPtr,
|
||||
Tcl_Obj ***objv));
|
||||
EXTERN ClientData Tcl_GetAssocData _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *name, Tcl_InterpDeleteProc **procPtr));
|
||||
EXTERN int Tcl_GetBoolean _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, int *boolPtr));
|
||||
EXTERN int Tcl_GetBooleanFromObj _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, Tcl_Obj *objPtr,
|
||||
int *boolPtr));
|
||||
EXTERN Tcl_Channel Tcl_GetChannel _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *chanName, int *modePtr));
|
||||
EXTERN int Tcl_GetChannelBufferSize _ANSI_ARGS_((
|
||||
Tcl_Channel chan));
|
||||
EXTERN int Tcl_GetChannelHandle _ANSI_ARGS_((Tcl_Channel chan,
|
||||
int direction, ClientData *handlePtr));
|
||||
EXTERN ClientData Tcl_GetChannelInstanceData _ANSI_ARGS_((
|
||||
Tcl_Channel chan));
|
||||
EXTERN int Tcl_GetChannelMode _ANSI_ARGS_((Tcl_Channel chan));
|
||||
EXTERN char * Tcl_GetChannelName _ANSI_ARGS_((Tcl_Channel chan));
|
||||
EXTERN int Tcl_GetChannelOption _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Channel chan, char *optionName,
|
||||
Tcl_DString *dsPtr));
|
||||
EXTERN Tcl_ChannelType * Tcl_GetChannelType _ANSI_ARGS_((Tcl_Channel chan));
|
||||
EXTERN int Tcl_GetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *cmdName, Tcl_CmdInfo *infoPtr));
|
||||
EXTERN char * Tcl_GetCommandName _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Command command));
|
||||
EXTERN int Tcl_GetDouble _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, double *doublePtr));
|
||||
EXTERN int Tcl_GetDoubleFromObj _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, Tcl_Obj *objPtr,
|
||||
double *doublePtr));
|
||||
EXTERN int Tcl_GetErrno _ANSI_ARGS_((void));
|
||||
EXTERN char * Tcl_GetHostName _ANSI_ARGS_((void));
|
||||
EXTERN int Tcl_GetIndexFromObj _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *objPtr, char **tablePtr, char *msg,
|
||||
int flags, int *indexPtr));
|
||||
EXTERN int Tcl_GetInt _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, int *intPtr));
|
||||
EXTERN int Tcl_GetInterpPath _ANSI_ARGS_((Tcl_Interp *askInterp,
|
||||
Tcl_Interp *slaveInterp));
|
||||
EXTERN int Tcl_GetIntFromObj _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *objPtr, int *intPtr));
|
||||
EXTERN int Tcl_GetLongFromObj _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *objPtr, long *longPtr));
|
||||
EXTERN Tcl_Interp * Tcl_GetMaster _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN CONST char * Tcl_GetNameOfExecutable _ANSI_ARGS_((void));
|
||||
EXTERN Tcl_Obj * Tcl_GetObjResult _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN Tcl_ObjType * Tcl_GetObjType _ANSI_ARGS_((char *typeName));
|
||||
EXTERN int Tcl_GetOpenFile _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, int write, int checkUsage,
|
||||
ClientData *filePtr));
|
||||
EXTERN Tcl_PathType Tcl_GetPathType _ANSI_ARGS_((char *path));
|
||||
EXTERN int Tcl_Gets _ANSI_ARGS_((Tcl_Channel chan,
|
||||
Tcl_DString *dsPtr));
|
||||
EXTERN int Tcl_GetsObj _ANSI_ARGS_((Tcl_Channel chan,
|
||||
Tcl_Obj *objPtr));
|
||||
EXTERN int Tcl_GetServiceMode _ANSI_ARGS_((void));
|
||||
EXTERN Tcl_Interp * Tcl_GetSlave _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *slaveName));
|
||||
EXTERN Tcl_Channel Tcl_GetStdChannel _ANSI_ARGS_((int type));
|
||||
EXTERN char * Tcl_GetStringFromObj _ANSI_ARGS_((Tcl_Obj *objPtr,
|
||||
int *lengthPtr));
|
||||
EXTERN char * Tcl_GetStringResult _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN char * Tcl_GetVar _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *varName, int flags));
|
||||
EXTERN char * Tcl_GetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *part1, char *part2, int flags));
|
||||
EXTERN int Tcl_GlobalEval _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *command));
|
||||
EXTERN int Tcl_GlobalEvalObj _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *objPtr));
|
||||
EXTERN char * Tcl_HashStats _ANSI_ARGS_((Tcl_HashTable *tablePtr));
|
||||
EXTERN int Tcl_HideCommand _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *cmdName, char *hiddenCmdToken));
|
||||
EXTERN int Tcl_Init _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN void Tcl_InitHashTable _ANSI_ARGS_((Tcl_HashTable *tablePtr,
|
||||
int keyType));
|
||||
#define Tcl_Return Tcl_SetResult
|
||||
#define Tcl_TildeSubst Tcl_TranslateFileName
|
||||
|
||||
/*
|
||||
* In later releases, Tcl_Panic will be the correct name to use. For now
|
||||
* we leave it as panic to avoid breaking existing binaries.
|
||||
*/
|
||||
|
||||
#define Tcl_Panic panic
|
||||
#define Tcl_PanicVA panicVA
|
||||
|
||||
/*
|
||||
* The following constant is used to test for older versions of Tcl
|
||||
* in the stubs tables.
|
||||
*
|
||||
* The plus patch implementation uses 0xFCA1BACF so we need to pick
|
||||
* a different value to avoid accidental matches.
|
||||
*/
|
||||
|
||||
#define TCL_STUB_MAGIC 0xFCA3BACF
|
||||
|
||||
/*
|
||||
* The following function is required to be defined in all stubs aware
|
||||
* extensions. The function is actually implemented in the stub
|
||||
* library, not the main Tcl library, although there is a trivial
|
||||
* implementation in the main library in case an extension is statically
|
||||
* linked into an application.
|
||||
*/
|
||||
|
||||
EXTERN char * Tcl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *version, int exact));
|
||||
|
||||
/*
|
||||
* Include the public function declarations that are accessible via
|
||||
* the stubs table.
|
||||
*/
|
||||
|
||||
#include "tclDecls.h"
|
||||
|
||||
/*
|
||||
* Public functions that are not accessible via the stubs table.
|
||||
*/
|
||||
|
||||
EXTERN void Tcl_InitMemory _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN int Tcl_InputBlocked _ANSI_ARGS_((Tcl_Channel chan));
|
||||
EXTERN int Tcl_InputBuffered _ANSI_ARGS_((Tcl_Channel chan));
|
||||
EXTERN int Tcl_InterpDeleted _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN int Tcl_IsSafe _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN void Tcl_InvalidateStringRep _ANSI_ARGS_((
|
||||
Tcl_Obj *objPtr));
|
||||
EXTERN char * Tcl_JoinPath _ANSI_ARGS_((int argc, char **argv,
|
||||
Tcl_DString *resultPtr));
|
||||
EXTERN int Tcl_LinkVar _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *varName, char *addr, int type));
|
||||
EXTERN int Tcl_ListObjAppendList _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, Tcl_Obj *listPtr,
|
||||
Tcl_Obj *elemListPtr));
|
||||
EXTERN int Tcl_ListObjAppendElement _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, Tcl_Obj *listPtr,
|
||||
Tcl_Obj *objPtr));
|
||||
EXTERN int Tcl_ListObjGetElements _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, Tcl_Obj *listPtr,
|
||||
int *objcPtr, Tcl_Obj ***objvPtr));
|
||||
EXTERN int Tcl_ListObjIndex _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *listPtr, int index,
|
||||
Tcl_Obj **objPtrPtr));
|
||||
EXTERN int Tcl_ListObjLength _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *listPtr, int *intPtr));
|
||||
EXTERN int Tcl_ListObjReplace _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *listPtr, int first, int count,
|
||||
int objc, Tcl_Obj *CONST objv[]));
|
||||
EXTERN void Tcl_Main _ANSI_ARGS_((int argc, char **argv,
|
||||
Tcl_AppInitProc *appInitProc));
|
||||
EXTERN Tcl_Channel Tcl_MakeFileChannel _ANSI_ARGS_((ClientData handle,
|
||||
int mode));
|
||||
EXTERN int Tcl_MakeSafe _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN Tcl_Channel Tcl_MakeTcpClientChannel _ANSI_ARGS_((
|
||||
ClientData tcpSocket));
|
||||
EXTERN char * Tcl_Merge _ANSI_ARGS_((int argc, char **argv));
|
||||
EXTERN Tcl_HashEntry * Tcl_NextHashEntry _ANSI_ARGS_((
|
||||
Tcl_HashSearch *searchPtr));
|
||||
EXTERN void Tcl_NotifyChannel _ANSI_ARGS_((Tcl_Channel channel,
|
||||
int mask));
|
||||
EXTERN Tcl_Obj * Tcl_ObjGetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
|
||||
int flags));
|
||||
EXTERN Tcl_Obj * Tcl_ObjSetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
|
||||
Tcl_Obj *newValuePtr, int flags));
|
||||
EXTERN Tcl_Channel Tcl_OpenCommandChannel _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, int argc, char **argv,
|
||||
int flags));
|
||||
EXTERN Tcl_Channel Tcl_OpenFileChannel _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *fileName, char *modeString,
|
||||
int permissions));
|
||||
EXTERN Tcl_Channel Tcl_OpenTcpClient _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
int port, char *address, char *myaddr,
|
||||
int myport, int async));
|
||||
EXTERN Tcl_Channel Tcl_OpenTcpServer _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
int port, char *host,
|
||||
Tcl_TcpAcceptProc *acceptProc,
|
||||
ClientData callbackData));
|
||||
EXTERN char * Tcl_ParseVar _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char **termPtr));
|
||||
EXTERN int Tcl_PkgProvide _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *name, char *version));
|
||||
EXTERN char * Tcl_PkgRequire _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *name, char *version, int exact));
|
||||
EXTERN char * Tcl_PosixError _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN void Tcl_Preserve _ANSI_ARGS_((ClientData data));
|
||||
EXTERN void Tcl_PrintDouble _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
double value, char *dst));
|
||||
EXTERN int Tcl_PutEnv _ANSI_ARGS_((CONST char *string));
|
||||
EXTERN void Tcl_QueueEvent _ANSI_ARGS_((Tcl_Event *evPtr,
|
||||
Tcl_QueuePosition position));
|
||||
EXTERN int Tcl_Read _ANSI_ARGS_((Tcl_Channel chan,
|
||||
char *bufPtr, int toRead));
|
||||
EXTERN void Tcl_ReapDetachedProcs _ANSI_ARGS_((void));
|
||||
EXTERN int Tcl_RecordAndEval _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *cmd, int flags));
|
||||
EXTERN int Tcl_RecordAndEvalObj _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *cmdPtr, int flags));
|
||||
EXTERN Tcl_RegExp Tcl_RegExpCompile _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string));
|
||||
EXTERN int Tcl_RegExpExec _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_RegExp regexp, char *string, char *start));
|
||||
EXTERN int Tcl_RegExpMatch _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *pattern));
|
||||
EXTERN void Tcl_RegExpRange _ANSI_ARGS_((Tcl_RegExp regexp,
|
||||
int index, char **startPtr, char **endPtr));
|
||||
EXTERN void Tcl_RegisterChannel _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Channel chan));
|
||||
EXTERN void Tcl_RegisterObjType _ANSI_ARGS_((
|
||||
Tcl_ObjType *typePtr));
|
||||
EXTERN void Tcl_Release _ANSI_ARGS_((ClientData clientData));
|
||||
EXTERN void Tcl_ResetResult _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
#define Tcl_Return Tcl_SetResult
|
||||
EXTERN int Tcl_ScanCountedElement _ANSI_ARGS_((CONST char *string,
|
||||
int length, int *flagPtr));
|
||||
EXTERN int Tcl_ScanElement _ANSI_ARGS_((CONST char *string,
|
||||
int *flagPtr));
|
||||
EXTERN int Tcl_Seek _ANSI_ARGS_((Tcl_Channel chan,
|
||||
int offset, int mode));
|
||||
EXTERN int Tcl_ServiceAll _ANSI_ARGS_((void));
|
||||
EXTERN int Tcl_ServiceEvent _ANSI_ARGS_((int flags));
|
||||
EXTERN void Tcl_SetAssocData _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *name, Tcl_InterpDeleteProc *proc,
|
||||
ClientData clientData));
|
||||
EXTERN void Tcl_SetBooleanObj _ANSI_ARGS_((Tcl_Obj *objPtr,
|
||||
int boolValue));
|
||||
EXTERN void Tcl_SetChannelBufferSize _ANSI_ARGS_((
|
||||
Tcl_Channel chan, int sz));
|
||||
EXTERN int Tcl_SetChannelOption _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, Tcl_Channel chan,
|
||||
char *optionName, char *newValue));
|
||||
EXTERN int Tcl_SetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *cmdName, Tcl_CmdInfo *infoPtr));
|
||||
EXTERN void Tcl_SetDoubleObj _ANSI_ARGS_((Tcl_Obj *objPtr,
|
||||
double doubleValue));
|
||||
EXTERN void Tcl_SetErrno _ANSI_ARGS_((int err));
|
||||
EXTERN void Tcl_SetErrorCode _ANSI_ARGS_(
|
||||
TCL_VARARGS(Tcl_Interp *,arg1));
|
||||
EXTERN void Tcl_SetIntObj _ANSI_ARGS_((Tcl_Obj *objPtr,
|
||||
int intValue));
|
||||
EXTERN void Tcl_SetListObj _ANSI_ARGS_((Tcl_Obj *objPtr,
|
||||
int objc, Tcl_Obj *CONST objv[]));
|
||||
EXTERN void Tcl_SetLongObj _ANSI_ARGS_((Tcl_Obj *objPtr,
|
||||
long longValue));
|
||||
EXTERN void Tcl_SetMaxBlockTime _ANSI_ARGS_((Tcl_Time *timePtr));
|
||||
EXTERN void Tcl_SetObjErrorCode _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *errorObjPtr));
|
||||
EXTERN void Tcl_SetObjLength _ANSI_ARGS_((Tcl_Obj *objPtr,
|
||||
int length));
|
||||
EXTERN void Tcl_SetObjResult _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *resultObjPtr));
|
||||
EXTERN void Tcl_SetPanicProc _ANSI_ARGS_((void (*proc)
|
||||
_ANSI_ARGS_(TCL_VARARGS(char *, format))));
|
||||
EXTERN int Tcl_SetRecursionLimit _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
int depth));
|
||||
EXTERN void Tcl_SetResult _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, Tcl_FreeProc *freeProc));
|
||||
EXTERN int Tcl_SetServiceMode _ANSI_ARGS_((int mode));
|
||||
EXTERN void Tcl_SetStdChannel _ANSI_ARGS_((Tcl_Channel channel,
|
||||
int type));
|
||||
EXTERN void Tcl_SetStringObj _ANSI_ARGS_((Tcl_Obj *objPtr,
|
||||
char *bytes, int length));
|
||||
EXTERN void Tcl_SetTimer _ANSI_ARGS_((Tcl_Time *timePtr));
|
||||
EXTERN char * Tcl_SetVar _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *varName, char *newValue, int flags));
|
||||
EXTERN char * Tcl_SetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *part1, char *part2, char *newValue,
|
||||
int flags));
|
||||
EXTERN char * Tcl_SignalId _ANSI_ARGS_((int sig));
|
||||
EXTERN char * Tcl_SignalMsg _ANSI_ARGS_((int sig));
|
||||
EXTERN void Tcl_Sleep _ANSI_ARGS_((int ms));
|
||||
EXTERN void Tcl_SourceRCFile _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN int Tcl_SplitList _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *list, int *argcPtr, char ***argvPtr));
|
||||
EXTERN void Tcl_SplitPath _ANSI_ARGS_((char *path,
|
||||
int *argcPtr, char ***argvPtr));
|
||||
EXTERN void Tcl_StaticPackage _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *pkgName, Tcl_PackageInitProc *initProc,
|
||||
Tcl_PackageInitProc *safeInitProc));
|
||||
EXTERN int Tcl_StringMatch _ANSI_ARGS_((char *string,
|
||||
char *pattern));
|
||||
EXTERN int Tcl_Tell _ANSI_ARGS_((Tcl_Channel chan));
|
||||
#define Tcl_TildeSubst Tcl_TranslateFileName
|
||||
EXTERN int Tcl_TraceVar _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *varName, int flags, Tcl_VarTraceProc *proc,
|
||||
ClientData clientData));
|
||||
EXTERN int Tcl_TraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *part1, char *part2, int flags,
|
||||
Tcl_VarTraceProc *proc, ClientData clientData));
|
||||
EXTERN char * Tcl_TranslateFileName _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *name, Tcl_DString *bufferPtr));
|
||||
EXTERN int Tcl_Ungets _ANSI_ARGS_((Tcl_Channel chan, char *str,
|
||||
int len, int atHead));
|
||||
EXTERN void Tcl_UnlinkVar _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *varName));
|
||||
EXTERN int Tcl_UnregisterChannel _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Channel chan));
|
||||
EXTERN int Tcl_UnsetVar _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *varName, int flags));
|
||||
EXTERN int Tcl_UnsetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *part1, char *part2, int flags));
|
||||
EXTERN void Tcl_UntraceVar _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *varName, int flags, Tcl_VarTraceProc *proc,
|
||||
ClientData clientData));
|
||||
EXTERN void Tcl_UntraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *part1, char *part2, int flags,
|
||||
Tcl_VarTraceProc *proc, ClientData clientData));
|
||||
EXTERN void Tcl_UpdateLinkedVar _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *varName));
|
||||
EXTERN int Tcl_UpVar _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *frameName, char *varName,
|
||||
char *localName, int flags));
|
||||
EXTERN int Tcl_UpVar2 _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *frameName, char *part1, char *part2,
|
||||
char *localName, int flags));
|
||||
EXTERN int Tcl_VarEval _ANSI_ARGS_(
|
||||
TCL_VARARGS(Tcl_Interp *,interp));
|
||||
EXTERN ClientData Tcl_VarTraceInfo _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *varName, int flags,
|
||||
Tcl_VarTraceProc *procPtr,
|
||||
ClientData prevClientData));
|
||||
EXTERN ClientData Tcl_VarTraceInfo2 _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *part1, char *part2, int flags,
|
||||
Tcl_VarTraceProc *procPtr,
|
||||
ClientData prevClientData));
|
||||
EXTERN int Tcl_WaitForEvent _ANSI_ARGS_((Tcl_Time *timePtr));
|
||||
EXTERN Tcl_Pid Tcl_WaitPid _ANSI_ARGS_((Tcl_Pid pid, int *statPtr,
|
||||
int options));
|
||||
EXTERN int Tcl_Write _ANSI_ARGS_((Tcl_Channel chan,
|
||||
char *s, int slen));
|
||||
EXTERN void Tcl_WrongNumArgs _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *CONST objv[], char *message));
|
||||
|
||||
#undef TCL_STORAGE_CLASS
|
||||
#define TCL_STORAGE_CLASS
|
||||
|
||||
/*
|
||||
* Convenience declaration of Tcl_AppInit for backwards compatibility.
|
||||
@@ -1570,7 +1110,10 @@ EXTERN void Tcl_WrongNumArgs _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
* class is neither DLLEXPORT nor DLLIMPORT
|
||||
*/
|
||||
|
||||
EXTERN int Tcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
#undef TCL_STORAGE_CLASS
|
||||
#define TCL_STORAGE_CLASS
|
||||
|
||||
EXTERN int Tcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
|
||||
#endif /* RESOURCE_INCLUDED */
|
||||
|
||||
|
||||
+78
-14
@@ -14,12 +14,14 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclAlloc.c,v 1.3 1999/01/06 21:08:51 stanton Exp $
|
||||
* RCS: @(#) $Id: tclAlloc.c,v 1.3.4.2 1999/03/05 20:18:03 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
#include "tclPort.h"
|
||||
|
||||
#ifndef USE_NATIVE_MALLOC
|
||||
|
||||
#ifdef TCL_DEBUG
|
||||
# define DEBUG
|
||||
/* #define MSTATS */
|
||||
@@ -125,9 +127,6 @@ char *
|
||||
TclpAlloc(
|
||||
unsigned int nbytes) /* Number of bytes to allocate. */
|
||||
{
|
||||
#ifdef USE_NATIVEMALLOC
|
||||
return (char*) malloc(nbytes);
|
||||
#else
|
||||
register union overhead *op;
|
||||
register long bucket;
|
||||
register unsigned amt;
|
||||
@@ -206,7 +205,6 @@ TclpAlloc(
|
||||
*(unsigned short *)((caddr_t)(op + 1) + op->ov_size) = RMAGIC;
|
||||
#endif
|
||||
return ((char *)(op + 1));
|
||||
#endif /* USE_NATIVEMALLOC */
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -283,10 +281,6 @@ void
|
||||
TclpFree(
|
||||
char *cp) /* Pointer to memory to free. */
|
||||
{
|
||||
#ifdef USE_NATIVEMALLOC
|
||||
free(cp);
|
||||
return;
|
||||
#else
|
||||
register long size;
|
||||
register union overhead *op;
|
||||
|
||||
@@ -318,7 +312,6 @@ TclpFree(
|
||||
#ifdef MSTATS
|
||||
nmalloc[size]--;
|
||||
#endif
|
||||
#endif /* USE_NATIVEMALLOC */
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -342,9 +335,6 @@ TclpRealloc(
|
||||
char *cp, /* Pointer to alloced block. */
|
||||
unsigned int nbytes) /* New size of memory. */
|
||||
{
|
||||
#ifdef USE_NATIVEMALLOC
|
||||
return (char*) realloc(cp, nbytes);
|
||||
#else
|
||||
int i;
|
||||
union overhead *op;
|
||||
int expensive;
|
||||
@@ -419,7 +409,6 @@ TclpRealloc(
|
||||
*(unsigned short *)((caddr_t)(op + 1) + op->ov_size) = RMAGIC;
|
||||
#endif
|
||||
return(cp);
|
||||
#endif /* USE_NATIVEMALLOC */
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -468,3 +457,78 @@ mstats(
|
||||
}
|
||||
#endif
|
||||
|
||||
#else /* USE_NATIVE_MALLOC */
|
||||
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclpAlloc --
|
||||
*
|
||||
* Allocate more memory.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
char *
|
||||
TclpAlloc(
|
||||
unsigned int nbytes) /* Number of bytes to allocate. */
|
||||
{
|
||||
return (char*) malloc(nbytes);
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclpFree --
|
||||
*
|
||||
* Free memory.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void
|
||||
TclpFree(
|
||||
char *cp) /* Pointer to memory to free. */
|
||||
{
|
||||
free(cp);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclpRealloc --
|
||||
*
|
||||
* Reallocate memory.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
char *
|
||||
TclpRealloc(
|
||||
char *cp, /* Pointer to alloced block. */
|
||||
unsigned int nbytes) /* New size of memory. */
|
||||
{
|
||||
return (char*) realloc(cp, nbytes);
|
||||
}
|
||||
|
||||
#endif /* USE_NATIVE_MALLOC */
|
||||
|
||||
+88
-22
@@ -12,7 +12,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclBasic.c,v 1.15 1999/02/03 00:55:04 stanton Exp $
|
||||
* RCS: @(#) $Id: tclBasic.c,v 1.15.4.1 1999/03/03 00:38:38 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
@@ -234,6 +234,35 @@ static CmdInfo builtInCmds[] = {
|
||||
(CompileProc *) NULL, 0}
|
||||
};
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_InitStubs --
|
||||
*
|
||||
* Ensures that the correct version of Tcl is loaded. This is
|
||||
* a trivial implementation of the stubs library initializer
|
||||
* that will get called if a stubs aware extension is directly
|
||||
* linked with the Tcl library.
|
||||
*
|
||||
* Results:
|
||||
* The actual version of Tcl that satisfies the request, or
|
||||
* NULL to indicate that an error occurred.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
char *
|
||||
Tcl_InitStubs (interp, version, exact)
|
||||
Tcl_Interp *interp;
|
||||
char *version;
|
||||
int exact;
|
||||
{
|
||||
return Tcl_PkgRequire(interp, "Tcl", version, exact);
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
@@ -339,6 +368,12 @@ Tcl_CreateInterp()
|
||||
|
||||
iPtr->execEnvPtr = TclCreateExecEnv((Tcl_Interp *) iPtr);
|
||||
|
||||
/*
|
||||
* Initialise the stub table pointer.
|
||||
*/
|
||||
|
||||
iPtr->stubTable = tclStubsPtr;
|
||||
|
||||
/*
|
||||
* Create the core commands. Do it here, rather than calling
|
||||
* Tcl_CreateCommand, because it's faster (there's no need to check for
|
||||
@@ -455,7 +490,8 @@ Tcl_CreateInterp()
|
||||
* Register Tcl's version number.
|
||||
*/
|
||||
|
||||
Tcl_PkgProvide((Tcl_Interp *) iPtr, "Tcl", TCL_VERSION);
|
||||
Tcl_PkgProvideEx((Tcl_Interp *) iPtr, "Tcl", TCL_VERSION,
|
||||
(ClientData) tclStubsPtr);
|
||||
|
||||
return (Tcl_Interp *) iPtr;
|
||||
}
|
||||
@@ -3894,6 +3930,54 @@ Tcl_AddObjErrorInfo(interp, message, length)
|
||||
Tcl_DecrRefCount(namePtr); /* free the name object */
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_VarEvalVA --
|
||||
*
|
||||
* Given a variable number of string arguments, concatenate them
|
||||
* all together and execute the result as a Tcl command.
|
||||
*
|
||||
* Results:
|
||||
* A standard Tcl return result. An error message or other
|
||||
* result may be left in interp->result.
|
||||
*
|
||||
* Side effects:
|
||||
* Depends on what was done by the command.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int
|
||||
Tcl_VarEvalVA (interp, argList)
|
||||
Tcl_Interp *interp; /* Interpreter in which to evaluate command. */
|
||||
va_list argList; /* Variable argument list. */
|
||||
{
|
||||
Tcl_DString buf;
|
||||
char *string;
|
||||
int result;
|
||||
|
||||
/*
|
||||
* Copy the strings one after the other into a single larger
|
||||
* string. Use stack-allocated space for small commands, but if
|
||||
* the command gets too large than call ckalloc to create the
|
||||
* space.
|
||||
*/
|
||||
|
||||
Tcl_DStringInit(&buf);
|
||||
while (1) {
|
||||
string = va_arg(argList, char *);
|
||||
if (string == NULL) {
|
||||
break;
|
||||
}
|
||||
Tcl_DStringAppend(&buf, string, -1);
|
||||
}
|
||||
|
||||
result = Tcl_Eval(interp, Tcl_DStringValue(&buf));
|
||||
Tcl_DStringFree(&buf);
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
@@ -3915,32 +3999,14 @@ Tcl_AddObjErrorInfo(interp, message, length)
|
||||
int
|
||||
Tcl_VarEval TCL_VARARGS_DEF(Tcl_Interp *,arg1)
|
||||
{
|
||||
va_list argList;
|
||||
Tcl_DString buf;
|
||||
char *string;
|
||||
Tcl_Interp *interp;
|
||||
va_list argList;
|
||||
int result;
|
||||
|
||||
/*
|
||||
* Copy the strings one after the other into a single larger
|
||||
* string. Use stack-allocated space for small commands, but if
|
||||
* the command gets too large than call ckalloc to create the
|
||||
* space.
|
||||
*/
|
||||
|
||||
interp = TCL_VARARGS_START(Tcl_Interp *,arg1,argList);
|
||||
Tcl_DStringInit(&buf);
|
||||
while (1) {
|
||||
string = va_arg(argList, char *);
|
||||
if (string == NULL) {
|
||||
break;
|
||||
}
|
||||
Tcl_DStringAppend(&buf, string, -1);
|
||||
}
|
||||
result = Tcl_VarEvalVA(interp, argList);
|
||||
va_end(argList);
|
||||
|
||||
result = Tcl_Eval(interp, Tcl_DStringValue(&buf));
|
||||
Tcl_DStringFree(&buf);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
+496
-35
@@ -2,14 +2,15 @@
|
||||
* tclBinary.c --
|
||||
*
|
||||
* This file contains the implementation of the "binary" Tcl built-in
|
||||
* command .
|
||||
* command and the Tcl binary data object.
|
||||
*
|
||||
* Copyright (c) 1997 by Sun Microsystems, Inc.
|
||||
* Copyright (c) 1998-1999 by Scriptics Corporation.
|
||||
*
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclBinary.c,v 1.3 1998/09/14 18:39:57 stanton Exp $
|
||||
* RCS: @(#) $Id: tclBinary.c,v 1.3.4.1 1999/03/03 00:38:39 stanton Exp $
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
@@ -28,11 +29,462 @@
|
||||
* Prototypes for local procedures defined in this file:
|
||||
*/
|
||||
|
||||
static void DupByteArrayInternalRep _ANSI_ARGS_((Tcl_Obj *srcPtr,
|
||||
Tcl_Obj *copyPtr));
|
||||
static int FormatNumber _ANSI_ARGS_((Tcl_Interp *interp, int type,
|
||||
Tcl_Obj *src, unsigned char **cursorPtr));
|
||||
static void FreeByteArrayInternalRep _ANSI_ARGS_((Tcl_Obj *objPtr));
|
||||
static int GetFormatSpec _ANSI_ARGS_((char **formatPtr,
|
||||
char *cmdPtr, int *countPtr));
|
||||
static int FormatNumber _ANSI_ARGS_((Tcl_Interp *interp, int type,
|
||||
Tcl_Obj *src, char **cursorPtr));
|
||||
static Tcl_Obj * ScanNumber _ANSI_ARGS_((char *buffer, int type));
|
||||
static Tcl_Obj * ScanNumber _ANSI_ARGS_((unsigned char *buffer,
|
||||
int type));
|
||||
static int SetByteArrayFromAny _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *objPtr));
|
||||
static void UpdateStringOfByteArray _ANSI_ARGS_((Tcl_Obj *listPtr));
|
||||
|
||||
/*
|
||||
* The following object type represents an array of bytes. This type should
|
||||
* be used to represent arbitrary binary data instead of a string object
|
||||
* because although they are equivalent at the moment they will not be in
|
||||
* future versions which support unicode.
|
||||
*/
|
||||
|
||||
Tcl_ObjType tclByteArrayType = {
|
||||
"bytearray",
|
||||
FreeByteArrayInternalRep,
|
||||
DupByteArrayInternalRep,
|
||||
UpdateStringOfByteArray,
|
||||
SetByteArrayFromAny
|
||||
};
|
||||
|
||||
/*
|
||||
* The following structure is the internal rep for a ByteArray object.
|
||||
* Keeps track of how much memory has been used and how much has been
|
||||
* allocated for the byte array to enable growing and shrinking of the
|
||||
* ByteArray object with fewer mallocs.
|
||||
*/
|
||||
|
||||
typedef struct ByteArray {
|
||||
int used; /* The number of bytes used in the byte
|
||||
* array. */
|
||||
int allocated; /* The amount of space actually allocated
|
||||
* minus 1 byte. */
|
||||
unsigned char bytes[4]; /* The array of bytes. The actual size of
|
||||
* this field depends on the 'allocated' field
|
||||
* above. */
|
||||
} ByteArray;
|
||||
|
||||
#define BYTEARRAY_SIZE(len) \
|
||||
((unsigned) (sizeof(ByteArray) - 4 + (len)))
|
||||
#define GET_BYTEARRAY(objPtr) \
|
||||
((ByteArray *) (objPtr)->internalRep.otherValuePtr)
|
||||
#define SET_BYTEARRAY(objPtr, baPtr) \
|
||||
(objPtr)->internalRep.otherValuePtr = (VOID *) (baPtr)
|
||||
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_NewByteArrayObj --
|
||||
*
|
||||
* This procedure is normally called when not debugging: i.e., when
|
||||
* TCL_MEM_DEBUG is not defined. It creates a new ByteArray object and
|
||||
* initializes it from the given array of bytes.
|
||||
*
|
||||
* When TCL_MEM_DEBUG is defined, this procedure just returns the
|
||||
* result of calling the debugging version Tcl_DbNewByteArrayObj.
|
||||
*
|
||||
* Results:
|
||||
* The newly create object is returned. This object will have no
|
||||
* initial string representation. The returned object has a ref count
|
||||
* of 0.
|
||||
*
|
||||
* Side effects:
|
||||
* Memory allocated for new object and copy of byte array argument.
|
||||
*
|
||||
*---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifdef TCL_MEM_DEBUG
|
||||
#undef Tcl_NewByteArrayObj
|
||||
|
||||
Tcl_Obj *
|
||||
Tcl_NewByteArrayObj(bytes, length)
|
||||
unsigned char *bytes; /* The array of bytes used to initialize
|
||||
* the new object. */
|
||||
int length; /* Length of the array of bytes, which must
|
||||
* be >= 0. */
|
||||
{
|
||||
return Tcl_DbNewByteArrayObj(bytes, length, "unknown", 0);
|
||||
}
|
||||
|
||||
#else /* if not TCL_MEM_DEBUG */
|
||||
|
||||
Tcl_Obj *
|
||||
Tcl_NewByteArrayObj(bytes, length)
|
||||
unsigned char *bytes; /* The array of bytes used to initialize
|
||||
* the new object. */
|
||||
int length; /* Length of the array of bytes, which must
|
||||
* be >= 0. */
|
||||
{
|
||||
Tcl_Obj *objPtr;
|
||||
|
||||
TclNewObj(objPtr);
|
||||
Tcl_SetByteArrayObj(objPtr, bytes, length);
|
||||
return objPtr;
|
||||
}
|
||||
#endif /* TCL_MEM_DEBUG */
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_DbNewByteArrayObj --
|
||||
*
|
||||
* This procedure is normally called when debugging: i.e., when
|
||||
* TCL_MEM_DEBUG is defined. It is the same as the Tcl_NewByteArrayObj
|
||||
* above except that it calls Tcl_DbCkalloc directly with the file name
|
||||
* and line number from its caller. This simplifies debugging since then
|
||||
* the checkmem command will report the correct file name and line number
|
||||
* when reporting objects that haven't been freed.
|
||||
*
|
||||
* When TCL_MEM_DEBUG is not defined, this procedure just returns the
|
||||
* result of calling Tcl_NewByteArrayObj.
|
||||
*
|
||||
* Results:
|
||||
* The newly create object is returned. This object will have no
|
||||
* initial string representation. The returned object has a ref count
|
||||
* of 0.
|
||||
*
|
||||
* Side effects:
|
||||
* Memory allocated for new object and copy of byte array argument.
|
||||
*
|
||||
*---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifdef TCL_MEM_DEBUG
|
||||
|
||||
Tcl_Obj *
|
||||
Tcl_DbNewByteArrayObj(bytes, length, file, line)
|
||||
unsigned char *bytes; /* The array of bytes used to initialize
|
||||
* the new object. */
|
||||
int length; /* Length of the array of bytes, which must
|
||||
* be >= 0. */
|
||||
char *file; /* The name of the source file calling this
|
||||
* procedure; used for debugging. */
|
||||
int line; /* Line number in the source file; used
|
||||
* for debugging. */
|
||||
{
|
||||
Tcl_Obj *objPtr;
|
||||
|
||||
TclDbNewObj(objPtr, file, line);
|
||||
Tcl_SetByteArrayObj(objPtr, bytes, length);
|
||||
return objPtr;
|
||||
}
|
||||
|
||||
#else /* if not TCL_MEM_DEBUG */
|
||||
|
||||
Tcl_Obj *
|
||||
Tcl_DbNewByteArrayObj(bytes, length, file, line)
|
||||
unsigned char *bytes; /* The array of bytes used to initialize
|
||||
* the new object. */
|
||||
int length; /* Length of the array of bytes, which must
|
||||
* be >= 0. */
|
||||
char *file; /* The name of the source file calling this
|
||||
* procedure; used for debugging. */
|
||||
int line; /* Line number in the source file; used
|
||||
* for debugging. */
|
||||
{
|
||||
return Tcl_NewByteArrayObj(bytes, length);
|
||||
}
|
||||
#endif /* TCL_MEM_DEBUG */
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_SetByteArrayObj --
|
||||
*
|
||||
* Modify an object to be a ByteArray object and to have the specified
|
||||
* array of bytes as its value.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* The object's old string rep and internal rep is freed.
|
||||
* Memory allocated for copy of byte array argument.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void
|
||||
Tcl_SetByteArrayObj(objPtr, bytes, length)
|
||||
Tcl_Obj *objPtr; /* Object to initialize as a ByteArray. */
|
||||
unsigned char *bytes; /* The array of bytes to use as the new
|
||||
* value. */
|
||||
int length; /* Length of the array of bytes, which must
|
||||
* be >= 0. */
|
||||
{
|
||||
Tcl_ObjType *typePtr;
|
||||
ByteArray *byteArrayPtr;
|
||||
|
||||
if (Tcl_IsShared(objPtr)) {
|
||||
panic("Tcl_SetByteArrayObj called with shared object");
|
||||
}
|
||||
typePtr = objPtr->typePtr;
|
||||
if ((typePtr != NULL) && (typePtr->freeIntRepProc != NULL)) {
|
||||
(*typePtr->freeIntRepProc)(objPtr);
|
||||
}
|
||||
Tcl_InvalidateStringRep(objPtr);
|
||||
|
||||
byteArrayPtr = (ByteArray *) ckalloc(BYTEARRAY_SIZE(length));
|
||||
byteArrayPtr->used = length;
|
||||
byteArrayPtr->allocated = length;
|
||||
memcpy((VOID *) byteArrayPtr->bytes, (VOID *) bytes, (size_t) length);
|
||||
|
||||
objPtr->typePtr = &tclByteArrayType;
|
||||
SET_BYTEARRAY(objPtr, byteArrayPtr);
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_GetByteArrayFromObj --
|
||||
*
|
||||
* Attempt to get the array of bytes from the Tcl object. If the
|
||||
* object is not already a ByteArray object, an attempt will be
|
||||
* made to convert it to one.
|
||||
*
|
||||
* Results:
|
||||
* Pointer to array of bytes representing the ByteArray object.
|
||||
*
|
||||
* Side effects:
|
||||
* Frees old internal rep. Allocates memory for new internal rep.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
unsigned char *
|
||||
Tcl_GetByteArrayFromObj(objPtr, lengthPtr)
|
||||
Tcl_Obj *objPtr; /* The ByteArray object. */
|
||||
int *lengthPtr; /* If non-NULL, filled with length of the
|
||||
* array of bytes in the ByteArray object. */
|
||||
{
|
||||
ByteArray *baPtr;
|
||||
|
||||
SetByteArrayFromAny(NULL, objPtr);
|
||||
baPtr = GET_BYTEARRAY(objPtr);
|
||||
|
||||
if (lengthPtr != NULL) {
|
||||
*lengthPtr = baPtr->used;
|
||||
}
|
||||
return (unsigned char *) baPtr->bytes;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_SetByteArrayLength --
|
||||
*
|
||||
* This procedure changes the length of the byte array for this
|
||||
* object. Once the caller has set the length of the array, it
|
||||
* is acceptable to directly modify the bytes in the array up until
|
||||
* Tcl_GetStringFromObj() has been called on this object.
|
||||
*
|
||||
* Results:
|
||||
* The new byte array of the specified length.
|
||||
*
|
||||
* Side effects:
|
||||
* Allocates enough memory for an array of bytes of the requested
|
||||
* size. When growing the array, the old array is copied to the
|
||||
* new array; new bytes are undefined. When shrinking, the
|
||||
* old array is truncated to the specified length.
|
||||
*
|
||||
*---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
unsigned char *
|
||||
Tcl_SetByteArrayLength(objPtr, length)
|
||||
Tcl_Obj *objPtr; /* The ByteArray object. */
|
||||
int length; /* New length for internal byte array. */
|
||||
{
|
||||
ByteArray *byteArrayPtr, *newByteArrayPtr;
|
||||
|
||||
if (Tcl_IsShared(objPtr)) {
|
||||
panic("Tcl_SetObjLength called with shared object");
|
||||
}
|
||||
if (objPtr->typePtr != &tclByteArrayType) {
|
||||
SetByteArrayFromAny(NULL, objPtr);
|
||||
}
|
||||
|
||||
byteArrayPtr = GET_BYTEARRAY(objPtr);
|
||||
if (length > byteArrayPtr->allocated) {
|
||||
newByteArrayPtr = (ByteArray *) ckalloc(BYTEARRAY_SIZE(length));
|
||||
newByteArrayPtr->used = length;
|
||||
newByteArrayPtr->allocated = length;
|
||||
memcpy((VOID *) newByteArrayPtr->bytes,
|
||||
(VOID *) byteArrayPtr->bytes, (size_t) byteArrayPtr->used);
|
||||
ckfree((char *) byteArrayPtr);
|
||||
byteArrayPtr = newByteArrayPtr;
|
||||
SET_BYTEARRAY(objPtr, byteArrayPtr);
|
||||
}
|
||||
Tcl_InvalidateStringRep(objPtr);
|
||||
byteArrayPtr->used = length;
|
||||
return byteArrayPtr->bytes;
|
||||
}
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------------------------
|
||||
*
|
||||
* SetByteArrayFromAny --
|
||||
*
|
||||
* Generate the ByteArray internal rep from the string rep.
|
||||
*
|
||||
* Results:
|
||||
* The return value is always TCL_OK.
|
||||
*
|
||||
* Side effects:
|
||||
* A ByteArray object is stored as the internal rep of objPtr.
|
||||
*
|
||||
*---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static int
|
||||
SetByteArrayFromAny(interp, objPtr)
|
||||
Tcl_Interp *interp; /* Not used. */
|
||||
Tcl_Obj *objPtr; /* The object to convert to type ByteArray. */
|
||||
{
|
||||
Tcl_ObjType *typePtr;
|
||||
int length;
|
||||
char *src;
|
||||
ByteArray *byteArrayPtr;
|
||||
|
||||
typePtr = objPtr->typePtr;
|
||||
if (typePtr != &tclByteArrayType) {
|
||||
src = Tcl_GetStringFromObj(objPtr, &length);
|
||||
|
||||
byteArrayPtr = (ByteArray *) ckalloc(BYTEARRAY_SIZE(length));
|
||||
memcpy((VOID *) byteArrayPtr->bytes, (VOID *) src, (size_t) length);
|
||||
|
||||
byteArrayPtr->used = length;
|
||||
byteArrayPtr->allocated = length;
|
||||
|
||||
if ((typePtr != NULL) && (typePtr->freeIntRepProc) != NULL) {
|
||||
(*typePtr->freeIntRepProc)(objPtr);
|
||||
}
|
||||
objPtr->typePtr = &tclByteArrayType;
|
||||
SET_BYTEARRAY(objPtr, byteArrayPtr);
|
||||
}
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* FreeByteArrayInternalRep --
|
||||
*
|
||||
* Deallocate the storage associated with a ByteArray data object's
|
||||
* internal representation.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* Frees memory.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static void
|
||||
FreeByteArrayInternalRep(objPtr)
|
||||
Tcl_Obj *objPtr; /* Object with internal rep to free. */
|
||||
{
|
||||
ckfree((char *) GET_BYTEARRAY(objPtr));
|
||||
}
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------------------------
|
||||
*
|
||||
* DupByteArrayInternalRep --
|
||||
*
|
||||
* Initialize the internal representation of a ByteArray Tcl_Obj
|
||||
* to a copy of the internal representation of an existing ByteArray
|
||||
* object.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* Allocates memory.
|
||||
*
|
||||
*---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static void
|
||||
DupByteArrayInternalRep(srcPtr, copyPtr)
|
||||
Tcl_Obj *srcPtr; /* Object with internal rep to copy. */
|
||||
Tcl_Obj *copyPtr; /* Object with internal rep to set. */
|
||||
{
|
||||
int length;
|
||||
ByteArray *srcArrayPtr, *copyArrayPtr;
|
||||
|
||||
srcArrayPtr = GET_BYTEARRAY(srcPtr);
|
||||
length = srcArrayPtr->used;
|
||||
|
||||
copyArrayPtr = (ByteArray *) ckalloc(BYTEARRAY_SIZE(length));
|
||||
copyArrayPtr->used = length;
|
||||
copyArrayPtr->allocated = length;
|
||||
memcpy((VOID *) copyArrayPtr->bytes, (VOID *) srcArrayPtr->bytes,
|
||||
(size_t) length);
|
||||
SET_BYTEARRAY(copyPtr, copyArrayPtr);
|
||||
}
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------------------------
|
||||
*
|
||||
* UpdateStringOfByteArray --
|
||||
*
|
||||
* Update the string representation for a ByteArray data object.
|
||||
* Note: This procedure does not invalidate an existing old string rep
|
||||
* so storage will be lost if this has not already been done.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* The object's string is set to a valid string that results from
|
||||
* the ByteArray-to-string conversion.
|
||||
*
|
||||
* The object becomes a string object -- the internal rep is
|
||||
* discarded and the typePtr becomes NULL.
|
||||
*
|
||||
*---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static void
|
||||
UpdateStringOfByteArray(objPtr)
|
||||
Tcl_Obj *objPtr; /* ByteArray object whose string rep to
|
||||
* update. */
|
||||
{
|
||||
int length;
|
||||
unsigned char *src;
|
||||
char *dst;
|
||||
ByteArray *byteArrayPtr;
|
||||
|
||||
byteArrayPtr = GET_BYTEARRAY(objPtr);
|
||||
src = byteArrayPtr->bytes;
|
||||
length = byteArrayPtr->used;
|
||||
|
||||
/*
|
||||
* The byte array is the string representation.
|
||||
*/
|
||||
|
||||
dst = (char *) ckalloc((unsigned) (length + 1));
|
||||
objPtr->bytes = dst;
|
||||
objPtr->length = length;
|
||||
|
||||
memcpy((VOID *) dst, (VOID *) src, (size_t) length);
|
||||
dst[length] = '\0';
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
@@ -65,13 +517,13 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
* character. */
|
||||
char *format; /* Pointer to current position in format
|
||||
* string. */
|
||||
char *cursor; /* Current position within result buffer. */
|
||||
char *maxPos; /* Greatest position within result buffer that
|
||||
Tcl_Obj *resultPtr; /* Object holding result buffer. */
|
||||
unsigned char *buffer; /* Start of result buffer. */
|
||||
unsigned char *cursor; /* Current position within result buffer. */
|
||||
unsigned char *maxPos; /* Greatest position within result buffer that
|
||||
* cursor has visited.*/
|
||||
char *buffer; /* Start of data buffer. */
|
||||
char *errorString, *errorValue, *str;
|
||||
int offset, size, length;
|
||||
Tcl_Obj *resultPtr;
|
||||
|
||||
static char *subCmds[] = { "format", "scan", (char *) NULL };
|
||||
enum { BinaryFormat, BinaryScan } index;
|
||||
@@ -121,7 +573,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
goto badIndex;
|
||||
}
|
||||
if (count == BINARY_ALL) {
|
||||
(void)Tcl_GetStringFromObj(objv[arg], &count);
|
||||
Tcl_GetByteArrayFromObj(objv[arg], &count);
|
||||
} else if (count == BINARY_NOCOUNT) {
|
||||
count = 1;
|
||||
}
|
||||
@@ -241,8 +693,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
*/
|
||||
|
||||
resultPtr = Tcl_GetObjResult(interp);
|
||||
Tcl_SetObjLength(resultPtr, length);
|
||||
buffer = Tcl_GetStringFromObj(resultPtr, NULL);
|
||||
buffer = Tcl_SetByteArrayLength(resultPtr, length);
|
||||
memset(buffer, 0, (size_t) length);
|
||||
|
||||
/*
|
||||
@@ -267,8 +718,9 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
case 'a':
|
||||
case 'A': {
|
||||
char pad = (char) (cmd == 'a' ? '\0' : ' ');
|
||||
unsigned char *bytes;
|
||||
|
||||
str = Tcl_GetStringFromObj(objv[arg++], &length);
|
||||
bytes = Tcl_GetByteArrayFromObj(objv[arg++], &length);
|
||||
|
||||
if (count == BINARY_ALL) {
|
||||
count = length;
|
||||
@@ -276,10 +728,10 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
count = 1;
|
||||
}
|
||||
if (length >= count) {
|
||||
memcpy((VOID *) cursor, (VOID *) str,
|
||||
memcpy((VOID *) cursor, (VOID *) bytes,
|
||||
(size_t) count);
|
||||
} else {
|
||||
memcpy((VOID *) cursor, (VOID *) str,
|
||||
memcpy((VOID *) cursor, (VOID *) bytes,
|
||||
(size_t) length);
|
||||
memset(cursor+length, pad,
|
||||
(size_t) (count - length));
|
||||
@@ -289,7 +741,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
}
|
||||
case 'b':
|
||||
case 'B': {
|
||||
char *last;
|
||||
unsigned char *last;
|
||||
|
||||
str = Tcl_GetStringFromObj(objv[arg++], &length);
|
||||
if (count == BINARY_ALL) {
|
||||
@@ -347,7 +799,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
}
|
||||
case 'h':
|
||||
case 'H': {
|
||||
char *last;
|
||||
unsigned char *last;
|
||||
int c;
|
||||
|
||||
str = Tcl_GetStringFromObj(objv[arg++], &length);
|
||||
@@ -491,7 +943,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
"value formatString ?varName varName ...?");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
buffer = Tcl_GetStringFromObj(objv[2], &length);
|
||||
buffer = Tcl_GetByteArrayFromObj(objv[2], &length);
|
||||
format = Tcl_GetStringFromObj(objv[3], NULL);
|
||||
cursor = buffer;
|
||||
arg = 4;
|
||||
@@ -502,7 +954,9 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
}
|
||||
switch (cmd) {
|
||||
case 'a':
|
||||
case 'A':
|
||||
case 'A': {
|
||||
unsigned char *src;
|
||||
|
||||
if (arg >= objc) {
|
||||
goto badIndex;
|
||||
}
|
||||
@@ -517,7 +971,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
}
|
||||
}
|
||||
|
||||
str = buffer + offset;
|
||||
src = buffer + offset;
|
||||
size = count;
|
||||
|
||||
/*
|
||||
@@ -526,13 +980,13 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
|
||||
if (cmd == 'A') {
|
||||
while (size > 0) {
|
||||
if (str[size-1] != '\0' && str[size-1] != ' ') {
|
||||
if (src[size-1] != '\0' && src[size-1] != ' ') {
|
||||
break;
|
||||
}
|
||||
size--;
|
||||
}
|
||||
}
|
||||
valuePtr = Tcl_NewStringObj(str, size);
|
||||
valuePtr = Tcl_NewByteArrayObj(src, size);
|
||||
resultPtr = Tcl_ObjSetVar2(interp, objv[arg++], NULL,
|
||||
valuePtr,
|
||||
TCL_LEAVE_ERR_MSG | TCL_PARSE_PART1);
|
||||
@@ -542,8 +996,10 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
}
|
||||
offset += count;
|
||||
break;
|
||||
}
|
||||
case 'b':
|
||||
case 'B': {
|
||||
unsigned char *src;
|
||||
char *dest;
|
||||
|
||||
if (arg >= objc) {
|
||||
@@ -559,7 +1015,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
str = buffer + offset;
|
||||
src = buffer + offset;
|
||||
valuePtr = Tcl_NewObj();
|
||||
Tcl_SetObjLength(valuePtr, count);
|
||||
dest = Tcl_GetStringFromObj(valuePtr, NULL);
|
||||
@@ -569,7 +1025,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
if (i % 8) {
|
||||
value >>= 1;
|
||||
} else {
|
||||
value = *str++;
|
||||
value = *src++;
|
||||
}
|
||||
*dest++ = (char) ((value & 1) ? '1' : '0');
|
||||
}
|
||||
@@ -578,7 +1034,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
if (i % 8) {
|
||||
value <<= 1;
|
||||
} else {
|
||||
value = *str++;
|
||||
value = *src++;
|
||||
}
|
||||
*dest++ = (char) ((value & 0x80) ? '1' : '0');
|
||||
}
|
||||
@@ -596,6 +1052,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
}
|
||||
case 'h':
|
||||
case 'H': {
|
||||
unsigned char *src;
|
||||
char *dest;
|
||||
int i;
|
||||
static char hexdigit[] = "0123456789abcdef";
|
||||
@@ -613,7 +1070,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
str = buffer + offset;
|
||||
src = buffer + offset;
|
||||
valuePtr = Tcl_NewObj();
|
||||
Tcl_SetObjLength(valuePtr, count);
|
||||
dest = Tcl_GetStringFromObj(valuePtr, NULL);
|
||||
@@ -623,7 +1080,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
if (i % 2) {
|
||||
value >>= 4;
|
||||
} else {
|
||||
value = *str++;
|
||||
value = *src++;
|
||||
}
|
||||
*dest++ = hexdigit[value & 0xf];
|
||||
}
|
||||
@@ -632,7 +1089,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
if (i % 2) {
|
||||
value <<= 4;
|
||||
} else {
|
||||
value = *str++;
|
||||
value = *src++;
|
||||
}
|
||||
*dest++ = hexdigit[(value >> 4) & 0xf];
|
||||
}
|
||||
@@ -662,10 +1119,13 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
case 'f':
|
||||
size = sizeof(float);
|
||||
goto scanNumber;
|
||||
case 'd':
|
||||
case 'd': {
|
||||
unsigned char *src;
|
||||
|
||||
size = sizeof(double);
|
||||
/* fall through */
|
||||
scanNumber:
|
||||
|
||||
scanNumber:
|
||||
if (arg >= objc) {
|
||||
goto badIndex;
|
||||
}
|
||||
@@ -683,10 +1143,10 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
goto done;
|
||||
}
|
||||
valuePtr = Tcl_NewObj();
|
||||
str = buffer+offset;
|
||||
src = buffer+offset;
|
||||
for (i = 0; i < count; i++) {
|
||||
elementPtr = ScanNumber(str, cmd);
|
||||
str += size;
|
||||
elementPtr = ScanNumber(src, cmd);
|
||||
src += size;
|
||||
Tcl_ListObjAppendElement(NULL, valuePtr,
|
||||
elementPtr);
|
||||
}
|
||||
@@ -701,6 +1161,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
|
||||
return TCL_ERROR;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'x':
|
||||
if (count == BINARY_NOCOUNT) {
|
||||
count = 1;
|
||||
@@ -860,7 +1321,7 @@ FormatNumber(interp, type, src, cursorPtr)
|
||||
* errors. */
|
||||
int type; /* Type of number to format. */
|
||||
Tcl_Obj *src; /* Number to format. */
|
||||
char **cursorPtr; /* Pointer to index into destination buffer. */
|
||||
unsigned char **cursorPtr; /* Pointer to index into destination buffer. */
|
||||
{
|
||||
int value;
|
||||
double dvalue;
|
||||
@@ -942,7 +1403,7 @@ FormatNumber(interp, type, src, cursorPtr)
|
||||
|
||||
static Tcl_Obj *
|
||||
ScanNumber(buffer, type)
|
||||
char *buffer; /* Buffer to scan number from. */
|
||||
unsigned char *buffer; /* Buffer to scan number from. */
|
||||
int type; /* Format character from "binary scan" */
|
||||
{
|
||||
int value;
|
||||
|
||||
+11
-9
@@ -12,7 +12,7 @@
|
||||
*
|
||||
* This code contributed by Karl Lehenbauer and Mark Diekhans
|
||||
*
|
||||
* RCS: @(#) $Id: tclCkalloc.c,v 1.2 1998/09/14 18:39:57 stanton Exp $
|
||||
* RCS: @(#) $Id: tclCkalloc.c,v 1.2.4.1 1999/03/03 00:38:39 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
@@ -661,7 +661,7 @@ Tcl_InitMemory(interp)
|
||||
(Tcl_CmdDeleteProc *) NULL);
|
||||
}
|
||||
|
||||
#else
|
||||
#else /* TCL_MEM_DEBUG */
|
||||
|
||||
|
||||
/*
|
||||
@@ -778,8 +778,8 @@ Tcl_DbCkfree(ptr, file, line)
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_InitMemory --
|
||||
* Dummy initialization for memory command, which is only available
|
||||
* Tcl_InitMemory, et al. --
|
||||
* Dummy implementations of memory routines, which is only available
|
||||
* if TCL_MEM_DEBUG is on.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
@@ -794,10 +794,6 @@ Tcl_InitMemory(interp)
|
||||
#undef Tcl_DumpActiveMemory
|
||||
#undef Tcl_ValidateAllMemory
|
||||
|
||||
extern int Tcl_DumpActiveMemory _ANSI_ARGS_((char *fileName));
|
||||
extern void Tcl_ValidateAllMemory _ANSI_ARGS_((char *file,
|
||||
int line));
|
||||
|
||||
int
|
||||
Tcl_DumpActiveMemory(fileName)
|
||||
char *fileName;
|
||||
@@ -812,4 +808,10 @@ Tcl_ValidateAllMemory(file, line)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
void
|
||||
TclDumpMemoryInfo(outFile)
|
||||
FILE *outFile;
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* TCL_MEM_DEBUG */
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclClock.c,v 1.2 1998/09/14 18:39:57 stanton Exp $
|
||||
* RCS: @(#) $Id: tclClock.c,v 1.2.4.1 1999/03/04 00:58:26 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tcl.h"
|
||||
@@ -263,7 +263,7 @@ FormatClock(interp, clockVal, useGMT, format)
|
||||
}
|
||||
#endif
|
||||
|
||||
timeDataPtr = TclpGetDate((time_t *) &clockVal, useGMT);
|
||||
timeDataPtr = TclpGetDate((TclpTime_t) &clockVal, useGMT);
|
||||
|
||||
/*
|
||||
* Make a guess at the upper limit on the substituted string size
|
||||
|
||||
+2
-55
@@ -6,7 +6,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclCompile.h,v 1.8 1998/09/14 18:39:58 stanton Exp $
|
||||
* RCS: @(#) $Id: tclCompile.h,v 1.8.4.2 1999/03/06 21:19:56 stanton Exp $
|
||||
*/
|
||||
|
||||
#ifndef _TCLCOMPILATION
|
||||
@@ -151,58 +151,6 @@ typedef struct CmdLocation {
|
||||
int numSrcChars; /* Number of command source chars. */
|
||||
} CmdLocation;
|
||||
|
||||
/*
|
||||
* CompileProcs need the ability to record information during compilation
|
||||
* that can be used by bytecode instructions during execution. The AuxData
|
||||
* structure provides this "auxiliary data" mechanism. An arbitrary number
|
||||
* of these structures can be stored in the ByteCode record (during
|
||||
* compilation they are stored in a CompileEnv structure). Each AuxData
|
||||
* record holds one word of client-specified data (often a pointer) and is
|
||||
* given an index that instructions can later use to look up the structure
|
||||
* and its data.
|
||||
*
|
||||
* The following definitions declare the types of procedures that are called
|
||||
* to duplicate or free this auxiliary data when the containing ByteCode
|
||||
* objects are duplicated and freed. Pointers to these procedures are kept
|
||||
* in the AuxData structure.
|
||||
*/
|
||||
|
||||
typedef ClientData (AuxDataDupProc) _ANSI_ARGS_((ClientData clientData));
|
||||
typedef void (AuxDataFreeProc) _ANSI_ARGS_((ClientData clientData));
|
||||
|
||||
/*
|
||||
* We define a separate AuxDataType struct to hold type-related information
|
||||
* for the AuxData structure. This separation makes it possible for clients
|
||||
* outside of the TCL core to manipulate (in a limited fashion!) AuxData;
|
||||
* for example, it makes it possible to pickle and unpickle AuxData structs.
|
||||
*/
|
||||
|
||||
typedef struct AuxDataType {
|
||||
char *name; /* the name of the type. Types can be
|
||||
* registered and found by name */
|
||||
AuxDataDupProc *dupProc; /* Callback procedure to invoke when the
|
||||
* aux data is duplicated (e.g., when the
|
||||
* ByteCode structure containing the aux
|
||||
* data is duplicated). NULL means just
|
||||
* copy the source clientData bits; no
|
||||
* proc need be called. */
|
||||
AuxDataFreeProc *freeProc; /* Callback procedure to invoke when the
|
||||
* aux data is freed. NULL means no
|
||||
* proc need be called. */
|
||||
} AuxDataType;
|
||||
|
||||
/*
|
||||
* The definition of the AuxData structure that holds information created
|
||||
* during compilation by CompileProcs and used by instructions during
|
||||
* execution.
|
||||
*/
|
||||
|
||||
typedef struct AuxData {
|
||||
AuxDataType *type; /* pointer to the AuxData type associated with
|
||||
* this ClientData. */
|
||||
ClientData clientData; /* The compilation data itself. */
|
||||
} AuxData;
|
||||
|
||||
/*
|
||||
* Structure defining the compilation environment. After compilation, fields
|
||||
* describing bytecode instructions are copied out into the more compact
|
||||
@@ -785,12 +733,11 @@ EXTERN int TclCompileDollarVar _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int flags,
|
||||
CompileEnv *envPtr));
|
||||
EXTERN int TclCreateAuxData _ANSI_ARGS_((ClientData clientData,
|
||||
AuxDataType *typePtr, CompileEnv *envPtr));
|
||||
AuxDataType *typePtr, CompileEnv *envPtr));
|
||||
EXTERN ExecEnv * TclCreateExecEnv _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN void TclDeleteExecEnv _ANSI_ARGS_((ExecEnv *eePtr));
|
||||
EXTERN void TclEmitForwardJump _ANSI_ARGS_((CompileEnv *envPtr,
|
||||
TclJumpType jumpType, JumpFixup *jumpFixupPtr));
|
||||
EXTERN AuxDataType *TclGetAuxDataType _ANSI_ARGS_((char *typeName));
|
||||
EXTERN ExceptionRange * TclGetExceptionRangeForPc _ANSI_ARGS_((
|
||||
unsigned char *pc, int catchOnly,
|
||||
ByteCode* codePtr));
|
||||
|
||||
+7
-7
@@ -10,7 +10,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclDate.c,v 1.2 1998/09/14 18:39:58 stanton Exp $
|
||||
* RCS: @(#) $Id: tclDate.c,v 1.2.4.1 1999/03/04 00:58:26 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
@@ -441,7 +441,7 @@ Convert(Month, Day, Year, Hours, Minutes, Seconds, Meridian, DSTmode, TimePtr)
|
||||
return -1;
|
||||
Julian += tod;
|
||||
if (DSTmode == DSTon
|
||||
|| (DSTmode == DSTmaybe && TclpGetDate(&Julian, 0)->tm_isdst))
|
||||
|| (DSTmode == DSTmaybe && TclpGetDate((TclpTime_t)&Julian, 0)->tm_isdst))
|
||||
Julian -= 60 * 60;
|
||||
*TimePtr = Julian;
|
||||
return 0;
|
||||
@@ -456,8 +456,8 @@ DSTcorrect(Start, Future)
|
||||
time_t StartDay;
|
||||
time_t FutureDay;
|
||||
|
||||
StartDay = (TclpGetDate(&Start, 0)->tm_hour + 1) % 24;
|
||||
FutureDay = (TclpGetDate(&Future, 0)->tm_hour + 1) % 24;
|
||||
StartDay = (TclpGetDate((TclpTime_t)&Start, 0)->tm_hour + 1) % 24;
|
||||
FutureDay = (TclpGetDate((TclpTime_t)&Future, 0)->tm_hour + 1) % 24;
|
||||
return (Future - Start) + (StartDay - FutureDay) * 60L * 60L;
|
||||
}
|
||||
|
||||
@@ -472,7 +472,7 @@ RelativeDate(Start, DayOrdinal, DayNumber)
|
||||
time_t now;
|
||||
|
||||
now = Start;
|
||||
tm = TclpGetDate(&now, 0);
|
||||
tm = TclpGetDate((TclpTime_t)&now, 0);
|
||||
now += SECSPERDAY * ((DayNumber - tm->tm_wday + 7) % 7);
|
||||
now += 7 * SECSPERDAY * (DayOrdinal <= 0 ? DayOrdinal : DayOrdinal - 1);
|
||||
return DSTcorrect(Start, now);
|
||||
@@ -495,7 +495,7 @@ RelativeMonth(Start, RelMonth, TimePtr)
|
||||
*TimePtr = 0;
|
||||
return 0;
|
||||
}
|
||||
tm = TclpGetDate(&Start, 0);
|
||||
tm = TclpGetDate((TclpTime_t)&Start, 0);
|
||||
Month = 12 * (tm->tm_year + TM_YEAR_BASE) + tm->tm_mon + RelMonth;
|
||||
Year = Month / 12;
|
||||
Month = Month % 12 + 1;
|
||||
@@ -726,7 +726,7 @@ TclGetDate(p, now, zone, timePtr)
|
||||
int thisyear;
|
||||
|
||||
TclDateInput = p;
|
||||
tm = TclpGetDate((time_t *) &now, 0);
|
||||
tm = TclpGetDate((TclpTime_t) &now, 0);
|
||||
thisyear = tm->tm_year + TM_YEAR_BASE;
|
||||
TclDateYear = thisyear;
|
||||
TclDateMonth = tm->tm_mon + 1;
|
||||
|
||||
+1791
-1729
File diff suppressed because it is too large
Load Diff
+7
-11
@@ -9,7 +9,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclFileName.c,v 1.4 1999/02/03 19:12:26 stanton Exp $
|
||||
* RCS: @(#) $Id: tclFileName.c,v 1.4.4.2 1999/03/04 01:00:47 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
@@ -1084,17 +1084,13 @@ DoTildeSubst(interp, user, resultPtr)
|
||||
return NULL;
|
||||
}
|
||||
Tcl_JoinPath(1, &dir, resultPtr);
|
||||
} else {
|
||||
|
||||
/* lint, TclGetuserHome() always NULL under windows. */
|
||||
if (TclGetUserHome(user, resultPtr) == NULL) {
|
||||
if (interp) {
|
||||
Tcl_ResetResult(interp);
|
||||
Tcl_AppendResult(interp, "user \"", user, "\" doesn't exist",
|
||||
(char *) NULL);
|
||||
}
|
||||
return NULL;
|
||||
} else if (TclGetUserHome(user, resultPtr) == NULL) {
|
||||
if (interp) {
|
||||
Tcl_ResetResult(interp);
|
||||
Tcl_AppendResult(interp, "user \"", user, "\" doesn't exist",
|
||||
(char *) NULL);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return resultPtr->string;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclGetDate.y,v 1.2 1998/09/14 18:39:59 stanton Exp $
|
||||
* RCS: @(#) $Id: tclGetDate.y,v 1.2.4.1 1999/03/05 20:18:05 stanton Exp $
|
||||
*/
|
||||
|
||||
%{
|
||||
@@ -596,7 +596,7 @@ Convert(Month, Day, Year, Hours, Minutes, Seconds, Meridian, DSTmode, TimePtr)
|
||||
return -1;
|
||||
Julian += tod;
|
||||
if (DSTmode == DSTon
|
||||
|| (DSTmode == DSTmaybe && TclpGetDate(&Julian, 0)->tm_isdst))
|
||||
|| (DSTmode == DSTmaybe && TclpGetDate((TclpTime_t)&Julian, 0)->tm_isdst))
|
||||
Julian -= 60 * 60;
|
||||
*TimePtr = Julian;
|
||||
return 0;
|
||||
@@ -611,8 +611,8 @@ DSTcorrect(Start, Future)
|
||||
time_t StartDay;
|
||||
time_t FutureDay;
|
||||
|
||||
StartDay = (TclpGetDate(&Start, 0)->tm_hour + 1) % 24;
|
||||
FutureDay = (TclpGetDate(&Future, 0)->tm_hour + 1) % 24;
|
||||
StartDay = (TclpGetDate((TclpTime_t)&Start, 0)->tm_hour + 1) % 24;
|
||||
FutureDay = (TclpGetDate((TclpTime_t)&Future, 0)->tm_hour + 1) % 24;
|
||||
return (Future - Start) + (StartDay - FutureDay) * 60L * 60L;
|
||||
}
|
||||
|
||||
@@ -627,7 +627,7 @@ RelativeDate(Start, DayOrdinal, DayNumber)
|
||||
time_t now;
|
||||
|
||||
now = Start;
|
||||
tm = TclpGetDate(&now, 0);
|
||||
tm = TclpGetDate((TclpTime_t)&now, 0);
|
||||
now += SECSPERDAY * ((DayNumber - tm->tm_wday + 7) % 7);
|
||||
now += 7 * SECSPERDAY * (DayOrdinal <= 0 ? DayOrdinal : DayOrdinal - 1);
|
||||
return DSTcorrect(Start, now);
|
||||
@@ -650,7 +650,7 @@ RelativeMonth(Start, RelMonth, TimePtr)
|
||||
*TimePtr = 0;
|
||||
return 0;
|
||||
}
|
||||
tm = TclpGetDate(&Start, 0);
|
||||
tm = TclpGetDate((TclpTime_t)&Start, 0);
|
||||
Month = 12 * (tm->tm_year + TM_YEAR_BASE) + tm->tm_mon + RelMonth;
|
||||
Year = Month / 12;
|
||||
Month = Month % 12 + 1;
|
||||
@@ -881,7 +881,7 @@ TclGetDate(p, now, zone, timePtr)
|
||||
int thisyear;
|
||||
|
||||
yyInput = p;
|
||||
tm = TclpGetDate((time_t *) &now, 0);
|
||||
tm = TclpGetDate((TclpTime_t) &now, 0);
|
||||
thisyear = tm->tm_year + TM_YEAR_BASE;
|
||||
yyYear = thisyear;
|
||||
yyMonth = tm->tm_mon + 1;
|
||||
|
||||
+300
-206
@@ -3,13 +3,14 @@
|
||||
# This file contains the declarations for all unsupported
|
||||
# functions that are exported by the Tcl library. This file
|
||||
# is used to generate the tclIntDecls.h, tclIntPlatDecls.h,
|
||||
# tclIntStub.c, and tclPlatStub.c files.
|
||||
# tclIntStub.c, tclPlatStub.c, tclCompileDecls.h and tclCompileStub.c
|
||||
# files
|
||||
#
|
||||
# Copyright (c) 1998-1999 by Scriptics Corporation.
|
||||
# See the file "license.terms" for information on usage and redistribution
|
||||
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
#
|
||||
# RCS: @(#) $Id: tclInt.decls,v 1.1 1999/03/03 00:38:40 stanton Exp $
|
||||
# RCS: @(#) $Id: tclInt.decls,v 1.2.2.4 1999/03/10 05:50:26 stanton Exp $
|
||||
|
||||
library tcl
|
||||
|
||||
@@ -98,477 +99,403 @@ declare 21 generic {
|
||||
int TclFileRenameCmd(Tcl_Interp *interp, int argc, char **argv)
|
||||
}
|
||||
declare 22 generic {
|
||||
void TclFinalizeCompExecEnv(void)
|
||||
}
|
||||
declare 23 generic {
|
||||
void TclFinalizeEnvironment(void)
|
||||
}
|
||||
declare 24 generic {
|
||||
void TclFinalizeExecEnv(void)
|
||||
}
|
||||
declare 25 generic {
|
||||
int TclFindElement(Tcl_Interp *interp, char *list, int listLength, \
|
||||
char **elementPtr, char **nextPtr, int *sizePtr, int *bracePtr)
|
||||
}
|
||||
declare 26 generic {
|
||||
declare 23 generic {
|
||||
Proc * TclFindProc(Interp *iPtr, char *procName)
|
||||
}
|
||||
declare 27 generic {
|
||||
declare 24 generic {
|
||||
int TclFormatInt(char *buffer, long n)
|
||||
}
|
||||
declare 28 generic {
|
||||
declare 25 generic {
|
||||
void TclFreePackageInfo(Interp *iPtr)
|
||||
}
|
||||
declare 29 generic {
|
||||
void TclGetAndDetachPids(Tcl_Interp *interp, Tcl_Channel chan)
|
||||
}
|
||||
declare 30 generic {
|
||||
declare 26 generic {
|
||||
char * TclGetCwd(Tcl_Interp *interp)
|
||||
}
|
||||
declare 31 generic {
|
||||
declare 27 generic {
|
||||
int TclGetDate(char *p, unsigned long now, long zone, \
|
||||
unsigned long *timePtr)
|
||||
}
|
||||
declare 32 generic {
|
||||
declare 28 generic {
|
||||
Tcl_Channel TclGetDefaultStdChannel(int type)
|
||||
}
|
||||
declare 33 generic {
|
||||
declare 29 generic {
|
||||
Tcl_Obj * TclGetElementOfIndexedArray(Tcl_Interp *interp, \
|
||||
int localIndex, Tcl_Obj *elemPtr, int leaveErrorMsg)
|
||||
}
|
||||
declare 34 generic {
|
||||
declare 30 generic {
|
||||
char * TclGetEnv(CONST char *name)
|
||||
}
|
||||
declare 35 generic {
|
||||
declare 31 generic {
|
||||
char * TclGetExtension(char *name)
|
||||
}
|
||||
declare 36 generic {
|
||||
declare 32 generic {
|
||||
int TclGetFrame(Tcl_Interp *interp, char *string, CallFrame **framePtrPtr)
|
||||
}
|
||||
declare 37 generic {
|
||||
declare 33 generic {
|
||||
TclCmdProcType TclGetInterpProc(void)
|
||||
}
|
||||
declare 38 generic {
|
||||
declare 34 generic {
|
||||
int TclGetIntForIndex(Tcl_Interp *interp, Tcl_Obj *objPtr, \
|
||||
int endValue, int *indexPtr)
|
||||
}
|
||||
declare 39 generic {
|
||||
declare 35 generic {
|
||||
Tcl_Obj * TclGetIndexedScalar(Tcl_Interp *interp, int localIndex, \
|
||||
int leaveErrorMsg)
|
||||
}
|
||||
declare 40 generic {
|
||||
declare 36 generic {
|
||||
int TclGetLong(Tcl_Interp *interp, char *string, long *longPtr)
|
||||
}
|
||||
declare 41 generic {
|
||||
declare 37 generic {
|
||||
int TclGetLoadedPackages(Tcl_Interp *interp, char *targetName)
|
||||
}
|
||||
declare 42 generic {
|
||||
declare 38 generic {
|
||||
int TclGetNamespaceForQualName(Tcl_Interp *interp, char *qualName, \
|
||||
Namespace *cxtNsPtr, int flags, Namespace **nsPtrPtr, \
|
||||
Namespace **altNsPtrPtr, Namespace **actualCxtPtrPtr, \
|
||||
char **simpleNamePtr)
|
||||
}
|
||||
declare 43 generic {
|
||||
declare 39 generic {
|
||||
TclObjCmdProcType TclGetObjInterpProc(void)
|
||||
}
|
||||
declare 44 generic {
|
||||
declare 40 generic {
|
||||
int TclGetOpenMode(Tcl_Interp *interp, char *string, int *seekFlagPtr)
|
||||
}
|
||||
declare 45 generic {
|
||||
declare 41 generic {
|
||||
Tcl_Command TclGetOriginalCommand(Tcl_Command command)
|
||||
}
|
||||
declare 46 generic {
|
||||
char * TclpGetUserHome(char *name, Tcl_DString *bufferPtr)
|
||||
declare 42 generic {
|
||||
char * TclGetUserHome(char *name, Tcl_DString *bufferPtr)
|
||||
}
|
||||
declare 47 generic {
|
||||
declare 43 generic {
|
||||
int TclGlobalInvoke(Tcl_Interp *interp, int argc, char **argv, int flags)
|
||||
}
|
||||
declare 48 generic {
|
||||
declare 44 generic {
|
||||
int TclGuessPackageName(char *fileName, Tcl_DString *bufPtr)
|
||||
}
|
||||
declare 49 generic {
|
||||
int TclHasSockets(Tcl_Interp *interp)
|
||||
}
|
||||
declare 50 generic {
|
||||
declare 45 generic {
|
||||
int TclHideUnsafeCommands(Tcl_Interp *interp)
|
||||
}
|
||||
declare 51 generic {
|
||||
declare 46 generic {
|
||||
int TclInExit(void)
|
||||
}
|
||||
declare 52 generic {
|
||||
declare 47 generic {
|
||||
Tcl_Obj * TclIncrElementOfIndexedArray(Tcl_Interp *interp, \
|
||||
int localIndex, Tcl_Obj *elemPtr, long incrAmount)
|
||||
}
|
||||
declare 53 generic {
|
||||
declare 48 generic {
|
||||
Tcl_Obj * TclIncrIndexedScalar(Tcl_Interp *interp, int localIndex, \
|
||||
long incrAmount)
|
||||
}
|
||||
declare 54 generic {
|
||||
declare 49 generic {
|
||||
Tcl_Obj * TclIncrVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, \
|
||||
Tcl_Obj *part2Ptr, long incrAmount, int part1NotParsed)
|
||||
}
|
||||
declare 55 generic {
|
||||
declare 50 generic {
|
||||
void TclInitCompiledLocals(Tcl_Interp *interp, CallFrame *framePtr, \
|
||||
Namespace *nsPtr)
|
||||
}
|
||||
declare 56 generic {
|
||||
void TclInitNamespaces(void)
|
||||
}
|
||||
declare 57 generic {
|
||||
declare 51 generic {
|
||||
int TclInterpInit(Tcl_Interp *interp)
|
||||
}
|
||||
declare 58 generic {
|
||||
declare 52 generic {
|
||||
int TclInvoke(Tcl_Interp *interp, int argc, char **argv, int flags)
|
||||
}
|
||||
declare 59 generic {
|
||||
declare 53 generic {
|
||||
int TclInvokeObjectCommand(ClientData clientData, Tcl_Interp *interp, \
|
||||
int argc, char **argv)
|
||||
}
|
||||
declare 60 generic {
|
||||
declare 54 generic {
|
||||
int TclInvokeStringCommand(ClientData clientData, Tcl_Interp *interp, \
|
||||
int objc, Tcl_Obj *CONST objv[])
|
||||
}
|
||||
declare 61 generic {
|
||||
declare 55 generic {
|
||||
Proc * TclIsProc(Command *cmdPtr)
|
||||
}
|
||||
declare 62 generic {
|
||||
declare 56 generic {
|
||||
int TclLoadFile(Tcl_Interp *interp, char *fileName, char *sym1, \
|
||||
char *sym2, Tcl_PackageInitProc **proc1Ptr, \
|
||||
Tcl_PackageInitProc **proc2Ptr)
|
||||
}
|
||||
declare 63 generic {
|
||||
declare 57 generic {
|
||||
int TclLooksLikeInt(char *p)
|
||||
}
|
||||
declare 64 generic {
|
||||
declare 58 generic {
|
||||
Var * TclLookupVar(Tcl_Interp *interp, char *part1, char *part2, \
|
||||
int flags, char *msg, int createPart1, int createPart2, \
|
||||
Var **arrayPtrPtr)
|
||||
}
|
||||
declare 65 generic {
|
||||
declare 59 generic {
|
||||
int TclMatchFiles(Tcl_Interp *interp, char *separators, \
|
||||
Tcl_DString *dirPtr, char *pattern, char *tail)
|
||||
}
|
||||
declare 66 generic {
|
||||
declare 60 generic {
|
||||
int TclNeedSpace(char *start, char *end)
|
||||
}
|
||||
declare 67 generic {
|
||||
declare 61 generic {
|
||||
Tcl_Obj * TclNewProcBodyObj(Proc *procPtr)
|
||||
}
|
||||
declare 68 generic {
|
||||
declare 62 generic {
|
||||
int TclObjCommandComplete(Tcl_Obj *cmdPtr)
|
||||
}
|
||||
declare 69 generic {
|
||||
declare 63 generic {
|
||||
int TclObjInterpProc(ClientData clientData, Tcl_Interp *interp, \
|
||||
int objc, Tcl_Obj *CONST objv[])
|
||||
}
|
||||
declare 70 generic {
|
||||
declare 64 generic {
|
||||
int TclObjInvoke(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], \
|
||||
int flags)
|
||||
}
|
||||
declare 71 generic {
|
||||
declare 65 generic {
|
||||
int TclObjInvokeGlobal(Tcl_Interp *interp, int objc, \
|
||||
Tcl_Obj *CONST objv[], int flags)
|
||||
}
|
||||
declare 72 generic {
|
||||
declare 66 generic {
|
||||
int TclOpenFileChannelDeleteProc(TclOpenFileChannelProc_ *proc)
|
||||
}
|
||||
declare 73 generic {
|
||||
declare 67 generic {
|
||||
int TclOpenFileChannelInsertProc(TclOpenFileChannelProc_ *proc)
|
||||
}
|
||||
declare 74 generic {
|
||||
declare 68 generic {
|
||||
int TclpAccess(CONST char *path, int mode)
|
||||
}
|
||||
declare 69 generic {
|
||||
char * TclpAlloc(unsigned int size)
|
||||
}
|
||||
declare 75 generic {
|
||||
int TclpCloseFile(TclFile file)
|
||||
}
|
||||
declare 76 generic {
|
||||
declare 70 generic {
|
||||
int TclpCopyFile(char *source, char *dest)
|
||||
}
|
||||
declare 77 generic {
|
||||
declare 71 generic {
|
||||
int TclpCopyDirectory(char *source, char *dest, Tcl_DString *errorPtr)
|
||||
}
|
||||
declare 78 generic {
|
||||
Tcl_Channel TclpCreateCommandChannel(TclFile readFile, \
|
||||
TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr)
|
||||
}
|
||||
declare 79 generic {
|
||||
declare 72 generic {
|
||||
int TclpCreateDirectory(char *path)
|
||||
}
|
||||
declare 80 generic {
|
||||
int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe)
|
||||
}
|
||||
declare 81 generic {
|
||||
int TclpCreateProcess(Tcl_Interp *interp, int argc, char **argv, \
|
||||
TclFile inputFile, TclFile outputFile, TclFile errorFile, \
|
||||
Tcl_Pid *pidPtr)
|
||||
}
|
||||
declare 82 generic {
|
||||
TclFile TclpCreateTempFile(char *contents,
|
||||
Tcl_DString *namePtr)
|
||||
}
|
||||
declare 83 generic {
|
||||
declare 73 generic {
|
||||
int TclpDeleteFile(char *path)
|
||||
}
|
||||
declare 84 generic {
|
||||
void TclpFinalize(void)
|
||||
}
|
||||
declare 85 generic {
|
||||
declare 74 generic {
|
||||
void TclpFree(char *ptr)
|
||||
}
|
||||
declare 86 generic {
|
||||
declare 75 generic {
|
||||
unsigned long TclpGetClicks(void)
|
||||
}
|
||||
declare 87 generic {
|
||||
declare 76 generic {
|
||||
unsigned long TclpGetSeconds(void)
|
||||
}
|
||||
declare 88 generic {
|
||||
declare 77 generic {
|
||||
void TclpGetTime(Tcl_Time *time)
|
||||
}
|
||||
declare 89 generic {
|
||||
declare 78 generic {
|
||||
int TclpGetTimeZone(unsigned long time)
|
||||
}
|
||||
declare 90 generic {
|
||||
char * TclpGetTZName(void)
|
||||
}
|
||||
declare 91 generic {
|
||||
declare 79 generic {
|
||||
int TclpListVolumes(Tcl_Interp *interp)
|
||||
}
|
||||
declare 92 generic {
|
||||
TclFile TclpMakeFile(Tcl_Channel channel, int direction)
|
||||
}
|
||||
declare 93 generic {
|
||||
TclFile TclpOpenFile(char *fname, int mode)
|
||||
}
|
||||
declare 94 generic {
|
||||
declare 80 generic {
|
||||
Tcl_Channel TclpOpenFileChannel(Tcl_Interp *interp, char *fileName, \
|
||||
char *modeString, int permissions)
|
||||
}
|
||||
declare 95 generic {
|
||||
declare 81 generic {
|
||||
char * TclpRealloc(char *ptr, unsigned int size)
|
||||
}
|
||||
declare 96 generic {
|
||||
declare 82 generic {
|
||||
int TclpRemoveDirectory(char *path, int recursive, Tcl_DString *errorPtr)
|
||||
}
|
||||
declare 97 generic {
|
||||
declare 83 generic {
|
||||
int TclpRenameFile(char *source, char *dest)
|
||||
}
|
||||
declare 98 generic {
|
||||
declare 84 generic {
|
||||
int TclParseBraces(Tcl_Interp *interp, char *string, char **termPtr, \
|
||||
ParseValue *pvPtr)
|
||||
}
|
||||
declare 99 generic {
|
||||
declare 85 generic {
|
||||
int TclParseNestedCmd(Tcl_Interp *interp, char *string, int flags, \
|
||||
char **termPtr, ParseValue *pvPtr)
|
||||
}
|
||||
declare 100 generic {
|
||||
declare 86 generic {
|
||||
int TclParseQuotes(Tcl_Interp *interp, char *string, int termChar, \
|
||||
int flags, char **termPtr, ParseValue *pvPtr)
|
||||
}
|
||||
declare 101 generic {
|
||||
declare 87 generic {
|
||||
void TclPlatformInit(Tcl_Interp *interp)
|
||||
}
|
||||
declare 102 generic {
|
||||
declare 88 generic {
|
||||
char * TclPrecTraceProc(ClientData clientData, Tcl_Interp *interp, \
|
||||
char *name1, char *name2, int flags)
|
||||
}
|
||||
declare 103 generic {
|
||||
declare 89 generic {
|
||||
int TclPreventAliasLoop(Tcl_Interp *interp, Tcl_Interp *cmdInterp, \
|
||||
Tcl_Command cmd)
|
||||
}
|
||||
declare 104 generic {
|
||||
declare 90 generic {
|
||||
void TclPrintByteCodeObj(Tcl_Interp *interp, Tcl_Obj *objPtr)
|
||||
}
|
||||
declare 105 generic {
|
||||
declare 91 generic {
|
||||
void TclProcCleanupProc(Proc *procPtr)
|
||||
}
|
||||
declare 106 generic {
|
||||
declare 92 generic {
|
||||
int TclProcCompileProc(Tcl_Interp *interp, Proc *procPtr, \
|
||||
Tcl_Obj *bodyPtr, Namespace *nsPtr, CONST char *description, \
|
||||
CONST char *procName)
|
||||
}
|
||||
declare 107 generic {
|
||||
declare 93 generic {
|
||||
void TclProcDeleteProc(ClientData clientData)
|
||||
}
|
||||
declare 108 generic {
|
||||
declare 94 generic {
|
||||
int TclProcInterpProc(ClientData clientData, Tcl_Interp *interp, \
|
||||
int argc, char **argv)
|
||||
}
|
||||
declare 109 generic {
|
||||
declare 95 generic {
|
||||
int TclpStat(CONST char *path, struct stat *buf)
|
||||
}
|
||||
declare 96 generic {
|
||||
int TclRenameCommand(Tcl_Interp *interp, char *oldName, char *newName)
|
||||
}
|
||||
declare 110 generic {
|
||||
declare 97 generic {
|
||||
void TclResetShadowedCmdRefs(Tcl_Interp *interp, Command *newCmdPtr)
|
||||
}
|
||||
declare 111 generic {
|
||||
declare 98 generic {
|
||||
int TclServiceIdle(void)
|
||||
}
|
||||
declare 112 generic {
|
||||
declare 99 generic {
|
||||
Tcl_Obj * TclSetElementOfIndexedArray(Tcl_Interp *interp, \
|
||||
int localIndex, Tcl_Obj *elemPtr, Tcl_Obj *objPtr, int leaveErrorMsg)
|
||||
}
|
||||
declare 113 generic {
|
||||
declare 100 generic {
|
||||
Tcl_Obj * TclSetIndexedScalar(Tcl_Interp *interp, int localIndex, \
|
||||
Tcl_Obj *objPtr, int leaveErrorMsg)
|
||||
}
|
||||
declare 114 generic {
|
||||
declare 101 generic {
|
||||
char * TclSetPreInitScript(char *string)
|
||||
}
|
||||
declare 115 generic {
|
||||
declare 102 generic {
|
||||
void TclSetupEnv(Tcl_Interp *interp)
|
||||
}
|
||||
declare 116 generic {
|
||||
declare 103 generic {
|
||||
int TclSockGetPort(Tcl_Interp *interp, char *string, char *proto, \
|
||||
int *portPtr)
|
||||
}
|
||||
declare 117 generic {
|
||||
declare 104 generic {
|
||||
int TclSockMinimumBuffers(int sock, int size)
|
||||
}
|
||||
declare 118 generic {
|
||||
declare 105 generic {
|
||||
int TclStat(CONST char *path, TclStat_ *buf)
|
||||
}
|
||||
declare 119 generic {
|
||||
declare 106 generic {
|
||||
int TclStatDeleteProc(TclStatProc_ *proc)
|
||||
}
|
||||
declare 120 generic {
|
||||
declare 107 generic {
|
||||
int TclStatInsertProc(TclStatProc_ *proc)
|
||||
}
|
||||
declare 121 generic {
|
||||
declare 108 generic {
|
||||
void TclTeardownNamespace(Namespace *nsPtr)
|
||||
}
|
||||
declare 122 generic {
|
||||
declare 109 generic {
|
||||
int TclUpdateReturnInfo(Interp *iPtr)
|
||||
}
|
||||
declare 123 generic {
|
||||
declare 110 generic {
|
||||
char * TclWordEnd(char *start, char *lastChar, int nested, int *semiPtr)
|
||||
}
|
||||
|
||||
# Procedures used in conjunction with Tcl namespaces. They are
|
||||
# defined here instead of in tcl.decls since they are not stable yet.
|
||||
|
||||
declare 124 generic {
|
||||
declare 111 generic {
|
||||
void Tcl_AddInterpResolvers(Tcl_Interp *interp, char *name, \
|
||||
Tcl_ResolveCmdProc *cmdProc, Tcl_ResolveVarProc *varProc, \
|
||||
Tcl_ResolveCompiledVarProc *compiledVarProc)
|
||||
}
|
||||
declare 125 generic {
|
||||
declare 112 generic {
|
||||
int Tcl_AppendExportList(Tcl_Interp *interp, Tcl_Namespace *nsPtr, \
|
||||
Tcl_Obj *objPtr)
|
||||
}
|
||||
declare 126 generic {
|
||||
declare 113 generic {
|
||||
Tcl_Namespace * Tcl_CreateNamespace(Tcl_Interp *interp, char *name, \
|
||||
ClientData clientData, Tcl_NamespaceDeleteProc *deleteProc)
|
||||
}
|
||||
declare 127 generic {
|
||||
declare 114 generic {
|
||||
void Tcl_DeleteNamespace(Tcl_Namespace *nsPtr)
|
||||
}
|
||||
declare 128 generic {
|
||||
declare 115 generic {
|
||||
int Tcl_Export(Tcl_Interp *interp, Tcl_Namespace *nsPtr, char *pattern, \
|
||||
int resetListFirst)
|
||||
}
|
||||
declare 129 generic {
|
||||
declare 116 generic {
|
||||
Tcl_Command Tcl_FindCommand(Tcl_Interp *interp, char *name, \
|
||||
Tcl_Namespace *contextNsPtr, int flags)
|
||||
}
|
||||
declare 130 generic {
|
||||
declare 117 generic {
|
||||
Tcl_Namespace * Tcl_FindNamespace(Tcl_Interp *interp, char *name, \
|
||||
Tcl_Namespace *contextNsPtr, int flags)
|
||||
}
|
||||
declare 131 generic {
|
||||
declare 118 generic {
|
||||
int Tcl_GetInterpResolvers(Tcl_Interp *interp, char *name, \
|
||||
Tcl_ResolverInfo *resInfo)
|
||||
}
|
||||
declare 132 generic {
|
||||
declare 119 generic {
|
||||
int Tcl_GetNamespaceResolvers(Tcl_Namespace *namespacePtr, \
|
||||
Tcl_ResolverInfo *resInfo)
|
||||
}
|
||||
declare 133 generic {
|
||||
declare 120 generic {
|
||||
Tcl_Var Tcl_FindNamespaceVar(Tcl_Interp *interp, char *name, \
|
||||
Tcl_Namespace *contextNsPtr, int flags)
|
||||
}
|
||||
declare 134 generic {
|
||||
declare 121 generic {
|
||||
int Tcl_ForgetImport(Tcl_Interp *interp, Tcl_Namespace *nsPtr, \
|
||||
char *pattern)
|
||||
}
|
||||
declare 135 generic {
|
||||
declare 122 generic {
|
||||
Tcl_Command Tcl_GetCommandFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr)
|
||||
}
|
||||
declare 136 generic {
|
||||
declare 123 generic {
|
||||
void Tcl_GetCommandFullName(Tcl_Interp *interp, Tcl_Command command, \
|
||||
Tcl_Obj *objPtr)
|
||||
}
|
||||
declare 137 generic {
|
||||
declare 124 generic {
|
||||
Tcl_Namespace * Tcl_GetCurrentNamespace(Tcl_Interp *interp)
|
||||
}
|
||||
declare 138 generic {
|
||||
declare 125 generic {
|
||||
Tcl_Namespace * Tcl_GetGlobalNamespace(Tcl_Interp *interp)
|
||||
}
|
||||
declare 139 generic {
|
||||
declare 126 generic {
|
||||
void Tcl_GetVariableFullName(Tcl_Interp *interp, Tcl_Var variable, \
|
||||
Tcl_Obj *objPtr)
|
||||
}
|
||||
declare 140 generic {
|
||||
declare 127 generic {
|
||||
int Tcl_Import(Tcl_Interp *interp, Tcl_Namespace *nsPtr, \
|
||||
char *pattern, int allowOverwrite)
|
||||
}
|
||||
declare 141 generic {
|
||||
declare 128 generic {
|
||||
void Tcl_PopCallFrame(Tcl_Interp* interp)
|
||||
}
|
||||
declare 142 generic {
|
||||
declare 129 generic {
|
||||
int Tcl_PushCallFrame(Tcl_Interp* interp, Tcl_CallFrame *framePtr, \
|
||||
Tcl_Namespace *nsPtr, int isProcCallFrame)
|
||||
}
|
||||
declare 143 generic {
|
||||
declare 130 generic {
|
||||
int Tcl_RemoveInterpResolvers(Tcl_Interp *interp, char *name)
|
||||
}
|
||||
declare 144 generic {
|
||||
declare 131 generic {
|
||||
void Tcl_SetNamespaceResolvers(Tcl_Namespace *namespacePtr, \
|
||||
Tcl_ResolveCmdProc *cmdProc, Tcl_ResolveVarProc *varProc, \
|
||||
Tcl_ResolveCompiledVarProc *compiledVarProc)
|
||||
}
|
||||
|
||||
# Compilation procedures for commands in the generic core:
|
||||
|
||||
declare 145 generic {
|
||||
int TclCompileBreakCmd(Tcl_Interp *interp, char *string, char *lastChar, \
|
||||
int compileFlags, struct CompileEnv *compileEnvPtr)
|
||||
declare 132 generic {
|
||||
int TclHasSockets(Tcl_Interp *interp)
|
||||
}
|
||||
declare 146 generic {
|
||||
int TclCompileCatchCmd(Tcl_Interp *interp, char *string, char *lastChar, \
|
||||
int compileFlags, struct CompileEnv *compileEnvPtr)
|
||||
declare 133 generic {
|
||||
struct tm * TclpGetDate(TclpTime_t time, int useGMT)
|
||||
}
|
||||
declare 147 generic {
|
||||
int TclCompileContinueCmd(Tcl_Interp *interp, char *string, \
|
||||
char *lastChar, int compileFlags, struct CompileEnv *compileEnvPtr)
|
||||
declare 134 generic {
|
||||
size_t TclStrftime(char *s, size_t maxsize, const char *format, \
|
||||
const struct tm *t)
|
||||
}
|
||||
declare 148 generic {
|
||||
int TclCompileExprCmd(Tcl_Interp *interp, char *string, char *lastChar, \
|
||||
int compileFlags, struct CompileEnv *compileEnvPtr)
|
||||
declare 135 generic {
|
||||
int TclpCheckStackSpace(void)
|
||||
}
|
||||
declare 149 generic {
|
||||
int TclCompileForCmd(Tcl_Interp *interp, char *string, char *lastChar, \
|
||||
int compileFlags, struct CompileEnv *compileEnvPtr)
|
||||
}
|
||||
declare 150 generic {
|
||||
int TclCompileForeachCmd(Tcl_Interp *interp, char *string, \
|
||||
char *lastChar, int compileFlags, struct CompileEnv *compileEnvPtr)
|
||||
}
|
||||
declare 151 generic {
|
||||
int TclCompileIfCmd(Tcl_Interp *interp, char *string, char *lastChar, \
|
||||
int compileFlags, struct CompileEnv *compileEnvPtr)
|
||||
}
|
||||
declare 152 generic {
|
||||
int TclCompileIncrCmd(Tcl_Interp *interp, char *string, char *lastChar, \
|
||||
int compileFlags, struct CompileEnv *compileEnvPtr)
|
||||
}
|
||||
declare 153 generic {
|
||||
int TclCompileSetCmd(Tcl_Interp *interp, char *string, char *lastChar, \
|
||||
int compileFlags, struct CompileEnv *compileEnvPtr)
|
||||
}
|
||||
declare 154 generic {
|
||||
int TclCompileWhileCmd(Tcl_Interp *interp, char *string, char *lastChar, \
|
||||
int compileFlags, struct CompileEnv *compileEnvPtr)
|
||||
}
|
||||
|
||||
|
||||
##############################################################################
|
||||
|
||||
@@ -577,24 +504,111 @@ declare 154 generic {
|
||||
|
||||
interface tclIntPlat
|
||||
|
||||
########################
|
||||
# Mac specific internals
|
||||
|
||||
declare 0 mac {
|
||||
int TclpCheckStackSpace(void)
|
||||
}
|
||||
declare 1 mac {
|
||||
VOID * TclpSysAlloc(long size, int isBin)
|
||||
}
|
||||
declare 2 mac {
|
||||
declare 1 mac {
|
||||
void TclpSysFree(VOID *ptr)
|
||||
}
|
||||
declare 3 mac {
|
||||
declare 2 mac {
|
||||
VOID * TclpSysRealloc(VOID *cp, unsigned int size)
|
||||
}
|
||||
declare 4 mac {
|
||||
declare 3 mac {
|
||||
void TclPlatformExit(int status)
|
||||
}
|
||||
|
||||
# Prototypes for functions found in the tclMacUtil.c compatability library.
|
||||
|
||||
declare 4 mac {
|
||||
int FSpGetDefaultDir(FSSpecPtr theSpec)
|
||||
}
|
||||
declare 5 mac {
|
||||
int FSpSetDefaultDir(FSSpecPtr theSpec)
|
||||
}
|
||||
declare 6 mac {
|
||||
OSErr FSpFindFolder(short vRefNum, OSType folderType, \
|
||||
Boolean createFolder, FSSpec *spec)
|
||||
}
|
||||
declare 7 mac {
|
||||
void GetGlobalMouse(Point *mouse)
|
||||
}
|
||||
|
||||
# The following routines are utility functions in Tcl. They are exported
|
||||
# here because they are needed in Tk. They are not officially supported,
|
||||
# however. The first set are from the MoreFiles package.
|
||||
|
||||
declare 8 mac {
|
||||
pascal OSErr FSpGetDirectoryID(const FSSpec *spec, long *theDirID, \
|
||||
Boolean *isDirectory)
|
||||
}
|
||||
declare 9 mac {
|
||||
pascal short FSpOpenResFileCompat(const FSSpec *spec, \
|
||||
SignedByte permission)
|
||||
}
|
||||
declare 10 mac {
|
||||
pascal void FSpCreateResFileCompat(const FSSpec *spec, OSType creator, \
|
||||
OSType fileType, ScriptCode scriptTag)
|
||||
}
|
||||
|
||||
# Like the MoreFiles routines these fix problems in the standard
|
||||
# Mac calls. These routines are from tclMacUtils.h.
|
||||
|
||||
declare 11 mac {
|
||||
int FSpLocationFromPath(int length, CONST char *path, FSSpecPtr theSpec)
|
||||
}
|
||||
declare 12 mac {
|
||||
OSErr FSpPathFromLocation(FSSpecPtr theSpec, int *length, \
|
||||
Handle *fullPath)
|
||||
}
|
||||
|
||||
# Prototypes of Mac only internal functions.
|
||||
|
||||
declare 13 mac {
|
||||
void TclMacExitHandler(void)
|
||||
}
|
||||
declare 14 mac {
|
||||
void TclMacInitExitToShell(int usePatch)
|
||||
}
|
||||
declare 15 mac {
|
||||
OSErr TclMacInstallExitToShellPatch(ExitToShellProcPtr newProc)
|
||||
}
|
||||
declare 16 mac {
|
||||
int TclMacOSErrorToPosixError(int error)
|
||||
}
|
||||
declare 17 mac {
|
||||
void TclMacRemoveTimer(void *timerToken)
|
||||
}
|
||||
declare 18 mac {
|
||||
void * TclMacStartTimer(long ms)
|
||||
}
|
||||
declare 19 mac {
|
||||
int TclMacTimerExpired(void *timerToken)
|
||||
}
|
||||
declare 20 mac {
|
||||
int TclMacRegisterResourceFork(short fileRef, Tcl_Obj *tokenPtr, \
|
||||
int insert)
|
||||
}
|
||||
declare 21 mac {
|
||||
short TclMacUnRegisterResourceFork(char *tokenPtr, Tcl_Obj *resultPtr)
|
||||
}
|
||||
declare 22 mac {
|
||||
int TclMacCreateEnv(void)
|
||||
}
|
||||
declare 23 mac {
|
||||
FILE * TclMacFOpenHack(const char *path, const char *mode)
|
||||
}
|
||||
declare 24 mac {
|
||||
int TclMacReadlink(char *path, char *buf, int size)
|
||||
}
|
||||
declare 25 mac {
|
||||
int TclMacChmod(char *path, int mode)
|
||||
}
|
||||
|
||||
|
||||
############################
|
||||
# Windows specific internals
|
||||
|
||||
declare 0 win {
|
||||
@@ -615,7 +629,7 @@ declare 4 win {
|
||||
HINSTANCE TclWinGetTclInstance(void)
|
||||
}
|
||||
declare 5 win {
|
||||
HINSTANCE TclWinLoadLibrary(char *name)
|
||||
HINSTANCE TclWinLoadLibrary(char *name)
|
||||
}
|
||||
declare 6 win {
|
||||
u_short TclWinNToHS(u_short ns)
|
||||
@@ -624,3 +638,83 @@ declare 7 win {
|
||||
int TclWinSetSockOpt(SOCKET s, int level, int optname, \
|
||||
const char FAR * optval, int optlen)
|
||||
}
|
||||
declare 8 win {
|
||||
unsigned long TclpGetPid(Tcl_Pid pid)
|
||||
}
|
||||
declare 9 win {
|
||||
int TclWinGetPlatformId(void)
|
||||
}
|
||||
declare 10 win {
|
||||
int TclWinSynchSpawn(void *args, int type, void **trans, Tcl_Pid *pidPtr)
|
||||
}
|
||||
|
||||
# Pipe channel functions
|
||||
|
||||
declare 11 win {
|
||||
void TclGetAndDetachPids(Tcl_Interp *interp, Tcl_Channel chan)
|
||||
}
|
||||
declare 12 win {
|
||||
int TclpCloseFile(TclFile file)
|
||||
}
|
||||
declare 13 win {
|
||||
Tcl_Channel TclpCreateCommandChannel(TclFile readFile, \
|
||||
TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr)
|
||||
}
|
||||
declare 14 win {
|
||||
int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe)
|
||||
}
|
||||
declare 15 win {
|
||||
int TclpCreateProcess(Tcl_Interp *interp, int argc, char **argv, \
|
||||
TclFile inputFile, TclFile outputFile, TclFile errorFile, \
|
||||
Tcl_Pid *pidPtr)
|
||||
}
|
||||
declare 16 win {
|
||||
TclFile TclpCreateTempFile(char *contents,
|
||||
Tcl_DString *namePtr)
|
||||
}
|
||||
declare 17 win {
|
||||
char * TclpGetTZName(void)
|
||||
}
|
||||
declare 18 win {
|
||||
TclFile TclpMakeFile(Tcl_Channel channel, int direction)
|
||||
}
|
||||
declare 19 win {
|
||||
TclFile TclpOpenFile(char *fname, int mode)
|
||||
}
|
||||
|
||||
#########################
|
||||
# Unix specific internals
|
||||
|
||||
# Pipe channel functions
|
||||
|
||||
declare 0 unix {
|
||||
void TclGetAndDetachPids(Tcl_Interp *interp, Tcl_Channel chan)
|
||||
}
|
||||
declare 1 unix {
|
||||
int TclpCloseFile(TclFile file)
|
||||
}
|
||||
declare 2 unix {
|
||||
Tcl_Channel TclpCreateCommandChannel(TclFile readFile, \
|
||||
TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr)
|
||||
}
|
||||
declare 3 unix {
|
||||
int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe)
|
||||
}
|
||||
declare 4 unix {
|
||||
int TclpCreateProcess(Tcl_Interp *interp, int argc, char **argv, \
|
||||
TclFile inputFile, TclFile outputFile, TclFile errorFile, \
|
||||
Tcl_Pid *pidPtr)
|
||||
}
|
||||
declare 5 unix {
|
||||
TclFile TclpCreateTempFile(char *contents,
|
||||
Tcl_DString *namePtr)
|
||||
}
|
||||
declare 6 unix {
|
||||
TclFile TclpMakeFile(Tcl_Channel channel, int direction)
|
||||
}
|
||||
declare 7 unix {
|
||||
TclFile TclpOpenFile(char *fname, int mode)
|
||||
}
|
||||
declare 8 unix {
|
||||
int TclUnixWaitForFile(int fd, int mask, int timeout)
|
||||
}
|
||||
|
||||
+124
-374
@@ -11,7 +11,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclInt.h,v 1.23 1999/02/03 21:28:00 stanton Exp $
|
||||
* RCS: @(#) $Id: tclInt.h,v 1.23.4.5 1999/03/10 05:50:26 stanton Exp $
|
||||
*/
|
||||
|
||||
#ifndef _TCLINT
|
||||
@@ -52,15 +52,16 @@
|
||||
#else
|
||||
#include <string.h>
|
||||
#endif
|
||||
#if defined(__STDC__) || defined(HAS_STDARG)
|
||||
# include <stdarg.h>
|
||||
#else
|
||||
# include <varargs.h>
|
||||
#endif
|
||||
|
||||
#undef TCL_STORAGE_CLASS
|
||||
#ifdef BUILD_tcl
|
||||
# undef TCL_STORAGE_CLASS
|
||||
# define TCL_STORAGE_CLASS DLLEXPORT
|
||||
#else
|
||||
# ifdef USE_TCL_STUBS
|
||||
# define TCL_STORAGE_CLASS
|
||||
# else
|
||||
# define TCL_STORAGE_CLASS DLLIMPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -824,6 +825,58 @@ typedef struct ExecEnv {
|
||||
int stackEnd; /* Index of last usable item in stack. */
|
||||
} ExecEnv;
|
||||
|
||||
/*
|
||||
* CompileProcs need the ability to record information during compilation
|
||||
* that can be used by bytecode instructions during execution. The AuxData
|
||||
* structure provides this "auxiliary data" mechanism. An arbitrary number
|
||||
* of these structures can be stored in the ByteCode record (during
|
||||
* compilation they are stored in a CompileEnv structure). Each AuxData
|
||||
* record holds one word of client-specified data (often a pointer) and is
|
||||
* given an index that instructions can later use to look up the structure
|
||||
* and its data.
|
||||
*
|
||||
* The following definitions declare the types of procedures that are called
|
||||
* to duplicate or free this auxiliary data when the containing ByteCode
|
||||
* objects are duplicated and freed. Pointers to these procedures are kept
|
||||
* in the AuxData structure.
|
||||
*/
|
||||
|
||||
typedef ClientData (AuxDataDupProc) _ANSI_ARGS_((ClientData clientData));
|
||||
typedef void (AuxDataFreeProc) _ANSI_ARGS_((ClientData clientData));
|
||||
|
||||
/*
|
||||
* We define a separate AuxDataType struct to hold type-related information
|
||||
* for the AuxData structure. This separation makes it possible for clients
|
||||
* outside of the TCL core to manipulate (in a limited fashion!) AuxData;
|
||||
* for example, it makes it possible to pickle and unpickle AuxData structs.
|
||||
*/
|
||||
|
||||
typedef struct AuxDataType {
|
||||
char *name; /* the name of the type. Types can be
|
||||
* registered and found by name */
|
||||
AuxDataDupProc *dupProc; /* Callback procedure to invoke when the
|
||||
* aux data is duplicated (e.g., when the
|
||||
* ByteCode structure containing the aux
|
||||
* data is duplicated). NULL means just
|
||||
* copy the source clientData bits; no
|
||||
* proc need be called. */
|
||||
AuxDataFreeProc *freeProc; /* Callback procedure to invoke when the
|
||||
* aux data is freed. NULL means no
|
||||
* proc need be called. */
|
||||
} AuxDataType;
|
||||
|
||||
/*
|
||||
* The definition of the AuxData structure that holds information created
|
||||
* during compilation by CompileProcs and used by instructions during
|
||||
* execution.
|
||||
*/
|
||||
|
||||
typedef struct AuxData {
|
||||
AuxDataType *type; /* pointer to the AuxData type associated with
|
||||
* this ClientData. */
|
||||
ClientData clientData; /* The compilation data itself. */
|
||||
} AuxData;
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------
|
||||
* Data structures related to commands.
|
||||
@@ -989,9 +1042,13 @@ typedef struct Interp {
|
||||
int errorLine; /* When TCL_ERROR is returned, this gives
|
||||
* the line number in the command where the
|
||||
* error occurred (1 means first line). */
|
||||
Tcl_Obj *objResultPtr; /* If the last command returned an object
|
||||
* result, this points to it. Should not be
|
||||
* accessed directly; see comment above. */
|
||||
struct TclStubs *stubTable;
|
||||
/* Pointer to the exported Tcl stub table.
|
||||
* On previous versions of Tcl this is a
|
||||
* pointer to the objResultPtr or a pointer
|
||||
* to a buckets array in a hash table. We
|
||||
* therefore have to do some careful checking
|
||||
* before we can use this. */
|
||||
Namespace *globalNsPtr; /* The interpreter's global namespace. */
|
||||
Tcl_HashTable mathFuncTable;/* Contains all the math functions currently
|
||||
* defined for the interpreter. Indexed by
|
||||
@@ -1120,6 +1177,9 @@ typedef struct Interp {
|
||||
* gross way. */
|
||||
char resultSpace[TCL_RESULT_SIZE+1];
|
||||
/* Static space holding small results. */
|
||||
Tcl_Obj *objResultPtr; /* If the last command returned an object
|
||||
* result, this points to it. Should not be
|
||||
* accessed directly; see comment above. */
|
||||
} Interp;
|
||||
|
||||
/*
|
||||
@@ -1365,6 +1425,12 @@ typedef int (*TclCmdProcType) _ANSI_ARGS_((ClientData clientData,
|
||||
typedef int (*TclObjCmdProcType) _ANSI_ARGS_((ClientData clientData,
|
||||
Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST objv[]));
|
||||
|
||||
/*
|
||||
* Opaque names for platform specific types.
|
||||
*/
|
||||
|
||||
typedef struct TclpTime_t_ *TclpTime_t;
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------
|
||||
* Variables shared among Tcl modules but not used by the outside world.
|
||||
@@ -1385,6 +1451,7 @@ extern CONST TclFileAttrProcs tclpFileAttrProcs[];
|
||||
*/
|
||||
|
||||
extern Tcl_ObjType tclBooleanType;
|
||||
extern Tcl_ObjType tclByteArrayType;
|
||||
extern Tcl_ObjType tclByteCodeType;
|
||||
extern Tcl_ObjType tclDoubleType;
|
||||
extern Tcl_ObjType tclIntType;
|
||||
@@ -1414,277 +1481,46 @@ extern char * tclEmptyStringRep;
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------
|
||||
* Procedures shared among Tcl modules but not used by the outside
|
||||
* world:
|
||||
* Declarations of procedures that are not accessible by way of
|
||||
* the stubs tables.
|
||||
*----------------------------------------------------------------
|
||||
*/
|
||||
|
||||
EXTERN void panic _ANSI_ARGS_(TCL_VARARGS(char *,format));
|
||||
EXTERN int TclAccess _ANSI_ARGS_((CONST char *path,
|
||||
int mode));
|
||||
EXTERN int TclAccessDeleteProc _ANSI_ARGS_((TclAccessProc_ *proc));
|
||||
EXTERN int TclAccessInsertProc _ANSI_ARGS_((TclAccessProc_ *proc));
|
||||
EXTERN void TclAllocateFreeObjects _ANSI_ARGS_((void));
|
||||
EXTERN int TclChdir _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *dirName));
|
||||
EXTERN int TclCleanupChildren _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
int numPids, Tcl_Pid *pidPtr,
|
||||
Tcl_Channel errorChan));
|
||||
EXTERN void TclCleanupCommand _ANSI_ARGS_((Command *cmdPtr));
|
||||
EXTERN int TclCopyAndCollapse _ANSI_ARGS_((int count,
|
||||
char *src, char *dst));
|
||||
EXTERN int TclCopyChannel _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Channel inChan, Tcl_Channel outChan,
|
||||
int toRead, Tcl_Obj *cmdPtr));
|
||||
/*
|
||||
* TclCreatePipeline unofficially exported for use by BLT.
|
||||
*/
|
||||
EXTERN int TclCreatePipeline _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
int argc, char **argv, Tcl_Pid **pidArrayPtr,
|
||||
TclFile *inPipePtr, TclFile *outPipePtr,
|
||||
TclFile *errFilePtr));
|
||||
EXTERN int TclCreateProc _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Namespace *nsPtr, char *procName,
|
||||
Tcl_Obj *argsPtr, Tcl_Obj *bodyPtr,
|
||||
Proc **procPtrPtr));
|
||||
EXTERN void TclDeleteCompiledLocalVars _ANSI_ARGS_((
|
||||
Interp *iPtr, CallFrame *framePtr));
|
||||
EXTERN void TclDeleteVars _ANSI_ARGS_((Interp *iPtr,
|
||||
Tcl_HashTable *tablePtr));
|
||||
EXTERN int TclDoGlob _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *separators, Tcl_DString *headPtr,
|
||||
char *tail));
|
||||
EXTERN void TclDumpMemoryInfo _ANSI_ARGS_((FILE *outFile));
|
||||
EXTERN void TclExpandParseValue _ANSI_ARGS_((ParseValue *pvPtr,
|
||||
int needed));
|
||||
EXTERN void TclExprFloatError _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
double value));
|
||||
EXTERN int TclFileAttrsCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *CONST objv[]));
|
||||
EXTERN int TclFileCopyCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
int argc, char **argv)) ;
|
||||
EXTERN int TclFileDeleteCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
int argc, char **argv));
|
||||
EXTERN int TclFileMakeDirsCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
int argc, char **argv)) ;
|
||||
EXTERN int TclFileRenameCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
int argc, char **argv)) ;
|
||||
EXTERN void TclFinalizeCompExecEnv _ANSI_ARGS_((void));
|
||||
EXTERN void TclFinalizeEnvironment _ANSI_ARGS_((void));
|
||||
EXTERN void TclFinalizeExecEnv _ANSI_ARGS_((void));
|
||||
EXTERN int TclFindElement _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *list, int listLength, char **elementPtr,
|
||||
char **nextPtr, int *sizePtr, int *bracePtr));
|
||||
EXTERN Proc * TclFindProc _ANSI_ARGS_((Interp *iPtr,
|
||||
char *procName));
|
||||
EXTERN int TclFormatInt _ANSI_ARGS_((char *buffer, long n));
|
||||
EXTERN void TclFreePackageInfo _ANSI_ARGS_((Interp *iPtr));
|
||||
EXTERN void TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Channel chan));
|
||||
EXTERN char * TclGetCwd _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN int TclGetDate _ANSI_ARGS_((char *p,
|
||||
unsigned long now, long zone,
|
||||
unsigned long *timePtr));
|
||||
EXTERN Tcl_Channel TclGetDefaultStdChannel _ANSI_ARGS_((int type));
|
||||
EXTERN Tcl_Obj * TclGetElementOfIndexedArray _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, int localIndex,
|
||||
Tcl_Obj *elemPtr, int leaveErrorMsg));
|
||||
EXTERN char * TclGetEnv _ANSI_ARGS_((CONST char *name));
|
||||
EXTERN char * TclGetExtension _ANSI_ARGS_((char *name));
|
||||
EXTERN int TclGetFrame _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, CallFrame **framePtrPtr));
|
||||
EXTERN TclCmdProcType TclGetInterpProc _ANSI_ARGS_((void));
|
||||
EXTERN int TclGetIntForIndex _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *objPtr, int endValue, int *indexPtr));
|
||||
EXTERN Tcl_Obj * TclGetIndexedScalar _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
int localIndex, int leaveErrorMsg));
|
||||
EXTERN int TclGetLong _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, long *longPtr));
|
||||
EXTERN int TclGetLoadedPackages _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, char *targetName));
|
||||
EXTERN int TclGetNamespaceForQualName _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, char *qualName,
|
||||
Namespace *cxtNsPtr, int flags,
|
||||
Namespace **nsPtrPtr, Namespace **altNsPtrPtr,
|
||||
Namespace **actualCxtPtrPtr,
|
||||
char **simpleNamePtr));
|
||||
EXTERN TclObjCmdProcType TclGetObjInterpProc _ANSI_ARGS_((void));
|
||||
EXTERN int TclGetOpenMode _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, int *seekFlagPtr));
|
||||
EXTERN Tcl_Command TclGetOriginalCommand _ANSI_ARGS_((
|
||||
Tcl_Command command));
|
||||
EXTERN char * TclGetUserHome _ANSI_ARGS_((char *name,
|
||||
Tcl_DString *bufferPtr));
|
||||
EXTERN int TclGlobalInvoke _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
int argc, char **argv, int flags));
|
||||
EXTERN int TclGuessPackageName _ANSI_ARGS_((char *fileName,
|
||||
Tcl_DString *bufPtr));
|
||||
EXTERN int TclHasSockets _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN int TclHideUnsafeCommands _ANSI_ARGS_((
|
||||
Tcl_Interp *interp));
|
||||
EXTERN int TclInExit _ANSI_ARGS_((void));
|
||||
EXTERN Tcl_Obj * TclIncrElementOfIndexedArray _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, int localIndex,
|
||||
Tcl_Obj *elemPtr, long incrAmount));
|
||||
EXTERN Tcl_Obj * TclIncrIndexedScalar _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, int localIndex,
|
||||
long incrAmount));
|
||||
EXTERN Tcl_Obj * TclIncrVar2 _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
|
||||
long incrAmount, int part1NotParsed));
|
||||
EXTERN void TclInitCompiledLocals _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, CallFrame *framePtr,
|
||||
Namespace *nsPtr));
|
||||
EXTERN void TclInitNamespaces _ANSI_ARGS_((void));
|
||||
EXTERN int TclInterpInit _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN int TclInvoke _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
int argc, char **argv, int flags));
|
||||
EXTERN int TclInvokeObjectCommand _ANSI_ARGS_((
|
||||
ClientData clientData, Tcl_Interp *interp,
|
||||
int argc, char **argv));
|
||||
EXTERN int TclInvokeStringCommand _ANSI_ARGS_((
|
||||
ClientData clientData, Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *CONST objv[]));
|
||||
EXTERN Proc * TclIsProc _ANSI_ARGS_((Command *cmdPtr));
|
||||
EXTERN int TclLoadFile _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *fileName, char *sym1, char *sym2,
|
||||
Tcl_PackageInitProc **proc1Ptr,
|
||||
Tcl_PackageInitProc **proc2Ptr));
|
||||
EXTERN int TclLooksLikeInt _ANSI_ARGS_((char *p));
|
||||
EXTERN Var * TclLookupVar _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *part1, char *part2, int flags, char *msg,
|
||||
int createPart1, int createPart2,
|
||||
Var **arrayPtrPtr));
|
||||
EXTERN int TclMatchFiles _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *separators, Tcl_DString *dirPtr,
|
||||
char *pattern, char *tail));
|
||||
EXTERN int TclNeedSpace _ANSI_ARGS_((char *start, char *end));
|
||||
EXTERN Tcl_Obj * TclNewProcBodyObj _ANSI_ARGS_((Proc *procPtr));
|
||||
EXTERN int TclObjCommandComplete _ANSI_ARGS_((Tcl_Obj *cmdPtr));
|
||||
EXTERN int TclObjInterpProc _ANSI_ARGS_((ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *CONST objv[]));
|
||||
EXTERN int TclObjInvoke _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *CONST objv[], int flags));
|
||||
EXTERN int TclObjInvokeGlobal _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *CONST objv[], int flags));
|
||||
EXTERN int TclOpenFileChannelDeleteProc _ANSI_ARGS_((
|
||||
TclOpenFileChannelProc_ *proc));
|
||||
EXTERN int TclOpenFileChannelInsertProc _ANSI_ARGS_((
|
||||
TclOpenFileChannelProc_ *proc));
|
||||
EXTERN char * TclpAlloc _ANSI_ARGS_((unsigned int size));
|
||||
|
||||
/*
|
||||
* On a Mac, we can exit gracefully if the stack gets too small.
|
||||
*/
|
||||
|
||||
#ifdef MAC_TCL
|
||||
EXTERN int TclpCheckStackSpace _ANSI_ARGS_((void));
|
||||
#else
|
||||
#define TclpCheckStackSpace() (1)
|
||||
#endif
|
||||
|
||||
EXTERN int TclpCloseFile _ANSI_ARGS_((TclFile file));
|
||||
EXTERN int TclpCopyFile _ANSI_ARGS_((char *source, char *dest));
|
||||
EXTERN int TclpCopyDirectory _ANSI_ARGS_((char *source,
|
||||
char *dest, Tcl_DString *errorPtr));
|
||||
EXTERN Tcl_Channel TclpCreateCommandChannel _ANSI_ARGS_((
|
||||
TclFile readFile, TclFile writeFile,
|
||||
TclFile errorFile, int numPids, Tcl_Pid *pidPtr));
|
||||
EXTERN int TclpCreateDirectory _ANSI_ARGS_((char *path));
|
||||
EXTERN int TclpCreatePipe _ANSI_ARGS_((TclFile *readPipe,
|
||||
TclFile *writePipe));
|
||||
EXTERN int TclpCreateProcess _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
int argc, char **argv, TclFile inputFile,
|
||||
TclFile outputFile, TclFile errorFile,
|
||||
Tcl_Pid *pidPtr));
|
||||
EXTERN TclFile TclpCreateTempFile _ANSI_ARGS_((char *contents,
|
||||
Tcl_DString *namePtr));
|
||||
EXTERN int TclpDeleteFile _ANSI_ARGS_((char *path));
|
||||
EXTERN void TclpFinalize _ANSI_ARGS_((void));
|
||||
EXTERN void TclpFree _ANSI_ARGS_((char *ptr));
|
||||
EXTERN unsigned long TclpGetClicks _ANSI_ARGS_((void));
|
||||
EXTERN unsigned long TclpGetSeconds _ANSI_ARGS_((void));
|
||||
EXTERN void TclpGetTime _ANSI_ARGS_((Tcl_Time *time));
|
||||
EXTERN int TclpGetTimeZone _ANSI_ARGS_((unsigned long time));
|
||||
EXTERN char * TclpGetTZName _ANSI_ARGS_((void));
|
||||
EXTERN int TclpListVolumes _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN TclFile TclpMakeFile _ANSI_ARGS_((Tcl_Channel channel,
|
||||
int direction));
|
||||
EXTERN TclFile TclpOpenFile _ANSI_ARGS_((char *fname, int mode));
|
||||
EXTERN Tcl_Channel TclpOpenFileChannel _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *fileName, char *modeString,
|
||||
int permissions));
|
||||
EXTERN char * TclpRealloc _ANSI_ARGS_((char *ptr,
|
||||
unsigned int size));
|
||||
EXTERN int TclpRemoveDirectory _ANSI_ARGS_((char *path,
|
||||
int recursive, Tcl_DString *errorPtr));
|
||||
EXTERN int TclpRenameFile _ANSI_ARGS_((char *source, char *dest));
|
||||
#ifndef TclpSysAlloc
|
||||
EXTERN VOID * TclpSysAlloc _ANSI_ARGS_((long size, int isBin));
|
||||
#endif
|
||||
#ifndef TclpSysFree
|
||||
EXTERN void TclpSysFree _ANSI_ARGS_((VOID *ptr));
|
||||
#endif
|
||||
#ifndef TclpSysRealloc
|
||||
EXTERN VOID * TclpSysRealloc _ANSI_ARGS_((VOID *cp,
|
||||
unsigned int size));
|
||||
#endif
|
||||
EXTERN int TclParseBraces _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char **termPtr, ParseValue *pvPtr));
|
||||
EXTERN int TclParseNestedCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, int flags, char **termPtr,
|
||||
ParseValue *pvPtr));
|
||||
EXTERN int TclParseQuotes _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, int termChar, int flags,
|
||||
char **termPtr, ParseValue *pvPtr));
|
||||
EXTERN void TclPlatformExit _ANSI_ARGS_((int status));
|
||||
EXTERN void TclPlatformInit _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN char * TclPrecTraceProc _ANSI_ARGS_((ClientData clientData,
|
||||
Tcl_Interp *interp, char *name1, char *name2,
|
||||
int flags));
|
||||
EXTERN int TclPreventAliasLoop _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Interp *cmdInterp, Tcl_Command cmd));
|
||||
EXTERN void TclPrintByteCodeObj _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *objPtr));
|
||||
EXTERN void TclProcCleanupProc _ANSI_ARGS_((Proc *procPtr));
|
||||
EXTERN int TclProcCompileProc _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Proc *procPtr, Tcl_Obj *bodyPtr, Namespace *nsPtr,
|
||||
CONST char *description, CONST char *procName));
|
||||
EXTERN void TclProcDeleteProc _ANSI_ARGS_((ClientData clientData));
|
||||
EXTERN int TclProcInterpProc _ANSI_ARGS_((ClientData clientData,
|
||||
Tcl_Interp *interp, int argc, char **argv));
|
||||
EXTERN int TclRenameCommand _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *oldName, char *newName)) ;
|
||||
EXTERN void TclResetShadowedCmdRefs _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, Command *newCmdPtr));
|
||||
EXTERN int TclServiceIdle _ANSI_ARGS_((void));
|
||||
EXTERN Tcl_Obj * TclSetElementOfIndexedArray _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, int localIndex,
|
||||
Tcl_Obj *elemPtr, Tcl_Obj *objPtr,
|
||||
int leaveErrorMsg));
|
||||
EXTERN Tcl_Obj * TclSetIndexedScalar _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
int localIndex, Tcl_Obj *objPtr,
|
||||
int leaveErrorMsg));
|
||||
EXTERN char * TclSetPreInitScript _ANSI_ARGS_((char *string));
|
||||
EXTERN void TclSetupEnv _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
EXTERN int TclSockGetPort _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *proto, int *portPtr));
|
||||
EXTERN int TclSockMinimumBuffers _ANSI_ARGS_((int sock,
|
||||
int size));
|
||||
EXTERN int TclStat _ANSI_ARGS_((CONST char *path,
|
||||
TclStat_ *buf));
|
||||
EXTERN int TclStatDeleteProc _ANSI_ARGS_((TclStatProc_ *proc));
|
||||
EXTERN int TclStatInsertProc _ANSI_ARGS_((TclStatProc_ *proc));
|
||||
EXTERN void TclTeardownNamespace _ANSI_ARGS_((Namespace *nsPtr));
|
||||
EXTERN int TclTestChannelCmd _ANSI_ARGS_((ClientData clientData,
|
||||
Tcl_Interp *interp, int argc, char **argv));
|
||||
EXTERN int TclTestChannelEventCmd _ANSI_ARGS_((
|
||||
ClientData clientData, Tcl_Interp *interp,
|
||||
int argc, char **argv));
|
||||
EXTERN int TclUpdateReturnInfo _ANSI_ARGS_((Interp *iPtr));
|
||||
EXTERN char * TclWordEnd _ANSI_ARGS_((char *start, char *lastChar,
|
||||
int nested, int *semiPtr));
|
||||
EXTERN int TclCompileBreakCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int compileFlags,
|
||||
struct CompileEnv *compileEnvPtr));
|
||||
EXTERN int TclCompileCatchCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int compileFlags,
|
||||
struct CompileEnv *compileEnvPtr));
|
||||
EXTERN int TclCompileContinueCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int compileFlags,
|
||||
struct CompileEnv *compileEnvPtr));
|
||||
EXTERN int TclCompileExprCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int compileFlags,
|
||||
struct CompileEnv *compileEnvPtr));
|
||||
EXTERN int TclCompileForCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int compileFlags,
|
||||
struct CompileEnv *compileEnvPtr));
|
||||
EXTERN int TclCompileForeachCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int compileFlags,
|
||||
struct CompileEnv *compileEnvPtr));
|
||||
EXTERN int TclCompileIfCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int compileFlags,
|
||||
struct CompileEnv *compileEnvPtr));
|
||||
EXTERN int TclCompileIncrCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int compileFlags,
|
||||
struct CompileEnv *compileEnvPtr));
|
||||
EXTERN int TclCompileSetCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int compileFlags,
|
||||
struct CompileEnv *compileEnvPtr));
|
||||
EXTERN int TclCompileWhileCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int compileFlags,
|
||||
struct CompileEnv *compileEnvPtr));
|
||||
EXTERN void TclFinalizeCompExecEnv _ANSI_ARGS_((void));
|
||||
EXTERN void TclFinalizeEnvironment _ANSI_ARGS_((void));
|
||||
EXTERN void TclFinalizeExecEnv _ANSI_ARGS_((void));
|
||||
EXTERN void TclInitNamespaces _ANSI_ARGS_((void));
|
||||
EXTERN void TclpFinalize _ANSI_ARGS_((void));
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------
|
||||
@@ -1759,7 +1595,7 @@ EXTERN int Tcl_IncrCmd _ANSI_ARGS_((ClientData clientData,
|
||||
EXTERN int Tcl_InfoObjCmd _ANSI_ARGS_((ClientData clientData,
|
||||
Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]));
|
||||
EXTERN int Tcl_InterpObjCmd _ANSI_ARGS_((ClientData clientData,
|
||||
Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[]));
|
||||
Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]));
|
||||
EXTERN int Tcl_JoinObjCmd _ANSI_ARGS_((ClientData clientData,
|
||||
Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]));
|
||||
EXTERN int Tcl_LappendObjCmd _ANSI_ARGS_((ClientData clientData,
|
||||
@@ -1864,42 +1700,17 @@ EXTERN int Tcl_ResourceObjCmd _ANSI_ARGS_((ClientData clientData,
|
||||
Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]));
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------
|
||||
* Compilation procedures for commands in the generic core:
|
||||
* Command procedures used for testing.
|
||||
*----------------------------------------------------------------
|
||||
*/
|
||||
|
||||
EXTERN int TclCompileBreakCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int compileFlags,
|
||||
struct CompileEnv *compileEnvPtr));
|
||||
EXTERN int TclCompileCatchCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int compileFlags,
|
||||
struct CompileEnv *compileEnvPtr));
|
||||
EXTERN int TclCompileContinueCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int compileFlags,
|
||||
struct CompileEnv *compileEnvPtr));
|
||||
EXTERN int TclCompileExprCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int compileFlags,
|
||||
struct CompileEnv *compileEnvPtr));
|
||||
EXTERN int TclCompileForCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int compileFlags,
|
||||
struct CompileEnv *compileEnvPtr));
|
||||
EXTERN int TclCompileForeachCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int compileFlags,
|
||||
struct CompileEnv *compileEnvPtr));
|
||||
EXTERN int TclCompileIfCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int compileFlags,
|
||||
struct CompileEnv *compileEnvPtr));
|
||||
EXTERN int TclCompileIncrCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int compileFlags,
|
||||
struct CompileEnv *compileEnvPtr));
|
||||
EXTERN int TclCompileSetCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int compileFlags,
|
||||
struct CompileEnv *compileEnvPtr));
|
||||
EXTERN int TclCompileWhileCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *string, char *lastChar, int compileFlags,
|
||||
struct CompileEnv *compileEnvPtr));
|
||||
EXTERN int TclTestChannelCmd _ANSI_ARGS_((ClientData clientData,
|
||||
Tcl_Interp *interp, int argc, char **argv));
|
||||
EXTERN int TclTestChannelEventCmd _ANSI_ARGS_((ClientData clientData,
|
||||
Tcl_Interp *interp, int argc, char **argv));
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------
|
||||
@@ -2073,72 +1884,11 @@ EXTERN int TclCompileWhileCmd _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------
|
||||
* Procedures used in conjunction with Tcl namespaces. They are
|
||||
* defined here instead of in tcl.h since they are not stable yet.
|
||||
*----------------------------------------------------------------
|
||||
* Include the declarations for functions that are accessible via
|
||||
* the stubs table.
|
||||
*/
|
||||
|
||||
EXTERN void Tcl_AddInterpResolvers _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *name, Tcl_ResolveCmdProc *cmdProc,
|
||||
Tcl_ResolveVarProc *varProc,
|
||||
Tcl_ResolveCompiledVarProc *compiledVarProc));
|
||||
EXTERN int Tcl_AppendExportList _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, Tcl_Namespace *nsPtr,
|
||||
Tcl_Obj *objPtr));
|
||||
EXTERN Tcl_Namespace * Tcl_CreateNamespace _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *name, ClientData clientData,
|
||||
Tcl_NamespaceDeleteProc *deleteProc));
|
||||
EXTERN void Tcl_DeleteNamespace _ANSI_ARGS_((
|
||||
Tcl_Namespace *nsPtr));
|
||||
EXTERN int Tcl_Export _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Namespace *nsPtr, char *pattern,
|
||||
int resetListFirst));
|
||||
EXTERN Tcl_Command Tcl_FindCommand _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *name, Tcl_Namespace *contextNsPtr,
|
||||
int flags));
|
||||
EXTERN Tcl_Namespace * Tcl_FindNamespace _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *name, Tcl_Namespace *contextNsPtr,
|
||||
int flags));
|
||||
EXTERN int Tcl_GetInterpResolvers _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *name, Tcl_ResolverInfo *resInfo));
|
||||
EXTERN int Tcl_GetNamespaceResolvers _ANSI_ARGS_((
|
||||
Tcl_Namespace *namespacePtr,
|
||||
Tcl_ResolverInfo *resInfo));
|
||||
EXTERN void Tcl_GetVariableFullName _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, Tcl_Var variable,
|
||||
Tcl_Obj *objPtr));
|
||||
EXTERN Tcl_Var Tcl_FindNamespaceVar _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, char *name,
|
||||
Tcl_Namespace *contextNsPtr, int flags));
|
||||
EXTERN int Tcl_ForgetImport _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Namespace *nsPtr, char *pattern));
|
||||
EXTERN Tcl_Command Tcl_GetCommandFromObj _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, Tcl_Obj *objPtr));
|
||||
EXTERN void Tcl_GetCommandFullName _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, Tcl_Command command,
|
||||
Tcl_Obj *objPtr));
|
||||
EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace _ANSI_ARGS_((
|
||||
Tcl_Interp *interp));
|
||||
EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace _ANSI_ARGS_((
|
||||
Tcl_Interp *interp));
|
||||
EXTERN void Tcl_GetVariableFullName _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, Tcl_Var variable,
|
||||
Tcl_Obj *objPtr));
|
||||
EXTERN int Tcl_Import _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Namespace *nsPtr, char *pattern,
|
||||
int allowOverwrite));
|
||||
EXTERN void Tcl_PopCallFrame _ANSI_ARGS_((Tcl_Interp* interp));
|
||||
EXTERN int Tcl_PushCallFrame _ANSI_ARGS_((Tcl_Interp* interp,
|
||||
Tcl_CallFrame *framePtr, Tcl_Namespace *nsPtr,
|
||||
int isProcCallFrame));
|
||||
EXTERN int Tcl_RemoveInterpResolvers _ANSI_ARGS_((
|
||||
Tcl_Interp *interp, char *name));
|
||||
EXTERN void Tcl_SetNamespaceResolvers _ANSI_ARGS_((
|
||||
Tcl_Namespace *namespacePtr,
|
||||
Tcl_ResolveCmdProc *cmdProc,
|
||||
Tcl_ResolveVarProc *varProc,
|
||||
Tcl_ResolveCompiledVarProc *compiledVarProc));
|
||||
#include "tclIntDecls.h"
|
||||
|
||||
# undef TCL_STORAGE_CLASS
|
||||
# define TCL_STORAGE_CLASS DLLIMPORT
|
||||
|
||||
+367
-538
File diff suppressed because it is too large
Load Diff
+355
-19
@@ -9,7 +9,7 @@
|
||||
* Copyright (c) 1998-1999 by Scriptics Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* RCS: @(#) $Id: tclIntPlatDecls.h,v 1.1 1999/03/03 00:38:41 stanton Exp $
|
||||
* RCS: @(#) $Id: tclIntPlatDecls.h,v 1.2.4.2 1999/03/10 05:50:27 stanton Exp $
|
||||
*/
|
||||
|
||||
#ifndef _TCLINTPLATDECLS
|
||||
@@ -27,6 +27,37 @@
|
||||
* Exported function declarations:
|
||||
*/
|
||||
|
||||
#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
|
||||
/* 0 */
|
||||
EXTERN void TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp * interp,
|
||||
Tcl_Channel chan));
|
||||
/* 1 */
|
||||
EXTERN int TclpCloseFile _ANSI_ARGS_((TclFile file));
|
||||
/* 2 */
|
||||
EXTERN Tcl_Channel TclpCreateCommandChannel _ANSI_ARGS_((
|
||||
TclFile readFile, TclFile writeFile,
|
||||
TclFile errorFile, int numPids,
|
||||
Tcl_Pid * pidPtr));
|
||||
/* 3 */
|
||||
EXTERN int TclpCreatePipe _ANSI_ARGS_((TclFile * readPipe,
|
||||
TclFile * writePipe));
|
||||
/* 4 */
|
||||
EXTERN int TclpCreateProcess _ANSI_ARGS_((Tcl_Interp * interp,
|
||||
int argc, char ** argv, TclFile inputFile,
|
||||
TclFile outputFile, TclFile errorFile,
|
||||
Tcl_Pid * pidPtr));
|
||||
/* 5 */
|
||||
EXTERN TclFile TclpCreateTempFile _ANSI_ARGS_((char * contents,
|
||||
Tcl_DString * namePtr));
|
||||
/* 6 */
|
||||
EXTERN TclFile TclpMakeFile _ANSI_ARGS_((Tcl_Channel channel,
|
||||
int direction));
|
||||
/* 7 */
|
||||
EXTERN TclFile TclpOpenFile _ANSI_ARGS_((char * fname, int mode));
|
||||
/* 8 */
|
||||
EXTERN int TclUnixWaitForFile _ANSI_ARGS_((int fd, int mask,
|
||||
int timeout));
|
||||
#endif /* UNIX */
|
||||
#ifdef __WIN32__
|
||||
/* 0 */
|
||||
EXTERN void TclWinConvertError _ANSI_ARGS_((DWORD errCode));
|
||||
@@ -49,25 +80,127 @@ EXTERN u_short TclWinNToHS _ANSI_ARGS_((u_short ns));
|
||||
EXTERN int TclWinSetSockOpt _ANSI_ARGS_((SOCKET s, int level,
|
||||
int optname, const char FAR * optval,
|
||||
int optlen));
|
||||
/* 8 */
|
||||
EXTERN unsigned long TclpGetPid _ANSI_ARGS_((Tcl_Pid pid));
|
||||
/* 9 */
|
||||
EXTERN int TclWinGetPlatformId _ANSI_ARGS_((void));
|
||||
/* 10 */
|
||||
EXTERN int TclWinSynchSpawn _ANSI_ARGS_((void * args, int type,
|
||||
void ** trans, Tcl_Pid * pidPtr));
|
||||
/* 11 */
|
||||
EXTERN void TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp * interp,
|
||||
Tcl_Channel chan));
|
||||
/* 12 */
|
||||
EXTERN int TclpCloseFile _ANSI_ARGS_((TclFile file));
|
||||
/* 13 */
|
||||
EXTERN Tcl_Channel TclpCreateCommandChannel _ANSI_ARGS_((
|
||||
TclFile readFile, TclFile writeFile,
|
||||
TclFile errorFile, int numPids,
|
||||
Tcl_Pid * pidPtr));
|
||||
/* 14 */
|
||||
EXTERN int TclpCreatePipe _ANSI_ARGS_((TclFile * readPipe,
|
||||
TclFile * writePipe));
|
||||
/* 15 */
|
||||
EXTERN int TclpCreateProcess _ANSI_ARGS_((Tcl_Interp * interp,
|
||||
int argc, char ** argv, TclFile inputFile,
|
||||
TclFile outputFile, TclFile errorFile,
|
||||
Tcl_Pid * pidPtr));
|
||||
/* 16 */
|
||||
EXTERN TclFile TclpCreateTempFile _ANSI_ARGS_((char * contents,
|
||||
Tcl_DString * namePtr));
|
||||
/* 17 */
|
||||
EXTERN char * TclpGetTZName _ANSI_ARGS_((void));
|
||||
/* 18 */
|
||||
EXTERN TclFile TclpMakeFile _ANSI_ARGS_((Tcl_Channel channel,
|
||||
int direction));
|
||||
/* 19 */
|
||||
EXTERN TclFile TclpOpenFile _ANSI_ARGS_((char * fname, int mode));
|
||||
#endif /* __WIN32__ */
|
||||
#ifdef MAC_TCL
|
||||
/* 0 */
|
||||
EXTERN int TclpCheckStackSpace _ANSI_ARGS_((void));
|
||||
/* 1 */
|
||||
EXTERN VOID * TclpSysAlloc _ANSI_ARGS_((long size, int isBin));
|
||||
/* 2 */
|
||||
/* 1 */
|
||||
EXTERN void TclpSysFree _ANSI_ARGS_((VOID * ptr));
|
||||
/* 3 */
|
||||
/* 2 */
|
||||
EXTERN VOID * TclpSysRealloc _ANSI_ARGS_((VOID * cp,
|
||||
unsigned int size));
|
||||
/* 4 */
|
||||
/* 3 */
|
||||
EXTERN void TclPlatformExit _ANSI_ARGS_((int status));
|
||||
/* 4 */
|
||||
EXTERN int FSpGetDefaultDir _ANSI_ARGS_((FSSpecPtr theSpec));
|
||||
/* 5 */
|
||||
EXTERN int FSpSetDefaultDir _ANSI_ARGS_((FSSpecPtr theSpec));
|
||||
/* 6 */
|
||||
EXTERN OSErr FSpFindFolder _ANSI_ARGS_((short vRefNum,
|
||||
OSType folderType, Boolean createFolder,
|
||||
FSSpec * spec));
|
||||
/* 7 */
|
||||
EXTERN void GetGlobalMouse _ANSI_ARGS_((Point * mouse));
|
||||
/* 8 */
|
||||
EXTERN pascal OSErr FSpGetDirectoryID _ANSI_ARGS_((const FSSpec * spec,
|
||||
long * theDirID, Boolean * isDirectory));
|
||||
/* 9 */
|
||||
EXTERN pascal short FSpOpenResFileCompat _ANSI_ARGS_((
|
||||
const FSSpec * spec, SignedByte permission));
|
||||
/* 10 */
|
||||
EXTERN pascal void FSpCreateResFileCompat _ANSI_ARGS_((
|
||||
const FSSpec * spec, OSType creator,
|
||||
OSType fileType, ScriptCode scriptTag));
|
||||
/* 11 */
|
||||
EXTERN int FSpLocationFromPath _ANSI_ARGS_((int length,
|
||||
CONST char * path, FSSpecPtr theSpec));
|
||||
/* 12 */
|
||||
EXTERN OSErr FSpPathFromLocation _ANSI_ARGS_((FSSpecPtr theSpec,
|
||||
int * length, Handle * fullPath));
|
||||
/* 13 */
|
||||
EXTERN void TclMacExitHandler _ANSI_ARGS_((void));
|
||||
/* 14 */
|
||||
EXTERN void TclMacInitExitToShell _ANSI_ARGS_((int usePatch));
|
||||
/* 15 */
|
||||
EXTERN OSErr TclMacInstallExitToShellPatch _ANSI_ARGS_((
|
||||
ExitToShellProcPtr newProc));
|
||||
/* 16 */
|
||||
EXTERN int TclMacOSErrorToPosixError _ANSI_ARGS_((int error));
|
||||
/* 17 */
|
||||
EXTERN void TclMacRemoveTimer _ANSI_ARGS_((void * timerToken));
|
||||
/* 18 */
|
||||
EXTERN void * TclMacStartTimer _ANSI_ARGS_((long ms));
|
||||
/* 19 */
|
||||
EXTERN int TclMacTimerExpired _ANSI_ARGS_((void * timerToken));
|
||||
/* 20 */
|
||||
EXTERN int TclMacRegisterResourceFork _ANSI_ARGS_((
|
||||
short fileRef, Tcl_Obj * tokenPtr,
|
||||
int insert));
|
||||
/* 21 */
|
||||
EXTERN short TclMacUnRegisterResourceFork _ANSI_ARGS_((
|
||||
char * tokenPtr, Tcl_Obj * resultPtr));
|
||||
/* 22 */
|
||||
EXTERN int TclMacCreateEnv _ANSI_ARGS_((void));
|
||||
/* 23 */
|
||||
EXTERN FILE * TclMacFOpenHack _ANSI_ARGS_((const char * path,
|
||||
const char * mode));
|
||||
/* 24 */
|
||||
EXTERN int TclMacReadlink _ANSI_ARGS_((char * path, char * buf,
|
||||
int size));
|
||||
/* 25 */
|
||||
EXTERN int TclMacChmod _ANSI_ARGS_((char * path, int mode));
|
||||
#endif /* MAC_TCL */
|
||||
|
||||
typedef struct TclIntPlatStubs {
|
||||
int magic;
|
||||
struct TclIntPlatStubHooks *hooks;
|
||||
|
||||
#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
|
||||
void (*tclGetAndDetachPids) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan)); /* 0 */
|
||||
int (*tclpCloseFile) _ANSI_ARGS_((TclFile file)); /* 1 */
|
||||
Tcl_Channel (*tclpCreateCommandChannel) _ANSI_ARGS_((TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr)); /* 2 */
|
||||
int (*tclpCreatePipe) _ANSI_ARGS_((TclFile * readPipe, TclFile * writePipe)); /* 3 */
|
||||
int (*tclpCreateProcess) _ANSI_ARGS_((Tcl_Interp * interp, int argc, char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr)); /* 4 */
|
||||
TclFile (*tclpCreateTempFile) _ANSI_ARGS_((char * contents, Tcl_DString * namePtr)); /* 5 */
|
||||
TclFile (*tclpMakeFile) _ANSI_ARGS_((Tcl_Channel channel, int direction)); /* 6 */
|
||||
TclFile (*tclpOpenFile) _ANSI_ARGS_((char * fname, int mode)); /* 7 */
|
||||
int (*tclUnixWaitForFile) _ANSI_ARGS_((int fd, int mask, int timeout)); /* 8 */
|
||||
#endif /* UNIX */
|
||||
#ifdef __WIN32__
|
||||
void (*tclWinConvertError) _ANSI_ARGS_((DWORD errCode)); /* 0 */
|
||||
void (*tclWinConvertWSAError) _ANSI_ARGS_((DWORD errCode)); /* 1 */
|
||||
@@ -77,13 +210,46 @@ typedef struct TclIntPlatStubs {
|
||||
HINSTANCE (*tclWinLoadLibrary) _ANSI_ARGS_((char * name)); /* 5 */
|
||||
u_short (*tclWinNToHS) _ANSI_ARGS_((u_short ns)); /* 6 */
|
||||
int (*tclWinSetSockOpt) _ANSI_ARGS_((SOCKET s, int level, int optname, const char FAR * optval, int optlen)); /* 7 */
|
||||
unsigned long (*tclpGetPid) _ANSI_ARGS_((Tcl_Pid pid)); /* 8 */
|
||||
int (*tclWinGetPlatformId) _ANSI_ARGS_((void)); /* 9 */
|
||||
int (*tclWinSynchSpawn) _ANSI_ARGS_((void * args, int type, void ** trans, Tcl_Pid * pidPtr)); /* 10 */
|
||||
void (*tclGetAndDetachPids) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan)); /* 11 */
|
||||
int (*tclpCloseFile) _ANSI_ARGS_((TclFile file)); /* 12 */
|
||||
Tcl_Channel (*tclpCreateCommandChannel) _ANSI_ARGS_((TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr)); /* 13 */
|
||||
int (*tclpCreatePipe) _ANSI_ARGS_((TclFile * readPipe, TclFile * writePipe)); /* 14 */
|
||||
int (*tclpCreateProcess) _ANSI_ARGS_((Tcl_Interp * interp, int argc, char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr)); /* 15 */
|
||||
TclFile (*tclpCreateTempFile) _ANSI_ARGS_((char * contents, Tcl_DString * namePtr)); /* 16 */
|
||||
char * (*tclpGetTZName) _ANSI_ARGS_((void)); /* 17 */
|
||||
TclFile (*tclpMakeFile) _ANSI_ARGS_((Tcl_Channel channel, int direction)); /* 18 */
|
||||
TclFile (*tclpOpenFile) _ANSI_ARGS_((char * fname, int mode)); /* 19 */
|
||||
#endif /* __WIN32__ */
|
||||
#ifdef MAC_TCL
|
||||
int (*tclpCheckStackSpace) _ANSI_ARGS_((void)); /* 0 */
|
||||
VOID * (*tclpSysAlloc) _ANSI_ARGS_((long size, int isBin)); /* 1 */
|
||||
void (*tclpSysFree) _ANSI_ARGS_((VOID * ptr)); /* 2 */
|
||||
VOID * (*tclpSysRealloc) _ANSI_ARGS_((VOID * cp, unsigned int size)); /* 3 */
|
||||
void (*tclPlatformExit) _ANSI_ARGS_((int status)); /* 4 */
|
||||
VOID * (*tclpSysAlloc) _ANSI_ARGS_((long size, int isBin)); /* 0 */
|
||||
void (*tclpSysFree) _ANSI_ARGS_((VOID * ptr)); /* 1 */
|
||||
VOID * (*tclpSysRealloc) _ANSI_ARGS_((VOID * cp, unsigned int size)); /* 2 */
|
||||
void (*tclPlatformExit) _ANSI_ARGS_((int status)); /* 3 */
|
||||
int (*fSpGetDefaultDir) _ANSI_ARGS_((FSSpecPtr theSpec)); /* 4 */
|
||||
int (*fSpSetDefaultDir) _ANSI_ARGS_((FSSpecPtr theSpec)); /* 5 */
|
||||
OSErr (*fSpFindFolder) _ANSI_ARGS_((short vRefNum, OSType folderType, Boolean createFolder, FSSpec * spec)); /* 6 */
|
||||
void (*getGlobalMouse) _ANSI_ARGS_((Point * mouse)); /* 7 */
|
||||
pascal OSErr (*fSpGetDirectoryID) _ANSI_ARGS_((const FSSpec * spec, long * theDirID, Boolean * isDirectory)); /* 8 */
|
||||
pascal short (*fSpOpenResFileCompat) _ANSI_ARGS_((const FSSpec * spec, SignedByte permission)); /* 9 */
|
||||
pascal void (*fSpCreateResFileCompat) _ANSI_ARGS_((const FSSpec * spec, OSType creator, OSType fileType, ScriptCode scriptTag)); /* 10 */
|
||||
int (*fSpLocationFromPath) _ANSI_ARGS_((int length, CONST char * path, FSSpecPtr theSpec)); /* 11 */
|
||||
OSErr (*fSpPathFromLocation) _ANSI_ARGS_((FSSpecPtr theSpec, int * length, Handle * fullPath)); /* 12 */
|
||||
void (*tclMacExitHandler) _ANSI_ARGS_((void)); /* 13 */
|
||||
void (*tclMacInitExitToShell) _ANSI_ARGS_((int usePatch)); /* 14 */
|
||||
OSErr (*tclMacInstallExitToShellPatch) _ANSI_ARGS_((ExitToShellProcPtr newProc)); /* 15 */
|
||||
int (*tclMacOSErrorToPosixError) _ANSI_ARGS_((int error)); /* 16 */
|
||||
void (*tclMacRemoveTimer) _ANSI_ARGS_((void * timerToken)); /* 17 */
|
||||
void * (*tclMacStartTimer) _ANSI_ARGS_((long ms)); /* 18 */
|
||||
int (*tclMacTimerExpired) _ANSI_ARGS_((void * timerToken)); /* 19 */
|
||||
int (*tclMacRegisterResourceFork) _ANSI_ARGS_((short fileRef, Tcl_Obj * tokenPtr, int insert)); /* 20 */
|
||||
short (*tclMacUnRegisterResourceFork) _ANSI_ARGS_((char * tokenPtr, Tcl_Obj * resultPtr)); /* 21 */
|
||||
int (*tclMacCreateEnv) _ANSI_ARGS_((void)); /* 22 */
|
||||
FILE * (*tclMacFOpenHack) _ANSI_ARGS_((const char * path, const char * mode)); /* 23 */
|
||||
int (*tclMacReadlink) _ANSI_ARGS_((char * path, char * buf, int size)); /* 24 */
|
||||
int (*tclMacChmod) _ANSI_ARGS_((char * path, int mode)); /* 25 */
|
||||
#endif /* MAC_TCL */
|
||||
} TclIntPlatStubs;
|
||||
|
||||
@@ -95,6 +261,44 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr;
|
||||
* Inline function declarations:
|
||||
*/
|
||||
|
||||
#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
|
||||
#ifndef TclGetAndDetachPids
|
||||
#define TclGetAndDetachPids(interp, chan) \
|
||||
(tclIntPlatStubsPtr->tclGetAndDetachPids)(interp, chan) /* 0 */
|
||||
#endif
|
||||
#ifndef TclpCloseFile
|
||||
#define TclpCloseFile(file) \
|
||||
(tclIntPlatStubsPtr->tclpCloseFile)(file) /* 1 */
|
||||
#endif
|
||||
#ifndef TclpCreateCommandChannel
|
||||
#define TclpCreateCommandChannel(readFile, writeFile, errorFile, numPids, pidPtr) \
|
||||
(tclIntPlatStubsPtr->tclpCreateCommandChannel)(readFile, writeFile, errorFile, numPids, pidPtr) /* 2 */
|
||||
#endif
|
||||
#ifndef TclpCreatePipe
|
||||
#define TclpCreatePipe(readPipe, writePipe) \
|
||||
(tclIntPlatStubsPtr->tclpCreatePipe)(readPipe, writePipe) /* 3 */
|
||||
#endif
|
||||
#ifndef TclpCreateProcess
|
||||
#define TclpCreateProcess(interp, argc, argv, inputFile, outputFile, errorFile, pidPtr) \
|
||||
(tclIntPlatStubsPtr->tclpCreateProcess)(interp, argc, argv, inputFile, outputFile, errorFile, pidPtr) /* 4 */
|
||||
#endif
|
||||
#ifndef TclpCreateTempFile
|
||||
#define TclpCreateTempFile(contents, namePtr) \
|
||||
(tclIntPlatStubsPtr->tclpCreateTempFile)(contents, namePtr) /* 5 */
|
||||
#endif
|
||||
#ifndef TclpMakeFile
|
||||
#define TclpMakeFile(channel, direction) \
|
||||
(tclIntPlatStubsPtr->tclpMakeFile)(channel, direction) /* 6 */
|
||||
#endif
|
||||
#ifndef TclpOpenFile
|
||||
#define TclpOpenFile(fname, mode) \
|
||||
(tclIntPlatStubsPtr->tclpOpenFile)(fname, mode) /* 7 */
|
||||
#endif
|
||||
#ifndef TclUnixWaitForFile
|
||||
#define TclUnixWaitForFile(fd, mask, timeout) \
|
||||
(tclIntPlatStubsPtr->tclUnixWaitForFile)(fd, mask, timeout) /* 8 */
|
||||
#endif
|
||||
#endif /* UNIX */
|
||||
#ifdef __WIN32__
|
||||
#ifndef TclWinConvertError
|
||||
#define TclWinConvertError(errCode) \
|
||||
@@ -128,27 +332,159 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr;
|
||||
#define TclWinSetSockOpt(s, level, optname, optval, optlen) \
|
||||
(tclIntPlatStubsPtr->tclWinSetSockOpt)(s, level, optname, optval, optlen) /* 7 */
|
||||
#endif
|
||||
#ifndef TclpGetPid
|
||||
#define TclpGetPid(pid) \
|
||||
(tclIntPlatStubsPtr->tclpGetPid)(pid) /* 8 */
|
||||
#endif
|
||||
#ifndef TclWinGetPlatformId
|
||||
#define TclWinGetPlatformId() \
|
||||
(tclIntPlatStubsPtr->tclWinGetPlatformId)() /* 9 */
|
||||
#endif
|
||||
#ifndef TclWinSynchSpawn
|
||||
#define TclWinSynchSpawn(args, type, trans, pidPtr) \
|
||||
(tclIntPlatStubsPtr->tclWinSynchSpawn)(args, type, trans, pidPtr) /* 10 */
|
||||
#endif
|
||||
#ifndef TclGetAndDetachPids
|
||||
#define TclGetAndDetachPids(interp, chan) \
|
||||
(tclIntPlatStubsPtr->tclGetAndDetachPids)(interp, chan) /* 11 */
|
||||
#endif
|
||||
#ifndef TclpCloseFile
|
||||
#define TclpCloseFile(file) \
|
||||
(tclIntPlatStubsPtr->tclpCloseFile)(file) /* 12 */
|
||||
#endif
|
||||
#ifndef TclpCreateCommandChannel
|
||||
#define TclpCreateCommandChannel(readFile, writeFile, errorFile, numPids, pidPtr) \
|
||||
(tclIntPlatStubsPtr->tclpCreateCommandChannel)(readFile, writeFile, errorFile, numPids, pidPtr) /* 13 */
|
||||
#endif
|
||||
#ifndef TclpCreatePipe
|
||||
#define TclpCreatePipe(readPipe, writePipe) \
|
||||
(tclIntPlatStubsPtr->tclpCreatePipe)(readPipe, writePipe) /* 14 */
|
||||
#endif
|
||||
#ifndef TclpCreateProcess
|
||||
#define TclpCreateProcess(interp, argc, argv, inputFile, outputFile, errorFile, pidPtr) \
|
||||
(tclIntPlatStubsPtr->tclpCreateProcess)(interp, argc, argv, inputFile, outputFile, errorFile, pidPtr) /* 15 */
|
||||
#endif
|
||||
#ifndef TclpCreateTempFile
|
||||
#define TclpCreateTempFile(contents, namePtr) \
|
||||
(tclIntPlatStubsPtr->tclpCreateTempFile)(contents, namePtr) /* 16 */
|
||||
#endif
|
||||
#ifndef TclpGetTZName
|
||||
#define TclpGetTZName() \
|
||||
(tclIntPlatStubsPtr->tclpGetTZName)() /* 17 */
|
||||
#endif
|
||||
#ifndef TclpMakeFile
|
||||
#define TclpMakeFile(channel, direction) \
|
||||
(tclIntPlatStubsPtr->tclpMakeFile)(channel, direction) /* 18 */
|
||||
#endif
|
||||
#ifndef TclpOpenFile
|
||||
#define TclpOpenFile(fname, mode) \
|
||||
(tclIntPlatStubsPtr->tclpOpenFile)(fname, mode) /* 19 */
|
||||
#endif
|
||||
#endif /* __WIN32__ */
|
||||
#ifdef MAC_TCL
|
||||
#ifndef TclpCheckStackSpace
|
||||
#define TclpCheckStackSpace() \
|
||||
(tclIntPlatStubsPtr->tclpCheckStackSpace)() /* 0 */
|
||||
#endif
|
||||
#ifndef TclpSysAlloc
|
||||
#define TclpSysAlloc(size, isBin) \
|
||||
(tclIntPlatStubsPtr->tclpSysAlloc)(size, isBin) /* 1 */
|
||||
(tclIntPlatStubsPtr->tclpSysAlloc)(size, isBin) /* 0 */
|
||||
#endif
|
||||
#ifndef TclpSysFree
|
||||
#define TclpSysFree(ptr) \
|
||||
(tclIntPlatStubsPtr->tclpSysFree)(ptr) /* 2 */
|
||||
(tclIntPlatStubsPtr->tclpSysFree)(ptr) /* 1 */
|
||||
#endif
|
||||
#ifndef TclpSysRealloc
|
||||
#define TclpSysRealloc(cp, size) \
|
||||
(tclIntPlatStubsPtr->tclpSysRealloc)(cp, size) /* 3 */
|
||||
(tclIntPlatStubsPtr->tclpSysRealloc)(cp, size) /* 2 */
|
||||
#endif
|
||||
#ifndef TclPlatformExit
|
||||
#define TclPlatformExit(status) \
|
||||
(tclIntPlatStubsPtr->tclPlatformExit)(status) /* 4 */
|
||||
(tclIntPlatStubsPtr->tclPlatformExit)(status) /* 3 */
|
||||
#endif
|
||||
#ifndef FSpGetDefaultDir
|
||||
#define FSpGetDefaultDir(theSpec) \
|
||||
(tclIntPlatStubsPtr->fSpGetDefaultDir)(theSpec) /* 4 */
|
||||
#endif
|
||||
#ifndef FSpSetDefaultDir
|
||||
#define FSpSetDefaultDir(theSpec) \
|
||||
(tclIntPlatStubsPtr->fSpSetDefaultDir)(theSpec) /* 5 */
|
||||
#endif
|
||||
#ifndef FSpFindFolder
|
||||
#define FSpFindFolder(vRefNum, folderType, createFolder, spec) \
|
||||
(tclIntPlatStubsPtr->fSpFindFolder)(vRefNum, folderType, createFolder, spec) /* 6 */
|
||||
#endif
|
||||
#ifndef GetGlobalMouse
|
||||
#define GetGlobalMouse(mouse) \
|
||||
(tclIntPlatStubsPtr->getGlobalMouse)(mouse) /* 7 */
|
||||
#endif
|
||||
#ifndef FSpGetDirectoryID
|
||||
#define FSpGetDirectoryID(spec, theDirID, isDirectory) \
|
||||
(tclIntPlatStubsPtr->fSpGetDirectoryID)(spec, theDirID, isDirectory) /* 8 */
|
||||
#endif
|
||||
#ifndef FSpOpenResFileCompat
|
||||
#define FSpOpenResFileCompat(spec, permission) \
|
||||
(tclIntPlatStubsPtr->fSpOpenResFileCompat)(spec, permission) /* 9 */
|
||||
#endif
|
||||
#ifndef FSpCreateResFileCompat
|
||||
#define FSpCreateResFileCompat(spec, creator, fileType, scriptTag) \
|
||||
(tclIntPlatStubsPtr->fSpCreateResFileCompat)(spec, creator, fileType, scriptTag) /* 10 */
|
||||
#endif
|
||||
#ifndef FSpLocationFromPath
|
||||
#define FSpLocationFromPath(length, path, theSpec) \
|
||||
(tclIntPlatStubsPtr->fSpLocationFromPath)(length, path, theSpec) /* 11 */
|
||||
#endif
|
||||
#ifndef FSpPathFromLocation
|
||||
#define FSpPathFromLocation(theSpec, length, fullPath) \
|
||||
(tclIntPlatStubsPtr->fSpPathFromLocation)(theSpec, length, fullPath) /* 12 */
|
||||
#endif
|
||||
#ifndef TclMacExitHandler
|
||||
#define TclMacExitHandler() \
|
||||
(tclIntPlatStubsPtr->tclMacExitHandler)() /* 13 */
|
||||
#endif
|
||||
#ifndef TclMacInitExitToShell
|
||||
#define TclMacInitExitToShell(usePatch) \
|
||||
(tclIntPlatStubsPtr->tclMacInitExitToShell)(usePatch) /* 14 */
|
||||
#endif
|
||||
#ifndef TclMacInstallExitToShellPatch
|
||||
#define TclMacInstallExitToShellPatch(newProc) \
|
||||
(tclIntPlatStubsPtr->tclMacInstallExitToShellPatch)(newProc) /* 15 */
|
||||
#endif
|
||||
#ifndef TclMacOSErrorToPosixError
|
||||
#define TclMacOSErrorToPosixError(error) \
|
||||
(tclIntPlatStubsPtr->tclMacOSErrorToPosixError)(error) /* 16 */
|
||||
#endif
|
||||
#ifndef TclMacRemoveTimer
|
||||
#define TclMacRemoveTimer(timerToken) \
|
||||
(tclIntPlatStubsPtr->tclMacRemoveTimer)(timerToken) /* 17 */
|
||||
#endif
|
||||
#ifndef TclMacStartTimer
|
||||
#define TclMacStartTimer(ms) \
|
||||
(tclIntPlatStubsPtr->tclMacStartTimer)(ms) /* 18 */
|
||||
#endif
|
||||
#ifndef TclMacTimerExpired
|
||||
#define TclMacTimerExpired(timerToken) \
|
||||
(tclIntPlatStubsPtr->tclMacTimerExpired)(timerToken) /* 19 */
|
||||
#endif
|
||||
#ifndef TclMacRegisterResourceFork
|
||||
#define TclMacRegisterResourceFork(fileRef, tokenPtr, insert) \
|
||||
(tclIntPlatStubsPtr->tclMacRegisterResourceFork)(fileRef, tokenPtr, insert) /* 20 */
|
||||
#endif
|
||||
#ifndef TclMacUnRegisterResourceFork
|
||||
#define TclMacUnRegisterResourceFork(tokenPtr, resultPtr) \
|
||||
(tclIntPlatStubsPtr->tclMacUnRegisterResourceFork)(tokenPtr, resultPtr) /* 21 */
|
||||
#endif
|
||||
#ifndef TclMacCreateEnv
|
||||
#define TclMacCreateEnv() \
|
||||
(tclIntPlatStubsPtr->tclMacCreateEnv)() /* 22 */
|
||||
#endif
|
||||
#ifndef TclMacFOpenHack
|
||||
#define TclMacFOpenHack(path, mode) \
|
||||
(tclIntPlatStubsPtr->tclMacFOpenHack)(path, mode) /* 23 */
|
||||
#endif
|
||||
#ifndef TclMacReadlink
|
||||
#define TclMacReadlink(path, buf, size) \
|
||||
(tclIntPlatStubsPtr->tclMacReadlink)(path, buf, size) /* 24 */
|
||||
#endif
|
||||
#ifndef TclMacChmod
|
||||
#define TclMacChmod(path, mode) \
|
||||
(tclIntPlatStubsPtr->tclMacChmod)(path, mode) /* 25 */
|
||||
#endif
|
||||
#endif /* MAC_TCL */
|
||||
|
||||
|
||||
+401
-11
@@ -7,7 +7,7 @@
|
||||
* Copyright (c) 1998-1999 by Scriptics Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* RCS: @(#) $Id: tclIntPlatStubs.c,v 1.1 1999/03/03 00:38:41 stanton Exp $
|
||||
* RCS: @(#) $Id: tclIntPlatStubs.c,v 1.2.4.2 1999/03/10 05:50:27 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
@@ -25,6 +25,97 @@
|
||||
* Exported stub functions:
|
||||
*/
|
||||
|
||||
#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
|
||||
/* Slot 0 */
|
||||
void
|
||||
TclGetAndDetachPids(interp, chan)
|
||||
Tcl_Interp * interp;
|
||||
Tcl_Channel chan;
|
||||
{
|
||||
(tclIntPlatStubsPtr->tclGetAndDetachPids)(interp, chan);
|
||||
}
|
||||
|
||||
/* Slot 1 */
|
||||
int
|
||||
TclpCloseFile(file)
|
||||
TclFile file;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclpCloseFile)(file);
|
||||
}
|
||||
|
||||
/* Slot 2 */
|
||||
Tcl_Channel
|
||||
TclpCreateCommandChannel(readFile, writeFile, errorFile, numPids, pidPtr)
|
||||
TclFile readFile;
|
||||
TclFile writeFile;
|
||||
TclFile errorFile;
|
||||
int numPids;
|
||||
Tcl_Pid * pidPtr;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclpCreateCommandChannel)(readFile, writeFile, errorFile, numPids, pidPtr);
|
||||
}
|
||||
|
||||
/* Slot 3 */
|
||||
int
|
||||
TclpCreatePipe(readPipe, writePipe)
|
||||
TclFile * readPipe;
|
||||
TclFile * writePipe;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclpCreatePipe)(readPipe, writePipe);
|
||||
}
|
||||
|
||||
/* Slot 4 */
|
||||
int
|
||||
TclpCreateProcess(interp, argc, argv, inputFile, outputFile, errorFile, pidPtr)
|
||||
Tcl_Interp * interp;
|
||||
int argc;
|
||||
char ** argv;
|
||||
TclFile inputFile;
|
||||
TclFile outputFile;
|
||||
TclFile errorFile;
|
||||
Tcl_Pid * pidPtr;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclpCreateProcess)(interp, argc, argv, inputFile, outputFile, errorFile, pidPtr);
|
||||
}
|
||||
|
||||
/* Slot 5 */
|
||||
TclFile
|
||||
TclpCreateTempFile(contents, namePtr)
|
||||
char * contents;
|
||||
Tcl_DString * namePtr;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclpCreateTempFile)(contents, namePtr);
|
||||
}
|
||||
|
||||
/* Slot 6 */
|
||||
TclFile
|
||||
TclpMakeFile(channel, direction)
|
||||
Tcl_Channel channel;
|
||||
int direction;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclpMakeFile)(channel, direction);
|
||||
}
|
||||
|
||||
/* Slot 7 */
|
||||
TclFile
|
||||
TclpOpenFile(fname, mode)
|
||||
char * fname;
|
||||
int mode;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclpOpenFile)(fname, mode);
|
||||
}
|
||||
|
||||
/* Slot 8 */
|
||||
int
|
||||
TclUnixWaitForFile(fd, mask, timeout)
|
||||
int fd;
|
||||
int mask;
|
||||
int timeout;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclUnixWaitForFile)(fd, mask, timeout);
|
||||
}
|
||||
|
||||
#endif /* UNIX */
|
||||
#ifdef __WIN32__
|
||||
/* Slot 0 */
|
||||
void
|
||||
@@ -98,16 +189,121 @@ TclWinSetSockOpt(s, level, optname, optval, optlen)
|
||||
return (tclIntPlatStubsPtr->tclWinSetSockOpt)(s, level, optname, optval, optlen);
|
||||
}
|
||||
|
||||
/* Slot 8 */
|
||||
unsigned long
|
||||
TclpGetPid(pid)
|
||||
Tcl_Pid pid;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclpGetPid)(pid);
|
||||
}
|
||||
|
||||
/* Slot 9 */
|
||||
int
|
||||
TclWinGetPlatformId()
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclWinGetPlatformId)();
|
||||
}
|
||||
|
||||
/* Slot 10 */
|
||||
int
|
||||
TclWinSynchSpawn(args, type, trans, pidPtr)
|
||||
void * args;
|
||||
int type;
|
||||
void ** trans;
|
||||
Tcl_Pid * pidPtr;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclWinSynchSpawn)(args, type, trans, pidPtr);
|
||||
}
|
||||
|
||||
/* Slot 11 */
|
||||
void
|
||||
TclGetAndDetachPids(interp, chan)
|
||||
Tcl_Interp * interp;
|
||||
Tcl_Channel chan;
|
||||
{
|
||||
(tclIntPlatStubsPtr->tclGetAndDetachPids)(interp, chan);
|
||||
}
|
||||
|
||||
/* Slot 12 */
|
||||
int
|
||||
TclpCloseFile(file)
|
||||
TclFile file;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclpCloseFile)(file);
|
||||
}
|
||||
|
||||
/* Slot 13 */
|
||||
Tcl_Channel
|
||||
TclpCreateCommandChannel(readFile, writeFile, errorFile, numPids, pidPtr)
|
||||
TclFile readFile;
|
||||
TclFile writeFile;
|
||||
TclFile errorFile;
|
||||
int numPids;
|
||||
Tcl_Pid * pidPtr;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclpCreateCommandChannel)(readFile, writeFile, errorFile, numPids, pidPtr);
|
||||
}
|
||||
|
||||
/* Slot 14 */
|
||||
int
|
||||
TclpCreatePipe(readPipe, writePipe)
|
||||
TclFile * readPipe;
|
||||
TclFile * writePipe;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclpCreatePipe)(readPipe, writePipe);
|
||||
}
|
||||
|
||||
/* Slot 15 */
|
||||
int
|
||||
TclpCreateProcess(interp, argc, argv, inputFile, outputFile, errorFile, pidPtr)
|
||||
Tcl_Interp * interp;
|
||||
int argc;
|
||||
char ** argv;
|
||||
TclFile inputFile;
|
||||
TclFile outputFile;
|
||||
TclFile errorFile;
|
||||
Tcl_Pid * pidPtr;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclpCreateProcess)(interp, argc, argv, inputFile, outputFile, errorFile, pidPtr);
|
||||
}
|
||||
|
||||
/* Slot 16 */
|
||||
TclFile
|
||||
TclpCreateTempFile(contents, namePtr)
|
||||
char * contents;
|
||||
Tcl_DString * namePtr;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclpCreateTempFile)(contents, namePtr);
|
||||
}
|
||||
|
||||
/* Slot 17 */
|
||||
char *
|
||||
TclpGetTZName()
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclpGetTZName)();
|
||||
}
|
||||
|
||||
/* Slot 18 */
|
||||
TclFile
|
||||
TclpMakeFile(channel, direction)
|
||||
Tcl_Channel channel;
|
||||
int direction;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclpMakeFile)(channel, direction);
|
||||
}
|
||||
|
||||
/* Slot 19 */
|
||||
TclFile
|
||||
TclpOpenFile(fname, mode)
|
||||
char * fname;
|
||||
int mode;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclpOpenFile)(fname, mode);
|
||||
}
|
||||
|
||||
#endif /* __WIN32__ */
|
||||
#ifdef MAC_TCL
|
||||
/* Slot 0 */
|
||||
int
|
||||
TclpCheckStackSpace()
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclpCheckStackSpace)();
|
||||
}
|
||||
|
||||
/* Slot 1 */
|
||||
VOID *
|
||||
TclpSysAlloc(size, isBin)
|
||||
long size;
|
||||
@@ -116,7 +312,7 @@ TclpSysAlloc(size, isBin)
|
||||
return (tclIntPlatStubsPtr->tclpSysAlloc)(size, isBin);
|
||||
}
|
||||
|
||||
/* Slot 2 */
|
||||
/* Slot 1 */
|
||||
void
|
||||
TclpSysFree(ptr)
|
||||
VOID * ptr;
|
||||
@@ -124,7 +320,7 @@ TclpSysFree(ptr)
|
||||
(tclIntPlatStubsPtr->tclpSysFree)(ptr);
|
||||
}
|
||||
|
||||
/* Slot 3 */
|
||||
/* Slot 2 */
|
||||
VOID *
|
||||
TclpSysRealloc(cp, size)
|
||||
VOID * cp;
|
||||
@@ -133,7 +329,7 @@ TclpSysRealloc(cp, size)
|
||||
return (tclIntPlatStubsPtr->tclpSysRealloc)(cp, size);
|
||||
}
|
||||
|
||||
/* Slot 4 */
|
||||
/* Slot 3 */
|
||||
void
|
||||
TclPlatformExit(status)
|
||||
int status;
|
||||
@@ -141,6 +337,200 @@ TclPlatformExit(status)
|
||||
(tclIntPlatStubsPtr->tclPlatformExit)(status);
|
||||
}
|
||||
|
||||
/* Slot 4 */
|
||||
int
|
||||
FSpGetDefaultDir(theSpec)
|
||||
FSSpecPtr theSpec;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->fSpGetDefaultDir)(theSpec);
|
||||
}
|
||||
|
||||
/* Slot 5 */
|
||||
int
|
||||
FSpSetDefaultDir(theSpec)
|
||||
FSSpecPtr theSpec;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->fSpSetDefaultDir)(theSpec);
|
||||
}
|
||||
|
||||
/* Slot 6 */
|
||||
OSErr
|
||||
FSpFindFolder(vRefNum, folderType, createFolder, spec)
|
||||
short vRefNum;
|
||||
OSType folderType;
|
||||
Boolean createFolder;
|
||||
FSSpec * spec;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->fSpFindFolder)(vRefNum, folderType, createFolder, spec);
|
||||
}
|
||||
|
||||
/* Slot 7 */
|
||||
void
|
||||
GetGlobalMouse(mouse)
|
||||
Point * mouse;
|
||||
{
|
||||
(tclIntPlatStubsPtr->getGlobalMouse)(mouse);
|
||||
}
|
||||
|
||||
/* Slot 8 */
|
||||
pascal OSErr
|
||||
FSpGetDirectoryID(spec, theDirID, isDirectory)
|
||||
const FSSpec * spec;
|
||||
long * theDirID;
|
||||
Boolean * isDirectory;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->fSpGetDirectoryID)(spec, theDirID, isDirectory);
|
||||
}
|
||||
|
||||
/* Slot 9 */
|
||||
pascal short
|
||||
FSpOpenResFileCompat(spec, permission)
|
||||
const FSSpec * spec;
|
||||
SignedByte permission;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->fSpOpenResFileCompat)(spec, permission);
|
||||
}
|
||||
|
||||
/* Slot 10 */
|
||||
pascal void
|
||||
FSpCreateResFileCompat(spec, creator, fileType, scriptTag)
|
||||
const FSSpec * spec;
|
||||
OSType creator;
|
||||
OSType fileType;
|
||||
ScriptCode scriptTag;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->fSpCreateResFileCompat)(spec, creator, fileType, scriptTag);
|
||||
}
|
||||
|
||||
/* Slot 11 */
|
||||
int
|
||||
FSpLocationFromPath(length, path, theSpec)
|
||||
int length;
|
||||
CONST char * path;
|
||||
FSSpecPtr theSpec;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->fSpLocationFromPath)(length, path, theSpec);
|
||||
}
|
||||
|
||||
/* Slot 12 */
|
||||
OSErr
|
||||
FSpPathFromLocation(theSpec, length, fullPath)
|
||||
FSSpecPtr theSpec;
|
||||
int * length;
|
||||
Handle * fullPath;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->fSpPathFromLocation)(theSpec, length, fullPath);
|
||||
}
|
||||
|
||||
/* Slot 13 */
|
||||
void
|
||||
TclMacExitHandler()
|
||||
{
|
||||
(tclIntPlatStubsPtr->tclMacExitHandler)();
|
||||
}
|
||||
|
||||
/* Slot 14 */
|
||||
void
|
||||
TclMacInitExitToShell(usePatch)
|
||||
int usePatch;
|
||||
{
|
||||
(tclIntPlatStubsPtr->tclMacInitExitToShell)(usePatch);
|
||||
}
|
||||
|
||||
/* Slot 15 */
|
||||
OSErr
|
||||
TclMacInstallExitToShellPatch(newProc)
|
||||
ExitToShellProcPtr newProc;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclMacInstallExitToShellPatch)(newProc);
|
||||
}
|
||||
|
||||
/* Slot 16 */
|
||||
int
|
||||
TclMacOSErrorToPosixError(error)
|
||||
int error;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclMacOSErrorToPosixError)(error);
|
||||
}
|
||||
|
||||
/* Slot 17 */
|
||||
void
|
||||
TclMacRemoveTimer(timerToken)
|
||||
void * timerToken;
|
||||
{
|
||||
(tclIntPlatStubsPtr->tclMacRemoveTimer)(timerToken);
|
||||
}
|
||||
|
||||
/* Slot 18 */
|
||||
void *
|
||||
TclMacStartTimer(ms)
|
||||
long ms;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclMacStartTimer)(ms);
|
||||
}
|
||||
|
||||
/* Slot 19 */
|
||||
int
|
||||
TclMacTimerExpired(timerToken)
|
||||
void * timerToken;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclMacTimerExpired)(timerToken);
|
||||
}
|
||||
|
||||
/* Slot 20 */
|
||||
int
|
||||
TclMacRegisterResourceFork(fileRef, tokenPtr, insert)
|
||||
short fileRef;
|
||||
Tcl_Obj * tokenPtr;
|
||||
int insert;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclMacRegisterResourceFork)(fileRef, tokenPtr, insert);
|
||||
}
|
||||
|
||||
/* Slot 21 */
|
||||
short
|
||||
TclMacUnRegisterResourceFork(tokenPtr, resultPtr)
|
||||
char * tokenPtr;
|
||||
Tcl_Obj * resultPtr;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclMacUnRegisterResourceFork)(tokenPtr, resultPtr);
|
||||
}
|
||||
|
||||
/* Slot 22 */
|
||||
int
|
||||
TclMacCreateEnv()
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclMacCreateEnv)();
|
||||
}
|
||||
|
||||
/* Slot 23 */
|
||||
FILE *
|
||||
TclMacFOpenHack(path, mode)
|
||||
const char * path;
|
||||
const char * mode;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclMacFOpenHack)(path, mode);
|
||||
}
|
||||
|
||||
/* Slot 24 */
|
||||
int
|
||||
TclMacReadlink(path, buf, size)
|
||||
char * path;
|
||||
char * buf;
|
||||
int size;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclMacReadlink)(path, buf, size);
|
||||
}
|
||||
|
||||
/* Slot 25 */
|
||||
int
|
||||
TclMacChmod(path, mode)
|
||||
char * path;
|
||||
int mode;
|
||||
{
|
||||
return (tclIntPlatStubsPtr->tclMacChmod)(path, mode);
|
||||
}
|
||||
|
||||
#endif /* MAC_TCL */
|
||||
|
||||
/* !END!: Do not edit above this line. */
|
||||
|
||||
+148
-344
File diff suppressed because it is too large
Load Diff
+2
-1
@@ -9,7 +9,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclObj.c,v 1.3 1998/10/05 22:32:09 escoffon Exp $
|
||||
* RCS: @(#) $Id: tclObj.c,v 1.3.4.1 1999/03/03 00:38:41 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
@@ -129,6 +129,7 @@ InitTypeTable()
|
||||
|
||||
Tcl_InitHashTable(&typeTable, TCL_STRING_KEYS);
|
||||
Tcl_RegisterObjType(&tclBooleanType);
|
||||
Tcl_RegisterObjType(&tclByteArrayType);
|
||||
Tcl_RegisterObjType(&tclDoubleType);
|
||||
Tcl_RegisterObjType(&tclIntType);
|
||||
Tcl_RegisterObjType(&tclStringType);
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
/*
|
||||
* tclPanic.c --
|
||||
*
|
||||
* Source code for the "Tcl_Panic" library procedure for Tcl;
|
||||
* individual applications will probably override this with
|
||||
* an application-specific panic procedure.
|
||||
*
|
||||
* Copyright (c) 1988-1993 The Regents of the University of California.
|
||||
* Copyright (c) 1994 Sun Microsystems, Inc.
|
||||
* Copyright (c) 1998-1999 by Scriptics Corporation.
|
||||
*
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclPanic.c,v 1.1 1999/03/03 00:38:42 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
|
||||
/*
|
||||
* The panicProc variable contains a pointer to an application
|
||||
* specific panic procedure.
|
||||
*/
|
||||
|
||||
void (*panicProc) _ANSI_ARGS_(TCL_VARARGS(char *,format)) = NULL;
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_SetPanicProc --
|
||||
*
|
||||
* Replace the default panic behavior with the specified functiion.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* Sets the panicProc variable.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void
|
||||
Tcl_SetPanicProc(proc)
|
||||
void (*proc) _ANSI_ARGS_(TCL_VARARGS(char *,format));
|
||||
{
|
||||
panicProc = proc;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_PanicVA --
|
||||
*
|
||||
* Print an error message and kill the process.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* The process dies, entering the debugger if possible.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void
|
||||
Tcl_PanicVA (format, argList)
|
||||
char *format; /* Format string, suitable for passing to
|
||||
* fprintf. */
|
||||
va_list argList; /* Variable argument list. */
|
||||
{
|
||||
char *arg1, *arg2, *arg3, *arg4; /* Additional arguments (variable in
|
||||
* number) to pass to fprintf. */
|
||||
char *arg5, *arg6, *arg7, *arg8;
|
||||
|
||||
arg1 = va_arg(argList, char *);
|
||||
arg2 = va_arg(argList, char *);
|
||||
arg3 = va_arg(argList, char *);
|
||||
arg4 = va_arg(argList, char *);
|
||||
arg5 = va_arg(argList, char *);
|
||||
arg6 = va_arg(argList, char *);
|
||||
arg7 = va_arg(argList, char *);
|
||||
arg8 = va_arg(argList, char *);
|
||||
|
||||
if (panicProc != NULL) {
|
||||
(void) (*panicProc)(format, arg1, arg2, arg3, arg4,
|
||||
arg5, arg6, arg7, arg8);
|
||||
} else {
|
||||
(void) fprintf(stderr, format, arg1, arg2, arg3, arg4, arg5, arg6,
|
||||
arg7, arg8);
|
||||
(void) fprintf(stderr, "\n");
|
||||
(void) fflush(stderr);
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_Panic --
|
||||
*
|
||||
* Print an error message and kill the process.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* The process dies, entering the debugger if possible.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* VARARGS ARGSUSED */
|
||||
void
|
||||
Tcl_Panic TCL_VARARGS_DEF(char *,arg1)
|
||||
{
|
||||
va_list argList;
|
||||
char *format;
|
||||
|
||||
format = TCL_VARARGS_START(char *,arg1,argList);
|
||||
Tcl_PanicVA(format, argList);
|
||||
va_end (argList);
|
||||
}
|
||||
+208
-6
@@ -9,7 +9,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclPkg.c,v 1.2 1998/09/14 18:40:01 stanton Exp $
|
||||
* RCS: @(#) $Id: tclPkg.c,v 1.2.4.1 1999/03/03 00:38:42 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
@@ -43,6 +43,7 @@ typedef struct Package {
|
||||
* exist in this interpreter yet. */
|
||||
PkgAvail *availPtr; /* First in list of all available versions
|
||||
* of this package. */
|
||||
ClientData clientData; /* Client data. */
|
||||
} Package;
|
||||
|
||||
/*
|
||||
@@ -59,7 +60,7 @@ static Package * FindPackage _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_PkgProvide --
|
||||
* Tcl_PkgProvide / Tcl_PkgProvideEx --
|
||||
*
|
||||
* This procedure is invoked to declare that a particular version
|
||||
* of a particular package is now present in an interpreter. There
|
||||
@@ -85,6 +86,18 @@ Tcl_PkgProvide(interp, name, version)
|
||||
* available. */
|
||||
char *name; /* Name of package. */
|
||||
char *version; /* Version string for package. */
|
||||
{
|
||||
return Tcl_PkgProvideEx(interp, name, version, (ClientData) NULL);
|
||||
}
|
||||
|
||||
int
|
||||
Tcl_PkgProvideEx(interp, name, version, clientData)
|
||||
Tcl_Interp *interp; /* Interpreter in which package is now
|
||||
* available. */
|
||||
char *name; /* Name of package. */
|
||||
char *version; /* Version string for package. */
|
||||
ClientData clientData; /* clientdata for this package (normally
|
||||
* used for C callback function table) */
|
||||
{
|
||||
Package *pkgPtr;
|
||||
|
||||
@@ -92,6 +105,7 @@ Tcl_PkgProvide(interp, name, version)
|
||||
if (pkgPtr->version == NULL) {
|
||||
pkgPtr->version = ckalloc((unsigned) (strlen(version) + 1));
|
||||
strcpy(pkgPtr->version, version);
|
||||
pkgPtr->clientData = clientData;
|
||||
return TCL_OK;
|
||||
}
|
||||
if (ComparePkgVersions(pkgPtr->version, version, (int *) NULL) == 0) {
|
||||
@@ -105,7 +119,7 @@ Tcl_PkgProvide(interp, name, version)
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_PkgRequire --
|
||||
* Tcl_PkgRequire / Tcl_PkgRequireEx --
|
||||
*
|
||||
* This procedure is called by code that depends on a particular
|
||||
* version of a particular package. If the package is not already
|
||||
@@ -142,6 +156,25 @@ Tcl_PkgRequire(interp, name, version, exact)
|
||||
int exact; /* Non-zero means that only the particular
|
||||
* version given is acceptable. Zero means
|
||||
* use the latest compatible version. */
|
||||
{
|
||||
return Tcl_PkgRequireEx(interp, name, version, exact, (ClientData *) NULL);
|
||||
}
|
||||
|
||||
char *
|
||||
Tcl_PkgRequireEx(interp, name, version, exact, clientDataPtr)
|
||||
Tcl_Interp *interp; /* Interpreter in which package is now
|
||||
* available. */
|
||||
char *name; /* Name of desired package. */
|
||||
char *version; /* Version string for desired version;
|
||||
* NULL means use the latest version
|
||||
* available. */
|
||||
int exact; /* Non-zero means that only the particular
|
||||
* version given is acceptable. Zero means
|
||||
* use the latest compatible version. */
|
||||
ClientData *clientDataPtr; /* Used to return the client data for this
|
||||
* package. If it is NULL then the client
|
||||
* data is not returned. This is unchanged
|
||||
* if this call fails for any reason. */
|
||||
{
|
||||
Package *pkgPtr;
|
||||
PkgAvail *availPtr, *bestPtr;
|
||||
@@ -149,6 +182,22 @@ Tcl_PkgRequire(interp, name, version, exact)
|
||||
int code, satisfies, result, pass;
|
||||
Tcl_DString command;
|
||||
|
||||
/*
|
||||
* If an attempt is being made to load this into a standalong executable
|
||||
* on a platform where backlinking is not supported then this must be
|
||||
* a shared version of Tcl (Otherwise the load would have failed).
|
||||
* Detect this situation by checking that this library has been correctly
|
||||
* initialised. If it has not been then return immediately as nothing will
|
||||
* work.
|
||||
*/
|
||||
|
||||
if (!tclEmptyStringRep) {
|
||||
Tcl_AppendResult(interp, "Cannot load package \"", name,
|
||||
"\" in standalone executable: This package is not ",
|
||||
"compiled with stub support", NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* It can take up to three passes to find the package: one pass to
|
||||
* run the "package unknown" script, one to run the "package ifneeded"
|
||||
@@ -253,15 +302,23 @@ Tcl_PkgRequire(interp, name, version, exact)
|
||||
}
|
||||
|
||||
/*
|
||||
* At this point we now that the package is present. Make sure that the
|
||||
* At this point we know that the package is present. Make sure that the
|
||||
* provided version meets the current requirement.
|
||||
*/
|
||||
|
||||
if (version == NULL) {
|
||||
if (clientDataPtr) {
|
||||
*clientDataPtr = pkgPtr->clientData;
|
||||
}
|
||||
|
||||
return pkgPtr->version;
|
||||
}
|
||||
result = ComparePkgVersions(pkgPtr->version, version, &satisfies);
|
||||
if ((satisfies && !exact) || (result == 0)) {
|
||||
if (clientDataPtr) {
|
||||
*clientDataPtr = pkgPtr->clientData;
|
||||
}
|
||||
|
||||
return pkgPtr->version;
|
||||
}
|
||||
Tcl_AppendResult(interp, "version conflict for package \"",
|
||||
@@ -270,6 +327,122 @@ Tcl_PkgRequire(interp, name, version, exact)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_PkgPresent / Tcl_PkgPresentEx --
|
||||
*
|
||||
* Checks to see whether the specified package is present. If it
|
||||
* is not then no additional action is taken.
|
||||
*
|
||||
* Results:
|
||||
* If successful, returns the version string for the currently
|
||||
* provided version of the package, which may be different from
|
||||
* the "version" argument. If the caller's requirements
|
||||
* cannot be met (e.g. the version requested conflicts with
|
||||
* a currently provided version), NULL is returned and an error
|
||||
* message is left in interp->result.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
char *
|
||||
Tcl_PkgPresent(interp, name, version, exact)
|
||||
Tcl_Interp *interp; /* Interpreter in which package is now
|
||||
* available. */
|
||||
char *name; /* Name of desired package. */
|
||||
char *version; /* Version string for desired version;
|
||||
* NULL means use the latest version
|
||||
* available. */
|
||||
int exact; /* Non-zero means that only the particular
|
||||
* version given is acceptable. Zero means
|
||||
* use the latest compatible version. */
|
||||
{
|
||||
return Tcl_PkgPresentEx(interp, name, version, exact, (ClientData *) NULL);
|
||||
}
|
||||
|
||||
char *
|
||||
Tcl_PkgPresentEx(interp, name, version, exact, clientDataPtr)
|
||||
Tcl_Interp *interp; /* Interpreter in which package is now
|
||||
* available. */
|
||||
char *name; /* Name of desired package. */
|
||||
char *version; /* Version string for desired version;
|
||||
* NULL means use the latest version
|
||||
* available. */
|
||||
int exact; /* Non-zero means that only the particular
|
||||
* version given is acceptable. Zero means
|
||||
* use the latest compatible version. */
|
||||
ClientData *clientDataPtr; /* Used to return the client data for this
|
||||
* package. If it is NULL then the client
|
||||
* data is not returned. This is unchanged
|
||||
* if this call fails for any reason. */
|
||||
{
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
Tcl_HashEntry *hPtr;
|
||||
Package *pkgPtr;
|
||||
int satisfies, result;
|
||||
|
||||
/*
|
||||
* If an attempt is being made to load this into a standalone executable
|
||||
* on a platform where backlinking is not supported then this must be
|
||||
* a shared version of Tcl (Otherwise the load would have failed).
|
||||
* Detect this situation by checking that this library has been correctly
|
||||
* initialised. If it has not been then return immediately as nothing will
|
||||
* work.
|
||||
*/
|
||||
|
||||
if (!tclEmptyStringRep) {
|
||||
Tcl_AppendResult(interp, "Cannot load package \"", name,
|
||||
"\" in standalone executable: This package is not ",
|
||||
"compiled with stub support", NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
hPtr = Tcl_FindHashEntry(&iPtr->packageTable, name);
|
||||
if (hPtr) {
|
||||
pkgPtr = (Package *) Tcl_GetHashValue(hPtr);
|
||||
if (pkgPtr->version != NULL) {
|
||||
|
||||
/*
|
||||
* At this point we know that the package is present. Make sure
|
||||
* that the provided version meets the current requirement.
|
||||
*/
|
||||
|
||||
if (version == NULL) {
|
||||
if (clientDataPtr) {
|
||||
*clientDataPtr = pkgPtr->clientData;
|
||||
}
|
||||
|
||||
return pkgPtr->version;
|
||||
}
|
||||
result = ComparePkgVersions(pkgPtr->version, version, &satisfies);
|
||||
if ((satisfies && !exact) || (result == 0)) {
|
||||
if (clientDataPtr) {
|
||||
*clientDataPtr = pkgPtr->clientData;
|
||||
}
|
||||
|
||||
return pkgPtr->version;
|
||||
}
|
||||
Tcl_AppendResult(interp, "version conflict for package \"",
|
||||
name, "\": have ", pkgPtr->version,
|
||||
", need ", version, (char *) NULL);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (version != NULL) {
|
||||
Tcl_AppendResult(interp, "package ", name, " ", version,
|
||||
" is not present", (char *) NULL);
|
||||
} else {
|
||||
Tcl_AppendResult(interp, "package ", name, " is not present",
|
||||
(char *) NULL);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
@@ -394,7 +567,35 @@ Tcl_PackageCmd(dummy, interp, argc, argv)
|
||||
Tcl_AppendElement(interp, Tcl_GetHashKey(tablePtr, hPtr));
|
||||
}
|
||||
}
|
||||
} else if ((c == 'p') && (strncmp(argv[1], "provide", length) == 0)) {
|
||||
} else if ((c == 'p') && (strncmp(argv[1], "present", length) == 0)
|
||||
&& (length >=3)) {
|
||||
if (argc < 3) {
|
||||
presentSyntax:
|
||||
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
|
||||
" present ?-exact? package ?version?\"", (char *) NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if ((argv[2][0] == '-') && (strcmp(argv[2], "-exact") == 0)) {
|
||||
exact = 1;
|
||||
} else {
|
||||
exact = 0;
|
||||
}
|
||||
version = NULL;
|
||||
if (argc == (4+exact)) {
|
||||
version = argv[3+exact];
|
||||
if (CheckVersion(interp, version) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
} else if ((argc != 3) || exact) {
|
||||
goto presentSyntax;
|
||||
}
|
||||
version = Tcl_PkgPresent(interp, argv[2+exact], version, exact);
|
||||
if (version == NULL) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_SetResult(interp, version, TCL_VOLATILE);
|
||||
} else if ((c == 'p') && (strncmp(argv[1], "provide", length) == 0)
|
||||
&& (length >=3)) {
|
||||
if ((argc != 3) && (argc != 4)) {
|
||||
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
|
||||
" provide package ?version?\"", (char *) NULL);
|
||||
@@ -506,7 +707,7 @@ Tcl_PackageCmd(dummy, interp, argc, argv)
|
||||
} else {
|
||||
Tcl_AppendResult(interp, "bad option \"", argv[1],
|
||||
"\": should be forget, ifneeded, names, ",
|
||||
"provide, require, unknown, vcompare, ",
|
||||
"present, provide, require, unknown, vcompare, ",
|
||||
"versions, or vsatisfies", (char *) NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
@@ -547,6 +748,7 @@ FindPackage(interp, name)
|
||||
pkgPtr = (Package *) ckalloc(sizeof(Package));
|
||||
pkgPtr->version = NULL;
|
||||
pkgPtr->availPtr = NULL;
|
||||
pkgPtr->clientData = NULL;
|
||||
Tcl_SetHashValue(hPtr, pkgPtr);
|
||||
} else {
|
||||
pkgPtr = (Package *) Tcl_GetHashValue(hPtr);
|
||||
|
||||
+75
-24
@@ -5,27 +5,54 @@
|
||||
* Exported function declarations:
|
||||
*/
|
||||
|
||||
#if !defined(__WIN32__) && !defined(MAC_TCL)
|
||||
#ifdef MAC_TCL
|
||||
/* 0 */
|
||||
EXTERN void Tcl_CreateFileHandler _ANSI_ARGS_((int fd, int mask,
|
||||
Tcl_FileProc * proc, ClientData clientData));
|
||||
EXTERN void Tcl_MacSetEventProc _ANSI_ARGS_((
|
||||
Tcl_MacConvertEventPtr procPtr));
|
||||
/* 1 */
|
||||
EXTERN void Tcl_DeleteFileHandler _ANSI_ARGS_((int fd));
|
||||
EXTERN char * Tcl_MacConvertTextResource _ANSI_ARGS_((
|
||||
Handle resource));
|
||||
/* 2 */
|
||||
EXTERN int Tcl_GetOpenFile _ANSI_ARGS_((Tcl_Interp * interp,
|
||||
char * string, int write, int checkUsage,
|
||||
ClientData * filePtr));
|
||||
#endif /* UNIX */
|
||||
EXTERN int Tcl_MacEvalResource _ANSI_ARGS_((Tcl_Interp * interp,
|
||||
char * resourceName, int resourceNumber,
|
||||
char * fileName));
|
||||
/* 3 */
|
||||
EXTERN Handle Tcl_MacFindResource _ANSI_ARGS_((Tcl_Interp * interp,
|
||||
long resourceType, char * resourceName,
|
||||
int resourceNumber, char * resFileRef,
|
||||
int * releaseIt));
|
||||
/* 4 */
|
||||
EXTERN int Tcl_GetOSTypeFromObj _ANSI_ARGS_((
|
||||
Tcl_Interp * interp, Tcl_Obj * objPtr,
|
||||
OSType * osTypePtr));
|
||||
/* 5 */
|
||||
EXTERN void Tcl_SetOSTypeObj _ANSI_ARGS_((Tcl_Obj * objPtr,
|
||||
OSType osType));
|
||||
/* 6 */
|
||||
EXTERN Tcl_Obj * Tcl_NewOSTypeObj _ANSI_ARGS_((OSType osType));
|
||||
/* 7 */
|
||||
EXTERN int strncasecmp _ANSI_ARGS_((CONST char * s1,
|
||||
CONST char * s2, size_t n));
|
||||
/* 8 */
|
||||
EXTERN int strcasecmp _ANSI_ARGS_((CONST char * s1,
|
||||
CONST char * s2));
|
||||
#endif /* MAC_TCL */
|
||||
|
||||
typedef struct TclPlatStubs {
|
||||
int magic;
|
||||
struct TclPlatStubHooks *hooks;
|
||||
|
||||
#if !defined(__WIN32__) && !defined(MAC_TCL)
|
||||
void (*tcl_CreateFileHandler) _ANSI_ARGS_((int fd, int mask, Tcl_FileProc * proc, ClientData clientData)); /* 0 */
|
||||
void (*tcl_DeleteFileHandler) _ANSI_ARGS_((int fd)); /* 1 */
|
||||
int (*tcl_GetOpenFile) _ANSI_ARGS_((Tcl_Interp * interp, char * string, int write, int checkUsage, ClientData * filePtr)); /* 2 */
|
||||
#endif /* UNIX */
|
||||
#ifdef MAC_TCL
|
||||
void (*tcl_MacSetEventProc) _ANSI_ARGS_((Tcl_MacConvertEventPtr procPtr)); /* 0 */
|
||||
char * (*tcl_MacConvertTextResource) _ANSI_ARGS_((Handle resource)); /* 1 */
|
||||
int (*tcl_MacEvalResource) _ANSI_ARGS_((Tcl_Interp * interp, char * resourceName, int resourceNumber, char * fileName)); /* 2 */
|
||||
Handle (*tcl_MacFindResource) _ANSI_ARGS_((Tcl_Interp * interp, long resourceType, char * resourceName, int resourceNumber, char * resFileRef, int * releaseIt)); /* 3 */
|
||||
int (*tcl_GetOSTypeFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, OSType * osTypePtr)); /* 4 */
|
||||
void (*tcl_SetOSTypeObj) _ANSI_ARGS_((Tcl_Obj * objPtr, OSType osType)); /* 5 */
|
||||
Tcl_Obj * (*tcl_NewOSTypeObj) _ANSI_ARGS_((OSType osType)); /* 6 */
|
||||
int (*strncasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2, size_t n)); /* 7 */
|
||||
int (*strcasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2)); /* 8 */
|
||||
#endif /* MAC_TCL */
|
||||
} TclPlatStubs;
|
||||
|
||||
extern TclPlatStubs *tclPlatStubsPtr;
|
||||
@@ -36,20 +63,44 @@ extern TclPlatStubs *tclPlatStubsPtr;
|
||||
* Inline function declarations:
|
||||
*/
|
||||
|
||||
#if !defined(__WIN32__) && !defined(MAC_TCL)
|
||||
#ifndef Tcl_CreateFileHandler
|
||||
#define Tcl_CreateFileHandler(fd, mask, proc, clientData) \
|
||||
(tclPlatStubsPtr->tcl_CreateFileHandler)(fd, mask, proc, clientData) /* 0 */
|
||||
#ifdef MAC_TCL
|
||||
#ifndef Tcl_MacSetEventProc
|
||||
#define Tcl_MacSetEventProc(procPtr) \
|
||||
(tclPlatStubsPtr->tcl_MacSetEventProc)(procPtr) /* 0 */
|
||||
#endif
|
||||
#ifndef Tcl_DeleteFileHandler
|
||||
#define Tcl_DeleteFileHandler(fd) \
|
||||
(tclPlatStubsPtr->tcl_DeleteFileHandler)(fd) /* 1 */
|
||||
#ifndef Tcl_MacConvertTextResource
|
||||
#define Tcl_MacConvertTextResource(resource) \
|
||||
(tclPlatStubsPtr->tcl_MacConvertTextResource)(resource) /* 1 */
|
||||
#endif
|
||||
#ifndef Tcl_GetOpenFile
|
||||
#define Tcl_GetOpenFile(interp, string, write, checkUsage, filePtr) \
|
||||
(tclPlatStubsPtr->tcl_GetOpenFile)(interp, string, write, checkUsage, filePtr) /* 2 */
|
||||
#ifndef Tcl_MacEvalResource
|
||||
#define Tcl_MacEvalResource(interp, resourceName, resourceNumber, fileName) \
|
||||
(tclPlatStubsPtr->tcl_MacEvalResource)(interp, resourceName, resourceNumber, fileName) /* 2 */
|
||||
#endif
|
||||
#endif /* UNIX */
|
||||
#ifndef Tcl_MacFindResource
|
||||
#define Tcl_MacFindResource(interp, resourceType, resourceName, resourceNumber, resFileRef, releaseIt) \
|
||||
(tclPlatStubsPtr->tcl_MacFindResource)(interp, resourceType, resourceName, resourceNumber, resFileRef, releaseIt) /* 3 */
|
||||
#endif
|
||||
#ifndef Tcl_GetOSTypeFromObj
|
||||
#define Tcl_GetOSTypeFromObj(interp, objPtr, osTypePtr) \
|
||||
(tclPlatStubsPtr->tcl_GetOSTypeFromObj)(interp, objPtr, osTypePtr) /* 4 */
|
||||
#endif
|
||||
#ifndef Tcl_SetOSTypeObj
|
||||
#define Tcl_SetOSTypeObj(objPtr, osType) \
|
||||
(tclPlatStubsPtr->tcl_SetOSTypeObj)(objPtr, osType) /* 5 */
|
||||
#endif
|
||||
#ifndef Tcl_NewOSTypeObj
|
||||
#define Tcl_NewOSTypeObj(osType) \
|
||||
(tclPlatStubsPtr->tcl_NewOSTypeObj)(osType) /* 6 */
|
||||
#endif
|
||||
#ifndef strncasecmp
|
||||
#define strncasecmp(s1, s2, n) \
|
||||
(tclPlatStubsPtr->strncasecmp)(s1, s2, n) /* 7 */
|
||||
#endif
|
||||
#ifndef strcasecmp
|
||||
#define strcasecmp(s1, s2) \
|
||||
(tclPlatStubsPtr->strcasecmp)(s1, s2) /* 8 */
|
||||
#endif
|
||||
#endif /* MAC_TCL */
|
||||
|
||||
#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
|
||||
|
||||
|
||||
+74
-20
@@ -7,11 +7,10 @@
|
||||
* Copyright (c) 1998-1999 by Scriptics Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* RCS: @(#) $Id: tclPlatStubs.c,v 1.1 1999/03/03 00:38:42 stanton Exp $
|
||||
* RCS: @(#) $Id: tclPlatStubs.c,v 1.2.4.1 1999/03/10 05:50:28 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tcl.h"
|
||||
#include "tclPort.h"
|
||||
|
||||
/*
|
||||
* WARNING: This file is automatically generated by the tools/genStubs.tcl
|
||||
@@ -25,38 +24,93 @@
|
||||
* Exported stub functions:
|
||||
*/
|
||||
|
||||
#if !defined(__WIN32__) && !defined(MAC_TCL)
|
||||
#ifdef MAC_TCL
|
||||
/* Slot 0 */
|
||||
void
|
||||
Tcl_CreateFileHandler(fd, mask, proc, clientData)
|
||||
int fd;
|
||||
int mask;
|
||||
Tcl_FileProc * proc;
|
||||
ClientData clientData;
|
||||
Tcl_MacSetEventProc(procPtr)
|
||||
Tcl_MacConvertEventPtr procPtr;
|
||||
{
|
||||
(tclPlatStubsPtr->tcl_CreateFileHandler)(fd, mask, proc, clientData);
|
||||
(tclPlatStubsPtr->tcl_MacSetEventProc)(procPtr);
|
||||
}
|
||||
|
||||
/* Slot 1 */
|
||||
void
|
||||
Tcl_DeleteFileHandler(fd)
|
||||
int fd;
|
||||
char *
|
||||
Tcl_MacConvertTextResource(resource)
|
||||
Handle resource;
|
||||
{
|
||||
(tclPlatStubsPtr->tcl_DeleteFileHandler)(fd);
|
||||
return (tclPlatStubsPtr->tcl_MacConvertTextResource)(resource);
|
||||
}
|
||||
|
||||
/* Slot 2 */
|
||||
int
|
||||
Tcl_GetOpenFile(interp, string, write, checkUsage, filePtr)
|
||||
Tcl_MacEvalResource(interp, resourceName, resourceNumber, fileName)
|
||||
Tcl_Interp * interp;
|
||||
char * string;
|
||||
int write;
|
||||
int checkUsage;
|
||||
ClientData * filePtr;
|
||||
char * resourceName;
|
||||
int resourceNumber;
|
||||
char * fileName;
|
||||
{
|
||||
return (tclPlatStubsPtr->tcl_GetOpenFile)(interp, string, write, checkUsage, filePtr);
|
||||
return (tclPlatStubsPtr->tcl_MacEvalResource)(interp, resourceName, resourceNumber, fileName);
|
||||
}
|
||||
|
||||
#endif /* UNIX */
|
||||
/* Slot 3 */
|
||||
Handle
|
||||
Tcl_MacFindResource(interp, resourceType, resourceName, resourceNumber, resFileRef, releaseIt)
|
||||
Tcl_Interp * interp;
|
||||
long resourceType;
|
||||
char * resourceName;
|
||||
int resourceNumber;
|
||||
char * resFileRef;
|
||||
int * releaseIt;
|
||||
{
|
||||
return (tclPlatStubsPtr->tcl_MacFindResource)(interp, resourceType, resourceName, resourceNumber, resFileRef, releaseIt);
|
||||
}
|
||||
|
||||
/* Slot 4 */
|
||||
int
|
||||
Tcl_GetOSTypeFromObj(interp, objPtr, osTypePtr)
|
||||
Tcl_Interp * interp;
|
||||
Tcl_Obj * objPtr;
|
||||
OSType * osTypePtr;
|
||||
{
|
||||
return (tclPlatStubsPtr->tcl_GetOSTypeFromObj)(interp, objPtr, osTypePtr);
|
||||
}
|
||||
|
||||
/* Slot 5 */
|
||||
void
|
||||
Tcl_SetOSTypeObj(objPtr, osType)
|
||||
Tcl_Obj * objPtr;
|
||||
OSType osType;
|
||||
{
|
||||
(tclPlatStubsPtr->tcl_SetOSTypeObj)(objPtr, osType);
|
||||
}
|
||||
|
||||
/* Slot 6 */
|
||||
Tcl_Obj *
|
||||
Tcl_NewOSTypeObj(osType)
|
||||
OSType osType;
|
||||
{
|
||||
return (tclPlatStubsPtr->tcl_NewOSTypeObj)(osType);
|
||||
}
|
||||
|
||||
/* Slot 7 */
|
||||
int
|
||||
strncasecmp(s1, s2, n)
|
||||
CONST char * s1;
|
||||
CONST char * s2;
|
||||
size_t n;
|
||||
{
|
||||
return (tclPlatStubsPtr->strncasecmp)(s1, s2, n);
|
||||
}
|
||||
|
||||
/* Slot 8 */
|
||||
int
|
||||
strcasecmp(s1, s2)
|
||||
CONST char * s1;
|
||||
CONST char * s2;
|
||||
{
|
||||
return (tclPlatStubsPtr->strcasecmp)(s1, s2);
|
||||
}
|
||||
|
||||
#endif /* MAC_TCL */
|
||||
|
||||
/* !END!: Do not edit above this line. */
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclProc.c,v 1.17 1999/02/03 00:55:06 stanton Exp $
|
||||
* RCS: @(#) $Id: tclProc.c,v 1.17.4.1 1999/03/05 20:18:05 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
@@ -185,7 +185,7 @@ TclCreateProc(interp, nsPtr, procName, argsPtr, bodyPtr, procPtrPtr)
|
||||
register Proc *procPtr;
|
||||
int i, length, result, numArgs;
|
||||
char *args, *bytes, *p;
|
||||
register CompiledLocal *localPtr;
|
||||
register CompiledLocal *localPtr = NULL;
|
||||
Tcl_Obj *defPtr;
|
||||
int precompiled = 0;
|
||||
|
||||
|
||||
+36
-8
@@ -14,7 +14,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclStringObj.c,v 1.2 1998/09/14 18:40:02 stanton Exp $
|
||||
* RCS: @(#) $Id: tclStringObj.c,v 1.2.4.1 1999/03/03 00:38:42 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
@@ -363,7 +363,7 @@ Tcl_AppendToObj(objPtr, bytes, length)
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_AppendStringsToObj --
|
||||
* Tcl_AppendStringsToObjVA --
|
||||
*
|
||||
* This procedure appends one or more null-terminated strings
|
||||
* to an object.
|
||||
@@ -379,14 +379,14 @@ Tcl_AppendToObj(objPtr, bytes, length)
|
||||
*/
|
||||
|
||||
void
|
||||
Tcl_AppendStringsToObj TCL_VARARGS_DEF(Tcl_Obj *,arg1)
|
||||
Tcl_AppendStringsToObjVA (objPtr, argList)
|
||||
register Tcl_Obj *objPtr; /* Points to the object to append to. */
|
||||
va_list argList; /* Variable argument list. */
|
||||
{
|
||||
va_list argList;
|
||||
register Tcl_Obj *objPtr;
|
||||
va_list tmpArgList;
|
||||
int newLength, oldLength;
|
||||
register char *string, *dst;
|
||||
|
||||
objPtr = (Tcl_Obj *) TCL_VARARGS_START(Tcl_Obj *,arg1,argList);
|
||||
if (Tcl_IsShared(objPtr)) {
|
||||
panic("Tcl_AppendStringsToObj called with shared object");
|
||||
}
|
||||
@@ -400,9 +400,10 @@ Tcl_AppendStringsToObj TCL_VARARGS_DEF(Tcl_Obj *,arg1)
|
||||
* bytes would be appended, just return.
|
||||
*/
|
||||
|
||||
tmpArgList = argList;
|
||||
newLength = oldLength = objPtr->length;
|
||||
while (1) {
|
||||
string = va_arg(argList, char *);
|
||||
string = va_arg(tmpArgList, char *);
|
||||
if (string == NULL) {
|
||||
break;
|
||||
}
|
||||
@@ -430,7 +431,6 @@ Tcl_AppendStringsToObj TCL_VARARGS_DEF(Tcl_Obj *,arg1)
|
||||
* strings to the object.
|
||||
*/
|
||||
|
||||
TCL_VARARGS_START(Tcl_Obj *,arg1,argList);
|
||||
dst = objPtr->bytes + oldLength;
|
||||
while (1) {
|
||||
string = va_arg(argList, char *);
|
||||
@@ -455,6 +455,34 @@ Tcl_AppendStringsToObj TCL_VARARGS_DEF(Tcl_Obj *,arg1)
|
||||
*dst = 0;
|
||||
}
|
||||
objPtr->length = newLength;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_AppendStringsToObj --
|
||||
*
|
||||
* This procedure appends one or more null-terminated strings
|
||||
* to an object.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* The contents of all the string arguments are appended to the
|
||||
* string representation of objPtr.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void
|
||||
Tcl_AppendStringsToObj TCL_VARARGS_DEF(Tcl_Obj *,arg1)
|
||||
{
|
||||
register Tcl_Obj *objPtr;
|
||||
va_list argList;
|
||||
|
||||
objPtr = TCL_VARARGS_START(Tcl_Obj *,arg1,argList);
|
||||
Tcl_AppendStringsToObjVA(objPtr, argList);
|
||||
va_end(argList);
|
||||
}
|
||||
|
||||
|
||||
+500
-422
@@ -8,11 +8,30 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclStubInit.c,v 1.1 1999/03/03 00:38:43 stanton Exp $
|
||||
* RCS: @(#) $Id: tclStubInit.c,v 1.2.2.4 1999/03/10 05:50:28 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
#include "tclPort.h"
|
||||
#include "tclCompile.h"
|
||||
|
||||
/*
|
||||
* Remove macros that will interfere with the definitions below.
|
||||
*/
|
||||
|
||||
#undef Tcl_Alloc
|
||||
#undef Tcl_Free
|
||||
#undef Tcl_Realloc
|
||||
#undef Tcl_NewBooleanObj
|
||||
#undef Tcl_NewByteArrayObj
|
||||
#undef Tcl_NewDoubleObj
|
||||
#undef Tcl_NewIntObj
|
||||
#undef Tcl_NewListObj
|
||||
#undef Tcl_NewLongObj
|
||||
#undef Tcl_NewObj
|
||||
#undef Tcl_NewStringObj
|
||||
#undef Tcl_DumpActiveMemory
|
||||
#undef Tcl_ValidateAllMemory
|
||||
|
||||
/*
|
||||
* WARNING: The contents of this file is automatically generated by the
|
||||
@@ -27,284 +46,312 @@ static TclStubHooks tclStubHooks;
|
||||
TclStubs tclStubs = {
|
||||
TCL_STUB_MAGIC,
|
||||
&tclStubHooks,
|
||||
Tcl_AddErrorInfo, /* 0 */
|
||||
Tcl_AddObjErrorInfo, /* 1 */
|
||||
Tcl_Alloc, /* 2 */
|
||||
Tcl_AllowExceptions, /* 3 */
|
||||
Tcl_AppendAllObjTypes, /* 4 */
|
||||
Tcl_AppendElement, /* 5 */
|
||||
Tcl_AppendResult, /* 6 */
|
||||
Tcl_AppendResultVA, /* 7 */
|
||||
Tcl_AppendToObj, /* 8 */
|
||||
Tcl_AppendStringsToObj, /* 9 */
|
||||
Tcl_AppendStringsToObjVA, /* 10 */
|
||||
Tcl_AsyncCreate, /* 11 */
|
||||
Tcl_AsyncDelete, /* 12 */
|
||||
Tcl_AsyncInvoke, /* 13 */
|
||||
Tcl_AsyncMark, /* 14 */
|
||||
Tcl_AsyncReady, /* 15 */
|
||||
Tcl_BackgroundError, /* 16 */
|
||||
Tcl_Backslash, /* 17 */
|
||||
Tcl_BadChannelOption, /* 18 */
|
||||
Tcl_CallWhenDeleted, /* 19 */
|
||||
Tcl_CancelIdleCall, /* 20 */
|
||||
Tcl_Close, /* 21 */
|
||||
Tcl_CommandComplete, /* 22 */
|
||||
Tcl_Concat, /* 23 */
|
||||
Tcl_ConcatObj, /* 24 */
|
||||
Tcl_ConvertCountedElement, /* 25 */
|
||||
Tcl_ConvertElement, /* 26 */
|
||||
Tcl_ConvertToType, /* 27 */
|
||||
Tcl_CreateAlias, /* 28 */
|
||||
Tcl_CreateAliasObj, /* 29 */
|
||||
Tcl_CreateChannel, /* 30 */
|
||||
Tcl_CreateChannelHandler, /* 31 */
|
||||
Tcl_CreateCloseHandler, /* 32 */
|
||||
Tcl_CreateCommand, /* 33 */
|
||||
Tcl_CreateEventSource, /* 34 */
|
||||
Tcl_CreateExitHandler, /* 35 */
|
||||
Tcl_CreateInterp, /* 36 */
|
||||
Tcl_CreateMathFunc, /* 37 */
|
||||
Tcl_CreateObjCommand, /* 38 */
|
||||
Tcl_CreateSlave, /* 39 */
|
||||
Tcl_CreateTimerHandler, /* 40 */
|
||||
Tcl_CreateTrace, /* 41 */
|
||||
Tcl_DbCkalloc, /* 42 */
|
||||
Tcl_DbCkfree, /* 43 */
|
||||
Tcl_DbCkrealloc, /* 44 */
|
||||
Tcl_DbDecrRefCount, /* 45 */
|
||||
Tcl_DbIncrRefCount, /* 46 */
|
||||
Tcl_DbIsShared, /* 47 */
|
||||
Tcl_DbNewBooleanObj, /* 48 */
|
||||
Tcl_DbNewByteArrayObj, /* 49 */
|
||||
Tcl_DbNewDoubleObj, /* 50 */
|
||||
Tcl_DbNewListObj, /* 51 */
|
||||
Tcl_DbNewLongObj, /* 52 */
|
||||
Tcl_DbNewObj, /* 53 */
|
||||
Tcl_DbNewStringObj, /* 54 */
|
||||
Tcl_DeleteAssocData, /* 55 */
|
||||
Tcl_DeleteCommand, /* 56 */
|
||||
Tcl_DeleteCommandFromToken, /* 57 */
|
||||
Tcl_DeleteChannelHandler, /* 58 */
|
||||
Tcl_DeleteCloseHandler, /* 59 */
|
||||
Tcl_DeleteEvents, /* 60 */
|
||||
Tcl_DeleteEventSource, /* 61 */
|
||||
Tcl_DeleteExitHandler, /* 62 */
|
||||
Tcl_DeleteHashEntry, /* 63 */
|
||||
Tcl_DeleteHashTable, /* 64 */
|
||||
Tcl_DeleteInterp, /* 65 */
|
||||
Tcl_DeleteTimerHandler, /* 66 */
|
||||
Tcl_DeleteTrace, /* 67 */
|
||||
Tcl_DetachPids, /* 68 */
|
||||
Tcl_DontCallWhenDeleted, /* 69 */
|
||||
Tcl_DoOneEvent, /* 70 */
|
||||
Tcl_DoWhenIdle, /* 71 */
|
||||
Tcl_DStringAppend, /* 72 */
|
||||
Tcl_DStringAppendElement, /* 73 */
|
||||
Tcl_DStringEndSublist, /* 74 */
|
||||
Tcl_DStringFree, /* 75 */
|
||||
Tcl_DStringGetResult, /* 76 */
|
||||
Tcl_DStringInit, /* 77 */
|
||||
Tcl_DStringResult, /* 78 */
|
||||
Tcl_DStringSetLength, /* 79 */
|
||||
Tcl_DStringStartSublist, /* 80 */
|
||||
Tcl_DumpActiveMemory, /* 81 */
|
||||
Tcl_DuplicateObj, /* 82 */
|
||||
Tcl_Eof, /* 83 */
|
||||
Tcl_ErrnoId, /* 84 */
|
||||
Tcl_ErrnoMsg, /* 85 */
|
||||
Tcl_Eval, /* 86 */
|
||||
Tcl_EvalFile, /* 87 */
|
||||
Tcl_EventuallyFree, /* 88 */
|
||||
Tcl_EvalObj, /* 89 */
|
||||
Tcl_Exit, /* 90 */
|
||||
Tcl_ExposeCommand, /* 91 */
|
||||
Tcl_ExprBoolean, /* 92 */
|
||||
Tcl_ExprBooleanObj, /* 93 */
|
||||
Tcl_ExprDouble, /* 94 */
|
||||
Tcl_ExprDoubleObj, /* 95 */
|
||||
Tcl_ExprLong, /* 96 */
|
||||
Tcl_ExprLongObj, /* 97 */
|
||||
Tcl_ExprObj, /* 98 */
|
||||
Tcl_ExprString, /* 99 */
|
||||
Tcl_Finalize, /* 100 */
|
||||
Tcl_FindExecutable, /* 101 */
|
||||
Tcl_FirstHashEntry, /* 102 */
|
||||
Tcl_Flush, /* 103 */
|
||||
Tcl_Free, /* 104 */
|
||||
TclFreeObj, /* 105 */
|
||||
Tcl_FreeResult, /* 106 */
|
||||
Tcl_GetAlias, /* 107 */
|
||||
Tcl_GetAliasObj, /* 108 */
|
||||
Tcl_GetAssocData, /* 109 */
|
||||
Tcl_GetBoolean, /* 110 */
|
||||
Tcl_GetBooleanFromObj, /* 111 */
|
||||
Tcl_GetByteArrayFromObj, /* 112 */
|
||||
Tcl_GetChannel, /* 113 */
|
||||
Tcl_GetChannelBufferSize, /* 114 */
|
||||
Tcl_GetChannelHandle, /* 115 */
|
||||
Tcl_GetChannelInstanceData, /* 116 */
|
||||
Tcl_GetChannelMode, /* 117 */
|
||||
Tcl_GetChannelName, /* 118 */
|
||||
Tcl_GetChannelOption, /* 119 */
|
||||
Tcl_GetChannelType, /* 120 */
|
||||
Tcl_GetCommandInfo, /* 121 */
|
||||
Tcl_GetCommandName, /* 122 */
|
||||
Tcl_GetDouble, /* 123 */
|
||||
Tcl_GetDoubleFromObj, /* 124 */
|
||||
Tcl_GetErrno, /* 125 */
|
||||
Tcl_GetHostName, /* 126 */
|
||||
Tcl_GetIndexFromObj, /* 127 */
|
||||
Tcl_GetInt, /* 128 */
|
||||
Tcl_GetInterpPath, /* 129 */
|
||||
Tcl_GetIntFromObj, /* 130 */
|
||||
Tcl_GetLongFromObj, /* 131 */
|
||||
Tcl_GetMaster, /* 132 */
|
||||
Tcl_GetNameOfExecutable, /* 133 */
|
||||
Tcl_GetObjResult, /* 134 */
|
||||
Tcl_GetObjType, /* 135 */
|
||||
Tcl_GetPathType, /* 136 */
|
||||
Tcl_Gets, /* 137 */
|
||||
Tcl_GetsObj, /* 138 */
|
||||
Tcl_GetServiceMode, /* 139 */
|
||||
Tcl_GetSlave, /* 140 */
|
||||
Tcl_GetStdChannel, /* 141 */
|
||||
Tcl_GetStringFromObj, /* 142 */
|
||||
Tcl_GetStringResult, /* 143 */
|
||||
Tcl_GetVar, /* 144 */
|
||||
Tcl_GetVar2, /* 145 */
|
||||
Tcl_GlobalEval, /* 146 */
|
||||
Tcl_GlobalEvalObj, /* 147 */
|
||||
Tcl_HashStats, /* 148 */
|
||||
Tcl_HideCommand, /* 149 */
|
||||
Tcl_Init, /* 150 */
|
||||
Tcl_InitHashTable, /* 151 */
|
||||
Tcl_InputBlocked, /* 152 */
|
||||
Tcl_InputBuffered, /* 153 */
|
||||
Tcl_InterpDeleted, /* 154 */
|
||||
Tcl_IsSafe, /* 155 */
|
||||
Tcl_InvalidateStringRep, /* 156 */
|
||||
Tcl_JoinPath, /* 157 */
|
||||
Tcl_LinkVar, /* 158 */
|
||||
Tcl_ListObjAppendList, /* 159 */
|
||||
Tcl_ListObjAppendElement, /* 160 */
|
||||
Tcl_ListObjGetElements, /* 161 */
|
||||
Tcl_ListObjIndex, /* 162 */
|
||||
Tcl_ListObjLength, /* 163 */
|
||||
Tcl_ListObjReplace, /* 164 */
|
||||
Tcl_MakeFileChannel, /* 165 */
|
||||
Tcl_MakeSafe, /* 166 */
|
||||
Tcl_MakeTcpClientChannel, /* 167 */
|
||||
Tcl_Merge, /* 168 */
|
||||
Tcl_NewBooleanObj, /* 169 */
|
||||
Tcl_NewByteArrayObj, /* 170 */
|
||||
Tcl_NewDoubleObj, /* 171 */
|
||||
Tcl_NewIntObj, /* 172 */
|
||||
Tcl_NewListObj, /* 173 */
|
||||
Tcl_NewLongObj, /* 174 */
|
||||
Tcl_NewObj, /* 175 */
|
||||
Tcl_NewStringObj, /* 176 */
|
||||
Tcl_NextHashEntry, /* 177 */
|
||||
Tcl_NotifyChannel, /* 178 */
|
||||
Tcl_ObjGetVar2, /* 179 */
|
||||
Tcl_ObjSetVar2, /* 180 */
|
||||
Tcl_OpenCommandChannel, /* 181 */
|
||||
Tcl_OpenFileChannel, /* 182 */
|
||||
Tcl_OpenTcpClient, /* 183 */
|
||||
Tcl_OpenTcpServer, /* 184 */
|
||||
Tcl_Panic, /* 185 */
|
||||
Tcl_PanicVA, /* 186 */
|
||||
Tcl_ParseVar, /* 187 */
|
||||
Tcl_PkgPresent, /* 188 */
|
||||
Tcl_PkgPresentEx, /* 189 */
|
||||
Tcl_PkgProvide, /* 190 */
|
||||
Tcl_PkgProvideEx, /* 191 */
|
||||
Tcl_PkgRequire, /* 192 */
|
||||
Tcl_PkgRequireEx, /* 193 */
|
||||
Tcl_PosixError, /* 194 */
|
||||
Tcl_Preserve, /* 195 */
|
||||
Tcl_PrintDouble, /* 196 */
|
||||
Tcl_PutEnv, /* 197 */
|
||||
Tcl_QueueEvent, /* 198 */
|
||||
Tcl_Read, /* 199 */
|
||||
Tcl_Realloc, /* 200 */
|
||||
Tcl_ReapDetachedProcs, /* 201 */
|
||||
Tcl_RecordAndEval, /* 202 */
|
||||
Tcl_RecordAndEvalObj, /* 203 */
|
||||
Tcl_RegExpCompile, /* 204 */
|
||||
Tcl_RegExpExec, /* 205 */
|
||||
Tcl_RegExpMatch, /* 206 */
|
||||
Tcl_RegExpRange, /* 207 */
|
||||
Tcl_RegisterChannel, /* 208 */
|
||||
Tcl_RegisterObjType, /* 209 */
|
||||
Tcl_Release, /* 210 */
|
||||
Tcl_ResetResult, /* 211 */
|
||||
Tcl_ScanCountedElement, /* 212 */
|
||||
Tcl_ScanElement, /* 213 */
|
||||
Tcl_Seek, /* 214 */
|
||||
Tcl_ServiceAll, /* 215 */
|
||||
Tcl_ServiceEvent, /* 216 */
|
||||
Tcl_SetAssocData, /* 217 */
|
||||
Tcl_SetBooleanObj, /* 218 */
|
||||
Tcl_SetByteArrayLength, /* 219 */
|
||||
Tcl_SetByteArrayObj, /* 220 */
|
||||
Tcl_SetChannelBufferSize, /* 221 */
|
||||
Tcl_SetChannelOption, /* 222 */
|
||||
Tcl_SetCommandInfo, /* 223 */
|
||||
Tcl_SetDoubleObj, /* 224 */
|
||||
Tcl_SetErrno, /* 225 */
|
||||
Tcl_SetErrorCode, /* 226 */
|
||||
Tcl_SetErrorCodeVA, /* 227 */
|
||||
Tcl_SetIntObj, /* 228 */
|
||||
Tcl_SetListObj, /* 229 */
|
||||
Tcl_SetLongObj, /* 230 */
|
||||
Tcl_SetMaxBlockTime, /* 231 */
|
||||
Tcl_SetObjErrorCode, /* 232 */
|
||||
Tcl_SetObjLength, /* 233 */
|
||||
Tcl_SetObjResult, /* 234 */
|
||||
Tcl_SetPanicProc, /* 235 */
|
||||
Tcl_SetRecursionLimit, /* 236 */
|
||||
Tcl_SetResult, /* 237 */
|
||||
Tcl_SetServiceMode, /* 238 */
|
||||
Tcl_SetStdChannel, /* 239 */
|
||||
Tcl_SetStringObj, /* 240 */
|
||||
Tcl_SetTimer, /* 241 */
|
||||
Tcl_SetVar, /* 242 */
|
||||
Tcl_SetVar2, /* 243 */
|
||||
Tcl_SignalId, /* 244 */
|
||||
Tcl_SignalMsg, /* 245 */
|
||||
Tcl_Sleep, /* 246 */
|
||||
Tcl_SourceRCFile, /* 247 */
|
||||
Tcl_SplitList, /* 248 */
|
||||
Tcl_SplitPath, /* 249 */
|
||||
Tcl_StaticPackage, /* 250 */
|
||||
Tcl_StringMatch, /* 251 */
|
||||
Tcl_Tell, /* 252 */
|
||||
Tcl_TraceVar, /* 253 */
|
||||
Tcl_TraceVar2, /* 254 */
|
||||
Tcl_TranslateFileName, /* 255 */
|
||||
Tcl_Ungets, /* 256 */
|
||||
Tcl_UnlinkVar, /* 257 */
|
||||
Tcl_UnregisterChannel, /* 258 */
|
||||
Tcl_UnsetVar, /* 259 */
|
||||
Tcl_UnsetVar2, /* 260 */
|
||||
Tcl_UntraceVar, /* 261 */
|
||||
Tcl_UntraceVar2, /* 262 */
|
||||
Tcl_UpdateLinkedVar, /* 263 */
|
||||
Tcl_UpVar, /* 264 */
|
||||
Tcl_UpVar2, /* 265 */
|
||||
Tcl_PkgProvideEx, /* 0 */
|
||||
Tcl_PkgRequireEx, /* 1 */
|
||||
panic, /* 2 */
|
||||
Tcl_Alloc, /* 3 */
|
||||
Tcl_Free, /* 4 */
|
||||
Tcl_Realloc, /* 5 */
|
||||
Tcl_DbCkalloc, /* 6 */
|
||||
Tcl_DbCkfree, /* 7 */
|
||||
Tcl_DbCkrealloc, /* 8 */
|
||||
#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
|
||||
Tcl_CreateFileHandler, /* 9 */
|
||||
#endif /* UNIX */
|
||||
#ifdef __WIN32__
|
||||
NULL, /* 9 */
|
||||
#endif /* __WIN32__ */
|
||||
#ifdef MAC_TCL
|
||||
NULL, /* 9 */
|
||||
#endif /* MAC_TCL */
|
||||
#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
|
||||
Tcl_DeleteFileHandler, /* 10 */
|
||||
#endif /* UNIX */
|
||||
#ifdef __WIN32__
|
||||
NULL, /* 10 */
|
||||
#endif /* __WIN32__ */
|
||||
#ifdef MAC_TCL
|
||||
NULL, /* 10 */
|
||||
#endif /* MAC_TCL */
|
||||
Tcl_SetTimer, /* 11 */
|
||||
Tcl_Sleep, /* 12 */
|
||||
Tcl_WaitForEvent, /* 13 */
|
||||
Tcl_AppendAllObjTypes, /* 14 */
|
||||
Tcl_AppendStringsToObj, /* 15 */
|
||||
Tcl_AppendToObj, /* 16 */
|
||||
Tcl_ConcatObj, /* 17 */
|
||||
Tcl_ConvertToType, /* 18 */
|
||||
Tcl_DbDecrRefCount, /* 19 */
|
||||
Tcl_DbIncrRefCount, /* 20 */
|
||||
Tcl_DbIsShared, /* 21 */
|
||||
Tcl_DbNewBooleanObj, /* 22 */
|
||||
Tcl_DbNewByteArrayObj, /* 23 */
|
||||
Tcl_DbNewDoubleObj, /* 24 */
|
||||
Tcl_DbNewListObj, /* 25 */
|
||||
Tcl_DbNewLongObj, /* 26 */
|
||||
Tcl_DbNewObj, /* 27 */
|
||||
Tcl_DbNewStringObj, /* 28 */
|
||||
Tcl_DuplicateObj, /* 29 */
|
||||
TclFreeObj, /* 30 */
|
||||
Tcl_GetBoolean, /* 31 */
|
||||
Tcl_GetBooleanFromObj, /* 32 */
|
||||
Tcl_GetByteArrayFromObj, /* 33 */
|
||||
Tcl_GetDouble, /* 34 */
|
||||
Tcl_GetDoubleFromObj, /* 35 */
|
||||
Tcl_GetIndexFromObj, /* 36 */
|
||||
Tcl_GetInt, /* 37 */
|
||||
Tcl_GetIntFromObj, /* 38 */
|
||||
Tcl_GetLongFromObj, /* 39 */
|
||||
Tcl_GetObjType, /* 40 */
|
||||
Tcl_GetStringFromObj, /* 41 */
|
||||
Tcl_InvalidateStringRep, /* 42 */
|
||||
Tcl_ListObjAppendList, /* 43 */
|
||||
Tcl_ListObjAppendElement, /* 44 */
|
||||
Tcl_ListObjGetElements, /* 45 */
|
||||
Tcl_ListObjIndex, /* 46 */
|
||||
Tcl_ListObjLength, /* 47 */
|
||||
Tcl_ListObjReplace, /* 48 */
|
||||
Tcl_NewBooleanObj, /* 49 */
|
||||
Tcl_NewByteArrayObj, /* 50 */
|
||||
Tcl_NewDoubleObj, /* 51 */
|
||||
Tcl_NewIntObj, /* 52 */
|
||||
Tcl_NewListObj, /* 53 */
|
||||
Tcl_NewLongObj, /* 54 */
|
||||
Tcl_NewObj, /* 55 */
|
||||
Tcl_NewStringObj, /* 56 */
|
||||
Tcl_SetBooleanObj, /* 57 */
|
||||
Tcl_SetByteArrayLength, /* 58 */
|
||||
Tcl_SetByteArrayObj, /* 59 */
|
||||
Tcl_SetDoubleObj, /* 60 */
|
||||
Tcl_SetIntObj, /* 61 */
|
||||
Tcl_SetListObj, /* 62 */
|
||||
Tcl_SetLongObj, /* 63 */
|
||||
Tcl_SetObjLength, /* 64 */
|
||||
Tcl_SetStringObj, /* 65 */
|
||||
Tcl_AddErrorInfo, /* 66 */
|
||||
Tcl_AddObjErrorInfo, /* 67 */
|
||||
Tcl_AllowExceptions, /* 68 */
|
||||
Tcl_AppendElement, /* 69 */
|
||||
Tcl_AppendResult, /* 70 */
|
||||
Tcl_AsyncCreate, /* 71 */
|
||||
Tcl_AsyncDelete, /* 72 */
|
||||
Tcl_AsyncInvoke, /* 73 */
|
||||
Tcl_AsyncMark, /* 74 */
|
||||
Tcl_AsyncReady, /* 75 */
|
||||
Tcl_BackgroundError, /* 76 */
|
||||
Tcl_Backslash, /* 77 */
|
||||
Tcl_BadChannelOption, /* 78 */
|
||||
Tcl_CallWhenDeleted, /* 79 */
|
||||
Tcl_CancelIdleCall, /* 80 */
|
||||
Tcl_Close, /* 81 */
|
||||
Tcl_CommandComplete, /* 82 */
|
||||
Tcl_Concat, /* 83 */
|
||||
Tcl_ConvertElement, /* 84 */
|
||||
Tcl_ConvertCountedElement, /* 85 */
|
||||
Tcl_CreateAlias, /* 86 */
|
||||
Tcl_CreateAliasObj, /* 87 */
|
||||
Tcl_CreateChannel, /* 88 */
|
||||
Tcl_CreateChannelHandler, /* 89 */
|
||||
Tcl_CreateCloseHandler, /* 90 */
|
||||
Tcl_CreateCommand, /* 91 */
|
||||
Tcl_CreateEventSource, /* 92 */
|
||||
Tcl_CreateExitHandler, /* 93 */
|
||||
Tcl_CreateInterp, /* 94 */
|
||||
Tcl_CreateMathFunc, /* 95 */
|
||||
Tcl_CreateObjCommand, /* 96 */
|
||||
Tcl_CreateSlave, /* 97 */
|
||||
Tcl_CreateTimerHandler, /* 98 */
|
||||
Tcl_CreateTrace, /* 99 */
|
||||
Tcl_DeleteAssocData, /* 100 */
|
||||
Tcl_DeleteChannelHandler, /* 101 */
|
||||
Tcl_DeleteCloseHandler, /* 102 */
|
||||
Tcl_DeleteCommand, /* 103 */
|
||||
Tcl_DeleteCommandFromToken, /* 104 */
|
||||
Tcl_DeleteEvents, /* 105 */
|
||||
Tcl_DeleteEventSource, /* 106 */
|
||||
Tcl_DeleteExitHandler, /* 107 */
|
||||
Tcl_DeleteHashEntry, /* 108 */
|
||||
Tcl_DeleteHashTable, /* 109 */
|
||||
Tcl_DeleteInterp, /* 110 */
|
||||
Tcl_DetachPids, /* 111 */
|
||||
Tcl_DeleteTimerHandler, /* 112 */
|
||||
Tcl_DeleteTrace, /* 113 */
|
||||
Tcl_DontCallWhenDeleted, /* 114 */
|
||||
Tcl_DoOneEvent, /* 115 */
|
||||
Tcl_DoWhenIdle, /* 116 */
|
||||
Tcl_DStringAppend, /* 117 */
|
||||
Tcl_DStringAppendElement, /* 118 */
|
||||
Tcl_DStringEndSublist, /* 119 */
|
||||
Tcl_DStringFree, /* 120 */
|
||||
Tcl_DStringGetResult, /* 121 */
|
||||
Tcl_DStringInit, /* 122 */
|
||||
Tcl_DStringResult, /* 123 */
|
||||
Tcl_DStringSetLength, /* 124 */
|
||||
Tcl_DStringStartSublist, /* 125 */
|
||||
Tcl_Eof, /* 126 */
|
||||
Tcl_ErrnoId, /* 127 */
|
||||
Tcl_ErrnoMsg, /* 128 */
|
||||
Tcl_Eval, /* 129 */
|
||||
Tcl_EvalFile, /* 130 */
|
||||
Tcl_EvalObj, /* 131 */
|
||||
Tcl_EventuallyFree, /* 132 */
|
||||
Tcl_Exit, /* 133 */
|
||||
Tcl_ExposeCommand, /* 134 */
|
||||
Tcl_ExprBoolean, /* 135 */
|
||||
Tcl_ExprBooleanObj, /* 136 */
|
||||
Tcl_ExprDouble, /* 137 */
|
||||
Tcl_ExprDoubleObj, /* 138 */
|
||||
Tcl_ExprLong, /* 139 */
|
||||
Tcl_ExprLongObj, /* 140 */
|
||||
Tcl_ExprObj, /* 141 */
|
||||
Tcl_ExprString, /* 142 */
|
||||
Tcl_Finalize, /* 143 */
|
||||
Tcl_FindExecutable, /* 144 */
|
||||
Tcl_FirstHashEntry, /* 145 */
|
||||
Tcl_Flush, /* 146 */
|
||||
Tcl_FreeResult, /* 147 */
|
||||
Tcl_GetAlias, /* 148 */
|
||||
Tcl_GetAliasObj, /* 149 */
|
||||
Tcl_GetAssocData, /* 150 */
|
||||
Tcl_GetChannel, /* 151 */
|
||||
Tcl_GetChannelBufferSize, /* 152 */
|
||||
Tcl_GetChannelHandle, /* 153 */
|
||||
Tcl_GetChannelInstanceData, /* 154 */
|
||||
Tcl_GetChannelMode, /* 155 */
|
||||
Tcl_GetChannelName, /* 156 */
|
||||
Tcl_GetChannelOption, /* 157 */
|
||||
Tcl_GetChannelType, /* 158 */
|
||||
Tcl_GetCommandInfo, /* 159 */
|
||||
Tcl_GetCommandName, /* 160 */
|
||||
Tcl_GetErrno, /* 161 */
|
||||
Tcl_GetHostName, /* 162 */
|
||||
Tcl_GetInterpPath, /* 163 */
|
||||
Tcl_GetMaster, /* 164 */
|
||||
Tcl_GetNameOfExecutable, /* 165 */
|
||||
Tcl_GetObjResult, /* 166 */
|
||||
#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
|
||||
Tcl_GetOpenFile, /* 167 */
|
||||
#endif /* UNIX */
|
||||
#ifdef __WIN32__
|
||||
NULL, /* 167 */
|
||||
#endif /* __WIN32__ */
|
||||
#ifdef MAC_TCL
|
||||
NULL, /* 167 */
|
||||
#endif /* MAC_TCL */
|
||||
Tcl_GetPathType, /* 168 */
|
||||
Tcl_Gets, /* 169 */
|
||||
Tcl_GetsObj, /* 170 */
|
||||
Tcl_GetServiceMode, /* 171 */
|
||||
Tcl_GetSlave, /* 172 */
|
||||
Tcl_GetStdChannel, /* 173 */
|
||||
Tcl_GetStringResult, /* 174 */
|
||||
Tcl_GetVar, /* 175 */
|
||||
Tcl_GetVar2, /* 176 */
|
||||
Tcl_GlobalEval, /* 177 */
|
||||
Tcl_GlobalEvalObj, /* 178 */
|
||||
Tcl_HideCommand, /* 179 */
|
||||
Tcl_Init, /* 180 */
|
||||
Tcl_InitHashTable, /* 181 */
|
||||
Tcl_InputBlocked, /* 182 */
|
||||
Tcl_InputBuffered, /* 183 */
|
||||
Tcl_InterpDeleted, /* 184 */
|
||||
Tcl_IsSafe, /* 185 */
|
||||
Tcl_JoinPath, /* 186 */
|
||||
Tcl_LinkVar, /* 187 */
|
||||
NULL, /* 188 */
|
||||
Tcl_MakeFileChannel, /* 189 */
|
||||
Tcl_MakeSafe, /* 190 */
|
||||
Tcl_MakeTcpClientChannel, /* 191 */
|
||||
Tcl_Merge, /* 192 */
|
||||
Tcl_NextHashEntry, /* 193 */
|
||||
Tcl_NotifyChannel, /* 194 */
|
||||
Tcl_ObjGetVar2, /* 195 */
|
||||
Tcl_ObjSetVar2, /* 196 */
|
||||
Tcl_OpenCommandChannel, /* 197 */
|
||||
Tcl_OpenFileChannel, /* 198 */
|
||||
Tcl_OpenTcpClient, /* 199 */
|
||||
Tcl_OpenTcpServer, /* 200 */
|
||||
Tcl_Preserve, /* 201 */
|
||||
Tcl_PrintDouble, /* 202 */
|
||||
Tcl_PutEnv, /* 203 */
|
||||
Tcl_PosixError, /* 204 */
|
||||
Tcl_QueueEvent, /* 205 */
|
||||
Tcl_Read, /* 206 */
|
||||
Tcl_ReapDetachedProcs, /* 207 */
|
||||
Tcl_RecordAndEval, /* 208 */
|
||||
Tcl_RecordAndEvalObj, /* 209 */
|
||||
Tcl_RegisterChannel, /* 210 */
|
||||
Tcl_RegisterObjType, /* 211 */
|
||||
Tcl_RegExpCompile, /* 212 */
|
||||
Tcl_RegExpExec, /* 213 */
|
||||
Tcl_RegExpMatch, /* 214 */
|
||||
Tcl_RegExpRange, /* 215 */
|
||||
Tcl_Release, /* 216 */
|
||||
Tcl_ResetResult, /* 217 */
|
||||
Tcl_ScanElement, /* 218 */
|
||||
Tcl_ScanCountedElement, /* 219 */
|
||||
Tcl_Seek, /* 220 */
|
||||
Tcl_ServiceAll, /* 221 */
|
||||
Tcl_ServiceEvent, /* 222 */
|
||||
Tcl_SetAssocData, /* 223 */
|
||||
Tcl_SetChannelBufferSize, /* 224 */
|
||||
Tcl_SetChannelOption, /* 225 */
|
||||
Tcl_SetCommandInfo, /* 226 */
|
||||
Tcl_SetErrno, /* 227 */
|
||||
Tcl_SetErrorCode, /* 228 */
|
||||
Tcl_SetMaxBlockTime, /* 229 */
|
||||
Tcl_SetPanicProc, /* 230 */
|
||||
Tcl_SetRecursionLimit, /* 231 */
|
||||
Tcl_SetResult, /* 232 */
|
||||
Tcl_SetServiceMode, /* 233 */
|
||||
Tcl_SetObjErrorCode, /* 234 */
|
||||
Tcl_SetObjResult, /* 235 */
|
||||
Tcl_SetStdChannel, /* 236 */
|
||||
Tcl_SetVar, /* 237 */
|
||||
Tcl_SetVar2, /* 238 */
|
||||
Tcl_SignalId, /* 239 */
|
||||
Tcl_SignalMsg, /* 240 */
|
||||
Tcl_SourceRCFile, /* 241 */
|
||||
Tcl_SplitList, /* 242 */
|
||||
Tcl_SplitPath, /* 243 */
|
||||
Tcl_StaticPackage, /* 244 */
|
||||
Tcl_StringMatch, /* 245 */
|
||||
Tcl_Tell, /* 246 */
|
||||
Tcl_TraceVar, /* 247 */
|
||||
Tcl_TraceVar2, /* 248 */
|
||||
Tcl_TranslateFileName, /* 249 */
|
||||
Tcl_Ungets, /* 250 */
|
||||
Tcl_UnlinkVar, /* 251 */
|
||||
Tcl_UnregisterChannel, /* 252 */
|
||||
Tcl_UnsetVar, /* 253 */
|
||||
Tcl_UnsetVar2, /* 254 */
|
||||
Tcl_UntraceVar, /* 255 */
|
||||
Tcl_UntraceVar2, /* 256 */
|
||||
Tcl_UpdateLinkedVar, /* 257 */
|
||||
Tcl_UpVar, /* 258 */
|
||||
Tcl_UpVar2, /* 259 */
|
||||
Tcl_VarEval, /* 260 */
|
||||
Tcl_VarTraceInfo, /* 261 */
|
||||
Tcl_VarTraceInfo2, /* 262 */
|
||||
Tcl_Write, /* 263 */
|
||||
Tcl_WrongNumArgs, /* 264 */
|
||||
Tcl_DumpActiveMemory, /* 265 */
|
||||
Tcl_ValidateAllMemory, /* 266 */
|
||||
Tcl_VarEval, /* 267 */
|
||||
Tcl_VarEvalVA, /* 268 */
|
||||
Tcl_VarTraceInfo, /* 269 */
|
||||
Tcl_VarTraceInfo2, /* 270 */
|
||||
Tcl_WaitForEvent, /* 271 */
|
||||
Tcl_WaitPid, /* 272 */
|
||||
Tcl_Write, /* 273 */
|
||||
Tcl_WrongNumArgs, /* 274 */
|
||||
Tcl_AppendResultVA, /* 267 */
|
||||
Tcl_AppendStringsToObjVA, /* 268 */
|
||||
Tcl_HashStats, /* 269 */
|
||||
Tcl_ParseVar, /* 270 */
|
||||
Tcl_PkgPresent, /* 271 */
|
||||
Tcl_PkgPresentEx, /* 272 */
|
||||
Tcl_PkgProvide, /* 273 */
|
||||
Tcl_PkgRequire, /* 274 */
|
||||
Tcl_SetErrorCodeVA, /* 275 */
|
||||
Tcl_VarEvalVA, /* 276 */
|
||||
Tcl_WaitPid, /* 277 */
|
||||
panicVA, /* 278 */
|
||||
};
|
||||
|
||||
extern TclStubs *tclStubsPtr = &tclStubs;
|
||||
TclStubs *tclStubsPtr = &tclStubs;
|
||||
|
||||
TclIntStubs tclIntStubs = {
|
||||
TCL_STUB_MAGIC,
|
||||
@@ -331,146 +378,138 @@ TclIntStubs tclIntStubs = {
|
||||
TclFileDeleteCmd, /* 19 */
|
||||
TclFileMakeDirsCmd, /* 20 */
|
||||
TclFileRenameCmd, /* 21 */
|
||||
TclFinalizeCompExecEnv, /* 22 */
|
||||
TclFinalizeEnvironment, /* 23 */
|
||||
TclFinalizeExecEnv, /* 24 */
|
||||
TclFindElement, /* 25 */
|
||||
TclFindProc, /* 26 */
|
||||
TclFormatInt, /* 27 */
|
||||
TclFreePackageInfo, /* 28 */
|
||||
TclGetAndDetachPids, /* 29 */
|
||||
TclGetCwd, /* 30 */
|
||||
TclGetDate, /* 31 */
|
||||
TclGetDefaultStdChannel, /* 32 */
|
||||
TclGetElementOfIndexedArray, /* 33 */
|
||||
TclGetEnv, /* 34 */
|
||||
TclGetExtension, /* 35 */
|
||||
TclGetFrame, /* 36 */
|
||||
TclGetInterpProc, /* 37 */
|
||||
TclGetIntForIndex, /* 38 */
|
||||
TclGetIndexedScalar, /* 39 */
|
||||
TclGetLong, /* 40 */
|
||||
TclGetLoadedPackages, /* 41 */
|
||||
TclGetNamespaceForQualName, /* 42 */
|
||||
TclGetObjInterpProc, /* 43 */
|
||||
TclGetOpenMode, /* 44 */
|
||||
TclGetOriginalCommand, /* 45 */
|
||||
TclpGetUserHome, /* 46 */
|
||||
TclGlobalInvoke, /* 47 */
|
||||
TclGuessPackageName, /* 48 */
|
||||
TclHasSockets, /* 49 */
|
||||
TclHideUnsafeCommands, /* 50 */
|
||||
TclInExit, /* 51 */
|
||||
TclIncrElementOfIndexedArray, /* 52 */
|
||||
TclIncrIndexedScalar, /* 53 */
|
||||
TclIncrVar2, /* 54 */
|
||||
TclInitCompiledLocals, /* 55 */
|
||||
TclInitNamespaces, /* 56 */
|
||||
TclInterpInit, /* 57 */
|
||||
TclInvoke, /* 58 */
|
||||
TclInvokeObjectCommand, /* 59 */
|
||||
TclInvokeStringCommand, /* 60 */
|
||||
TclIsProc, /* 61 */
|
||||
TclLoadFile, /* 62 */
|
||||
TclLooksLikeInt, /* 63 */
|
||||
TclLookupVar, /* 64 */
|
||||
TclMatchFiles, /* 65 */
|
||||
TclNeedSpace, /* 66 */
|
||||
TclNewProcBodyObj, /* 67 */
|
||||
TclObjCommandComplete, /* 68 */
|
||||
TclObjInterpProc, /* 69 */
|
||||
TclObjInvoke, /* 70 */
|
||||
TclObjInvokeGlobal, /* 71 */
|
||||
TclOpenFileChannelDeleteProc, /* 72 */
|
||||
TclOpenFileChannelInsertProc, /* 73 */
|
||||
TclpAlloc, /* 74 */
|
||||
TclpCloseFile, /* 75 */
|
||||
TclpCopyFile, /* 76 */
|
||||
TclpCopyDirectory, /* 77 */
|
||||
TclpCreateCommandChannel, /* 78 */
|
||||
TclpCreateDirectory, /* 79 */
|
||||
TclpCreatePipe, /* 80 */
|
||||
TclpCreateProcess, /* 81 */
|
||||
TclpCreateTempFile, /* 82 */
|
||||
TclpDeleteFile, /* 83 */
|
||||
TclpFinalize, /* 84 */
|
||||
TclpFree, /* 85 */
|
||||
TclpGetClicks, /* 86 */
|
||||
TclpGetSeconds, /* 87 */
|
||||
TclpGetTime, /* 88 */
|
||||
TclpGetTimeZone, /* 89 */
|
||||
TclpGetTZName, /* 90 */
|
||||
TclpListVolumes, /* 91 */
|
||||
TclpMakeFile, /* 92 */
|
||||
TclpOpenFile, /* 93 */
|
||||
TclpOpenFileChannel, /* 94 */
|
||||
TclpRealloc, /* 95 */
|
||||
TclpRemoveDirectory, /* 96 */
|
||||
TclpRenameFile, /* 97 */
|
||||
TclParseBraces, /* 98 */
|
||||
TclParseNestedCmd, /* 99 */
|
||||
TclParseQuotes, /* 100 */
|
||||
TclPlatformInit, /* 101 */
|
||||
TclPrecTraceProc, /* 102 */
|
||||
TclPreventAliasLoop, /* 103 */
|
||||
TclPrintByteCodeObj, /* 104 */
|
||||
TclProcCleanupProc, /* 105 */
|
||||
TclProcCompileProc, /* 106 */
|
||||
TclProcDeleteProc, /* 107 */
|
||||
TclProcInterpProc, /* 108 */
|
||||
TclRenameCommand, /* 109 */
|
||||
TclResetShadowedCmdRefs, /* 110 */
|
||||
TclServiceIdle, /* 111 */
|
||||
TclSetElementOfIndexedArray, /* 112 */
|
||||
TclSetIndexedScalar, /* 113 */
|
||||
TclSetPreInitScript, /* 114 */
|
||||
TclSetupEnv, /* 115 */
|
||||
TclSockGetPort, /* 116 */
|
||||
TclSockMinimumBuffers, /* 117 */
|
||||
TclStat, /* 118 */
|
||||
TclStatDeleteProc, /* 119 */
|
||||
TclStatInsertProc, /* 120 */
|
||||
TclTeardownNamespace, /* 121 */
|
||||
TclUpdateReturnInfo, /* 122 */
|
||||
TclWordEnd, /* 123 */
|
||||
Tcl_AddInterpResolvers, /* 124 */
|
||||
Tcl_AppendExportList, /* 125 */
|
||||
Tcl_CreateNamespace, /* 126 */
|
||||
Tcl_DeleteNamespace, /* 127 */
|
||||
Tcl_Export, /* 128 */
|
||||
Tcl_FindCommand, /* 129 */
|
||||
Tcl_FindNamespace, /* 130 */
|
||||
Tcl_GetInterpResolvers, /* 131 */
|
||||
Tcl_GetNamespaceResolvers, /* 132 */
|
||||
Tcl_FindNamespaceVar, /* 133 */
|
||||
Tcl_ForgetImport, /* 134 */
|
||||
Tcl_GetCommandFromObj, /* 135 */
|
||||
Tcl_GetCommandFullName, /* 136 */
|
||||
Tcl_GetCurrentNamespace, /* 137 */
|
||||
Tcl_GetGlobalNamespace, /* 138 */
|
||||
Tcl_GetVariableFullName, /* 139 */
|
||||
Tcl_Import, /* 140 */
|
||||
Tcl_PopCallFrame, /* 141 */
|
||||
Tcl_PushCallFrame, /* 142 */
|
||||
Tcl_RemoveInterpResolvers, /* 143 */
|
||||
Tcl_SetNamespaceResolvers, /* 144 */
|
||||
TclCompileBreakCmd, /* 145 */
|
||||
TclCompileCatchCmd, /* 146 */
|
||||
TclCompileContinueCmd, /* 147 */
|
||||
TclCompileExprCmd, /* 148 */
|
||||
TclCompileForCmd, /* 149 */
|
||||
TclCompileForeachCmd, /* 150 */
|
||||
TclCompileIfCmd, /* 151 */
|
||||
TclCompileIncrCmd, /* 152 */
|
||||
TclCompileSetCmd, /* 153 */
|
||||
TclCompileWhileCmd, /* 154 */
|
||||
TclFindElement, /* 22 */
|
||||
TclFindProc, /* 23 */
|
||||
TclFormatInt, /* 24 */
|
||||
TclFreePackageInfo, /* 25 */
|
||||
TclGetCwd, /* 26 */
|
||||
TclGetDate, /* 27 */
|
||||
TclGetDefaultStdChannel, /* 28 */
|
||||
TclGetElementOfIndexedArray, /* 29 */
|
||||
TclGetEnv, /* 30 */
|
||||
TclGetExtension, /* 31 */
|
||||
TclGetFrame, /* 32 */
|
||||
TclGetInterpProc, /* 33 */
|
||||
TclGetIntForIndex, /* 34 */
|
||||
TclGetIndexedScalar, /* 35 */
|
||||
TclGetLong, /* 36 */
|
||||
TclGetLoadedPackages, /* 37 */
|
||||
TclGetNamespaceForQualName, /* 38 */
|
||||
TclGetObjInterpProc, /* 39 */
|
||||
TclGetOpenMode, /* 40 */
|
||||
TclGetOriginalCommand, /* 41 */
|
||||
TclGetUserHome, /* 42 */
|
||||
TclGlobalInvoke, /* 43 */
|
||||
TclGuessPackageName, /* 44 */
|
||||
TclHideUnsafeCommands, /* 45 */
|
||||
TclInExit, /* 46 */
|
||||
TclIncrElementOfIndexedArray, /* 47 */
|
||||
TclIncrIndexedScalar, /* 48 */
|
||||
TclIncrVar2, /* 49 */
|
||||
TclInitCompiledLocals, /* 50 */
|
||||
TclInterpInit, /* 51 */
|
||||
TclInvoke, /* 52 */
|
||||
TclInvokeObjectCommand, /* 53 */
|
||||
TclInvokeStringCommand, /* 54 */
|
||||
TclIsProc, /* 55 */
|
||||
TclLoadFile, /* 56 */
|
||||
TclLooksLikeInt, /* 57 */
|
||||
TclLookupVar, /* 58 */
|
||||
TclMatchFiles, /* 59 */
|
||||
TclNeedSpace, /* 60 */
|
||||
TclNewProcBodyObj, /* 61 */
|
||||
TclObjCommandComplete, /* 62 */
|
||||
TclObjInterpProc, /* 63 */
|
||||
TclObjInvoke, /* 64 */
|
||||
TclObjInvokeGlobal, /* 65 */
|
||||
TclOpenFileChannelDeleteProc, /* 66 */
|
||||
TclOpenFileChannelInsertProc, /* 67 */
|
||||
TclpAccess, /* 68 */
|
||||
TclpAlloc, /* 69 */
|
||||
TclpCopyFile, /* 70 */
|
||||
TclpCopyDirectory, /* 71 */
|
||||
TclpCreateDirectory, /* 72 */
|
||||
TclpDeleteFile, /* 73 */
|
||||
TclpFree, /* 74 */
|
||||
TclpGetClicks, /* 75 */
|
||||
TclpGetSeconds, /* 76 */
|
||||
TclpGetTime, /* 77 */
|
||||
TclpGetTimeZone, /* 78 */
|
||||
TclpListVolumes, /* 79 */
|
||||
TclpOpenFileChannel, /* 80 */
|
||||
TclpRealloc, /* 81 */
|
||||
TclpRemoveDirectory, /* 82 */
|
||||
TclpRenameFile, /* 83 */
|
||||
TclParseBraces, /* 84 */
|
||||
TclParseNestedCmd, /* 85 */
|
||||
TclParseQuotes, /* 86 */
|
||||
TclPlatformInit, /* 87 */
|
||||
TclPrecTraceProc, /* 88 */
|
||||
TclPreventAliasLoop, /* 89 */
|
||||
TclPrintByteCodeObj, /* 90 */
|
||||
TclProcCleanupProc, /* 91 */
|
||||
TclProcCompileProc, /* 92 */
|
||||
TclProcDeleteProc, /* 93 */
|
||||
TclProcInterpProc, /* 94 */
|
||||
TclpStat, /* 95 */
|
||||
TclRenameCommand, /* 96 */
|
||||
TclResetShadowedCmdRefs, /* 97 */
|
||||
TclServiceIdle, /* 98 */
|
||||
TclSetElementOfIndexedArray, /* 99 */
|
||||
TclSetIndexedScalar, /* 100 */
|
||||
TclSetPreInitScript, /* 101 */
|
||||
TclSetupEnv, /* 102 */
|
||||
TclSockGetPort, /* 103 */
|
||||
TclSockMinimumBuffers, /* 104 */
|
||||
TclStat, /* 105 */
|
||||
TclStatDeleteProc, /* 106 */
|
||||
TclStatInsertProc, /* 107 */
|
||||
TclTeardownNamespace, /* 108 */
|
||||
TclUpdateReturnInfo, /* 109 */
|
||||
TclWordEnd, /* 110 */
|
||||
Tcl_AddInterpResolvers, /* 111 */
|
||||
Tcl_AppendExportList, /* 112 */
|
||||
Tcl_CreateNamespace, /* 113 */
|
||||
Tcl_DeleteNamespace, /* 114 */
|
||||
Tcl_Export, /* 115 */
|
||||
Tcl_FindCommand, /* 116 */
|
||||
Tcl_FindNamespace, /* 117 */
|
||||
Tcl_GetInterpResolvers, /* 118 */
|
||||
Tcl_GetNamespaceResolvers, /* 119 */
|
||||
Tcl_FindNamespaceVar, /* 120 */
|
||||
Tcl_ForgetImport, /* 121 */
|
||||
Tcl_GetCommandFromObj, /* 122 */
|
||||
Tcl_GetCommandFullName, /* 123 */
|
||||
Tcl_GetCurrentNamespace, /* 124 */
|
||||
Tcl_GetGlobalNamespace, /* 125 */
|
||||
Tcl_GetVariableFullName, /* 126 */
|
||||
Tcl_Import, /* 127 */
|
||||
Tcl_PopCallFrame, /* 128 */
|
||||
Tcl_PushCallFrame, /* 129 */
|
||||
Tcl_RemoveInterpResolvers, /* 130 */
|
||||
Tcl_SetNamespaceResolvers, /* 131 */
|
||||
TclHasSockets, /* 132 */
|
||||
TclpGetDate, /* 133 */
|
||||
TclStrftime, /* 134 */
|
||||
TclpCheckStackSpace, /* 135 */
|
||||
};
|
||||
|
||||
extern TclIntStubs *tclIntStubsPtr = &tclIntStubs;
|
||||
TclIntStubs *tclIntStubsPtr = &tclIntStubs;
|
||||
|
||||
TclIntPlatStubs tclIntPlatStubs = {
|
||||
TCL_STUB_MAGIC,
|
||||
NULL,
|
||||
#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
|
||||
TclGetAndDetachPids, /* 0 */
|
||||
TclpCloseFile, /* 1 */
|
||||
TclpCreateCommandChannel, /* 2 */
|
||||
TclpCreatePipe, /* 3 */
|
||||
TclpCreateProcess, /* 4 */
|
||||
TclpCreateTempFile, /* 5 */
|
||||
TclpMakeFile, /* 6 */
|
||||
TclpOpenFile, /* 7 */
|
||||
TclUnixWaitForFile, /* 8 */
|
||||
#endif /* UNIX */
|
||||
#ifdef __WIN32__
|
||||
TclWinConvertError, /* 0 */
|
||||
TclWinConvertWSAError, /* 1 */
|
||||
@@ -480,29 +519,68 @@ TclIntPlatStubs tclIntPlatStubs = {
|
||||
TclWinLoadLibrary, /* 5 */
|
||||
TclWinNToHS, /* 6 */
|
||||
TclWinSetSockOpt, /* 7 */
|
||||
TclpGetPid, /* 8 */
|
||||
TclWinGetPlatformId, /* 9 */
|
||||
TclWinSynchSpawn, /* 10 */
|
||||
TclGetAndDetachPids, /* 11 */
|
||||
TclpCloseFile, /* 12 */
|
||||
TclpCreateCommandChannel, /* 13 */
|
||||
TclpCreatePipe, /* 14 */
|
||||
TclpCreateProcess, /* 15 */
|
||||
TclpCreateTempFile, /* 16 */
|
||||
TclpGetTZName, /* 17 */
|
||||
TclpMakeFile, /* 18 */
|
||||
TclpOpenFile, /* 19 */
|
||||
#endif /* __WIN32__ */
|
||||
#ifdef MAC_TCL
|
||||
TclpCheckStackSpace, /* 0 */
|
||||
TclpSysAlloc, /* 1 */
|
||||
TclpSysFree, /* 2 */
|
||||
TclpSysRealloc, /* 3 */
|
||||
TclPlatformExit, /* 4 */
|
||||
TclpSysAlloc, /* 0 */
|
||||
TclpSysFree, /* 1 */
|
||||
TclpSysRealloc, /* 2 */
|
||||
TclPlatformExit, /* 3 */
|
||||
FSpGetDefaultDir, /* 4 */
|
||||
FSpSetDefaultDir, /* 5 */
|
||||
FSpFindFolder, /* 6 */
|
||||
GetGlobalMouse, /* 7 */
|
||||
FSpGetDirectoryID, /* 8 */
|
||||
FSpOpenResFileCompat, /* 9 */
|
||||
FSpCreateResFileCompat, /* 10 */
|
||||
FSpLocationFromPath, /* 11 */
|
||||
FSpPathFromLocation, /* 12 */
|
||||
TclMacExitHandler, /* 13 */
|
||||
TclMacInitExitToShell, /* 14 */
|
||||
TclMacInstallExitToShellPatch, /* 15 */
|
||||
TclMacOSErrorToPosixError, /* 16 */
|
||||
TclMacRemoveTimer, /* 17 */
|
||||
TclMacStartTimer, /* 18 */
|
||||
TclMacTimerExpired, /* 19 */
|
||||
TclMacRegisterResourceFork, /* 20 */
|
||||
TclMacUnRegisterResourceFork, /* 21 */
|
||||
TclMacCreateEnv, /* 22 */
|
||||
TclMacFOpenHack, /* 23 */
|
||||
TclMacReadlink, /* 24 */
|
||||
TclMacChmod, /* 25 */
|
||||
#endif /* MAC_TCL */
|
||||
};
|
||||
|
||||
extern TclIntPlatStubs *tclIntPlatStubsPtr = &tclIntPlatStubs;
|
||||
TclIntPlatStubs *tclIntPlatStubsPtr = &tclIntPlatStubs;
|
||||
|
||||
TclPlatStubs tclPlatStubs = {
|
||||
TCL_STUB_MAGIC,
|
||||
NULL,
|
||||
#if !defined(__WIN32__) && !defined(MAC_TCL)
|
||||
Tcl_CreateFileHandler, /* 0 */
|
||||
Tcl_DeleteFileHandler, /* 1 */
|
||||
Tcl_GetOpenFile, /* 2 */
|
||||
#endif /* UNIX */
|
||||
#ifdef MAC_TCL
|
||||
Tcl_MacSetEventProc, /* 0 */
|
||||
Tcl_MacConvertTextResource, /* 1 */
|
||||
Tcl_MacEvalResource, /* 2 */
|
||||
Tcl_MacFindResource, /* 3 */
|
||||
Tcl_GetOSTypeFromObj, /* 4 */
|
||||
Tcl_SetOSTypeObj, /* 5 */
|
||||
Tcl_NewOSTypeObj, /* 6 */
|
||||
strncasecmp, /* 7 */
|
||||
strcasecmp, /* 8 */
|
||||
#endif /* MAC_TCL */
|
||||
};
|
||||
|
||||
extern TclPlatStubs *tclPlatStubsPtr = &tclPlatStubs;
|
||||
TclPlatStubs *tclPlatStubsPtr = &tclPlatStubs;
|
||||
|
||||
static TclStubHooks tclStubHooks = {
|
||||
&tclPlatStubs,
|
||||
|
||||
+11
-2
@@ -10,7 +10,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclStubLib.c,v 1.1 1999/03/03 00:38:43 stanton Exp $
|
||||
* RCS: @(#) $Id: tclStubLib.c,v 1.2.2.1 1999/03/05 20:18:06 stanton Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -20,7 +20,10 @@
|
||||
* including the rest of the stub functions.
|
||||
*/
|
||||
|
||||
#undef TCL_NO_INLINES
|
||||
#ifndef USE_TCL_STUBS
|
||||
#define USE_TCL_STUBS
|
||||
#endif
|
||||
#undef USE_TCL_STUB_PROCS
|
||||
|
||||
#include "tclInt.h"
|
||||
#include "tclPort.h"
|
||||
@@ -35,6 +38,8 @@
|
||||
|
||||
TclStubs *tclStubsPtr;
|
||||
TclPlatStubs *tclPlatStubsPtr;
|
||||
TclIntStubs *tclIntStubsPtr;
|
||||
TclIntPlatStubs *tclIntPlatStubsPtr;
|
||||
|
||||
static TclStubs * HasStubSupport _ANSI_ARGS_((Tcl_Interp *interp));
|
||||
|
||||
@@ -96,8 +101,12 @@ Tcl_InitStubs (interp, version, exact)
|
||||
|
||||
if (tclStubsPtr->hooks) {
|
||||
tclPlatStubsPtr = tclStubsPtr->hooks->tclPlatStubs;
|
||||
tclIntStubsPtr = tclStubsPtr->hooks->tclIntStubs;
|
||||
tclIntPlatStubsPtr = tclStubsPtr->hooks->tclIntPlatStubs;
|
||||
} else {
|
||||
tclPlatStubsPtr = NULL;
|
||||
tclIntStubsPtr = NULL;
|
||||
tclIntPlatStubsPtr = NULL;
|
||||
}
|
||||
|
||||
return actualVersion;
|
||||
|
||||
+1667
-1621
File diff suppressed because it is too large
Load Diff
+2
-1
@@ -12,7 +12,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclTest.c,v 1.8 1999/02/03 02:58:25 stanton Exp $
|
||||
* RCS: @(#) $Id: tclTest.c,v 1.8.4.1 1999/03/05 20:18:07 stanton Exp $
|
||||
*/
|
||||
|
||||
#define TCL_TEST
|
||||
@@ -2716,6 +2716,7 @@ NoopObjCmd(unused, interp, objc, objv)
|
||||
*/
|
||||
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
TestsetCmd(data, interp, argc, argv)
|
||||
ClientData data; /* Additional flags for Get/SetVar2. */
|
||||
register Tcl_Interp *interp; /* Current interpreter. */
|
||||
|
||||
+142
-72
@@ -10,7 +10,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclUtil.c,v 1.3 1998/09/14 18:40:02 stanton Exp $
|
||||
* RCS: @(#) $Id: tclUtil.c,v 1.3.4.1 1999/03/03 00:38:43 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
@@ -1406,6 +1406,92 @@ Tcl_GetObjResult(interp)
|
||||
return iPtr->objResultPtr;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_AppendResultVA --
|
||||
*
|
||||
* Append a variable number of strings onto the interpreter's string
|
||||
* result.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* The result of the interpreter given by the first argument is
|
||||
* extended by the strings in the va_list (up to a terminating NULL
|
||||
* argument).
|
||||
*
|
||||
* If the string result is empty, the object result is moved to the
|
||||
* string result, then the object result is reset.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void
|
||||
Tcl_AppendResultVA (interp, argList)
|
||||
Tcl_Interp *interp; /* Interpreter with which to associate the
|
||||
* return value. */
|
||||
va_list argList; /* Variable argument list. */
|
||||
{
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
va_list tmpArgList;
|
||||
char *string;
|
||||
int newSpace;
|
||||
|
||||
/*
|
||||
* If the string result is empty, move the object result to the
|
||||
* string result, then reset the object result.
|
||||
* FAILS IF OBJECT RESULT'S STRING REPRESENTATION CONTAINS NULLS.
|
||||
*/
|
||||
|
||||
if (*(iPtr->result) == 0) {
|
||||
Tcl_SetResult((Tcl_Interp *) iPtr,
|
||||
TclGetStringFromObj(Tcl_GetObjResult((Tcl_Interp *) iPtr),
|
||||
(int *) NULL),
|
||||
TCL_VOLATILE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Scan through all the arguments to see how much space is needed.
|
||||
*/
|
||||
|
||||
tmpArgList = argList;
|
||||
newSpace = 0;
|
||||
while (1) {
|
||||
string = va_arg(tmpArgList, char *);
|
||||
if (string == NULL) {
|
||||
break;
|
||||
}
|
||||
newSpace += strlen(string);
|
||||
}
|
||||
|
||||
/*
|
||||
* If the append buffer isn't already setup and large enough to hold
|
||||
* the new data, set it up.
|
||||
*/
|
||||
|
||||
if ((iPtr->result != iPtr->appendResult)
|
||||
|| (iPtr->appendResult[iPtr->appendUsed] != 0)
|
||||
|| ((newSpace + iPtr->appendUsed) >= iPtr->appendAvl)) {
|
||||
SetupAppendBuffer(iPtr, newSpace);
|
||||
}
|
||||
|
||||
/*
|
||||
* Now go through all the argument strings again, copying them into the
|
||||
* buffer.
|
||||
*/
|
||||
|
||||
while (1) {
|
||||
string = va_arg(argList, char *);
|
||||
if (string == NULL) {
|
||||
break;
|
||||
}
|
||||
strcpy(iPtr->appendResult + iPtr->appendUsed, string);
|
||||
iPtr->appendUsed += strlen(string);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
@@ -1431,64 +1517,11 @@ Tcl_GetObjResult(interp)
|
||||
void
|
||||
Tcl_AppendResult TCL_VARARGS_DEF(Tcl_Interp *,arg1)
|
||||
{
|
||||
Tcl_Interp *interp;
|
||||
va_list argList;
|
||||
Interp *iPtr;
|
||||
char *string;
|
||||
int newSpace;
|
||||
|
||||
/*
|
||||
* If the string result is empty, move the object result to the
|
||||
* string result, then reset the object result.
|
||||
* FAILS IF OBJECT RESULT'S STRING REPRESENTATION CONTAINS NULLS.
|
||||
*/
|
||||
|
||||
iPtr = (Interp *) TCL_VARARGS_START(Tcl_Interp *,arg1,argList);
|
||||
if (*(iPtr->result) == 0) {
|
||||
Tcl_SetResult((Tcl_Interp *) iPtr,
|
||||
TclGetStringFromObj(Tcl_GetObjResult((Tcl_Interp *) iPtr),
|
||||
(int *) NULL),
|
||||
TCL_VOLATILE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Scan through all the arguments to see how much space is needed.
|
||||
*/
|
||||
|
||||
newSpace = 0;
|
||||
while (1) {
|
||||
string = va_arg(argList, char *);
|
||||
if (string == NULL) {
|
||||
break;
|
||||
}
|
||||
newSpace += strlen(string);
|
||||
}
|
||||
va_end(argList);
|
||||
|
||||
/*
|
||||
* If the append buffer isn't already setup and large enough to hold
|
||||
* the new data, set it up.
|
||||
*/
|
||||
|
||||
if ((iPtr->result != iPtr->appendResult)
|
||||
|| (iPtr->appendResult[iPtr->appendUsed] != 0)
|
||||
|| ((newSpace + iPtr->appendUsed) >= iPtr->appendAvl)) {
|
||||
SetupAppendBuffer(iPtr, newSpace);
|
||||
}
|
||||
|
||||
/*
|
||||
* Now go through all the argument strings again, copying them into the
|
||||
* buffer.
|
||||
*/
|
||||
|
||||
TCL_VARARGS_START(Tcl_Interp *,arg1,argList);
|
||||
while (1) {
|
||||
string = va_arg(argList, char *);
|
||||
if (string == NULL) {
|
||||
break;
|
||||
}
|
||||
strcpy(iPtr->appendResult + iPtr->appendUsed, string);
|
||||
iPtr->appendUsed += strlen(string);
|
||||
}
|
||||
interp = TCL_VARARGS_START(Tcl_Interp *,arg1,argList);
|
||||
Tcl_AppendResultVA(interp, argList);
|
||||
va_end(argList);
|
||||
}
|
||||
|
||||
@@ -1721,6 +1754,55 @@ Tcl_ResetResult(interp)
|
||||
iPtr->flags &= ~(ERR_ALREADY_LOGGED | ERR_IN_PROGRESS | ERROR_CODE_SET);
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_SetErrorCodeVA --
|
||||
*
|
||||
* This procedure is called to record machine-readable information
|
||||
* about an error that is about to be returned.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* The errorCode global variable is modified to hold all of the
|
||||
* arguments to this procedure, in a list form with each argument
|
||||
* becoming one element of the list. A flag is set internally
|
||||
* to remember that errorCode has been set, so the variable doesn't
|
||||
* get set automatically when the error is returned.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void
|
||||
Tcl_SetErrorCodeVA (interp, argList)
|
||||
Tcl_Interp *interp; /* Interpreter in which to access the errorCode
|
||||
* variable. */
|
||||
va_list argList; /* Variable argument list. */
|
||||
{
|
||||
char *string;
|
||||
int flags;
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
|
||||
/*
|
||||
* Scan through the arguments one at a time, appending them to
|
||||
* $errorCode as list elements.
|
||||
*/
|
||||
|
||||
flags = TCL_GLOBAL_ONLY | TCL_LIST_ELEMENT;
|
||||
while (1) {
|
||||
string = va_arg(argList, char *);
|
||||
if (string == NULL) {
|
||||
break;
|
||||
}
|
||||
(void) Tcl_SetVar2((Tcl_Interp *) iPtr, "errorCode",
|
||||
(char *) NULL, string, flags);
|
||||
flags |= TCL_APPEND_VALUE;
|
||||
}
|
||||
iPtr->flags |= ERROR_CODE_SET;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
@@ -1745,29 +1827,17 @@ Tcl_ResetResult(interp)
|
||||
void
|
||||
Tcl_SetErrorCode TCL_VARARGS_DEF(Tcl_Interp *,arg1)
|
||||
{
|
||||
Tcl_Interp *interp;
|
||||
va_list argList;
|
||||
char *string;
|
||||
int flags;
|
||||
Interp *iPtr;
|
||||
|
||||
/*
|
||||
* Scan through the arguments one at a time, appending them to
|
||||
* $errorCode as list elements.
|
||||
*/
|
||||
|
||||
iPtr = (Interp *) TCL_VARARGS_START(Tcl_Interp *,arg1,argList);
|
||||
flags = TCL_GLOBAL_ONLY | TCL_LIST_ELEMENT;
|
||||
while (1) {
|
||||
string = va_arg(argList, char *);
|
||||
if (string == NULL) {
|
||||
break;
|
||||
}
|
||||
(void) Tcl_SetVar2((Tcl_Interp *) iPtr, "errorCode",
|
||||
(char *) NULL, string, flags);
|
||||
flags |= TCL_APPEND_VALUE;
|
||||
}
|
||||
interp = TCL_VARARGS_START(Tcl_Interp *,arg1,argList);
|
||||
Tcl_SetErrorCodeVA(interp, argList);
|
||||
va_end(argList);
|
||||
iPtr->flags |= ERROR_CODE_SET;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+2
-65
@@ -8,7 +8,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclMac.h,v 1.3 1998/11/10 06:49:22 jingham Exp $
|
||||
* RCS: @(#) $Id: tclMac.h,v 1.3.4.1 1999/03/04 00:59:55 stanton Exp $
|
||||
*/
|
||||
|
||||
#ifndef _TCLMAC
|
||||
@@ -31,70 +31,7 @@
|
||||
|
||||
typedef int (*Tcl_MacConvertEventPtr) _ANSI_ARGS_((EventRecord *eventPtr));
|
||||
|
||||
/*
|
||||
* This is needed by the shells to handle Macintosh events.
|
||||
*/
|
||||
|
||||
EXTERN void Tcl_MacSetEventProc _ANSI_ARGS_((Tcl_MacConvertEventPtr procPtr));
|
||||
|
||||
/*
|
||||
* These routines are useful for handling using scripts from resources
|
||||
* in the application shell
|
||||
*/
|
||||
|
||||
EXTERN char * Tcl_MacConvertTextResource _ANSI_ARGS_((Handle resource));
|
||||
EXTERN int Tcl_MacEvalResource _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
char *resourceName, int resourceNumber, char *fileName));
|
||||
EXTERN Handle Tcl_MacFindResource _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
long resourceType, char *resourceName,
|
||||
int resourceNumber, char *resFileRef, int * releaseIt));
|
||||
|
||||
/* These routines support the new OSType object type (i.e. the packed 4
|
||||
* character type and creator codes).
|
||||
*/
|
||||
|
||||
EXTERN int Tcl_GetOSTypeFromObj _ANSI_ARGS_((Tcl_Interp *interp,
|
||||
Tcl_Obj *objPtr, OSType *osTypePtr));
|
||||
EXTERN void Tcl_SetOSTypeObj _ANSI_ARGS_((Tcl_Obj *objPtr,
|
||||
OSType osType));
|
||||
EXTERN Tcl_Obj * Tcl_NewOSTypeObj _ANSI_ARGS_((OSType osType));
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* The following routines are utility functions in Tcl. They are exported
|
||||
* here because they are needed in Tk. They are not officially supported,
|
||||
* however. The first set are from the MoreFiles package.
|
||||
*/
|
||||
|
||||
EXTERN pascal OSErr FSpGetDirectoryID(const FSSpec *spec,
|
||||
long *theDirID, Boolean *isDirectory);
|
||||
EXTERN pascal short FSpOpenResFileCompat(const FSSpec *spec,
|
||||
SignedByte permission);
|
||||
EXTERN pascal void FSpCreateResFileCompat(const FSSpec *spec,
|
||||
OSType creator, OSType fileType,
|
||||
ScriptCode scriptTag);
|
||||
/*
|
||||
* Like the MoreFiles routines these fix problems in the standard
|
||||
* Mac calls. These routines is from tclMacUtils.h.
|
||||
*/
|
||||
|
||||
EXTERN int FSpLocationFromPath _ANSI_ARGS_((int length, CONST char *path,
|
||||
FSSpecPtr theSpec));
|
||||
EXTERN OSErr FSpPathFromLocation _ANSI_ARGS_((FSSpecPtr theSpec,
|
||||
int *length, Handle *fullPath));
|
||||
|
||||
/*
|
||||
* These are not in MSL 2.1.2, so we need to export them from the
|
||||
* Tcl shared library. They are found in the compat directory
|
||||
* except the panic routine which is found in tclMacPanic.h.
|
||||
*/
|
||||
|
||||
EXTERN int strncasecmp _ANSI_ARGS_((CONST char *s1,
|
||||
CONST char *s2, size_t n));
|
||||
EXTERN int strcasecmp _ANSI_ARGS_((CONST char *s1,
|
||||
CONST char *s2));
|
||||
EXTERN void panic _ANSI_ARGS_(TCL_VARARGS(char *,format));
|
||||
#include "tclPlatDecls.h"
|
||||
|
||||
#pragma export reset
|
||||
|
||||
|
||||
+30
-1
@@ -9,7 +9,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclMacChan.c,v 1.3 1998/09/14 18:40:04 stanton Exp $
|
||||
* RCS: @(#) $Id: tclMacChan.c,v 1.3.4.1 1999/03/04 01:01:11 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
@@ -918,6 +918,35 @@ OpenFileChannel(
|
||||
return chan;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_MakeFileChannel --
|
||||
*
|
||||
* Makes a Tcl_Channel from an existing OS level file handle.
|
||||
*
|
||||
* Results:
|
||||
* The Tcl_Channel created around the preexisting OS level file handle.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
Tcl_Channel
|
||||
Tcl_MakeFileChannel(handle, mode)
|
||||
ClientData handle; /* OS level handle. */
|
||||
int mode; /* ORed combination of TCL_READABLE and
|
||||
* TCL_WRITABLE to indicate file mode. */
|
||||
{
|
||||
/*
|
||||
* Not implemented yet.
|
||||
*/
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclMacFile.c,v 1.4 1998/09/14 18:40:05 stanton Exp $
|
||||
* RCS: @(#) $Id: tclMacFile.c,v 1.4.4.2 1999/03/04 01:00:48 stanton Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
+2
-28
@@ -8,7 +8,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclMacInt.h,v 1.2 1998/09/14 18:40:05 stanton Exp $
|
||||
* RCS: @(#) $Id: tclMacInt.h,v 1.2.4.1 1999/03/04 00:59:55 stanton Exp $
|
||||
*/
|
||||
|
||||
#ifndef _TCLMACINT
|
||||
@@ -46,34 +46,8 @@
|
||||
*/
|
||||
typedef pascal void (*ExitToShellProcPtr)(void);
|
||||
|
||||
/*
|
||||
* Prototypes for functions found in the tclMacUtil.c compatability library.
|
||||
*/
|
||||
#include "tclIntPlatDecls.h"
|
||||
|
||||
EXTERN int FSpGetDefaultDir _ANSI_ARGS_((FSSpecPtr theSpec));
|
||||
EXTERN int FSpSetDefaultDir _ANSI_ARGS_((FSSpecPtr theSpec));
|
||||
EXTERN OSErr FSpFindFolder _ANSI_ARGS_((short vRefNum, OSType folderType,
|
||||
Boolean createFolder, FSSpec *spec));
|
||||
EXTERN void GetGlobalMouse _ANSI_ARGS_((Point *mouse));
|
||||
|
||||
/*
|
||||
* Prototypes of Mac only internal functions.
|
||||
*/
|
||||
|
||||
EXTERN void TclCreateMacEventSource _ANSI_ARGS_((void));
|
||||
EXTERN int TclMacConsoleInit _ANSI_ARGS_((void));
|
||||
EXTERN void TclMacExitHandler _ANSI_ARGS_((void));
|
||||
EXTERN void TclMacInitExitToShell _ANSI_ARGS_((int usePatch));
|
||||
EXTERN OSErr TclMacInstallExitToShellPatch _ANSI_ARGS_((
|
||||
ExitToShellProcPtr newProc));
|
||||
EXTERN int TclMacOSErrorToPosixError _ANSI_ARGS_((int error));
|
||||
EXTERN void TclMacRemoveTimer _ANSI_ARGS_((void *timerToken));
|
||||
EXTERN void * TclMacStartTimer _ANSI_ARGS_((long ms));
|
||||
EXTERN int TclMacTimerExpired _ANSI_ARGS_((void *timerToken));
|
||||
EXTERN int TclMacRegisterResourceFork _ANSI_ARGS_((short fileRef, Tcl_Obj *tokenPtr,
|
||||
int insert));
|
||||
EXTERN short TclMacUnRegisterResourceFork _ANSI_ARGS_((char *tokenPtr, Tcl_Obj *resultPtr));
|
||||
|
||||
#pragma export reset
|
||||
|
||||
#endif /* _TCLMACINT */
|
||||
|
||||
+1
-27
@@ -10,7 +10,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclMacPort.h,v 1.5 1998/09/14 18:40:06 stanton Exp $
|
||||
* RCS: @(#) $Id: tclMacPort.h,v 1.5.4.1 1999/03/04 00:59:55 stanton Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACPORT
|
||||
@@ -182,20 +182,9 @@ extern char **environ;
|
||||
* Prototypes needed for compatability
|
||||
*/
|
||||
|
||||
EXTERN int TclMacCreateEnv _ANSI_ARGS_((void));
|
||||
EXTERN int strncasecmp _ANSI_ARGS_((CONST char *s1,
|
||||
CONST char *s2, size_t n));
|
||||
|
||||
/*
|
||||
* The following declarations belong in tclInt.h, but depend on platform
|
||||
* specific types (e.g. struct tm).
|
||||
*/
|
||||
|
||||
EXTERN struct tm * TclpGetDate _ANSI_ARGS_((const time_t *tp,
|
||||
int useGMT));
|
||||
EXTERN size_t TclStrftime _ANSI_ARGS_((char *s, size_t maxsize,
|
||||
const char *format, const struct tm *t));
|
||||
|
||||
#define tzset()
|
||||
#define TclpGetPid(pid) ((unsigned long) (pid))
|
||||
|
||||
@@ -206,14 +195,10 @@ EXTERN size_t TclStrftime _ANSI_ARGS_((char *s, size_t maxsize,
|
||||
*/
|
||||
#define lstat(path, bufPtr) TclStat(path, bufPtr)
|
||||
|
||||
EXTERN FILE * TclMacFOpenHack _ANSI_ARGS_((const char *path,
|
||||
const char *mode));
|
||||
#define fopen(path, mode) TclMacFOpenHack(path, mode)
|
||||
EXTERN int TclMacReadlink _ANSI_ARGS_((char *path, char *buf, int size));
|
||||
#define readlink(fileName, buffer, size) TclMacReadlink(fileName, buffer, size)
|
||||
#ifdef TCL_TEST
|
||||
#define chmod(path, mode) TclMacChmod(path, mode)
|
||||
EXTERN int TclMacChmod(char *path, int mode);
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -254,15 +239,4 @@ void TclUnsetEnv(CONST char *name);
|
||||
|
||||
#define TclpFinalize()
|
||||
|
||||
/*
|
||||
* The following define should really be in tclInt.h, but tclInt.h does
|
||||
* not include tclPort.h, which includes the "struct stat" definition.
|
||||
*/
|
||||
|
||||
EXTERN int TclpSameFile _ANSI_ARGS_((char *file1, char *file2,
|
||||
struct stat *sourceStatBufPtr,
|
||||
struct stat *destStatBufPtr)) ;
|
||||
EXTERN int TclpStat _ANSI_ARGS_ ((CONST char *path, struct stat *buf));
|
||||
EXTERN int TclpAccess _ANSI_ARGS_ ((CONST char *path, int mode));
|
||||
|
||||
#endif /* _MACPORT */
|
||||
|
||||
+3
-2
@@ -9,7 +9,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclMacTime.c,v 1.2 1998/09/14 18:40:07 stanton Exp $
|
||||
* RCS: @(#) $Id: tclMacTime.c,v 1.2.4.1 1999/03/04 00:58:26 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
@@ -241,9 +241,10 @@ TclpGetTime(
|
||||
|
||||
struct tm *
|
||||
TclpGetDate(
|
||||
const time_t *tp, /* Time struct to fill. */
|
||||
TclpTime_t time, /* Time struct to fill. */
|
||||
int useGMT) /* True if date should reflect GNT time. */
|
||||
{
|
||||
const time_t *tp = (const time_t *)time;
|
||||
DateTimeRec dtr;
|
||||
MachineLocation loc;
|
||||
long int offset;
|
||||
|
||||
+74
-2
@@ -9,7 +9,7 @@
|
||||
# See the file "license.terms" for information on usage and redistribution
|
||||
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
#
|
||||
# RCS: @(#) $Id: pkg.test,v 1.2 1998/09/14 18:40:12 stanton Exp $
|
||||
# RCS: @(#) $Id: pkg.test,v 1.2.4.1 1999/03/03 00:38:44 stanton Exp $
|
||||
|
||||
if {[string compare test [info procs test]] == 1} then {source defs}
|
||||
|
||||
@@ -483,7 +483,7 @@ test pkg-3.52 {Tcl_PackageCmd procedure, "vsatisfies" option} {
|
||||
} {0}
|
||||
test pkg-3.53 {Tcl_PackageCmd procedure, "versions" option} {
|
||||
list [catch {package foo} msg] $msg
|
||||
} {1 {bad option "foo": should be forget, ifneeded, names, provide, require, unknown, vcompare, versions, or vsatisfies}}
|
||||
} {1 {bad option "foo": should be forget, ifneeded, names, present, provide, require, unknown, vcompare, versions, or vsatisfies}}
|
||||
|
||||
# No tests for FindPackage; can't think up anything detectable
|
||||
# errors.
|
||||
@@ -555,6 +555,78 @@ test pkg-6.9 {ComparePkgVersions procedure} {
|
||||
package vsatisfies 2 1
|
||||
} {0}
|
||||
|
||||
test pkg-7.1 {Tcl_PkgPresent procedure, any version} {
|
||||
package forget t
|
||||
package provide t 2.4
|
||||
package present t
|
||||
} {2.4}
|
||||
test pkg-7.2 {Tcl_PkgPresent procedure, correct version} {
|
||||
package forget t
|
||||
package provide t 2.4
|
||||
package present t 2.4
|
||||
} {2.4}
|
||||
test pkg-7.3 {Tcl_PkgPresent procedure, satisfying version} {
|
||||
package forget t
|
||||
package provide t 2.4
|
||||
package present t 2.0
|
||||
} {2.4}
|
||||
test pkg-7.4 {Tcl_PkgPresent procedure, not satisfying version} {
|
||||
package forget t
|
||||
package provide t 2.4
|
||||
list [catch {package present t 2.6} msg] $msg
|
||||
} {1 {version conflict for package "t": have 2.4, need 2.6}}
|
||||
test pkg-7.5 {Tcl_PkgPresent procedure, not satisfying version} {
|
||||
package forget t
|
||||
package provide t 2.4
|
||||
list [catch {package present t 1.0} msg] $msg
|
||||
} {1 {version conflict for package "t": have 2.4, need 1.0}}
|
||||
test pkg-7.6 {Tcl_PkgPresent procedure, exact version} {
|
||||
package forget t
|
||||
package provide t 2.4
|
||||
package present -exact t 2.4
|
||||
} {2.4}
|
||||
test pkg-7.7 {Tcl_PkgPresent procedure, not exact version} {
|
||||
package forget t
|
||||
package provide t 2.4
|
||||
list [catch {package present -exact t 2.3} msg] $msg
|
||||
} {1 {version conflict for package "t": have 2.4, need 2.3}}
|
||||
test pkg-7.8 {Tcl_PkgPresent procedure, unknown package} {
|
||||
package forget t
|
||||
list [catch {package present t} msg] $msg
|
||||
} {1 {package t is not present}}
|
||||
test pkg-7.9 {Tcl_PkgPresent procedure, unknown package} {
|
||||
package forget t
|
||||
list [catch {package present t 2.4} msg] $msg
|
||||
} {1 {package t 2.4 is not present}}
|
||||
test pkg-7.10 {Tcl_PkgPresent procedure, unknown package} {
|
||||
package forget t
|
||||
list [catch {package present -exact t 2.4} msg] $msg
|
||||
} {1 {package t 2.4 is not present}}
|
||||
test pkg-7.11 {Tcl_PackageCmd procedure, "present" option} {
|
||||
list [catch {package present} msg] $msg
|
||||
} {1 {wrong # args: should be "package present ?-exact? package ?version?"}}
|
||||
test pkg-7.12 {Tcl_PackageCmd procedure, "present" option} {
|
||||
list [catch {package present a b c} msg] $msg
|
||||
} {1 {wrong # args: should be "package present ?-exact? package ?version?"}}
|
||||
test pkg-7.13 {Tcl_PackageCmd procedure, "present" option} {
|
||||
list [catch {package present -exact a b c} msg] $msg
|
||||
} {1 {wrong # args: should be "package present ?-exact? package ?version?"}}
|
||||
test pkg-7.14 {Tcl_PackageCmd procedure, "present" option} {
|
||||
list [catch {package present -bs a b} msg] $msg
|
||||
} {1 {wrong # args: should be "package present ?-exact? package ?version?"}}
|
||||
test pkg-7.15 {Tcl_PackageCmd procedure, "present" option} {
|
||||
list [catch {package present x a.b} msg] $msg
|
||||
} {1 {expected version number but got "a.b"}}
|
||||
test pkg-7.16 {Tcl_PackageCmd procedure, "present" option} {
|
||||
list [catch {package present -exact x a.b} msg] $msg
|
||||
} {1 {expected version number but got "a.b"}}
|
||||
test pkg-7.17 {Tcl_PackageCmd procedure, "present" option} {
|
||||
list [catch {package present -exact x} msg] $msg
|
||||
} {1 {wrong # args: should be "package present ?-exact? package ?version?"}}
|
||||
test pkg-7.18 {Tcl_PackageCmd procedure, "present" option} {
|
||||
list [catch {package present -exact} msg] $msg
|
||||
} {1 {wrong # args: should be "package present ?-exact? package ?version?"}}
|
||||
|
||||
set auto_path $oldPath
|
||||
package unknown $oldPkgUnknown
|
||||
concat
|
||||
|
||||
+92
-104
@@ -8,7 +8,7 @@
|
||||
# See the file "license.terms" for information on usage and redistribution
|
||||
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
#
|
||||
# RCS: @(#) $Id: genStubs.tcl,v 1.1 1999/03/03 00:38:45 stanton Exp $
|
||||
# RCS: @(#) $Id: genStubs.tcl,v 1.1.2.2 1999/03/10 05:50:29 stanton Exp $
|
||||
|
||||
namespace eval genStubs {
|
||||
# libraryName --
|
||||
@@ -214,7 +214,7 @@ proc genStubs::addPlatformGuard {plat text} {
|
||||
return "#ifdef __WIN32__\n${text}#endif /* __WIN32__ */\n"
|
||||
}
|
||||
unix {
|
||||
return "#if !defined(__WIN32__) && !defined(MAC_TCL)\n${text}#endif /* UNIX */\n"
|
||||
return "#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */\n${text}#endif /* UNIX */\n"
|
||||
}
|
||||
mac {
|
||||
return "#ifdef MAC_TCL\n${text}#endif /* MAC_TCL */\n"
|
||||
@@ -226,8 +226,8 @@ proc genStubs::addPlatformGuard {plat text} {
|
||||
# genStubs::emitSlots --
|
||||
#
|
||||
# Generate the stub table slots for the given interface. If there
|
||||
# are no platform specific slots, then one table is generated for
|
||||
# all platforms, otherwise one table is generated for each platform.
|
||||
# are no generic slots, then one table is generated for each
|
||||
# platform, otherwise one table is generated for all platforms.
|
||||
#
|
||||
# Arguments:
|
||||
# name The name of the interface being emitted.
|
||||
@@ -240,43 +240,7 @@ proc genStubs::emitSlots {name textVar} {
|
||||
variable stubs
|
||||
upvar $textVar text
|
||||
|
||||
set lastNum -1
|
||||
if {[info exists stubs($name,generic,lastNum)]} {
|
||||
set lastNum $stubs($name,generic,lastNum)
|
||||
}
|
||||
set output 0
|
||||
foreach plat {win unix mac} {
|
||||
if {[info exists stubs($name,$plat,lastNum)]} {
|
||||
set num $stubs($name,$plat,lastNum)
|
||||
if {$num < $lastNum} {
|
||||
set num $lastNum
|
||||
}
|
||||
set temp ""
|
||||
for {set i 0} {$i <= $num} {incr i} {
|
||||
if {[info exists stubs($name,$plat,$i)]} {
|
||||
if {[info exists stubs($name,generic,$i)]} {
|
||||
puts stderr "platform entry duplicates generic entry: $i"
|
||||
}
|
||||
append temp [makeSlot $stubs($name,$plat,$i) $i]
|
||||
} elseif {[info exists stubs($name,generic,$i)]} {
|
||||
append temp [makeSlot $stubs($name,generic,$i) $i]
|
||||
} else {
|
||||
append temp " void *reserved$i;\n"
|
||||
}
|
||||
}
|
||||
append text [addPlatformGuard $plat $temp]
|
||||
set output 1
|
||||
}
|
||||
}
|
||||
if {!$output} {
|
||||
for {set i 0} {$i <= $lastNum} {incr i} {
|
||||
if {[info exists stubs($name,generic,$i)]} {
|
||||
append text [makeSlot $stubs($name,generic,$i) $i]
|
||||
} else {
|
||||
append text " void *reserved$i;\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
forAllStubs $name makeSlot 1 text {" void *reserved$i;\n"}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -532,13 +496,14 @@ proc genStubs::makeStub {name decl index} {
|
||||
# Generate the stub table entry for a function.
|
||||
#
|
||||
# Arguments:
|
||||
# name The interface name.
|
||||
# decl The function declaration.
|
||||
# index The slot index for this function.
|
||||
#
|
||||
# Results:
|
||||
# Returns the formatted table entry.
|
||||
|
||||
proc genStubs::makeSlot {decl index} {
|
||||
proc genStubs::makeSlot {name decl index} {
|
||||
lassign $decl rtype fname args
|
||||
|
||||
set lfname [string tolower [string index $fname 0]]
|
||||
@@ -571,6 +536,23 @@ proc genStubs::makeSlot {decl index} {
|
||||
return $text
|
||||
}
|
||||
|
||||
# genStubs::makeInit --
|
||||
#
|
||||
# Generate the prototype for a function.
|
||||
#
|
||||
# Arguments:
|
||||
# name The interface name.
|
||||
# decl The function declaration.
|
||||
# index The slot index for this function.
|
||||
#
|
||||
# Results:
|
||||
# Returns the formatted declaration string.
|
||||
|
||||
proc genStubs::makeInit {name decl index} {
|
||||
append text " " [lindex $decl 1] ", /* " $index " */\n"
|
||||
return $text
|
||||
}
|
||||
|
||||
# genStubs::forAllStubs --
|
||||
#
|
||||
# This function iterates over all of the platforms and invokes
|
||||
@@ -582,29 +564,74 @@ proc genStubs::makeSlot {decl index} {
|
||||
# slotProc The proc to invoke to handle the slot. It will
|
||||
# have the interface name, the declaration, and
|
||||
# the index appended.
|
||||
# onAll If 1, emit the skip string even if there are
|
||||
# definitions for one or more platforms.
|
||||
# textVar The variable to use for output.
|
||||
# skipString The string to emit if a slot is skipped. This
|
||||
# string will be subst'ed in the loop so "$i" can
|
||||
# be used to substitute the index value.
|
||||
#
|
||||
# Results:
|
||||
# None.
|
||||
|
||||
proc genStubs::forAllStubs {name slotProc textVar} {
|
||||
proc genStubs::forAllStubs {name slotProc onAll textVar \
|
||||
{skipString {"/* Slot $i is reserved */\n"}}} {
|
||||
variable stubs
|
||||
upvar $textVar text
|
||||
|
||||
foreach plat {generic win unix mac} {
|
||||
if {[info exists stubs($name,$plat,lastNum)]} {
|
||||
set lastNum $stubs($name,$plat,lastNum)
|
||||
set temp {}
|
||||
for {set i 0} {$i <= $lastNum} {incr i} {
|
||||
if {![info exists stubs($name,$plat,$i)]} {
|
||||
append temp "/* Slot $i is reserved */\n"
|
||||
} else {
|
||||
append temp [$slotProc $name $stubs($name,$plat,$i) $i]
|
||||
set plats [array names stubs $name,*,lastNum]
|
||||
if {[info exists stubs($name,generic,lastNum)]} {
|
||||
# Emit integrated stubs block
|
||||
set lastNum -1
|
||||
foreach plat [array names stubs $name,*,lastNum] {
|
||||
if {$stubs($plat) > $lastNum} {
|
||||
set lastNum $stubs($plat)
|
||||
}
|
||||
}
|
||||
for {set i 0} {$i <= $lastNum} {incr i} {
|
||||
set slots [array names stubs $name,*,$i]
|
||||
set emit 0
|
||||
if {[info exists stubs($name,generic,$i)]} {
|
||||
if {[llength $slots] > 1} {
|
||||
puts stderr "platform entry duplicates generic entry: $i"
|
||||
}
|
||||
append text [$slotProc $name $stubs($name,generic,$i) $i]
|
||||
set emit 1
|
||||
} elseif {[llength $slots] > 0} {
|
||||
foreach plat {unix win mac} {
|
||||
if {[info exists stubs($name,$plat,$i)]} {
|
||||
append text [addPlatformGuard $plat \
|
||||
[$slotProc $name $stubs($name,$plat,$i) $i]]
|
||||
set emit 1
|
||||
} elseif {$onAll} {
|
||||
append text [eval {addPlatformGuard $plat} $skipString]
|
||||
set emit 1
|
||||
}
|
||||
}
|
||||
}
|
||||
append text [addPlatformGuard $plat $temp]
|
||||
if {$emit == 0} {
|
||||
eval {append text} $skipString
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
# Emit separate stubs blocks per platform
|
||||
foreach plat {unix win mac} {
|
||||
if {[info exists stubs($name,$plat,lastNum)]} {
|
||||
set lastNum $stubs($name,$plat,lastNum)
|
||||
set temp {}
|
||||
for {set i 0} {$i <= $lastNum} {incr i} {
|
||||
if {![info exists stubs($name,$plat,$i)]} {
|
||||
eval {append temp} $skipString
|
||||
} else {
|
||||
append temp [$slotProc $name $stubs($name,$plat,$i) $i]
|
||||
}
|
||||
}
|
||||
append text [addPlatformGuard $plat $temp]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# genStubs::emitDeclarations --
|
||||
@@ -623,7 +650,7 @@ proc genStubs::emitDeclarations {name textVar} {
|
||||
upvar $textVar text
|
||||
|
||||
append text "\n/*\n * Exported function declarations:\n */\n\n"
|
||||
forAllStubs $name makeDecl text
|
||||
forAllStubs $name makeDecl 0 text
|
||||
return
|
||||
}
|
||||
|
||||
@@ -647,7 +674,7 @@ proc genStubs::emitMacros {name textVar} {
|
||||
append text "\n#if defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS)\n"
|
||||
append text "\n/*\n * Inline function declarations:\n */\n\n"
|
||||
|
||||
forAllStubs $name makeMacro text
|
||||
forAllStubs $name makeMacro 0 text
|
||||
|
||||
append text "\n#endif /* defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS) */\n"
|
||||
return
|
||||
@@ -713,13 +740,13 @@ proc genStubs::emitStubs {name} {
|
||||
variable outDir
|
||||
|
||||
append text "\n/*\n * Exported stub functions:\n */\n\n"
|
||||
forAllStubs $name makeStub text
|
||||
forAllStubs $name makeStub 0 text
|
||||
|
||||
rewriteFile [file join $outDir ${name}Stubs.c] $text
|
||||
return
|
||||
}
|
||||
|
||||
# genStubs::makeInit --
|
||||
# genStubs::emitInit --
|
||||
#
|
||||
# Generate the table initializers for an interface.
|
||||
#
|
||||
@@ -730,7 +757,7 @@ proc genStubs::emitStubs {name} {
|
||||
# Results:
|
||||
# Returns the formatted output.
|
||||
|
||||
proc genStubs::makeInit {name textVar} {
|
||||
proc genStubs::emitInit {name textVar} {
|
||||
variable stubs
|
||||
variable hooks
|
||||
upvar $textVar text
|
||||
@@ -749,53 +776,14 @@ proc genStubs::makeInit {name textVar} {
|
||||
append text " NULL,\n"
|
||||
}
|
||||
|
||||
set lastNum -1
|
||||
if {[info exists stubs($name,generic,lastNum)]} {
|
||||
set lastNum $stubs($name,generic,lastNum)
|
||||
}
|
||||
set output 0
|
||||
foreach plat {win unix mac} {
|
||||
if {[info exists stubs($name,$plat,lastNum)]} {
|
||||
set num $stubs($name,$plat,lastNum)
|
||||
if {$num < $lastNum} {
|
||||
set num $lastNum
|
||||
}
|
||||
set temp ""
|
||||
for {set i 0} {$i <= $num} {incr i} {
|
||||
append temp " "
|
||||
if {[info exists stubs($name,$plat,$i)]} {
|
||||
if {[info exists stubs($name,generic,$i)]} {
|
||||
puts stderr "platform entry duplicates generic entry: $i"
|
||||
}
|
||||
append temp [lindex $stubs($name,$plat,$i) 1]
|
||||
} elseif {[info exists stubs($name,generic,$i)]} {
|
||||
append temp [lindex $stubs($name,generic,$i) 1]
|
||||
} else {
|
||||
append temp "NULL"
|
||||
}
|
||||
append temp ", /* $i */\n"
|
||||
}
|
||||
append text [addPlatformGuard $plat $temp]
|
||||
set output 1
|
||||
}
|
||||
}
|
||||
if {!$output} {
|
||||
for {set i 0} {$i <= $lastNum} {incr i} {
|
||||
append text " "
|
||||
if {[info exists stubs($name,generic,$i)]} {
|
||||
append text [lindex $stubs($name,generic,$i) 1]
|
||||
} else {
|
||||
append text "NULL"
|
||||
}
|
||||
append text ", /* $i */\n"
|
||||
}
|
||||
}
|
||||
forAllStubs $name makeInit 1 text {" NULL, /* $i */\n"}
|
||||
|
||||
append text "\};\n\n"
|
||||
append text "extern ${capName}Stubs *${name}StubsPtr = &${name}Stubs;\n"
|
||||
append text "${capName}Stubs *${name}StubsPtr = &${name}Stubs;\n"
|
||||
return
|
||||
}
|
||||
|
||||
# genStubs::emitInit --
|
||||
# genStubs::emitInits --
|
||||
#
|
||||
# This function emits the body of the <name>StubInit.c file for
|
||||
# the specified interface.
|
||||
@@ -806,14 +794,14 @@ proc genStubs::makeInit {name textVar} {
|
||||
# Results:
|
||||
# None.
|
||||
|
||||
proc genStubs::emitInit {} {
|
||||
proc genStubs::emitInits {} {
|
||||
variable hooks
|
||||
variable outDir
|
||||
variable libraryName
|
||||
variable interfaces
|
||||
|
||||
foreach name [lsort [array names interfaces]] {
|
||||
makeInit $name text
|
||||
emitInit $name text
|
||||
}
|
||||
|
||||
|
||||
@@ -865,7 +853,7 @@ proc genStubs::init {} {
|
||||
emitStubs $name
|
||||
}
|
||||
|
||||
emitInit
|
||||
emitInits
|
||||
}
|
||||
|
||||
# lassign --
|
||||
|
||||
+130
-18
@@ -5,7 +5,7 @@
|
||||
# "autoconf" program (constructs like "@foo@" will get replaced in the
|
||||
# actual Makefile.
|
||||
#
|
||||
# RCS: @(#) $Id: Makefile.in,v 1.17 1999/02/02 23:00:07 stanton Exp $
|
||||
# RCS: @(#) $Id: Makefile.in,v 1.17.4.5 1999/03/06 21:19:58 stanton Exp $
|
||||
|
||||
# Current Tcl version; used in various names.
|
||||
|
||||
@@ -131,6 +131,15 @@ NOTIFY_OBJS = tclUnixNotfy.o
|
||||
MEM_DEBUG_FLAGS =
|
||||
#MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG
|
||||
|
||||
# To enable support for stubs in Tcl.
|
||||
STUB_LIB_FILE = @STUB_LIB_FILE@
|
||||
|
||||
TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@
|
||||
#TCL_STUB_LIB_FILE = libtclstub.a
|
||||
|
||||
TCL_STUB_LIB_FLAG = @TCL_STUB_LIB_FLAG@
|
||||
#TCL_STUB_LIB_FLAG = -ltclstub
|
||||
|
||||
# To enable compilation debugging reverse the comment characters on
|
||||
# one of the following lines.
|
||||
COMPILE_DEBUG_FLAGS =
|
||||
@@ -164,6 +173,7 @@ TCL_SHLIB_CFLAGS = @TCL_SHLIB_CFLAGS@
|
||||
# these definitions by hand.
|
||||
|
||||
SHLIB_LD = @SHLIB_LD@
|
||||
SHLIB_CFLAGS = @SHLIB_CFLAGS@
|
||||
|
||||
SHLIB_SUFFIX = @SHLIB_SUFFIX@
|
||||
#SHLIB_SUFFIX =
|
||||
@@ -184,6 +194,9 @@ TCL_LIB_FILE = @TCL_LIB_FILE@
|
||||
TCL_LIB_FLAG = @TCL_LIB_FLAG@
|
||||
#TCL_LIB_FLAG = -ltcl
|
||||
|
||||
TCL_EXP_FILE = @TCL_EXP_FILE@
|
||||
TCL_BUILD_EXP_FILE = @TCL_BUILD_EXP_FILE@
|
||||
|
||||
#----------------------------------------------------------------
|
||||
# The information below is modified by the configure script when
|
||||
# Makefile is generated from Makefile.in. You shouldn't normally
|
||||
@@ -215,12 +228,17 @@ CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${TCL_SHLIB_CFLAGS} \
|
||||
${AC_FLAGS} ${MATH_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \
|
||||
${COMPILE_DEBUG_FLAGS} ${ENV_FLAGS} -DTCL_SHLIB_EXT=\"${SHLIB_SUFFIX}\"
|
||||
|
||||
STUB_CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
|
||||
-I${GENERIC_DIR} -I${SRC_DIR} \
|
||||
${AC_FLAGS} ${MATH_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \
|
||||
${COMPILE_DEBUG_FLAGS} ${ENV_FLAGS} -DTCL_SHLIB_EXT=\"${SHLIB_SUFFIX}\"
|
||||
|
||||
LIBS = @DL_LIBS@ @LIBS@ $(MATH_LIBS) -lc
|
||||
|
||||
DEPEND_SWITCHES = ${CFLAGS} -I${GENERIC_DIR} -I${SRC_DIR} \
|
||||
${AC_FLAGS} ${MATH_FLAGS} \
|
||||
${GENERIC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \
|
||||
-DTCL_SHLIB_EXT=\"${SHLIB_SUFFIX}\"
|
||||
-DTCL_SHLIB_EXT=\"${SHLIB_SUFFIX}\" $(STUB_FLAGS)
|
||||
|
||||
TCLSH_OBJS = tclAppInit.o
|
||||
|
||||
@@ -230,27 +248,41 @@ TCLTEST_OBJS = tclTestInit.o tclTest.o tclTestObj.o tclTestProcBodyObj.o \
|
||||
XTTEST_OBJS = tclTest.o tclTestObj.o tclUnixTest.o tclXtNotify.o \
|
||||
tclXtTest.o xtTestInit.o
|
||||
|
||||
GENERIC_OBJS = panic.o regexp.o tclAsync.o tclBasic.o tclBinary.o tclCkalloc.o \
|
||||
GENERIC_OBJS = regexp.o tclAlloc.o tclAsync.o tclBasic.o tclBinary.o \
|
||||
tclCkalloc.o \
|
||||
tclClock.o tclCmdAH.o tclCmdIL.o tclCmdMZ.o tclCompExpr.o \
|
||||
tclCompile.o tclDate.o tclEnv.o tclEvent.o tclExecute.o \
|
||||
tclFCmd.o tclFileName.o tclGet.o tclHash.o tclHistory.o \
|
||||
tclIndexObj.o tclInterp.o tclIO.o tclIOCmd.o tclIOSock.o \
|
||||
tclIOUtil.o tclLink.o tclListObj.o tclLoad.o tclMain.o tclNamesp.o \
|
||||
tclNotify.o tclObj.o tclParse.o tclPipe.o tclPkg.o tclPosixStr.o \
|
||||
tclPreserve.o tclProc.o tclStringObj.o tclTimer.o tclUtil.o tclVar.o \
|
||||
tclResolve.o
|
||||
tclNotify.o tclObj.o tclPanic.o tclParse.o tclPipe.o tclPkg.o \
|
||||
tclPosixStr.o tclPreserve.o tclProc.o tclResolve.o tclStringObj.o \
|
||||
tclStubInit.o tclTimer.o tclUtil.o tclVar.o
|
||||
|
||||
OBJS = ${GENERIC_OBJS} ${UNIX_OBJS} ${NOTIFY_OBJS} ${COMPAT_OBJS} @DL_OBJS@
|
||||
STUB_LIB_OBJS = tclIntPlatStubs.o tclIntStubs.o tclPlatStubs.o tclStubLib.o \
|
||||
tclStubs.o
|
||||
|
||||
OBJS = ${GENERIC_OBJS} ${UNIX_OBJS} ${NOTIFY_OBJS} ${COMPAT_OBJS} \
|
||||
@DL_OBJS@
|
||||
|
||||
TCL_DECLS = \
|
||||
$(GENERIC_DIR)/tcl.decls \
|
||||
$(GENERIC_DIR)/tclInt.decls
|
||||
|
||||
GENERIC_HDRS = \
|
||||
$(GENERIC_DIR)/tclRegexp.h \
|
||||
$(GENERIC_DIR)/tcl.h \
|
||||
$(GENERIC_DIR)/tclDecls.h \
|
||||
$(GENERIC_DIR)/tclInt.h \
|
||||
$(GENERIC_DIR)/tclIntDecls.h \
|
||||
$(GENERIC_DIR)/tclIntPlatDecls.h \
|
||||
$(GENERIC_DIR)/tclPatch.h \
|
||||
$(GENERIC_DIR)/tclPlatDecls.h \
|
||||
$(GENERIC_DIR)/tclPort.h \
|
||||
$(GENERIC_DIR)/tclPatch.h
|
||||
$(GENERIC_DIR)/tclRegexp.h
|
||||
|
||||
GENERIC_SRCS = \
|
||||
$(GENERIC_DIR)/regexp.c \
|
||||
$(GENERIC_DIR)/tclAlloc.c \
|
||||
$(GENERIC_DIR)/tclAsync.c \
|
||||
$(GENERIC_DIR)/tclBasic.c \
|
||||
$(GENERIC_DIR)/tclBinary.c \
|
||||
@@ -290,6 +322,7 @@ GENERIC_SRCS = \
|
||||
$(GENERIC_DIR)/tclPreserve.c \
|
||||
$(GENERIC_DIR)/tclProc.c \
|
||||
$(GENERIC_DIR)/tclResolve.c \
|
||||
$(GENERIC_DIR)/tclStubInit.c \
|
||||
$(GENERIC_DIR)/tclStringObj.c \
|
||||
$(GENERIC_DIR)/tclTest.c \
|
||||
$(GENERIC_DIR)/tclTestObj.c \
|
||||
@@ -298,6 +331,13 @@ GENERIC_SRCS = \
|
||||
$(GENERIC_DIR)/tclUtil.c \
|
||||
$(GENERIC_DIR)/tclVar.c
|
||||
|
||||
STUB_SRCS = \
|
||||
$(GENERIC_DIR)/tclIntPlatStubs.c \
|
||||
$(GENERIC_DIR)/tclIntStubs.c \
|
||||
$(GENERIC_DIR)/tclPlatStubs.c \
|
||||
$(GENERIC_DIR)/tclStubLib.c \
|
||||
$(GENERIC_DIR)/tclStubs.c
|
||||
|
||||
UNIX_HDRS = \
|
||||
$(UNIX_DIR)/tclUnixPort.h
|
||||
|
||||
@@ -329,9 +369,9 @@ DL_SRCS = \
|
||||
# compile on the current machine, and they will cause problems for
|
||||
# things like "make depend".
|
||||
|
||||
SRCS = $(GENERIC_SRCS) $(UNIX_SRCS)
|
||||
SRCS = $(GENERIC_SRCS) $(UNIX_SRCS) $(STUB_SRCS)
|
||||
|
||||
all: ${TCL_LIB_FILE} tclsh
|
||||
all: ${TCL_LIB_FILE} $(TCL_STUB_LIB_FILE) tclsh
|
||||
|
||||
# The following target is configured by autoconf to generate either
|
||||
# a shared library or non-shared library for Tcl.
|
||||
@@ -340,6 +380,11 @@ ${TCL_LIB_FILE}: ${OBJS}
|
||||
@MAKE_LIB@
|
||||
$(RANLIB) ${TCL_LIB_FILE}
|
||||
|
||||
${STUB_LIB_FILE}: ${STUB_LIB_OBJS}
|
||||
rm -f ${STUB_LIB_FILE}
|
||||
@MAKE_STUB_LIB@
|
||||
$(RANLIB) ${STUB_LIB_FILE}
|
||||
|
||||
# Make target which outputs the list of the .o contained in the Tcl lib
|
||||
# usefull to build a single big shared library containing Tcl and other
|
||||
# extensions. used for the Tcl Plugin. -- dl
|
||||
@@ -403,7 +448,7 @@ topDirName:
|
||||
gendate:
|
||||
yacc -l $(GENERIC_DIR)/tclGetDate.y
|
||||
sed -e 's/yy/TclDate/g' -e '/^#include <values.h>/d' \
|
||||
-e 's/SCCSID/RCS: @(#) $Id: Makefile.in,v 1.17 1999/02/02 23:00:07 stanton Exp $'
|
||||
-e 's/SCCSID/RCS: @(#) \$Id\$'
|
||||
-e '/#ifdef __STDC__/,/#endif/d' -e '/TclDateerrlab:/d' \
|
||||
-e '/TclDatenewstate:/d' -e '/#pragma/d' \
|
||||
<y.tab.c >$(GENERIC_DIR)/tclDate.c
|
||||
@@ -433,7 +478,8 @@ install: install-binaries install-libraries install-man
|
||||
# some ranlibs write to current directory, and this might not always be
|
||||
# possible (e.g. if installing as root).
|
||||
|
||||
install-binaries: $(TCL_LIB_FILE) tclsh
|
||||
install-binaries: $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(TCL_BUILD_EXP_FILE) \
|
||||
tclsh
|
||||
@for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
|
||||
do \
|
||||
if [ ! -d $$i ] ; then \
|
||||
@@ -447,10 +493,20 @@ install-binaries: $(TCL_LIB_FILE) tclsh
|
||||
@$(INSTALL_DATA) $(TCL_LIB_FILE) $(LIB_INSTALL_DIR)/$(TCL_LIB_FILE)
|
||||
@(cd $(LIB_INSTALL_DIR); $(RANLIB) $(TCL_LIB_FILE))
|
||||
@chmod 555 $(LIB_INSTALL_DIR)/$(TCL_LIB_FILE)
|
||||
@if test "$(TCL_BUILD_EXP_FILE)" != ""; then \
|
||||
echo "Installing $(TCL_EXP_FILE)"; \
|
||||
$(INSTALL_DATA) $(TCL_BUILD_EXP_FILE) \
|
||||
$(LIB_INSTALL_DIR)/$(TCL_EXP_FILE); \
|
||||
fi
|
||||
@echo "Installing tclsh"
|
||||
@$(INSTALL_PROGRAM) tclsh $(BIN_INSTALL_DIR)/tclsh$(VERSION)
|
||||
@echo "Installing tclConfig.sh"
|
||||
@$(INSTALL_DATA) tclConfig.sh $(LIB_INSTALL_DIR)/tclConfig.sh
|
||||
@if test "$(TCL_STUB_LIB_FILE)" != "" ; then \
|
||||
echo "Installing $(TCL_STUB_LIB_FILE)"; \
|
||||
$(INSTALL_DATA) $(STUB_LIB_FILE) \
|
||||
$(LIB_INSTALL_DIR)/$(TCL_STUB_LIB_FILE); \
|
||||
fi
|
||||
|
||||
install-libraries:
|
||||
@for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \
|
||||
@@ -472,8 +528,11 @@ install-libraries:
|
||||
else true; \
|
||||
fi; \
|
||||
done;
|
||||
@echo "Installing tcl.h"
|
||||
@$(INSTALL_DATA) $(GENERIC_DIR)/tcl.h $(INCLUDE_INSTALL_DIR)/tcl.h
|
||||
@for i in $(GENERIC_DIR)/tcl.h $(GENERIC_DIR)/tclDecls.h ; \
|
||||
do \
|
||||
echo "Installing $$i"; \
|
||||
$(INSTALL_DATA) $$i $(INCLUDE_INSTALL_DIR); \
|
||||
done;
|
||||
@for i in $(TOP_DIR)/library/*.tcl $(TOP_DIR)/library/tclIndex $(UNIX_DIR)/tclAppInit.c $(UNIX_DIR)/ldAix; \
|
||||
do \
|
||||
echo "Installing $$i"; \
|
||||
@@ -577,15 +636,18 @@ xtTestInit.o: $(UNIX_DIR)/tclAppInit.c
|
||||
|
||||
# Object files used on all Unix systems:
|
||||
|
||||
panic.o: $(GENERIC_DIR)/panic.c
|
||||
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/panic.c
|
||||
|
||||
regexp.o: $(GENERIC_DIR)/regexp.c
|
||||
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/regexp.c
|
||||
|
||||
tclAppInit.o: $(UNIX_DIR)/tclAppInit.c
|
||||
$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclAppInit.c
|
||||
|
||||
# On unix we want to use the normal malloc/free implementation, so we
|
||||
# specifically set the USE_NATIVE_MALLOC flag.
|
||||
|
||||
tclAlloc.o: $(GENERIC_DIR)/tclAlloc.c
|
||||
$(CC) -c $(CC_SWITCHES) -DUSE_NATIVE_MALLOC $(GENERIC_DIR)/tclAlloc.c
|
||||
|
||||
tclAsync.o: $(GENERIC_DIR)/tclAsync.c
|
||||
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclAsync.c
|
||||
|
||||
@@ -712,6 +774,9 @@ tclNotify.o: $(GENERIC_DIR)/tclNotify.c
|
||||
tclParse.o: $(GENERIC_DIR)/tclParse.c
|
||||
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclParse.c
|
||||
|
||||
tclPanic.o: $(GENERIC_DIR)/tclPanic.c
|
||||
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclPanic.c
|
||||
|
||||
tclPipe.o: $(GENERIC_DIR)/tclPipe.c
|
||||
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclPipe.c
|
||||
|
||||
@@ -733,6 +798,9 @@ tclResolve.o: $(GENERIC_DIR)/tclResolve.c
|
||||
tclStringObj.o: $(GENERIC_DIR)/tclStringObj.c
|
||||
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclStringObj.c
|
||||
|
||||
tclStubInit.o: $(GENERIC_DIR)/tclStubInit.c
|
||||
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclStubInit.c
|
||||
|
||||
tclUtil.o: $(GENERIC_DIR)/tclUtil.c
|
||||
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclUtil.c
|
||||
|
||||
@@ -815,9 +883,53 @@ tmpnam.o: $(COMPAT_DIR)/tmpnam.c
|
||||
waitpid.o: $(COMPAT_DIR)/waitpid.c
|
||||
$(CC) -c $(CC_SWITCHES) $(COMPAT_DIR)/waitpid.c
|
||||
|
||||
|
||||
# Stub library binaries, these must be compiled for use in a shared library
|
||||
# even though they will be placed in a static archive
|
||||
|
||||
tclIntPlatStubs.o: $(GENERIC_DIR)/tclIntPlatStubs.c
|
||||
$(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tclIntPlatStubs.c
|
||||
|
||||
tclIntStubs.o: $(GENERIC_DIR)/tclIntStubs.c
|
||||
$(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tclIntStubs.c
|
||||
|
||||
tclPlatStubs.o: $(GENERIC_DIR)/tclPlatStubs.c
|
||||
$(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tclPlatStubs.c
|
||||
|
||||
tclStubLib.o: $(GENERIC_DIR)/tclStubLib.c
|
||||
$(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tclStubLib.c
|
||||
|
||||
tclStubs.o: $(GENERIC_DIR)/tclStubs.c
|
||||
$(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tclStubs.c
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CC_SWITCHES) $<
|
||||
|
||||
#
|
||||
# Target to regenerate header files and stub files from the *.decls tables.
|
||||
#
|
||||
|
||||
genstubs:
|
||||
tclsh $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \
|
||||
$(GENERIC_DIR)/tcl.decls $(GENERIC_DIR)/tclInt.decls
|
||||
|
||||
#
|
||||
# Target to check that all exported functions have an entry in the stubs
|
||||
# tables.
|
||||
#
|
||||
|
||||
checkstubs:
|
||||
-@for i in `nm -p $(TCL_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
|
||||
| sort -n`; do \
|
||||
match=0; \
|
||||
for j in $(TCL_DECLS); do \
|
||||
if [ `grep -c $$i $$j` -gt 0 ]; then \
|
||||
match=1; \
|
||||
fi; \
|
||||
done; \
|
||||
if [ $$match -eq 0 ]; then echo $$i; fi \
|
||||
done
|
||||
|
||||
#
|
||||
# Target to check for proper usage of UCHAR macro.
|
||||
#
|
||||
|
||||
+90
-23
@@ -2,7 +2,7 @@ dnl This file is an input file used by the GNU "autoconf" program to
|
||||
dnl generate the file "configure", which is run during Tcl installation
|
||||
dnl to configure the system for the local environment.
|
||||
AC_INIT(../generic/tcl.h)
|
||||
# RCS: @(#) $Id: configure.in,v 1.28 1999/02/03 18:37:42 stanton Exp $
|
||||
# RCS: @(#) $Id: configure.in,v 1.28.4.2 1999/03/06 00:36:21 stanton Exp $
|
||||
|
||||
TCL_VERSION=8.0
|
||||
TCL_MAJOR_VERSION=8
|
||||
@@ -641,6 +641,17 @@ AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"]))
|
||||
# a .a extension whereas shared objects for loadable
|
||||
# extensions have a .so extension. Defaults to
|
||||
# ${VERSION}${SHLIB_SUFFIX}.
|
||||
# TCL_NEEDS_EXP_FILE -
|
||||
# 1 means that an export file is needed to link to a
|
||||
# shared library.
|
||||
#
|
||||
# TCL_EXP_FILE - The name of the installed export / import file which
|
||||
# should be used to link to the Tcl shared library.
|
||||
# Empty if Tcl is unshared.
|
||||
# TCL_BUILD_EXP_FILE -
|
||||
# The name of the built export / import file which
|
||||
# should be used to link to the Tcl shared library.
|
||||
# Empty if Tcl is unshared.
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
# Step 1: set the variable "system" to hold the name and version number
|
||||
@@ -678,12 +689,16 @@ AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no)
|
||||
|
||||
fullSrcDir=`cd $srcdir; pwd`
|
||||
EXTRA_CFLAGS=""
|
||||
TCL_EXPORT_FILE_SUFFIX=""
|
||||
TCL_UNSHARED_LIB_SUFFIX=""
|
||||
TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
|
||||
ECHO_VERSION='`echo ${VERSION}`'
|
||||
TCL_LIB_VERSIONS_OK=ok
|
||||
CFLAGS_DEBUG=-g
|
||||
CFLAGS_OPTIMIZE=-O
|
||||
TCL_NEEDS_EXP_FILE=0
|
||||
TCL_BUILD_EXP_FILE=""
|
||||
TCL_EXP_FILE=""
|
||||
case $system in
|
||||
AIX-4.[[2-9]])
|
||||
SHLIB_CFLAGS=""
|
||||
@@ -694,8 +709,8 @@ case $system in
|
||||
DL_LIBS="-ldl"
|
||||
LD_FLAGS=""
|
||||
LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
|
||||
AIX=yes
|
||||
TCL_SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
|
||||
TCL_NEEDS_EXP_FILE=1
|
||||
TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
|
||||
;;
|
||||
AIX-*)
|
||||
SHLIB_CFLAGS=""
|
||||
@@ -706,7 +721,8 @@ case $system in
|
||||
DL_LIBS="-lld"
|
||||
LD_FLAGS=""
|
||||
LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
|
||||
TCL_SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
|
||||
TCL_NEEDS_EXP_FILE=1
|
||||
TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
|
||||
;;
|
||||
BSD/OS-2.1*|BSD/OS-3*|BSD/OS-4*)
|
||||
SHLIB_CFLAGS=""
|
||||
@@ -728,7 +744,7 @@ case $system in
|
||||
LD_FLAGS=""
|
||||
LD_SEARCH_FLAGS=""
|
||||
;;
|
||||
HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
|
||||
HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*|HP-UX-*.11.*)
|
||||
SHLIB_SUFFIX=".sl"
|
||||
AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
|
||||
if test "$tcl_ok" = yes; then
|
||||
@@ -778,8 +794,8 @@ case $system in
|
||||
;;
|
||||
IRIX64-6.*)
|
||||
SHLIB_CFLAGS=""
|
||||
SHLIB_LD="ld -32 -shared -rdata_shared -rpath /usr/local/lib"
|
||||
SHLIB_LD_LIBS=""
|
||||
SHLIB_LD="ld -32 -shared -rdata_shared"
|
||||
SHLIB_LD_LIBS='${LIBS}'
|
||||
SHLIB_SUFFIX=".so"
|
||||
DL_OBJS="tclLoadDl.o"
|
||||
DL_LIBS=""
|
||||
@@ -795,7 +811,7 @@ case $system in
|
||||
DL_OBJS="tclLoadDl.o"
|
||||
DL_LIBS="-ldl"
|
||||
LD_FLAGS="-rdynamic"
|
||||
LD_SEARCH_FLAGS=""
|
||||
LD_SEARCH_FLAGS="-Wl,-rpath,${LIB_RUNTIME_DIR}"
|
||||
else
|
||||
AC_CHECK_HEADER(dld.h, [
|
||||
SHLIB_LD="ld -shared"
|
||||
@@ -962,7 +978,7 @@ case $system in
|
||||
DL_OBJS="tclLoadDl.o"
|
||||
DL_LIBS="-ldl"
|
||||
LD_FLAGS=""
|
||||
LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
|
||||
LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
|
||||
;;
|
||||
ULTRIX-4.*)
|
||||
SHLIB_CFLAGS="-G 0"
|
||||
@@ -1227,24 +1243,11 @@ else
|
||||
;;
|
||||
esac
|
||||
TCL_SHLIB_CFLAGS=""
|
||||
TCL_LD_SEARCH_FLAGS=""
|
||||
TCL_LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS}"
|
||||
eval "TCL_LIB_FILE=libtcl${TCL_UNSHARED_LIB_SUFFIX}"
|
||||
MAKE_LIB="ar cr \${TCL_LIB_FILE} \${OBJS}"
|
||||
fi
|
||||
|
||||
# Note: in the following variable, it's important to use the absolute
|
||||
# path name of the Tcl directory rather than "..": this is because
|
||||
# AIX remembers this path and will attempt to use it at run-time to look
|
||||
# up the Tcl library.
|
||||
|
||||
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
|
||||
TCL_LIB_FLAG="-ltcl${TCL_VERSION}\${TCL_DBGX}"
|
||||
else
|
||||
TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}"
|
||||
fi
|
||||
TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}"
|
||||
TCL_LIB_SPEC="-L${exec_prefix}/lib ${TCL_LIB_FLAG}"
|
||||
|
||||
# tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed
|
||||
# so that the backslashes quoting the DBX braces are dropped.
|
||||
|
||||
@@ -1252,9 +1255,35 @@ TCL_LIB_SPEC="-L${exec_prefix}/lib ${TCL_LIB_FLAG}"
|
||||
DBGX='${TCL_DBGX}'
|
||||
eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
|
||||
|
||||
# Note: in the following variable, it's important to use the absolute
|
||||
# path name of the Tcl directory rather than "..": this is because
|
||||
# AIX remembers this path and will attempt to use it at run-time to look
|
||||
# up the Tcl library.
|
||||
|
||||
if test $TCL_SHARED_BUILD = 0 -o $TCL_NEEDS_EXP_FILE = 0; then
|
||||
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
|
||||
TCL_LIB_FLAG="-ltcl${TCL_VERSION}\${TCL_DBGX}"
|
||||
else
|
||||
TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}"
|
||||
fi
|
||||
TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}"
|
||||
TCL_LIB_SPEC="-L${exec_prefix}/lib ${TCL_LIB_FLAG}"
|
||||
else
|
||||
TCL_BUILD_EXP_FILE="lib.exp"
|
||||
eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}"
|
||||
|
||||
# Replace DBGX with TCL_DBGX
|
||||
eval "TCL_EXP_FILE=\"${TCL_EXP_FILE}\""
|
||||
|
||||
TCL_BUILD_LIB_SPEC="-bI:`pwd`/${TCL_BUILD_EXP_FILE}"
|
||||
TCL_LIB_SPEC="-bI:${exec_prefix}/lib/${TCL_EXP_FILE}"
|
||||
fi
|
||||
|
||||
VERSION='${VERSION}'
|
||||
eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
|
||||
eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
|
||||
eval "CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX}"
|
||||
VERSION=${TCL_VERSION}
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# The statements below define the symbol TCL_PACKAGE_PATH, which
|
||||
@@ -1269,6 +1298,40 @@ else
|
||||
TCL_PACKAGE_PATH="${prefix}/lib"
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# The statements below define various symbols relating to Tcl
|
||||
# stub support.
|
||||
#--------------------------------------------------------------------
|
||||
# Replace ${VERSION} with contents of ${TCL_VERSION}
|
||||
eval "STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}"
|
||||
# Replace DBGX with TCL_DBGX
|
||||
eval "STUB_LIB_FILE=\"${STUB_LIB_FILE}\""
|
||||
|
||||
MAKE_STUB_LIB="ar cr \${STUB_LIB_FILE} \${STUB_LIB_OBJS}"
|
||||
|
||||
TCL_STUB_LIB_FILE=${STUB_LIB_FILE}
|
||||
|
||||
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
|
||||
TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}\${TCL_DBGX}"
|
||||
else
|
||||
TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}"
|
||||
fi
|
||||
|
||||
TCL_BUILD_STUB_LIB_SPEC="-L`pwd` ${TCL_STUB_LIB_FLAG}"
|
||||
TCL_STUB_LIB_SPEC="-L${exec_prefix}/lib ${TCL_STUB_LIB_FLAG}"
|
||||
TCL_BUILD_STUB_LIB_PATH="`pwd`/${TCL_STUB_LIB_FILE}"
|
||||
TCL_STUB_LIB_PATH="${exec_prefix}/lib/${TCL_STUB_LIB_FILE}"
|
||||
|
||||
AC_SUBST(STUB_LIB_FILE)
|
||||
|
||||
AC_SUBST(TCL_STUB_LIB_FILE)
|
||||
AC_SUBST(TCL_STUB_LIB_FLAG)
|
||||
AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
|
||||
AC_SUBST(TCL_STUB_LIB_SPEC)
|
||||
AC_SUBST(TCL_BUILD_STUB_LIB_PATH)
|
||||
AC_SUBST(TCL_STUB_LIB_PATH)
|
||||
AC_SUBST(MAKE_STUB_LIB)
|
||||
|
||||
AC_SUBST(BUILD_DLTEST)
|
||||
AC_SUBST(CFLAGS_DEBUG)
|
||||
AC_SUBST(CFLAGS_DEFAULT)
|
||||
@@ -1276,6 +1339,7 @@ AC_SUBST(CFLAGS_OPTIMIZE)
|
||||
AC_SUBST(CFLAGS_WARNING)
|
||||
AC_SUBST(CFG_TCL_SHARED_LIB_SUFFIX)
|
||||
AC_SUBST(CFG_TCL_UNSHARED_LIB_SUFFIX)
|
||||
AC_SUBST(CFG_TCL_EXPORT_FILE_SUFFIX)
|
||||
AC_SUBST(TCL_DBGX)
|
||||
AC_SUBST(DL_LIBS)
|
||||
AC_SUBST(DL_OBJS)
|
||||
@@ -1291,6 +1355,9 @@ AC_SUBST(TCL_BUILD_LIB_SPEC)
|
||||
AC_SUBST(TCL_LD_SEARCH_FLAGS)
|
||||
AC_SUBST(TCL_LIB_FILE)
|
||||
AC_SUBST(TCL_LIB_FLAG)
|
||||
AC_SUBST(TCL_NEEDS_EXP_FILE)
|
||||
AC_SUBST(TCL_BUILD_EXP_FILE)
|
||||
AC_SUBST(TCL_EXP_FILE)
|
||||
AC_SUBST(TCL_LIB_SPEC)
|
||||
AC_SUBST(TCL_LIB_VERSIONS_OK)
|
||||
AC_SUBST(TCL_MAJOR_VERSION)
|
||||
|
||||
+8
-6
@@ -10,7 +10,7 @@
|
||||
# symbols exported by those files, and then invokes "ldCmd" to
|
||||
# perform the real link.
|
||||
#
|
||||
# RCS: @(#) $Id: ldAix,v 1.2 1998/09/14 18:40:16 stanton Exp $
|
||||
# RCS: @(#) $Id: ldAix,v 1.2.4.1 1999/03/03 00:38:45 stanton Exp $
|
||||
|
||||
# Extract from the arguments the names of all of the object files.
|
||||
|
||||
@@ -23,6 +23,9 @@ for i do
|
||||
fi
|
||||
done
|
||||
|
||||
# Extract the name of the object file that we're linking.
|
||||
outputFile=`echo $args | sed -e 's/.*-o \([^ ]*\).*/\1/'`
|
||||
|
||||
# Create the export file from all of the object files, using nm followed
|
||||
# by sed editing. Here are some tricky aspects of this:
|
||||
#
|
||||
@@ -49,13 +52,12 @@ if test $osver -eq 3; then
|
||||
nmopts="-e"
|
||||
fi
|
||||
rm -f lib.exp
|
||||
echo "#! " >lib.exp
|
||||
echo "#! $outputFile" >lib.exp
|
||||
/usr/ccs/bin/nm $nmopts -h $ofiles | sed -e '/:$/d' -e '/ U /d' -e '/[ ]0|extern/d' -e '/unamex/d' -e 's/^\.//' -e 's/[ |].*//' | sort | uniq >>lib.exp
|
||||
|
||||
# Extract the name of the object file that we're linking. If it's a .a
|
||||
# file, then link all the objects together into a single file "shr.o"
|
||||
# and then put that into the archive. Otherwise link the object files
|
||||
# directly into the .a file.
|
||||
# If we're linking a .a file, then link all the objects together into a
|
||||
# single file "shr.o" and then put that into the archive. Otherwise link
|
||||
# the object files directly into the .a file.
|
||||
|
||||
outputFile=`echo $args | sed -e 's/.*-o \([^ ]*\).*/\1/'`
|
||||
noDotA=`echo $outputFile | sed -e '/\.a$/d'`
|
||||
|
||||
@@ -727,6 +727,10 @@ if test -r PkgRequire.3; then
|
||||
rm -f Tcl_PkgRequire.3
|
||||
ln PkgRequire.3 Tcl_PkgRequire.3
|
||||
fi
|
||||
if test -r AddErrInfo.3; then
|
||||
rm -f Tcl_SetErrorCodeVA.3
|
||||
ln AddErrInfo.3 Tcl_SetErrorCodeVA.3
|
||||
fi
|
||||
if test -r AddErrInfo.3; then
|
||||
rm -f Tcl_PosixError.3
|
||||
ln AddErrInfo.3 Tcl_PosixError.3
|
||||
|
||||
+33
-1
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# The information in this file is specific to a single platform.
|
||||
#
|
||||
# RCS: @(#) $Id: tclConfig.sh.in,v 1.8 1998/10/20 20:01:23 rjohnson Exp $
|
||||
# RCS: @(#) $Id: tclConfig.sh.in,v 1.8.4.1 1999/03/03 00:38:46 stanton Exp $
|
||||
|
||||
# Tcl's version number.
|
||||
TCL_VERSION='@TCL_VERSION@'
|
||||
@@ -37,6 +37,15 @@ TCL_SHARED_BUILD=@TCL_SHARED_BUILD@
|
||||
# The name of the Tcl library (may be either a .a file or a shared library):
|
||||
TCL_LIB_FILE='@TCL_LIB_FILE@'
|
||||
|
||||
# Flag to indicate whether shared libraries need export files.
|
||||
TCL_NEEDS_EXP_FILE=@TCL_NEEDS_EXP_FILE@
|
||||
|
||||
# String that can be evaluated to generate the part of the export file
|
||||
# name that comes after the "libxxx" (includes version number, if any,
|
||||
# extension, and anything else needed). May depend on the variables
|
||||
# VERSION. On most UNIX systems this is ${VERSION}.exp.
|
||||
TCL_EXPORT_FILE_SUFFIX='@CFG_TCL_EXPORT_FILE_SUFFIX@'
|
||||
|
||||
# Additional libraries to use when linking Tcl.
|
||||
TCL_LIBS='@DL_LIBS@ @LIBS@ @MATH_LIBS@'
|
||||
|
||||
@@ -128,3 +137,26 @@ TCL_SRC_DIR='@TCL_SRC_DIR@'
|
||||
# "package require" commands. Contains the "prefix" directory plus also
|
||||
# the "exec_prefix" directory, if it is different.
|
||||
TCL_PACKAGE_PATH='@TCL_PACKAGE_PATH@'
|
||||
|
||||
# Tcl supports stub.
|
||||
TCL_SUPPORTS_STUBS=@TCL_SUPPORTS_STUBS@
|
||||
|
||||
# The name of the Tcl stub library (.a):
|
||||
TCL_STUB_LIB_FILE='@TCL_STUB_LIB_FILE@'
|
||||
|
||||
# -l flag to pass to the linker to pick up the Tcl stub library
|
||||
TCL_STUB_LIB_FLAG='@TCL_STUB_LIB_FLAG@'
|
||||
|
||||
# String to pass to linker to pick up the Tcl stub library from its
|
||||
# build directory.
|
||||
TCL_BUILD_STUB_LIB_SPEC='@TCL_BUILD_STUB_LIB_SPEC@'
|
||||
|
||||
# String to pass to linker to pick up the Tcl stub library from its
|
||||
# installed directory.
|
||||
TCL_STUB_LIB_SPEC='@TCL_STUB_LIB_SPEC@'
|
||||
|
||||
# Path to the Tcl stub library in the build directory.
|
||||
TCL_BUILD_STUB_LIB_PATH='@TCL_BUILD_STUB_LIB_PATH@'
|
||||
|
||||
# Path to the Tcl stub library in the install directory.
|
||||
TCL_STUB_LIB_PATH='@TCL_STUB_LIB_PATH@'
|
||||
|
||||
+50
-2
@@ -9,7 +9,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclUnixFile.c,v 1.4 1998/09/14 18:40:17 stanton Exp $
|
||||
* RCS: @(#) $Id: tclUnixFile.c,v 1.4.4.3 1999/03/05 20:18:08 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
@@ -37,7 +37,6 @@ extern pid_t waitpid _ANSI_ARGS_((pid_t pid, int *stat_loc, int options));
|
||||
* Static routines for this file:
|
||||
*/
|
||||
|
||||
static void FreeCurrentDir _ANSI_ARGS_((ClientData clientData));
|
||||
static void FreeExecutableName _ANSI_ARGS_((ClientData clientData));
|
||||
|
||||
/*
|
||||
@@ -535,3 +534,52 @@ TclMatchFiles(interp, separators, dirPtr, pattern, tail)
|
||||
closedir(d);
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------------------------
|
||||
*
|
||||
* TclpAccess --
|
||||
*
|
||||
* This function replaces the library version of access().
|
||||
*
|
||||
* Results:
|
||||
* See access() documentation.
|
||||
*
|
||||
* Side effects:
|
||||
* See access() documentation.
|
||||
*
|
||||
*---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int
|
||||
TclpAccess(path, mode)
|
||||
CONST char *path; /* Path of file to access. */
|
||||
int mode; /* Permission setting. */
|
||||
{
|
||||
return access(path, mode);
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclpStat --
|
||||
*
|
||||
* This function replaces the library version of stat().
|
||||
*
|
||||
* Results:
|
||||
* See stat() documentation.
|
||||
*
|
||||
* Side effects:
|
||||
* See stat() documentation.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int
|
||||
TclpStat(path, bufPtr)
|
||||
CONST char *path; /* Path of file to stat. */
|
||||
struct stat *bufPtr; /* Filled with results of stat call. */
|
||||
{
|
||||
return stat(path, bufPtr);
|
||||
}
|
||||
|
||||
|
||||
+28
-1
@@ -8,7 +8,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclUnixInit.c,v 1.11 1998/09/14 18:40:17 stanton Exp $
|
||||
* RCS: @(#) $Id: tclUnixInit.c,v 1.11.4.1 1999/03/04 00:59:04 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
@@ -280,3 +280,30 @@ Tcl_SourceRCFile(interp)
|
||||
Tcl_DStringFree(&temp);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclpCheckStackSpace --
|
||||
*
|
||||
* Detect if we are about to blow the stack. Called before an
|
||||
* evaluation can happen when nesting depth is checked.
|
||||
*
|
||||
* Results:
|
||||
* 1 if there is enough stack space to continue; 0 if not.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int
|
||||
TclpCheckStackSpace()
|
||||
{
|
||||
/*
|
||||
* This function is unimplemented on Unix platforms.
|
||||
*/
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
+3
-34
@@ -19,7 +19,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclUnixPort.h,v 1.8 1998/09/29 18:22:39 rjohnson Exp $
|
||||
* RCS: @(#) $Id: tclUnixPort.h,v 1.8.4.3 1999/03/10 05:50:29 stanton Exp $
|
||||
*/
|
||||
|
||||
#ifndef _TCLUNIXPORT
|
||||
@@ -147,16 +147,6 @@
|
||||
# define NBIO_FLAG O_NDELAY
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The following defines denote malloc and free as the system calls
|
||||
* used to allocate new memory. These defines are only used in the
|
||||
* file tclCkalloc.c.
|
||||
*/
|
||||
|
||||
#define TclpAlloc(size) malloc(size)
|
||||
#define TclpFree(ptr) free(ptr)
|
||||
#define TclpRealloc(ptr, size) realloc(ptr, size)
|
||||
|
||||
/*
|
||||
* The default platform eol translation on Unix is TCL_TRANSLATE_LF:
|
||||
*/
|
||||
@@ -299,15 +289,6 @@ EXTERN int gettimeofday _ANSI_ARGS_((struct timeval *tp,
|
||||
# define FD_CLOEXEC 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* On UNIX, there's no platform specific implementation of "TclpStat(...)"
|
||||
* or "TclpAccess(...)". Simply call "stat(...)' and "access(...)"
|
||||
* respectively.
|
||||
*/
|
||||
|
||||
#define TclpStat stat
|
||||
#define TclpAccess access
|
||||
|
||||
/*
|
||||
* On systems without symbolic links (i.e. S_IFLNK isn't defined)
|
||||
* define "lstat" to use "stat" instead.
|
||||
@@ -442,12 +423,6 @@ EXTERN int gettimeofday _ANSI_ARGS_((struct timeval *tp,
|
||||
*/
|
||||
#define TclPlatformExit(status) exit(status)
|
||||
|
||||
/*
|
||||
* The following functions always succeeds under Unix.
|
||||
*/
|
||||
|
||||
#define TclHasSockets(interp) (TCL_OK)
|
||||
|
||||
/*
|
||||
* Variables provided by the C library:
|
||||
*/
|
||||
@@ -472,8 +447,6 @@ extern double strtod();
|
||||
* standard Unix routines.
|
||||
*/
|
||||
|
||||
#define TclpGetDate(t,u) ((u) ? gmtime((t)) : localtime((t)))
|
||||
#define TclStrftime(s,m,f,t) (strftime((s),(m),(f),(t)))
|
||||
#define TclpGetPid(pid) ((unsigned long) (pid))
|
||||
|
||||
#define TclpReleaseFile(file)
|
||||
@@ -484,11 +457,7 @@ extern double strtod();
|
||||
|
||||
#define TclpFinalize()
|
||||
|
||||
/*
|
||||
* The following routine is only exported for testing purposes.
|
||||
*/
|
||||
|
||||
EXTERN int TclUnixWaitForFile _ANSI_ARGS_((int fd, int mask,
|
||||
int timeout));
|
||||
#include "tclPlatDecls.h"
|
||||
#include "tclIntPlatDecls.h"
|
||||
|
||||
#endif /* _TCLUNIXPORT */
|
||||
|
||||
+24
-1
@@ -8,7 +8,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclUnixSock.c,v 1.2 1998/09/14 18:40:17 stanton Exp $
|
||||
* RCS: @(#) $Id: tclUnixSock.c,v 1.2.4.1 1999/03/04 01:01:00 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tcl.h"
|
||||
@@ -98,3 +98,26 @@ Tcl_GetHostName()
|
||||
hostname[0] = 0;
|
||||
return hostname;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclHasSockets --
|
||||
*
|
||||
* Detect if sockets are available on this platform.
|
||||
*
|
||||
* Results:
|
||||
* Returns TCL_OK.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int
|
||||
TclHasSockets(interp)
|
||||
Tcl_Interp *interp; /* Not used. */
|
||||
{
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
+59
-1
@@ -9,7 +9,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclUnixTime.c,v 1.2 1998/09/14 18:40:18 stanton Exp $
|
||||
* RCS: @(#) $Id: tclUnixTime.c,v 1.2.4.1 1999/03/04 00:58:27 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
@@ -234,3 +234,61 @@ TclpGetTime(timePtr)
|
||||
timePtr->sec = tv.tv_sec;
|
||||
timePtr->usec = tv.tv_usec;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclpGetDate --
|
||||
*
|
||||
* This function converts between seconds and struct tm. If
|
||||
* useGMT is true, then the returned date will be in Greenwich
|
||||
* Mean Time (GMT). Otherwise, it will be in the local time zone.
|
||||
*
|
||||
* Results:
|
||||
* Returns a static tm structure.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
struct tm *
|
||||
TclpGetDate(time, useGMT)
|
||||
TclpTime_t time;
|
||||
int useGMT;
|
||||
{
|
||||
const time_t *tp = (const time_t *)time;
|
||||
|
||||
if (useGMT) {
|
||||
return gmtime(tp);
|
||||
} else {
|
||||
return localtime(tp);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclStrftime --
|
||||
*
|
||||
* On Unix, we can safely call the native strftime implementation.
|
||||
*
|
||||
* Results:
|
||||
* The normal strftime result.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
size_t
|
||||
TclStrftime(s, maxsize, format, t)
|
||||
char *s;
|
||||
size_t maxsize;
|
||||
const char *format;
|
||||
const struct tm *t;
|
||||
{
|
||||
return strftime(s, maxsize, format, t);
|
||||
}
|
||||
|
||||
+54
-11
@@ -6,7 +6,7 @@
|
||||
# Copyright (c) 1995-1996 Sun Microsystems, Inc.
|
||||
# Copyright (c) 1998-1999 by Scriptics Corporation.
|
||||
#
|
||||
# RCS: @(#) $Id: makefile.vc,v 1.24 1999/02/03 02:59:17 stanton Exp $
|
||||
# RCS: @(#) $Id: makefile.vc,v 1.24.4.2 1999/03/05 20:18:09 stanton Exp $
|
||||
|
||||
# Does not depend on the presence of any environment variables in
|
||||
# order to compile tcl; all needed information is derived from
|
||||
@@ -53,20 +53,21 @@ NODEBUG = 1
|
||||
# -DTCL_MEM_DEBUG Enables the debugging memory allocator.
|
||||
# -DTCL_COMPILE_DEBUG Enables byte compilation logging.
|
||||
# -DTCL_COMPILE_STATS Enables byte compilation statistics gathering.
|
||||
# -DUSE_NATIVEMALLOC Disables the Tcl memory allocator in favor
|
||||
# -DUSE_NATIVE_MALLOC Disables the Tcl memory allocator in favor
|
||||
# of the native malloc implementation. This is
|
||||
# needed when using Purify.
|
||||
#
|
||||
#DEBUGDEFINES = -DTCL_MEM_DEBUG
|
||||
#DEBUGDEFINES = -DTCL_MEM_DEBUG -DTCL_COMPILE_DEBUG
|
||||
#DEBUGDEFINES = -DTCL_MEM_DEBUG -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS
|
||||
#DEBUGDEFINES = -DUSE_NATIVEMALLOC
|
||||
#DEBUGDEFINES = -DUSE_NATIVE_MALLOC
|
||||
|
||||
######################################################################
|
||||
# Do not modify below this line
|
||||
######################################################################
|
||||
|
||||
NAMEPREFIX = tcl
|
||||
STUBPREFIX = $(NAMEPREFIX)stub
|
||||
DOTVERSION = 8.0
|
||||
VERSION = 80
|
||||
|
||||
@@ -85,6 +86,10 @@ OUTDIR = $(TMPDIR)
|
||||
TCLLIB = $(OUTDIR)\$(NAMEPREFIX)$(VERSION)$(DBGX).lib
|
||||
TCLDLLNAME = $(NAMEPREFIX)$(VERSION)$(DBGX).dll
|
||||
TCLDLL = $(OUTDIR)\$(TCLDLLNAME)
|
||||
|
||||
TCLSTUBLIBNAME = $(STUBPREFIX)$(VERSION)$(DBGX).lib
|
||||
TCLSTUBLIB = $(OUTDIR)\$(TCLSTUBLIBNAME)
|
||||
|
||||
TCLPLUGINLIB = $(OUTDIR)\$(NAMEPREFIX)$(VERSION)p$(DBGX).lib
|
||||
TCLPLUGINDLLNAME= $(NAMEPREFIX)$(VERSION)p$(DBGX).dll
|
||||
TCLPLUGINDLL = $(OUTDIR)\$(TCLPLUGINDLLNAME)
|
||||
@@ -116,7 +121,6 @@ TCLTESTOBJS = \
|
||||
$(TMPDIR)\testMain.obj
|
||||
|
||||
TCLOBJS = \
|
||||
$(TMPDIR)\panic.obj \
|
||||
$(TMPDIR)\regexp.obj \
|
||||
$(TMPDIR)\strftime.obj \
|
||||
$(TMPDIR)\tclAlloc.obj \
|
||||
@@ -152,6 +156,7 @@ TCLOBJS = \
|
||||
$(TMPDIR)\tclNamesp.obj \
|
||||
$(TMPDIR)\tclNotify.obj \
|
||||
$(TMPDIR)\tclObj.obj \
|
||||
$(TMPDIR)\tclPanic.obj \
|
||||
$(TMPDIR)\tclParse.obj \
|
||||
$(TMPDIR)\tclPipe.obj \
|
||||
$(TMPDIR)\tclPkg.obj \
|
||||
@@ -160,6 +165,7 @@ TCLOBJS = \
|
||||
$(TMPDIR)\tclResolve.obj \
|
||||
$(TMPDIR)\tclProc.obj \
|
||||
$(TMPDIR)\tclStringObj.obj \
|
||||
$(TMPDIR)\tclStubInit.obj \
|
||||
$(TMPDIR)\tclTimer.obj \
|
||||
$(TMPDIR)\tclUtil.obj \
|
||||
$(TMPDIR)\tclVar.obj \
|
||||
@@ -176,10 +182,18 @@ TCLOBJS = \
|
||||
$(TMPDIR)\tclWinSock.obj \
|
||||
$(TMPDIR)\tclWinTime.obj
|
||||
|
||||
TCLSTUBOBJS = \
|
||||
$(TMPDIR)\tclStubLib.obj \
|
||||
$(TMPDIR)\tclStubs.obj \
|
||||
$(TMPDIR)\tclPlatStubs.obj \
|
||||
$(TMPDIR)\tclIntStubs.obj \
|
||||
$(TMPDIR)\tclIntPlatStubs.obj
|
||||
|
||||
cc32 = "$(TOOLS32)\bin\cl.exe"
|
||||
link32 = "$(TOOLS32)\bin\link.exe"
|
||||
rc32 = "$(TOOLS32_rc)\bin\rc.exe"
|
||||
include32 = -I"$(TOOLS32)\include"
|
||||
lib32 = "$(TOOLS32)\bin\lib.exe"
|
||||
|
||||
cc16 = "$(TOOLS16)\bin\cl.exe"
|
||||
link16 = "$(TOOLS16)\bin\link.exe"
|
||||
@@ -317,6 +331,9 @@ $(TCLDLL): $(TCLOBJS) $(TMPDIR)\tcl.def $(TMPDIR)\tcl.res
|
||||
$(TCLOBJS)
|
||||
<<
|
||||
|
||||
$(TCLSTUBLIB): $(TCLSTUBOBJS)
|
||||
$(lib32) /out:$@ $(TCLSTUBOBJS)
|
||||
|
||||
$(TCLPLUGINLIB): $(TCLPLUGINDLL)
|
||||
|
||||
$(TCLPLUGINDLL): $(TCLOBJS) $(TMPDIR)\plugin.def $(TMPDIR)\tcl.res
|
||||
@@ -369,10 +386,10 @@ $(TCLPIPEDLL): $(WINDIR)\stub16.c
|
||||
set LIB="$(TOOLS32)\lib"
|
||||
$(link32) $(ldebug) $(conlflags) -out:$@ $(TMPDIR)\stub16.obj $(guilibs)
|
||||
|
||||
$(TCLREGDLL): $(TMPDIR)\tclWinReg.obj
|
||||
$(TCLREGDLL): $(TMPDIR)\tclWinReg.obj $(TCLSTUBLIB)
|
||||
set LIB="$(TOOLS32)\lib"
|
||||
$(link32) $(ldebug) $(dlllflags) -out:$@ $(TMPDIR)\tclWinReg.obj \
|
||||
$(conlibsdll) $(TCLLIB)
|
||||
$(conlibsdll) $(TCLSTUBLIB)
|
||||
|
||||
$(CAT32): $(WINDIR)\cat.c
|
||||
$(cc32) $(CON_CFLAGS) -Fo$(TMPDIR)\ $?
|
||||
@@ -407,6 +424,8 @@ install-binaries: $(TCLSH)
|
||||
@copy $(TCLPIPEDLL) $(BIN_INSTALL_DIR)
|
||||
@echo installing $(TCLREGDLLNAME)
|
||||
@copy $(TCLREGDLL) $(LIB_INSTALL_DIR)
|
||||
echo installing $(TCLSTUBLIBNAME)
|
||||
copy $(TCLSTUBLIB) $(LIB_INSTALL_DIR)
|
||||
|
||||
install-libraries:
|
||||
-@mkd $(LIB_INSTALL_DIR)
|
||||
@@ -433,13 +452,20 @@ package ifneeded registry 1.0 "load [list [file join $$dir .. $(TCLREGDLLNAME)]]
|
||||
-@copy $(ROOT)\library\tclIndex $(SCRIPT_INSTALL_DIR)
|
||||
-@copy $(ROOT)\library\word.tcl $(SCRIPT_INSTALL_DIR)
|
||||
|
||||
#
|
||||
# Regenerate the stubs files.
|
||||
#
|
||||
|
||||
genstubs:
|
||||
tclsh$(VERSION) $(ROOT)\tools\genStubs.tcl $(GENERICDIR) \
|
||||
$(GENERICDIR)\tcl.decls $(GENERICDIR)\tclInt.decls
|
||||
|
||||
#
|
||||
# Special case object file targets
|
||||
#
|
||||
|
||||
$(TMPDIR)\tclWinInit.obj: $(WINDIR)\tclWinInit.c
|
||||
$(cc32) -DDLL_BUILD -DBUILD_tcl $(TCL_CFLAGS) $(EXTFLAGS) \
|
||||
-Fo$(TMPDIR)\ $?
|
||||
$(cc32) -DBUILD_tcl $(TCL_CFLAGS) $(EXTFLAGS) -Fo$(TMPDIR)\ $?
|
||||
|
||||
$(TMPDIR)\testMain.obj: $(WINDIR)\tclAppInit.c
|
||||
$(cc32) $(TCL_CFLAGS) -DTCL_TEST -Fo$(TMPDIR)\testMain.obj $?
|
||||
@@ -456,18 +482,35 @@ $(TMPDIR)\tclWinTest.obj: $(WINDIR)\tclWinTest.c
|
||||
$(TMPDIR)\tclAppInit.obj : $(WINDIR)\tclAppInit.c
|
||||
$(cc32) $(TCL_CFLAGS) -Fo$@ $?
|
||||
|
||||
# The following objects should be built using the stub interfaces
|
||||
|
||||
$(TMPDIR)\tclWinReg.obj : $(WINDIR)\tclWinReg.c
|
||||
$(cc32) $(TCL_CFLAGS) -DUSE_TCL_STUBS -Fo$@ $?
|
||||
|
||||
# The following objects are part of the stub library and should not
|
||||
# be built as DLL objects but none of the symbols should be exported
|
||||
|
||||
$(TMPDIR)\tclStubs.obj : $(GENERICDIR)\tclStubs.c
|
||||
$(cc32) $(TCL_CFLAGS) -DSTATIC_BUILD -Fo$@ $?
|
||||
$(TMPDIR)\tclPlatStubs.obj : $(GENERICDIR)\tclPlatStubs.c
|
||||
$(cc32) $(TCL_CFLAGS) -DSTATIC_BUILD -Fo$@ $?
|
||||
$(TMPDIR)\tclIntStubs.obj : $(GENERICDIR)\tclIntStubs.c
|
||||
$(cc32) $(TCL_CFLAGS) -DSTATIC_BUILD -Fo$@ $?
|
||||
$(TMPDIR)\tclPlatIntStubs.obj : $(GENERICDIR)\tclPlatIntStubs.c
|
||||
$(cc32) $(TCL_CFLAGS) -DSTATIC_BUILD -Fo$@ $?
|
||||
|
||||
#
|
||||
# Implicit rules
|
||||
#
|
||||
|
||||
{$(WINDIR)}.c{$(TMPDIR)}.obj:
|
||||
$(cc32) -DDLL_BUILD -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMPDIR)\ $<
|
||||
$(cc32) -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMPDIR)\ $<
|
||||
|
||||
{$(GENERICDIR)}.c{$(TMPDIR)}.obj:
|
||||
$(cc32) -DDLL_BUILD -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMPDIR)\ $<
|
||||
$(cc32) -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMPDIR)\ $<
|
||||
|
||||
{$(ROOT)\compat}.c{$(TMPDIR)}.obj:
|
||||
$(cc32) -DDLL_BUILD -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMPDIR)\ $<
|
||||
$(cc32) -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMPDIR)\ $<
|
||||
|
||||
{$(WINDIR)}.rc{$(TMPDIR)}.res:
|
||||
$(rc32) -fo $@ -r -i $(GENERICDIR) -i $(WINDIR) -D__WIN32__ \
|
||||
|
||||
+36
-1
@@ -9,7 +9,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclWin32Dll.c,v 1.4 1998/09/14 18:40:19 stanton Exp $
|
||||
* RCS: @(#) $Id: tclWin32Dll.c,v 1.4.4.1 1999/03/04 00:59:04 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclWinInt.h"
|
||||
@@ -375,6 +375,41 @@ TclWinGetTclInstance()
|
||||
return tclInstance;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclpCheckStackSpace --
|
||||
*
|
||||
* Detect if we are about to blow the stack. Called before an
|
||||
* evaluation can happen when nesting depth is checked.
|
||||
*
|
||||
* Results:
|
||||
* 1 if there is enough stack space to continue; 0 if not.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int
|
||||
TclpCheckStackSpace()
|
||||
{
|
||||
/*
|
||||
* We can recurse only if there is at least TCL_WIN_STACK_THRESHOLD
|
||||
* bytes of stack space left. alloca() is cheap on windows; basically
|
||||
* it just subtracts from the stack pointer causing the OS to throw an
|
||||
* exception if the stack pointer is set below the bottom of the stack.
|
||||
*/
|
||||
|
||||
try {
|
||||
alloca(TCL_WIN_STACK_THRESHOLD);
|
||||
return 1;
|
||||
} except (1) {}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
|
||||
+2
-1
@@ -9,7 +9,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclWinChan.c,v 1.4 1999/01/04 19:25:05 rjohnson Exp $
|
||||
* RCS: @(#) $Id: tclWinChan.c,v 1.4.4.1 1999/03/10 05:50:29 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclWinInt.h"
|
||||
@@ -454,6 +454,7 @@ FileSeekProc(instanceData, offset, mode, errorCodePtr)
|
||||
newPos = SetFilePointer(infoPtr->handle, offset, NULL, moveMethod);
|
||||
if (newPos == 0xFFFFFFFF) {
|
||||
TclWinConvertError(GetLastError());
|
||||
*errorCodePtr = errno;
|
||||
return -1;
|
||||
}
|
||||
return newPos;
|
||||
|
||||
+27
-1
@@ -11,7 +11,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclWinFile.c,v 1.3 1998/09/14 18:40:20 stanton Exp $
|
||||
* RCS: @(#) $Id: tclWinFile.c,v 1.3.4.2 1999/03/04 01:00:49 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclWinInt.h"
|
||||
@@ -644,4 +644,30 @@ TclpAccess(
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclGetUserHome --
|
||||
*
|
||||
* This function takes the passed in user name and finds the
|
||||
* corresponding home directory specified in the password file.
|
||||
*
|
||||
* Results:
|
||||
* On Windows we always return a NULL.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
char *
|
||||
TclGetUserHome(
|
||||
char *name, /* User name to use to find home directory. */
|
||||
Tcl_DString *bufferPtr) /* May be used to hold result. Must not hold
|
||||
* anything at the time of the call, and need
|
||||
* not even be initialized. */
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+14
-4
@@ -8,7 +8,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclWinInt.h,v 1.5 1998/09/14 18:40:20 stanton Exp $
|
||||
* RCS: @(#) $Id: tclWinInt.h,v 1.5.4.2 1999/03/08 22:25:31 stanton Exp $
|
||||
*/
|
||||
|
||||
#ifndef _TCLWININT
|
||||
@@ -26,6 +26,14 @@
|
||||
# define TCL_STORAGE_CLASS DLLEXPORT
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The following specifies how much stack space TclpCheckStackSpace()
|
||||
* ensures is available. TclpCheckStackSpace() is called by Tcl_EvalObj()
|
||||
* to help avoid overflowing the stack in the case of infinite recursion.
|
||||
*/
|
||||
|
||||
#define TCL_WIN_STACK_THRESHOLD 0x2000
|
||||
|
||||
/*
|
||||
* Some versions of Borland C have a define for the OSVERSIONINFO for
|
||||
* Win32s and for NT, but not for Windows 95.
|
||||
@@ -35,10 +43,12 @@
|
||||
#define VER_PLATFORM_WIN32_WINDOWS 1
|
||||
#endif
|
||||
|
||||
EXTERN int TclWinGetPlatformId(void);
|
||||
/*
|
||||
* Declarations of functions that are not accessible by way of the
|
||||
* stubs table.
|
||||
*/
|
||||
|
||||
EXTERN void TclWinInit(HINSTANCE hInst);
|
||||
EXTERN int TclWinSynchSpawn(void *args, int type, void **trans,
|
||||
Tcl_Pid *pidPtr);
|
||||
|
||||
# undef TCL_STORAGE_CLASS
|
||||
# define TCL_STORAGE_CLASS DLLIMPORT
|
||||
|
||||
+5
-42
@@ -10,7 +10,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclWinPort.h,v 1.6 1998/09/30 23:57:18 stanton Exp $
|
||||
* RCS: @(#) $Id: tclWinPort.h,v 1.6.4.3 1999/03/10 05:50:30 stanton Exp $
|
||||
*/
|
||||
|
||||
#ifndef _TCLWINPORT
|
||||
@@ -205,12 +205,6 @@
|
||||
# define uid_t int
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Provide a stub definition for TclGetUserHome().
|
||||
*/
|
||||
|
||||
#define TclGetUserHome(name,bufferPtr) (NULL)
|
||||
|
||||
/*
|
||||
* Visual C++ has some odd names for common functions, so we need to
|
||||
* define a few macros to handle them. Also, it defines EDEADLOCK and
|
||||
@@ -354,52 +348,21 @@
|
||||
/*
|
||||
* The following implements the Windows method for exiting the process.
|
||||
*/
|
||||
|
||||
#define TclPlatformExit(status) exit(status)
|
||||
|
||||
|
||||
/*
|
||||
* The following declarations belong in tclInt.h, but depend on platform
|
||||
* specific types (e.g. struct tm).
|
||||
*/
|
||||
|
||||
EXTERN struct tm * TclpGetDate _ANSI_ARGS_((const time_t *tp,
|
||||
int useGMT));
|
||||
EXTERN unsigned long TclpGetPid _ANSI_ARGS_((Tcl_Pid pid));
|
||||
EXTERN size_t TclStrftime _ANSI_ARGS_((char *s, size_t maxsize,
|
||||
const char *format, const struct tm *t));
|
||||
|
||||
/*
|
||||
* The following prototypes and defines replace the Windows versions
|
||||
* of POSIX function that various compilier vendors didn't implement
|
||||
* of POSIX function that various compiler vendors didn't implement
|
||||
* well or consistantly.
|
||||
*/
|
||||
|
||||
#define lstat TclStat
|
||||
|
||||
EXTERN int TclpStat _ANSI_ARGS_((CONST char *path,
|
||||
struct stat *buf));
|
||||
EXTERN int TclpAccess _ANSI_ARGS_((CONST char *path,
|
||||
int mode));
|
||||
|
||||
#define TclpReleaseFile(file) ckfree((char *) file)
|
||||
|
||||
/*
|
||||
* Declarations for Windows specific functions.
|
||||
*/
|
||||
|
||||
EXTERN void TclWinConvertError _ANSI_ARGS_((DWORD errCode));
|
||||
EXTERN void TclWinConvertWSAError _ANSI_ARGS_((DWORD errCode));
|
||||
EXTERN struct servent * PASCAL FAR
|
||||
TclWinGetServByName _ANSI_ARGS_((const char FAR *nm,
|
||||
const char FAR *proto));
|
||||
EXTERN int PASCAL FAR TclWinGetSockOpt _ANSI_ARGS_((SOCKET s, int level,
|
||||
int optname, char FAR * optval, int FAR *optlen));
|
||||
EXTERN HINSTANCE TclWinGetTclInstance _ANSI_ARGS_((void));
|
||||
EXTERN HINSTANCE TclWinLoadLibrary _ANSI_ARGS_((char *name));
|
||||
EXTERN u_short PASCAL FAR
|
||||
TclWinNToHS _ANSI_ARGS_((u_short ns));
|
||||
EXTERN int PASCAL FAR TclWinSetSockOpt _ANSI_ARGS_((SOCKET s, int level,
|
||||
int optname, const char FAR * optval, int optlen));
|
||||
#include "tclPlatDecls.h"
|
||||
#include "tclIntPlatDecls.h"
|
||||
|
||||
# undef TCL_STORAGE_CLASS
|
||||
# define TCL_STORAGE_CLASS DLLIMPORT
|
||||
|
||||
+4
-43
@@ -10,7 +10,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclWinReg.c,v 1.7 1999/02/02 22:25:21 stanton Exp $
|
||||
* RCS: @(#) $Id: tclWinReg.c,v 1.7.4.1 1999/03/03 00:38:47 stanton Exp $
|
||||
*/
|
||||
|
||||
#include <tcl.h>
|
||||
@@ -29,17 +29,6 @@
|
||||
#undef TCL_STORAGE_CLASS
|
||||
#define TCL_STORAGE_CLASS DLLEXPORT
|
||||
|
||||
/*
|
||||
* VC++ has an alternate entry point called DllMain, so we need to rename
|
||||
* our entry point.
|
||||
*/
|
||||
|
||||
#ifdef DLL_BUILD
|
||||
# if defined(_MSC_VER)
|
||||
# define DllEntryPoint DllMain
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The following macros convert between different endian ints.
|
||||
*/
|
||||
@@ -118,38 +107,7 @@ static int SetValue(Tcl_Interp *interp, Tcl_Obj *keyNameObj,
|
||||
Tcl_Obj *typeObj);
|
||||
|
||||
EXTERN int Registry_Init(Tcl_Interp *interp);
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* DllEntryPoint --
|
||||
*
|
||||
* This wrapper function is used by Windows to invoke the
|
||||
* initialization code for the DLL. If we are compiling
|
||||
* with Visual C++, this routine will be renamed to DllMain.
|
||||
* routine.
|
||||
*
|
||||
* Results:
|
||||
* Returns TRUE;
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifdef __WIN32__
|
||||
#ifdef DLL_BUILD
|
||||
BOOL APIENTRY
|
||||
DllEntryPoint(
|
||||
HINSTANCE hInst, /* Library instance handle. */
|
||||
DWORD reason, /* Reason this function is being called. */
|
||||
LPVOID reserved) /* Not used. */
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
@@ -171,6 +129,9 @@ int
|
||||
Registry_Init(
|
||||
Tcl_Interp *interp)
|
||||
{
|
||||
if (!Tcl_InitStubs(interp, "8.0", 0)) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_CreateObjCommand(interp, "registry", RegistryObjCmd, NULL, NULL);
|
||||
return Tcl_PkgProvide(interp, "registry", "1.0");
|
||||
}
|
||||
|
||||
+7
-7
@@ -8,7 +8,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclWinSock.c,v 1.5 1999/02/03 00:51:20 stanton Exp $
|
||||
* RCS: @(#) $Id: tclWinSock.c,v 1.5.4.1 1999/03/03 00:38:47 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
@@ -2081,7 +2081,7 @@ Tcl_GetHostName()
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int PASCAL FAR
|
||||
int
|
||||
TclWinGetSockOpt(SOCKET s, int level, int optname, char FAR * optval,
|
||||
int FAR *optlen)
|
||||
{
|
||||
@@ -2099,7 +2099,7 @@ TclWinGetSockOpt(SOCKET s, int level, int optname, char FAR * optval,
|
||||
return (*winSock.getsockopt)(s, level, optname, optval, optlen);
|
||||
}
|
||||
|
||||
int PASCAL FAR
|
||||
int
|
||||
TclWinSetSockOpt(SOCKET s, int level, int optname, const char FAR * optval,
|
||||
int optlen)
|
||||
{
|
||||
@@ -2117,7 +2117,7 @@ TclWinSetSockOpt(SOCKET s, int level, int optname, const char FAR * optval,
|
||||
return (*winSock.setsockopt)(s, level, optname, optval, optlen);
|
||||
}
|
||||
|
||||
u_short PASCAL FAR
|
||||
u_short
|
||||
TclWinNToHS(u_short netshort)
|
||||
{
|
||||
/*
|
||||
@@ -2134,8 +2134,8 @@ TclWinNToHS(u_short netshort)
|
||||
return (*winSock.ntohs)(netshort);
|
||||
}
|
||||
|
||||
struct servent FAR * PASCAL FAR
|
||||
TclWinGetServByName(const char FAR * name, const char FAR * proto)
|
||||
struct servent *
|
||||
TclWinGetServByName(const char * name, const char * proto)
|
||||
{
|
||||
/*
|
||||
* Check that WinSock is initialized; do not call it if not, to
|
||||
@@ -2145,7 +2145,7 @@ TclWinGetServByName(const char FAR * name, const char FAR * proto)
|
||||
*/
|
||||
|
||||
if (winSock.hInstance == NULL) {
|
||||
return (struct servent FAR *) NULL;
|
||||
return (struct servent *) NULL;
|
||||
}
|
||||
|
||||
return (*winSock.getservbyname)(name, proto);
|
||||
|
||||
+5
-3
@@ -9,7 +9,7 @@
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*
|
||||
* RCS: @(#) $Id: tclWinTime.c,v 1.2 1998/09/14 18:40:20 stanton Exp $
|
||||
* RCS: @(#) $Id: tclWinTime.c,v 1.2.4.1 1999/03/04 00:58:27 stanton Exp $
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
@@ -191,10 +191,12 @@ TclpGetTZName()
|
||||
*/
|
||||
|
||||
struct tm *
|
||||
TclpGetDate(tp, useGMT)
|
||||
const time_t *tp;
|
||||
TclpGetDate(t, useGMT)
|
||||
TclpTime_t t;
|
||||
int useGMT;
|
||||
{
|
||||
const time_t *tp = (const time_t *) t;
|
||||
|
||||
struct tm *tmPtr;
|
||||
long time;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user