diff options
Diffstat (limited to 'generic/tclStubInit.c')
| -rw-r--r-- | generic/tclStubInit.c | 838 |
1 files changed, 681 insertions, 157 deletions
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index ab2d80b..6499bc2 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -7,12 +7,10 @@ * * 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.57 2001/09/04 18:06:34 vincentdarley Exp $ */ #include "tclInt.h" -#include "tclPort.h" +#include "tommath.h" /* * Remove macros that will interfere with the definitions below. @@ -31,9 +29,264 @@ #undef Tcl_NewStringObj #undef Tcl_DumpActiveMemory #undef Tcl_ValidateAllMemory -#if TCL_PRESERVE_BINARY_COMPATABILITY -# undef Tcl_FindHashEntry -# undef Tcl_CreateHashEntry +#undef Tcl_FindHashEntry +#undef Tcl_CreateHashEntry +#undef TclpGetPid +#undef TclSockMinimumBuffers +#undef TclWinGetServByName +#undef TclWinGetSockOpt +#undef TclWinSetSockOpt +#define TclUnusedStubEntry NULL + +/* + * Keep a record of the original Notifier procedures, created in the + * same compilation unit as the stub tables so we can later do reliable, + * portable comparisons to see whether a Tcl_SetNotifier() call swapped + * new routines into the stub table. + */ + +Tcl_NotifierProcs tclOriginalNotifier = { + Tcl_SetTimer, + Tcl_WaitForEvent, +#if !defined(__WIN32__) /* UNIX */ + Tcl_CreateFileHandler, + Tcl_DeleteFileHandler, +#else + NULL, + NULL, +#endif + NULL, + NULL, + NULL, + NULL +}; + +/* See bug 510001: TclSockMinimumBuffers needs plat imp */ +#ifdef _WIN64 +# define TclSockMinimumBuffersOld 0 +#else +int TclSockMinimumBuffersOld(sock, size) + int sock; + int size; +{ + return TclSockMinimumBuffers(INT2PTR(sock), size); +} +#endif + +MODULE_SCOPE TclIntStubs tclIntStubs; +MODULE_SCOPE TclIntPlatStubs tclIntPlatStubs; +MODULE_SCOPE TclPlatStubs tclPlatStubs; +MODULE_SCOPE TclStubs tclStubs; +MODULE_SCOPE TclTomMathStubs tclTomMathStubs; + +#if defined(_WIN32) || defined(__CYGWIN__) +#undef TclWinNToHS +unsigned short TclWinNToHS(unsigned short ns) { + return ntohs(ns); +} +#endif + +#ifdef __WIN32__ +# define TclUnixWaitForFile 0 +# define TclUnixCopyFile 0 +# define TclpReaddir 0 +# define TclpIsAtty 0 +#elif defined(__CYGWIN__) +# define TclpIsAtty TclPlatIsAtty +# define TclWinSetInterfaces (void (*) (int)) doNothing +# define TclWinAddProcess (void (*) (void *, unsigned int)) doNothing +# define TclWinFlushDirtyChannels doNothing +# define TclWinResetInterfaces doNothing +# define TclpGetTZName 0 + +static Tcl_Encoding winTCharEncoding; + +static int +TclpIsAtty(int fd) +{ + return isatty(fd); +} + +#define TclWinGetPlatformId winGetPlatformId +static int +TclWinGetPlatformId() +{ + /* Don't bother to determine the real platform on cygwin, + * because VER_PLATFORM_WIN32_NT is the only supported platform */ + return 2; /* VER_PLATFORM_WIN32_NT */; +} + +void *TclWinGetTclInstance() +{ + void *hInstance = NULL; + GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, + (const char *)&winTCharEncoding, &hInstance); + return hInstance; +} + +#define TclWinSetSockOpt winSetSockOpt +static int +TclWinSetSockOpt(SOCKET s, int level, int optname, + const char *optval, int optlen) +{ + return setsockopt((int) s, level, optname, optval, optlen); +} + +#define TclWinGetSockOpt winGetSockOpt +static int +TclWinGetSockOpt(SOCKET s, int level, int optname, + char *optval, int *optlen) +{ + return getsockopt((int) s, level, optname, optval, optlen); +} + +#define TclWinGetServByName winGetServByName +static struct servent * +TclWinGetServByName(const char *name, const char *proto) +{ + return getservbyname(name, proto); +} + +#define TclWinNoBackslash winNoBackslash +static char * +TclWinNoBackslash(char *path) +{ + char *p; + + for (p = path; *p != '\0'; p++) { + if (*p == '\\') { + *p = '/'; + } + } + return path; +} + +int +TclpGetPid(Tcl_Pid pid) +{ + return (int) (size_t) pid; +} + +static void +doNothing(void) +{ + /* dummy implementation, no need to do anything */ +} + +char * +Tcl_WinUtfToTChar( + const char *string, + int len, + Tcl_DString *dsPtr) +{ + if (!winTCharEncoding) { + winTCharEncoding = Tcl_GetEncoding(0, "unicode"); + } + return Tcl_UtfToExternalDString(winTCharEncoding, + string, len, dsPtr); +} + +char * +Tcl_WinTCharToUtf( + const char *string, + int len, + Tcl_DString *dsPtr) +{ + if (!winTCharEncoding) { + winTCharEncoding = Tcl_GetEncoding(0, "unicode"); + } + return Tcl_ExternalToUtfDString(winTCharEncoding, + string, len, dsPtr); +} + +#if defined(TCL_WIDE_INT_IS_LONG) +/* On Cygwin64, long is 64-bit while on Win64 long is 32-bit. Therefore + * we have to make sure that all stub entries on Cygwin64 follow the Win64 + * signature. Tcl 9 must find a better solution, but that cannot be done + * without introducing a binary incompatibility. + */ +#define Tcl_DbNewLongObj ((Tcl_Obj*(*)(long,const char*,int))dbNewLongObj) +static Tcl_Obj *dbNewLongObj( + int intValue, + const char *file, + int line +) { +#ifdef TCL_MEM_DEBUG + register Tcl_Obj *objPtr; + + TclDbNewObj(objPtr, file, line); + objPtr->bytes = NULL; + + objPtr->internalRep.longValue = (long) intValue; + objPtr->typePtr = &tclIntType; + return objPtr; +#else + return Tcl_NewIntObj(intValue); +#endif +} +#define Tcl_GetLongFromObj (int(*)(Tcl_Interp*,Tcl_Obj*,long*))Tcl_GetIntFromObj +#define Tcl_NewLongObj (Tcl_Obj*(*)(long))Tcl_NewIntObj +#define Tcl_SetLongObj (void(*)(Tcl_Obj*,long))Tcl_SetIntObj +static int exprInt(Tcl_Interp *interp, const char *expr, int *ptr){ + long longValue; + int result = Tcl_ExprLong(interp, expr, &longValue); + if (result == TCL_OK) { + if ((longValue >= -(long)(UINT_MAX)) + && (longValue <= (long)(UINT_MAX))) { + *ptr = (int)longValue; + } else { + Tcl_SetResult(interp, + "integer value too large to represent as non-long integer", + TCL_STATIC); + result = TCL_ERROR; + } + } + return result; +} +#define Tcl_ExprLong (int(*)(Tcl_Interp*,const char*,long*))exprInt +static int exprIntObj(Tcl_Interp *interp, Tcl_Obj*expr, int *ptr){ + long longValue; + int result = Tcl_ExprLongObj(interp, expr, &longValue); + if (result == TCL_OK) { + if ((longValue >= -(long)(UINT_MAX)) + && (longValue <= (long)(UINT_MAX))) { + *ptr = (int)longValue; + } else { + Tcl_SetResult(interp, + "integer value too large to represent as non-long integer", + TCL_STATIC); + result = TCL_ERROR; + } + } + return result; +} +#define Tcl_ExprLongObj (int(*)(Tcl_Interp*,Tcl_Obj*,long*))exprIntObj +static int uniCharNcmp(const Tcl_UniChar *ucs, const Tcl_UniChar *uct, unsigned int n){ + return Tcl_UniCharNcmp(ucs, uct, (unsigned long)n); +} +#define Tcl_UniCharNcmp (int(*)(const Tcl_UniChar*,const Tcl_UniChar*,unsigned long))uniCharNcmp +static int utfNcmp(const char *s1, const char *s2, unsigned int n){ + return Tcl_UtfNcmp(s1, s2, (unsigned long)n); +} +#define Tcl_UtfNcmp (int(*)(const char*,const char*,unsigned long))utfNcmp +static int utfNcasecmp(const char *s1, const char *s2, unsigned int n){ + return Tcl_UtfNcasecmp(s1, s2, (unsigned long)n); +} +#define Tcl_UtfNcasecmp (int(*)(const char*,const char*,unsigned long))utfNcasecmp +static int uniCharNcasecmp(const Tcl_UniChar *ucs, const Tcl_UniChar *uct, unsigned int n){ + return Tcl_UniCharNcasecmp(ucs, uct, (unsigned long)n); +} +#define Tcl_UniCharNcasecmp (int(*)(const Tcl_UniChar*,const Tcl_UniChar*,unsigned long))uniCharNcasecmp +static int formatInt(char *buffer, int n){ + return TclFormatInt(buffer, (long)n); +} +#define TclFormatInt (int(*)(char *, long))formatInt + +#endif + +#else /* UNIX and MAC */ +# define TclpLocaltime_unix TclpLocaltime +# define TclpGmtime_unix TclpGmtime #endif /* @@ -48,35 +301,19 @@ TclIntStubs tclIntStubs = { TCL_STUB_MAGIC, NULL, NULL, /* 0 */ - TclAccessDeleteProc, /* 1 */ - TclAccessInsertProc, /* 2 */ + NULL, /* 1 */ + NULL, /* 2 */ TclAllocateFreeObjects, /* 3 */ NULL, /* 4 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ TclCleanupChildren, /* 5 */ -#endif /* UNIX */ -#ifdef __WIN32__ - TclCleanupChildren, /* 5 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - NULL, /* 5 */ -#endif /* MAC_TCL */ TclCleanupCommand, /* 6 */ TclCopyAndCollapse, /* 7 */ TclCopyChannel, /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ TclCreatePipeline, /* 9 */ -#endif /* UNIX */ -#ifdef __WIN32__ - TclCreatePipeline, /* 9 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - NULL, /* 9 */ -#endif /* MAC_TCL */ TclCreateProc, /* 10 */ TclDeleteCompiledLocalVars, /* 11 */ TclDeleteVars, /* 12 */ - TclDoGlob, /* 13 */ + NULL, /* 13 */ TclDumpMemoryInfo, /* 14 */ NULL, /* 15 */ TclExprFloatError, /* 16 */ @@ -90,15 +327,15 @@ TclIntStubs tclIntStubs = { TclFormatInt, /* 24 */ TclFreePackageInfo, /* 25 */ NULL, /* 26 */ - TclGetDate, /* 27 */ + NULL, /* 27 */ TclpGetDefaultStdChannel, /* 28 */ - TclGetElementOfIndexedArray, /* 29 */ + NULL, /* 29 */ NULL, /* 30 */ TclGetExtension, /* 31 */ TclGetFrame, /* 32 */ - TclGetInterpProc, /* 33 */ + NULL, /* 33 */ TclGetIntForIndex, /* 34 */ - TclGetIndexedScalar, /* 35 */ + NULL, /* 35 */ TclGetLong, /* 36 */ TclGetLoadedPackages, /* 37 */ TclGetNamespaceForQualName, /* 38 */ @@ -106,16 +343,16 @@ TclIntStubs tclIntStubs = { TclGetOpenMode, /* 40 */ TclGetOriginalCommand, /* 41 */ TclpGetUserHome, /* 42 */ - TclGlobalInvoke, /* 43 */ + NULL, /* 43 */ TclGuessPackageName, /* 44 */ TclHideUnsafeCommands, /* 45 */ TclInExit, /* 46 */ - TclIncrElementOfIndexedArray, /* 47 */ - TclIncrIndexedScalar, /* 48 */ - TclIncrVar2, /* 49 */ + NULL, /* 47 */ + NULL, /* 48 */ + NULL, /* 49 */ TclInitCompiledLocals, /* 50 */ TclInterpInit, /* 51 */ - TclInvoke, /* 52 */ + NULL, /* 52 */ TclInvokeObjectCommand, /* 53 */ TclInvokeStringCommand, /* 54 */ TclIsProc, /* 55 */ @@ -128,9 +365,9 @@ TclIntStubs tclIntStubs = { TclObjCommandComplete, /* 62 */ TclObjInterpProc, /* 63 */ TclObjInvoke, /* 64 */ - TclObjInvokeGlobal, /* 65 */ - TclOpenFileChannelDeleteProc, /* 66 */ - TclOpenFileChannelInsertProc, /* 67 */ + NULL, /* 65 */ + NULL, /* 66 */ + NULL, /* 67 */ NULL, /* 68 */ TclpAlloc, /* 69 */ NULL, /* 70 */ @@ -157,39 +394,23 @@ TclIntStubs tclIntStubs = { TclProcCleanupProc, /* 91 */ TclProcCompileProc, /* 92 */ TclProcDeleteProc, /* 93 */ - TclProcInterpProc, /* 94 */ + NULL, /* 94 */ NULL, /* 95 */ TclRenameCommand, /* 96 */ TclResetShadowedCmdRefs, /* 97 */ TclServiceIdle, /* 98 */ - TclSetElementOfIndexedArray, /* 99 */ - TclSetIndexedScalar, /* 100 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ + NULL, /* 99 */ + NULL, /* 100 */ TclSetPreInitScript, /* 101 */ -#endif /* UNIX */ -#ifdef __WIN32__ - TclSetPreInitScript, /* 101 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - NULL, /* 101 */ -#endif /* MAC_TCL */ TclSetupEnv, /* 102 */ TclSockGetPort, /* 103 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - TclSockMinimumBuffers, /* 104 */ -#endif /* UNIX */ -#ifdef __WIN32__ - TclSockMinimumBuffers, /* 104 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - NULL, /* 104 */ -#endif /* MAC_TCL */ + TclSockMinimumBuffersOld, /* 104 */ NULL, /* 105 */ - TclStatDeleteProc, /* 106 */ - TclStatInsertProc, /* 107 */ + NULL, /* 106 */ + NULL, /* 107 */ TclTeardownNamespace, /* 108 */ TclUpdateReturnInfo, /* 109 */ - NULL, /* 110 */ + TclSockMinimumBuffers, /* 110 */ Tcl_AddInterpResolvers, /* 111 */ Tcl_AppendExportList, /* 112 */ Tcl_CreateNamespace, /* 113 */ @@ -213,13 +434,13 @@ TclIntStubs tclIntStubs = { Tcl_SetNamespaceResolvers, /* 131 */ TclpHasSockets, /* 132 */ TclpGetDate, /* 133 */ - TclpStrftime, /* 134 */ - TclpCheckStackSpace, /* 135 */ + NULL, /* 134 */ + NULL, /* 135 */ NULL, /* 136 */ NULL, /* 137 */ TclGetEnv, /* 138 */ NULL, /* 139 */ - TclLooksLikeInt, /* 140 */ + NULL, /* 140 */ TclpGetCwd, /* 141 */ TclSetByteCodeFromAny, /* 142 */ TclAddLiteralObj, /* 143 */ @@ -242,13 +463,99 @@ TclIntStubs tclIntStubs = { NULL, /* 160 */ TclChannelTransform, /* 161 */ TclChannelEventScriptInvoker, /* 162 */ - TclpSetInitialEncodings, /* 163 */ + TclGetInstructionTable, /* 163 */ + TclExpandCodeArray, /* 164 */ + TclpSetInitialEncodings, /* 165 */ + TclListObjSetElement, /* 166 */ + TclSetStartupScriptPath, /* 167 */ + TclGetStartupScriptPath, /* 168 */ + TclpUtfNcmp2, /* 169 */ + TclCheckInterpTraces, /* 170 */ + TclCheckExecutionTraces, /* 171 */ + TclInThreadExit, /* 172 */ + TclUniCharMatch, /* 173 */ + NULL, /* 174 */ + TclCallVarTraces, /* 175 */ + TclCleanupVar, /* 176 */ + TclVarErrMsg, /* 177 */ + Tcl_SetStartupScript, /* 178 */ + Tcl_GetStartupScript, /* 179 */ + NULL, /* 180 */ + NULL, /* 181 */ + TclpLocaltime, /* 182 */ + TclpGmtime, /* 183 */ + NULL, /* 184 */ + NULL, /* 185 */ + NULL, /* 186 */ + NULL, /* 187 */ + NULL, /* 188 */ + NULL, /* 189 */ + NULL, /* 190 */ + NULL, /* 191 */ + NULL, /* 192 */ + NULL, /* 193 */ + NULL, /* 194 */ + NULL, /* 195 */ + NULL, /* 196 */ + NULL, /* 197 */ + TclObjGetFrame, /* 198 */ + NULL, /* 199 */ + TclpObjRemoveDirectory, /* 200 */ + TclpObjCopyDirectory, /* 201 */ + TclpObjCreateDirectory, /* 202 */ + TclpObjDeleteFile, /* 203 */ + TclpObjCopyFile, /* 204 */ + TclpObjRenameFile, /* 205 */ + TclpObjStat, /* 206 */ + TclpObjAccess, /* 207 */ + TclpOpenFileChannel, /* 208 */ + NULL, /* 209 */ + NULL, /* 210 */ + NULL, /* 211 */ + TclpFindExecutable, /* 212 */ + TclGetObjNameOfExecutable, /* 213 */ + TclSetObjNameOfExecutable, /* 214 */ + TclStackAlloc, /* 215 */ + TclStackFree, /* 216 */ + TclPushStackFrame, /* 217 */ + TclPopStackFrame, /* 218 */ + NULL, /* 219 */ + NULL, /* 220 */ + NULL, /* 221 */ + NULL, /* 222 */ + NULL, /* 223 */ + TclGetPlatform, /* 224 */ + TclTraceDictPath, /* 225 */ + TclObjBeingDeleted, /* 226 */ + TclSetNsPath, /* 227 */ + TclObjInterpProcCore, /* 228 */ + TclPtrMakeUpvar, /* 229 */ + TclObjLookupVar, /* 230 */ + TclGetNamespaceFromObj, /* 231 */ + TclEvalObjEx, /* 232 */ + TclGetSrcInfoForPc, /* 233 */ + TclVarHashCreateVar, /* 234 */ + TclInitVarHashTable, /* 235 */ + TclBackgroundException, /* 236 */ + NULL, /* 237 */ + NULL, /* 238 */ + NULL, /* 239 */ + NULL, /* 240 */ + NULL, /* 241 */ + NULL, /* 242 */ + TclDbDumpActiveObjects, /* 243 */ + NULL, /* 244 */ + NULL, /* 245 */ + NULL, /* 246 */ + NULL, /* 247 */ + NULL, /* 248 */ + TclDoubleDigits, /* 249 */ }; TclIntPlatStubs tclIntPlatStubs = { TCL_STUB_MAGIC, NULL, -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(MAC_OSX_TCL) /* UNIX */ TclGetAndDetachPids, /* 0 */ TclpCloseFile, /* 1 */ TclpCreateCommandChannel, /* 2 */ @@ -259,84 +566,173 @@ TclIntPlatStubs tclIntPlatStubs = { TclpOpenFile, /* 7 */ TclUnixWaitForFile, /* 8 */ TclpCreateTempFile, /* 9 */ + TclpReaddir, /* 10 */ + TclpLocaltime_unix, /* 11 */ + TclpGmtime_unix, /* 12 */ + TclpInetNtoa, /* 13 */ + TclUnixCopyFile, /* 14 */ + NULL, /* 15 */ + NULL, /* 16 */ + NULL, /* 17 */ + NULL, /* 18 */ + NULL, /* 19 */ + NULL, /* 20 */ + NULL, /* 21 */ + NULL, /* 22 */ + NULL, /* 23 */ + NULL, /* 24 */ + NULL, /* 25 */ + NULL, /* 26 */ + NULL, /* 27 */ + NULL, /* 28 */ + TclWinCPUID, /* 29 */ #endif /* UNIX */ -#ifdef __WIN32__ +#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ TclWinConvertError, /* 0 */ TclWinConvertWSAError, /* 1 */ TclWinGetServByName, /* 2 */ TclWinGetSockOpt, /* 3 */ TclWinGetTclInstance, /* 4 */ - NULL, /* 5 */ + TclUnixWaitForFile, /* 5 */ TclWinNToHS, /* 6 */ TclWinSetSockOpt, /* 7 */ TclpGetPid, /* 8 */ TclWinGetPlatformId, /* 9 */ - NULL, /* 10 */ + TclpReaddir, /* 10 */ TclGetAndDetachPids, /* 11 */ TclpCloseFile, /* 12 */ TclpCreateCommandChannel, /* 13 */ TclpCreatePipe, /* 14 */ TclpCreateProcess, /* 15 */ - NULL, /* 16 */ - NULL, /* 17 */ + TclpIsAtty, /* 16 */ + TclUnixCopyFile, /* 17 */ TclpMakeFile, /* 18 */ TclpOpenFile, /* 19 */ TclWinAddProcess, /* 20 */ - NULL, /* 21 */ + TclpInetNtoa, /* 21 */ TclpCreateTempFile, /* 22 */ TclpGetTZName, /* 23 */ TclWinNoBackslash, /* 24 */ - TclWinGetPlatform, /* 25 */ + NULL, /* 25 */ TclWinSetInterfaces, /* 26 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - TclpSysAlloc, /* 0 */ - TclpSysFree, /* 1 */ - TclpSysRealloc, /* 2 */ - TclpExit, /* 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 */ + TclWinFlushDirtyChannels, /* 27 */ + TclWinResetInterfaces, /* 28 */ + TclWinCPUID, /* 29 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + TclGetAndDetachPids, /* 0 */ + TclpCloseFile, /* 1 */ + TclpCreateCommandChannel, /* 2 */ + TclpCreatePipe, /* 3 */ + TclpCreateProcess, /* 4 */ + NULL, /* 5 */ + TclpMakeFile, /* 6 */ + TclpOpenFile, /* 7 */ + TclUnixWaitForFile, /* 8 */ + TclpCreateTempFile, /* 9 */ + TclpReaddir, /* 10 */ + TclpLocaltime_unix, /* 11 */ + TclpGmtime_unix, /* 12 */ + TclpInetNtoa, /* 13 */ + TclUnixCopyFile, /* 14 */ + TclMacOSXGetFileAttribute, /* 15 */ + TclMacOSXSetFileAttribute, /* 16 */ + TclMacOSXCopyFileAttributes, /* 17 */ + TclMacOSXMatchType, /* 18 */ + TclMacOSXNotifierAddRunLoopMode, /* 19 */ + NULL, /* 20 */ + NULL, /* 21 */ + NULL, /* 22 */ + NULL, /* 23 */ NULL, /* 24 */ - TclMacChmod, /* 25 */ -#endif /* MAC_TCL */ + NULL, /* 25 */ + NULL, /* 26 */ + NULL, /* 27 */ + NULL, /* 28 */ + TclWinCPUID, /* 29 */ +#endif /* MACOSX */ }; TclPlatStubs tclPlatStubs = { TCL_STUB_MAGIC, NULL, -#ifdef __WIN32__ +#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ Tcl_WinUtfToTChar, /* 0 */ Tcl_WinTCharToUtf, /* 1 */ -#endif /* __WIN32__ */ -#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 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_MacOSXOpenBundleResources, /* 0 */ + Tcl_MacOSXOpenVersionedBundleResources, /* 1 */ +#endif /* MACOSX */ +}; + +TclTomMathStubs tclTomMathStubs = { + TCL_STUB_MAGIC, + NULL, + TclBN_epoch, /* 0 */ + TclBN_revision, /* 1 */ + TclBN_mp_add, /* 2 */ + TclBN_mp_add_d, /* 3 */ + TclBN_mp_and, /* 4 */ + TclBN_mp_clamp, /* 5 */ + TclBN_mp_clear, /* 6 */ + TclBN_mp_clear_multi, /* 7 */ + TclBN_mp_cmp, /* 8 */ + TclBN_mp_cmp_d, /* 9 */ + TclBN_mp_cmp_mag, /* 10 */ + TclBN_mp_copy, /* 11 */ + TclBN_mp_count_bits, /* 12 */ + TclBN_mp_div, /* 13 */ + TclBN_mp_div_d, /* 14 */ + TclBN_mp_div_2, /* 15 */ + TclBN_mp_div_2d, /* 16 */ + TclBN_mp_div_3, /* 17 */ + TclBN_mp_exch, /* 18 */ + TclBN_mp_expt_d, /* 19 */ + TclBN_mp_grow, /* 20 */ + TclBN_mp_init, /* 21 */ + TclBN_mp_init_copy, /* 22 */ + TclBN_mp_init_multi, /* 23 */ + TclBN_mp_init_set, /* 24 */ + TclBN_mp_init_size, /* 25 */ + TclBN_mp_lshd, /* 26 */ + TclBN_mp_mod, /* 27 */ + TclBN_mp_mod_2d, /* 28 */ + TclBN_mp_mul, /* 29 */ + TclBN_mp_mul_d, /* 30 */ + TclBN_mp_mul_2, /* 31 */ + TclBN_mp_mul_2d, /* 32 */ + TclBN_mp_neg, /* 33 */ + TclBN_mp_or, /* 34 */ + TclBN_mp_radix_size, /* 35 */ + TclBN_mp_read_radix, /* 36 */ + TclBN_mp_rshd, /* 37 */ + TclBN_mp_shrink, /* 38 */ + TclBN_mp_set, /* 39 */ + TclBN_mp_sqr, /* 40 */ + TclBN_mp_sqrt, /* 41 */ + TclBN_mp_sub, /* 42 */ + TclBN_mp_sub_d, /* 43 */ + TclBN_mp_to_unsigned_bin, /* 44 */ + TclBN_mp_to_unsigned_bin_n, /* 45 */ + TclBN_mp_toradix_n, /* 46 */ + TclBN_mp_unsigned_bin_size, /* 47 */ + TclBN_mp_xor, /* 48 */ + TclBN_mp_zero, /* 49 */ + TclBN_reverse, /* 50 */ + TclBN_fast_s_mp_mul_digs, /* 51 */ + TclBN_fast_s_mp_sqr, /* 52 */ + TclBN_mp_karatsuba_mul, /* 53 */ + TclBN_mp_karatsuba_sqr, /* 54 */ + TclBN_mp_toom_mul, /* 55 */ + TclBN_mp_toom_sqr, /* 56 */ + TclBN_s_mp_add, /* 57 */ + TclBN_s_mp_mul_digs, /* 58 */ + TclBN_s_mp_sqr, /* 59 */ + TclBN_s_mp_sub, /* 60 */ + TclBN_mp_init_set_int, /* 61 */ + TclBN_mp_set_int, /* 62 */ + TclBN_mp_cnt_lsb, /* 63 */ }; static TclStubHooks tclStubHooks = { @@ -357,24 +753,24 @@ TclStubs tclStubs = { Tcl_DbCkalloc, /* 6 */ Tcl_DbCkfree, /* 7 */ Tcl_DbCkrealloc, /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ Tcl_CreateFileHandler, /* 9 */ #endif /* UNIX */ -#ifdef __WIN32__ - NULL, /* 9 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL +#if defined(__WIN32__) /* WIN */ NULL, /* 9 */ -#endif /* MAC_TCL */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_CreateFileHandler, /* 9 */ +#endif /* MACOSX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ Tcl_DeleteFileHandler, /* 10 */ #endif /* UNIX */ -#ifdef __WIN32__ - NULL, /* 10 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL +#if defined(__WIN32__) /* WIN */ NULL, /* 10 */ -#endif /* MAC_TCL */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_DeleteFileHandler, /* 10 */ +#endif /* MACOSX */ Tcl_SetTimer, /* 11 */ Tcl_Sleep, /* 12 */ Tcl_WaitForEvent, /* 13 */ @@ -475,15 +871,7 @@ TclStubs tclStubs = { Tcl_DeleteHashEntry, /* 108 */ Tcl_DeleteHashTable, /* 109 */ Tcl_DeleteInterp, /* 110 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ Tcl_DetachPids, /* 111 */ -#endif /* UNIX */ -#ifdef __WIN32__ - Tcl_DetachPids, /* 111 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - NULL, /* 111 */ -#endif /* MAC_TCL */ Tcl_DeleteTimerHandler, /* 112 */ Tcl_DeleteTrace, /* 113 */ Tcl_DontCallWhenDeleted, /* 114 */ @@ -539,15 +927,15 @@ TclStubs tclStubs = { Tcl_GetMaster, /* 164 */ Tcl_GetNameOfExecutable, /* 165 */ Tcl_GetObjResult, /* 166 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ Tcl_GetOpenFile, /* 167 */ #endif /* UNIX */ -#ifdef __WIN32__ +#if defined(__WIN32__) /* WIN */ NULL, /* 167 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - NULL, /* 167 */ -#endif /* MAC_TCL */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_GetOpenFile, /* 167 */ +#endif /* MACOSX */ Tcl_GetPathType, /* 168 */ Tcl_Gets, /* 169 */ Tcl_GetsObj, /* 170 */ @@ -577,15 +965,7 @@ TclStubs tclStubs = { Tcl_NotifyChannel, /* 194 */ Tcl_ObjGetVar2, /* 195 */ Tcl_ObjSetVar2, /* 196 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ Tcl_OpenCommandChannel, /* 197 */ -#endif /* UNIX */ -#ifdef __WIN32__ - Tcl_OpenCommandChannel, /* 197 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - NULL, /* 197 */ -#endif /* MAC_TCL */ Tcl_OpenFileChannel, /* 198 */ Tcl_OpenTcpClient, /* 199 */ Tcl_OpenTcpServer, /* 200 */ @@ -595,15 +975,7 @@ TclStubs tclStubs = { Tcl_PosixError, /* 204 */ Tcl_QueueEvent, /* 205 */ Tcl_Read, /* 206 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - Tcl_ReapDetachedProcs, /* 207 */ -#endif /* UNIX */ -#ifdef __WIN32__ Tcl_ReapDetachedProcs, /* 207 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - NULL, /* 207 */ -#endif /* MAC_TCL */ Tcl_RecordAndEval, /* 208 */ Tcl_RecordAndEvalObj, /* 209 */ Tcl_RegisterChannel, /* 210 */ @@ -616,7 +988,7 @@ TclStubs tclStubs = { Tcl_ResetResult, /* 217 */ Tcl_ScanElement, /* 218 */ Tcl_ScanCountedElement, /* 219 */ - Tcl_Seek, /* 220 */ + Tcl_SeekOld, /* 220 */ Tcl_ServiceAll, /* 221 */ Tcl_ServiceEvent, /* 222 */ Tcl_SetAssocData, /* 223 */ @@ -642,7 +1014,7 @@ TclStubs tclStubs = { Tcl_SplitPath, /* 243 */ Tcl_StaticPackage, /* 244 */ Tcl_StringMatch, /* 245 */ - Tcl_Tell, /* 246 */ + Tcl_TellOld, /* 246 */ Tcl_TraceVar, /* 247 */ Tcl_TraceVar2, /* 248 */ Tcl_TranslateFileName, /* 249 */ @@ -875,6 +1247,158 @@ TclStubs tclStubs = { Tcl_FSGetTranslatedStringPath, /* 476 */ Tcl_FSGetFileSystemForPath, /* 477 */ Tcl_FSGetPathType, /* 478 */ + Tcl_OutputBuffered, /* 479 */ + Tcl_FSMountsChanged, /* 480 */ + Tcl_EvalTokensStandard, /* 481 */ + Tcl_GetTime, /* 482 */ + Tcl_CreateObjTrace, /* 483 */ + Tcl_GetCommandInfoFromToken, /* 484 */ + Tcl_SetCommandInfoFromToken, /* 485 */ + Tcl_DbNewWideIntObj, /* 486 */ + Tcl_GetWideIntFromObj, /* 487 */ + Tcl_NewWideIntObj, /* 488 */ + Tcl_SetWideIntObj, /* 489 */ + Tcl_AllocStatBuf, /* 490 */ + Tcl_Seek, /* 491 */ + Tcl_Tell, /* 492 */ + Tcl_ChannelWideSeekProc, /* 493 */ + Tcl_DictObjPut, /* 494 */ + Tcl_DictObjGet, /* 495 */ + Tcl_DictObjRemove, /* 496 */ + Tcl_DictObjSize, /* 497 */ + Tcl_DictObjFirst, /* 498 */ + Tcl_DictObjNext, /* 499 */ + Tcl_DictObjDone, /* 500 */ + Tcl_DictObjPutKeyList, /* 501 */ + Tcl_DictObjRemoveKeyList, /* 502 */ + Tcl_NewDictObj, /* 503 */ + Tcl_DbNewDictObj, /* 504 */ + Tcl_RegisterConfig, /* 505 */ + Tcl_CreateNamespace, /* 506 */ + Tcl_DeleteNamespace, /* 507 */ + Tcl_AppendExportList, /* 508 */ + Tcl_Export, /* 509 */ + Tcl_Import, /* 510 */ + Tcl_ForgetImport, /* 511 */ + Tcl_GetCurrentNamespace, /* 512 */ + Tcl_GetGlobalNamespace, /* 513 */ + Tcl_FindNamespace, /* 514 */ + Tcl_FindCommand, /* 515 */ + Tcl_GetCommandFromObj, /* 516 */ + Tcl_GetCommandFullName, /* 517 */ + Tcl_FSEvalFileEx, /* 518 */ + Tcl_SetExitProc, /* 519 */ + Tcl_LimitAddHandler, /* 520 */ + Tcl_LimitRemoveHandler, /* 521 */ + Tcl_LimitReady, /* 522 */ + Tcl_LimitCheck, /* 523 */ + Tcl_LimitExceeded, /* 524 */ + Tcl_LimitSetCommands, /* 525 */ + Tcl_LimitSetTime, /* 526 */ + Tcl_LimitSetGranularity, /* 527 */ + Tcl_LimitTypeEnabled, /* 528 */ + Tcl_LimitTypeExceeded, /* 529 */ + Tcl_LimitTypeSet, /* 530 */ + Tcl_LimitTypeReset, /* 531 */ + Tcl_LimitGetCommands, /* 532 */ + Tcl_LimitGetTime, /* 533 */ + Tcl_LimitGetGranularity, /* 534 */ + Tcl_SaveInterpState, /* 535 */ + Tcl_RestoreInterpState, /* 536 */ + Tcl_DiscardInterpState, /* 537 */ + Tcl_SetReturnOptions, /* 538 */ + Tcl_GetReturnOptions, /* 539 */ + Tcl_IsEnsemble, /* 540 */ + Tcl_CreateEnsemble, /* 541 */ + Tcl_FindEnsemble, /* 542 */ + Tcl_SetEnsembleSubcommandList, /* 543 */ + Tcl_SetEnsembleMappingDict, /* 544 */ + Tcl_SetEnsembleUnknownHandler, /* 545 */ + Tcl_SetEnsembleFlags, /* 546 */ + Tcl_GetEnsembleSubcommandList, /* 547 */ + Tcl_GetEnsembleMappingDict, /* 548 */ + Tcl_GetEnsembleUnknownHandler, /* 549 */ + Tcl_GetEnsembleFlags, /* 550 */ + Tcl_GetEnsembleNamespace, /* 551 */ + Tcl_SetTimeProc, /* 552 */ + Tcl_QueryTimeProc, /* 553 */ + Tcl_ChannelThreadActionProc, /* 554 */ + Tcl_NewBignumObj, /* 555 */ + Tcl_DbNewBignumObj, /* 556 */ + Tcl_SetBignumObj, /* 557 */ + Tcl_GetBignumFromObj, /* 558 */ + Tcl_TakeBignumFromObj, /* 559 */ + Tcl_TruncateChannel, /* 560 */ + Tcl_ChannelTruncateProc, /* 561 */ + Tcl_SetChannelErrorInterp, /* 562 */ + Tcl_GetChannelErrorInterp, /* 563 */ + Tcl_SetChannelError, /* 564 */ + Tcl_GetChannelError, /* 565 */ + Tcl_InitBignumFromDouble, /* 566 */ + Tcl_GetNamespaceUnknownHandler, /* 567 */ + Tcl_SetNamespaceUnknownHandler, /* 568 */ + Tcl_GetEncodingFromObj, /* 569 */ + Tcl_GetEncodingSearchPath, /* 570 */ + Tcl_SetEncodingSearchPath, /* 571 */ + Tcl_GetEncodingNameFromEnvironment, /* 572 */ + Tcl_PkgRequireProc, /* 573 */ + Tcl_AppendObjToErrorInfo, /* 574 */ + Tcl_AppendLimitedToObj, /* 575 */ + Tcl_Format, /* 576 */ + Tcl_AppendFormatToObj, /* 577 */ + Tcl_ObjPrintf, /* 578 */ + Tcl_AppendPrintfToObj, /* 579 */ + NULL, /* 580 */ + NULL, /* 581 */ + NULL, /* 582 */ + NULL, /* 583 */ + NULL, /* 584 */ + NULL, /* 585 */ + NULL, /* 586 */ + NULL, /* 587 */ + NULL, /* 588 */ + NULL, /* 589 */ + NULL, /* 590 */ + NULL, /* 591 */ + NULL, /* 592 */ + NULL, /* 593 */ + NULL, /* 594 */ + NULL, /* 595 */ + NULL, /* 596 */ + NULL, /* 597 */ + NULL, /* 598 */ + NULL, /* 599 */ + NULL, /* 600 */ + NULL, /* 601 */ + NULL, /* 602 */ + NULL, /* 603 */ + NULL, /* 604 */ + NULL, /* 605 */ + NULL, /* 606 */ + NULL, /* 607 */ + NULL, /* 608 */ + NULL, /* 609 */ + NULL, /* 610 */ + NULL, /* 611 */ + NULL, /* 612 */ + NULL, /* 613 */ + NULL, /* 614 */ + NULL, /* 615 */ + NULL, /* 616 */ + NULL, /* 617 */ + NULL, /* 618 */ + NULL, /* 619 */ + NULL, /* 620 */ + NULL, /* 621 */ + NULL, /* 622 */ + NULL, /* 623 */ + NULL, /* 624 */ + NULL, /* 625 */ + NULL, /* 626 */ + NULL, /* 627 */ + NULL, /* 628 */ + NULL, /* 629 */ + TclUnusedStubEntry, /* 630 */ }; /* !END!: Do not edit above this line. */ |
