diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-03-22 16:02:48 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-03-22 16:02:48 (GMT) |
commit | 90b55a0053849e5a6c0483f716de14cb4639ce08 (patch) | |
tree | 830224fbce35ca2add10635eb3e7e3d078959e48 | |
parent | 286934c4a1d3edc5b286c6f4c1d3b741ef25c262 (diff) | |
download | tcl-90b55a0053849e5a6c0483f716de14cb4639ce08.zip tcl-90b55a0053849e5a6c0483f716de14cb4639ce08.tar.gz tcl-90b55a0053849e5a6c0483f716de14cb4639ce08.tar.bz2 |
many more cygwin functions present
-rw-r--r-- | generic/tclInt.decls | 198 | ||||
-rw-r--r-- | generic/tclIntPlatDecls.h | 341 | ||||
-rw-r--r-- | generic/tclStubInit.c | 120 |
3 files changed, 412 insertions, 247 deletions
diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 269cd81..3d84cb2 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # of this file, and for a DISCLAIMER OF ALL WARRANTIES. library tcl - + # Define the unsupported generic interfaces. interface tclInt @@ -37,7 +37,7 @@ declare 3 generic { void TclAllocateFreeObjects(void) } # Replaced by TclpChdir in 8.1: -# declare 4 generic { +# declare 4 generic { # int TclChdir(Tcl_Interp *interp, char *dirName) # } declare 5 {unix win} { @@ -63,7 +63,7 @@ declare 9 {unix win} { TclFile *errFilePtr) } declare 10 generic { - int TclCreateProc(Tcl_Interp *interp, Namespace *nsPtr, + int TclCreateProc(Tcl_Interp *interp, Namespace *nsPtr, CONST char *procName, Tcl_Obj *argsPtr, Tcl_Obj *bodyPtr, Proc **procPtrPtr) } @@ -109,7 +109,7 @@ declare 22 generic { int *sizePtr, int *bracePtr) } declare 23 generic { - Proc * TclFindProc(Interp *iPtr, CONST char *procName) + Proc *TclFindProc(Interp *iPtr, CONST char *procName) } declare 24 generic { int TclFormatInt(char *buffer, long n) @@ -118,8 +118,8 @@ declare 25 generic { void TclFreePackageInfo(Interp *iPtr) } # Removed in 8.1: -# declare 26 generic { -# char * TclGetCwd(Tcl_Interp *interp) +# declare 26 generic { +# char *TclGetCwd(Tcl_Interp *interp) # } declare 27 generic { int TclGetDate(char *p, Tcl_WideInt now, long zone, @@ -130,15 +130,15 @@ declare 28 generic { } # Removed in 8.4b2: #declare 29 generic { -# Tcl_Obj * TclGetElementOfIndexedArray(Tcl_Interp *interp, +# Tcl_Obj *TclGetElementOfIndexedArray(Tcl_Interp *interp, # int localIndex, Tcl_Obj *elemPtr, int flags) #} -# Replaced by char * TclGetEnv(CONST char *name, Tcl_DString *valuePtr) in 8.1: +# Replaced by char *TclGetEnv(CONST char *name, Tcl_DString *valuePtr) in 8.1: # declare 30 generic { -# char * TclGetEnv(CONST char *name) +# char *TclGetEnv(CONST char *name) # } declare 31 generic { - char * TclGetExtension(char *name) + char *TclGetExtension(char *name) } declare 32 generic { int TclGetFrame(Tcl_Interp *interp, CONST char *str, @@ -153,7 +153,7 @@ declare 34 generic { } # Removed in 8.4b2: #declare 35 generic { -# Tcl_Obj * TclGetIndexedScalar(Tcl_Interp *interp, int localIndex, +# Tcl_Obj *TclGetIndexedScalar(Tcl_Interp *interp, int localIndex, # int flags) #} declare 36 generic { @@ -178,7 +178,7 @@ declare 41 generic { Tcl_Command TclGetOriginalCommand(Tcl_Command command) } declare 42 generic { - char * TclpGetUserHome(CONST char *name, Tcl_DString *bufferPtr) + char *TclpGetUserHome(CONST char *name, Tcl_DString *bufferPtr) } declare 43 generic { int TclGlobalInvoke(Tcl_Interp *interp, int argc, CONST84 char **argv, int flags) @@ -194,16 +194,16 @@ declare 46 generic { } # Removed in 8.4b2: #declare 47 generic { -# Tcl_Obj * TclIncrElementOfIndexedArray(Tcl_Interp *interp, +# Tcl_Obj *TclIncrElementOfIndexedArray(Tcl_Interp *interp, # int localIndex, Tcl_Obj *elemPtr, long incrAmount) #} # Removed in 8.4b2: #declare 48 generic { -# Tcl_Obj * TclIncrIndexedScalar(Tcl_Interp *interp, int localIndex, +# Tcl_Obj *TclIncrIndexedScalar(Tcl_Interp *interp, int localIndex, # long incrAmount) #} declare 49 generic { - Tcl_Obj * TclIncrVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, + Tcl_Obj *TclIncrVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, long incrAmount, int part1NotParsed) } declare 50 generic { @@ -225,7 +225,7 @@ declare 54 generic { int objc, Tcl_Obj *CONST objv[]) } declare 55 generic { - Proc * TclIsProc(Command *cmdPtr) + Proc *TclIsProc(Command *cmdPtr) } # Replaced with TclpLoadFile in 8.1: # declare 56 generic { @@ -238,7 +238,7 @@ declare 55 generic { # int TclLooksLikeInt(char *p) # } declare 58 generic { - Var * TclLookupVar(Tcl_Interp *interp, CONST char *part1, CONST char *part2, + Var *TclLookupVar(Tcl_Interp *interp, CONST char *part1, CONST char *part2, int flags, CONST char *msg, int createPart1, int createPart2, Var **arrayPtrPtr) } @@ -251,7 +251,7 @@ declare 60 generic { int TclNeedSpace(CONST char *start, CONST char *end) } declare 61 generic { - Tcl_Obj * TclNewProcBodyObj(Proc *procPtr) + Tcl_Obj *TclNewProcBodyObj(Proc *procPtr) } declare 62 generic { int TclObjCommandComplete(Tcl_Obj *cmdPtr) @@ -279,7 +279,7 @@ declare 67 generic { # int TclpAccess(CONST char *path, int mode) #} declare 69 generic { - char * TclpAlloc(unsigned int size) + char *TclpAlloc(unsigned int size) } #declare 70 generic { # int TclpCopyFile(CONST char *source, CONST char *dest) @@ -308,7 +308,6 @@ declare 76 generic { declare 77 generic { void TclpGetTime(Tcl_Time *time) } - declare 78 generic { int TclpGetTimeZone(Tcl_WideInt time) } @@ -322,7 +321,7 @@ declare 78 generic { # char *modeString, int permissions) #} declare 81 generic { - char * TclpRealloc(char *ptr, unsigned int size) + char *TclpRealloc(char *ptr, unsigned int size) } #declare 82 generic { # int TclpRemoveDirectory(CONST char *path, int recursive, @@ -348,7 +347,7 @@ declare 81 generic { # void TclPlatformInit(Tcl_Interp *interp) # } declare 88 generic { - char * TclPrecTraceProc(ClientData clientData, Tcl_Interp *interp, + char *TclPrecTraceProc(ClientData clientData, Tcl_Interp *interp, CONST char *name1, CONST char *name2, int flags) } declare 89 generic { @@ -389,16 +388,16 @@ declare 98 generic { } # Removed in 8.4b2: #declare 99 generic { -# Tcl_Obj * TclSetElementOfIndexedArray(Tcl_Interp *interp, int localIndex, +# Tcl_Obj *TclSetElementOfIndexedArray(Tcl_Interp *interp, int localIndex, # Tcl_Obj *elemPtr, Tcl_Obj *objPtr, int flags) #} # Removed in 8.4b2: #declare 100 generic { -# Tcl_Obj * TclSetIndexedScalar(Tcl_Interp *interp, int localIndex, +# Tcl_Obj *TclSetIndexedScalar(Tcl_Interp *interp, int localIndex, # Tcl_Obj *objPtr, int flags) #} declare 101 generic { - char * TclSetPreInitScript(char *string) + char *TclSetPreInitScript(char *string) } declare 102 generic { void TclSetupEnv(Tcl_Interp *interp) @@ -428,7 +427,7 @@ declare 109 generic { } # Removed in 8.1: # declare 110 generic { -# char * TclWordEnd(char *start, char *lastChar, int nested, int *semiPtr) +# char *TclWordEnd(char *start, char *lastChar, int nested, int *semiPtr) # } # Procedures used in conjunction with Tcl namespaces. They are @@ -444,7 +443,7 @@ declare 112 generic { Tcl_Obj *objPtr) } declare 113 generic { - Tcl_Namespace * Tcl_CreateNamespace(Tcl_Interp *interp, CONST char *name, + Tcl_Namespace *Tcl_CreateNamespace(Tcl_Interp *interp, CONST char *name, ClientData clientData, Tcl_NamespaceDeleteProc *deleteProc) } declare 114 generic { @@ -459,7 +458,7 @@ declare 116 generic { Tcl_Namespace *contextNsPtr, int flags) } declare 117 generic { - Tcl_Namespace * Tcl_FindNamespace(Tcl_Interp *interp, CONST char *name, + Tcl_Namespace *Tcl_FindNamespace(Tcl_Interp *interp, CONST char *name, Tcl_Namespace *contextNsPtr, int flags) } declare 118 generic { @@ -486,10 +485,10 @@ declare 123 generic { Tcl_Obj *objPtr) } declare 124 generic { - Tcl_Namespace * Tcl_GetCurrentNamespace(Tcl_Interp *interp) + Tcl_Namespace *Tcl_GetCurrentNamespace(Tcl_Interp *interp) } declare 125 generic { - Tcl_Namespace * Tcl_GetGlobalNamespace(Tcl_Interp *interp) + Tcl_Namespace *Tcl_GetGlobalNamespace(Tcl_Interp *interp) } declare 126 generic { void Tcl_GetVariableFullName(Tcl_Interp *interp, Tcl_Var variable, @@ -500,12 +499,12 @@ declare 127 generic { CONST char *pattern, int allowOverwrite) } declare 128 generic { - void Tcl_PopCallFrame(Tcl_Interp* interp) + void Tcl_PopCallFrame(Tcl_Interp *interp) } declare 129 generic { - int Tcl_PushCallFrame(Tcl_Interp* interp, Tcl_CallFrame *framePtr, + int Tcl_PushCallFrame(Tcl_Interp *interp, Tcl_CallFrame *framePtr, Tcl_Namespace *nsPtr, int isProcCallFrame) -} +} declare 130 generic { int Tcl_RemoveInterpResolvers(Tcl_Interp *interp, CONST char *name) } @@ -518,7 +517,7 @@ declare 132 generic { int TclpHasSockets(Tcl_Interp *interp) } declare 133 generic { - struct tm * TclpGetDate(TclpTime_t time, int useGMT) + struct tm *TclpGetDate(TclpTime_t time, int useGMT) } declare 134 generic { size_t TclpStrftime(char *s, size_t maxsize, CONST char *format, @@ -534,7 +533,7 @@ declare 135 generic { # int TclpChdir(CONST char *dirName) #} declare 138 generic { - CONST84_RETURN char * TclGetEnv(CONST char *name, Tcl_DString *valuePtr) + CONST84_RETURN char *TclGetEnv(CONST char *name, Tcl_DString *valuePtr) } #declare 139 generic { # int TclpLoadFile(Tcl_Interp *interp, char *fileName, char *sym1, @@ -563,19 +562,15 @@ declare 144 generic { declare 145 generic { struct AuxDataType *TclGetAuxDataType(char *typeName) } - declare 146 generic { TclHandle TclHandleCreate(VOID *ptr) } - declare 147 generic { void TclHandleFree(TclHandle handle) } - declare 148 generic { TclHandle TclHandlePreserve(TclHandle handle) } - declare 149 generic { void TclHandleRelease(TclHandle handle) } @@ -589,7 +584,6 @@ declare 151 generic { void TclRegExpRangeUniChar(Tcl_RegExp re, int index, int *startPtr, int *endPtr) } - declare 152 generic { void TclSetLibraryPath(Tcl_Obj *pathPtr) } @@ -608,11 +602,11 @@ declare 153 generic { #} declare 156 generic { - void TclRegError (Tcl_Interp *interp, CONST char *msg, + void TclRegError(Tcl_Interp *interp, CONST char *msg, int status) } declare 157 generic { - Var * TclVarTraceExists (Tcl_Interp *interp, CONST char *varName) + Var *TclVarTraceExists(Tcl_Interp *interp, CONST char *varName) } declare 158 generic { void TclSetStartupScriptFileName(CONST char *filename) @@ -622,7 +616,8 @@ declare 159 generic { } #declare 160 generic { # int TclpMatchFilesTypes(Tcl_Interp *interp, char *separators, -# Tcl_DString *dirPtr, char *pattern, char *tail, GlobTypeData *types) +# Tcl_DString *dirPtr, char *pattern, char *tail, +# GlobTypeData *types) #} # new in 8.3.2/8.4a2 @@ -634,7 +629,7 @@ declare 162 generic { void TclChannelEventScriptInvoker(ClientData clientData, int flags) } -# ALERT: The result of 'TclGetInstructionTable' is actually an +# ALERT: The result of 'TclGetInstructionTable' is actually a # "InstructionDesc*" but we do not want to describe this structure in # "tclInt.h". It is described in "tclCompile.h". Use a cast to the # correct type when calling this procedure. @@ -648,7 +643,7 @@ declare 163 generic { # "tclInt.h". It is described in "tclCompile.h". declare 164 generic { - void TclExpandCodeArray(VOID *envPtr) + void TclExpandCodeArray(VOID *envPtr) } # These functions are vfs aware, but are generally only useful internally. @@ -658,7 +653,7 @@ declare 165 generic { # New function due to TIP #33 declare 166 generic { - int TclListObjSetElement(Tcl_Interp *interp, Tcl_Obj *listPtr, + int TclListObjSetElement(Tcl_Interp *interp, Tcl_Obj *listPtr, int index, Tcl_Obj *valuePtr) } @@ -674,16 +669,15 @@ declare 169 generic { int TclpUtfNcmp2(CONST char *s1, CONST char *s2, unsigned long n) } declare 170 generic { - int TclCheckInterpTraces (Tcl_Interp *interp, CONST char *command, int numChars, \ - Command *cmdPtr, int result, int traceFlags, int objc, \ - Tcl_Obj *CONST objv[]) + int TclCheckInterpTraces(Tcl_Interp *interp, CONST char *command, + int numChars, Command *cmdPtr, int result, int traceFlags, + int objc, Tcl_Obj *CONST objv[]) } declare 171 generic { - int TclCheckExecutionTraces (Tcl_Interp *interp, CONST char *command, int numChars, \ - Command *cmdPtr, int result, int traceFlags, int objc, \ - Tcl_Obj *CONST objv[]) + int TclCheckExecutionTraces (Tcl_Interp *interp, CONST char *command, + int numChars, Command *cmdPtr, int result, int traceFlags, + int objc, Tcl_Obj *CONST objv[]) } - declare 172 generic { int TclInThreadExit(void) } @@ -691,7 +685,7 @@ declare 172 generic { # added for 8.4.2 declare 173 generic { - int TclUniCharMatch (CONST Tcl_UniChar *string, int strLen, \ + int TclUniCharMatch(CONST Tcl_UniChar *string, int strLen, \ CONST Tcl_UniChar *pattern, int ptnLen, int nocase) } @@ -719,13 +713,13 @@ interface tclIntPlat # Mac specific internals declare 0 mac { - VOID * TclpSysAlloc(long size, int isBin) + VOID *TclpSysAlloc(long size, int isBin) } declare 1 mac { void TclpSysFree(VOID *ptr) } declare 2 mac { - VOID * TclpSysRealloc(VOID *cp, unsigned int size) + VOID *TclpSysRealloc(VOID *cp, unsigned int size) } declare 3 mac { void TclpExit(int status) @@ -809,14 +803,14 @@ declare 22 mac { int TclMacCreateEnv(void) } declare 23 mac { - FILE * TclMacFOpenHack(CONST char *path, CONST char *mode) + FILE *TclMacFOpenHack(CONST char *path, CONST char *mode) } # Replaced in 8.1 by TclpReadLink: # declare 24 mac { # int TclMacReadlink(char *path, char *buf, int size) # } declare 24 mac { - char * TclpGetTZName(int isdst) + char *TclpGetTZName(int isdst) } declare 25 mac { int TclMacChmod(CONST char *path, int mode) @@ -826,8 +820,8 @@ declare 26 mac { int FSpLLocationFromPath(int length, CONST char *path, FSSpecPtr theSpec) } -############################ -# Windows specific internals +################################ +# Windows specific functions declare 0 win { void TclWinConvertError(DWORD errCode) @@ -836,12 +830,12 @@ declare 1 win { void TclWinConvertWSAError(DWORD errCode) } declare 2 win { - struct servent * TclWinGetServByName(CONST char *nm, + struct servent *TclWinGetServByName(CONST char *nm, CONST char *proto) } declare 3 win { int TclWinGetSockOpt(SOCKET s, int level, int optname, - char FAR * optval, int FAR *optlen) + char FAR *optval, int FAR *optlen) } declare 4 win { HINSTANCE TclWinGetTclInstance(void) @@ -855,7 +849,7 @@ declare 6 win { } declare 7 win { int TclWinSetSockOpt(SOCKET s, int level, int optname, - CONST char FAR * optval, int optlen) + CONST char FAR *optval, int optlen) } declare 8 win { unsigned long TclpGetPid(Tcl_Pid pid) @@ -893,7 +887,7 @@ declare 15 win { # TclFile TclpCreateTempFile(char *contents, Tcl_DString *namePtr) # } # declare 17 win { -# char * TclpGetTZName(void) +# char *TclpGetTZName(void) # } declare 18 win { TclFile TclpMakeFile(Tcl_Channel channel, int direction) @@ -915,10 +909,10 @@ declare 22 win { TclFile TclpCreateTempFile(CONST char *contents) } declare 23 win { - char * TclpGetTZName(int isdst) + char *TclpGetTZName(int isdst) } declare 24 win { - char * TclWinNoBackslash(char *path) + char *TclWinNoBackslash(char *path) } declare 25 win { TclPlatformType *TclWinGetPlatform(void) @@ -930,7 +924,7 @@ declare 26 win { # Added in Tcl 8.3.3 / 8.4 declare 27 win { - void TclWinFlushDirtyChannels (void) + void TclWinFlushDirtyChannels(void) } # Added in 8.4.2 @@ -938,13 +932,12 @@ declare 27 win { declare 28 win { void TclWinResetInterfaces(void) } - declare 29 win { - int TclWinCPUID( unsigned int index, unsigned int *regs ) + int TclWinCPUID(unsigned int index, unsigned int *regs) } -######################### -# Unix specific internals +################################ +# Unix specific functions # Pipe channel functions @@ -961,20 +954,23 @@ declare 2 unix { declare 3 unix { int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe) } +# On non-cygwin, this is actually a reference to TclpCreateProcess declare 4 unix { - int TclpCreateProcess(Tcl_Interp *interp, int argc, CONST char **argv, - TclFile inputFile, TclFile outputFile, TclFile errorFile, - Tcl_Pid *pidPtr) + int TclWinGetTclInstance(void) } # Signature changed in 8.1: # declare 5 unix { # TclFile TclpCreateTempFile(char *contents, Tcl_DString *namePtr) # } + +# On non-cygwin, this is actually a reference to TclpMakeFile declare 6 unix { - TclFile TclpMakeFile(Tcl_Channel channel, int direction) + unsigned short TclWinNToHS(unsigned short ns) } +# On non-cygwin, this is actually a reference to TclpOpenFile declare 7 unix { - TclFile TclpOpenFile(CONST char *fname, int mode) + int TclWinSetSockOpt(int s, int level, int optname, + CONST char *optval, int optlen) } declare 8 unix { int TclUnixWaitForFile(int fd, int mask, int timeout) @@ -990,28 +986,60 @@ declare 9 unix { # Added in 8.4: declare 10 unix { - Tcl_DirEntry * TclpReaddir(DIR * dir) + Tcl_DirEntry *TclpReaddir(DIR *dir) } - # Slots 11 and 12 are forwarders for functions that were promoted to # generic Stubs - declare 11 unix { - struct tm * TclpLocaltime_unix(TclpTime_t_CONST clock) + struct tm *TclpLocaltime_unix(TclpTime_t_CONST clock) } - declare 12 unix { - struct tm * TclpGmtime_unix(TclpTime_t_CONST clock) + struct tm *TclpGmtime_unix(TclpTime_t_CONST clock) } - declare 13 unix { - char * TclpInetNtoa(struct in_addr addr) + char *TclpInetNtoa(struct in_addr addr) +} +#On cygwin, TclpCreateProcess is here +declare 15 unix { + int TclMacOSXGetFileAttribute(Tcl_Interp *interp, int objIndex, + Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr) +} +#On cygwin, TclpMakeFile is here +declare 18 unix { + int TclMacOSXMatchType(Tcl_Interp *interp, CONST char *pathName, + CONST char *fileName, Tcl_StatBuf *statBufPtr, + Tcl_GlobTypeData *types) +} +#On cygwin, TclpOpenFile is here +declare 19 unix { + void TclMacOSXNotifierAddRunLoopMode(CONST void *runLoopMode) +} +declare 20 unix { + void TclWinAddProcess(void *hProcess, unsigned long id) } - declare 22 unix { TclFile TclpCreateTempFile(CONST char *contents) } +declare 23 unix { + char *TclpGetTZName(int isdst) +} +declare 24 unix { + char *TclWinNoBackslash(char *path) +} +declare 26 unix { + void TclWinSetInterfaces(int wide) +} +declare 27 unix { + void TclWinFlushDirtyChannels(void) +} +declare 28 unix { + void TclWinResetInterfaces(void) +} declare 29 unix { int TclWinCPUID(unsigned int index, unsigned int *regs) } + +# Local Variables: +# mode: tcl +# End: diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index ec474d4..3c967b0 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -13,6 +13,14 @@ #ifndef _TCLINTPLATDECLS #define _TCLINTPLATDECLS +EXTERN int TclpCreateProcess _ANSI_ARGS_((Tcl_Interp *interp, + int argc, CONST char **argv, TclFile inputFile, + TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr)); +EXTERN TclFile TclpMakeFile _ANSI_ARGS_((Tcl_Channel channel, + int direction)); +EXTERN TclFile TclpOpenFile _ANSI_ARGS_((CONST char *fname, + int mode)); + /* * WARNING: This file is automatically generated by the tools/genStubs.tcl * script. Any modifications to the function declarations below should be made @@ -27,37 +35,33 @@ #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ /* 0 */ -EXTERN void TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp * interp, +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)); + TclFile readFile, TclFile writeFile, + TclFile errorFile, int numPids, + Tcl_Pid *pidPtr)); /* 3 */ -EXTERN int TclpCreatePipe _ANSI_ARGS_((TclFile * readPipe, - TclFile * writePipe)); +EXTERN int TclpCreatePipe _ANSI_ARGS_((TclFile *readPipe, + TclFile *writePipe)); /* 4 */ -EXTERN int TclpCreateProcess _ANSI_ARGS_((Tcl_Interp * interp, - int argc, CONST char ** argv, - TclFile inputFile, TclFile outputFile, - TclFile errorFile, Tcl_Pid * pidPtr)); +EXTERN int TclWinGetTclInstance _ANSI_ARGS_((void)); /* Slot 5 is reserved */ /* 6 */ -EXTERN TclFile TclpMakeFile _ANSI_ARGS_((Tcl_Channel channel, - int direction)); +EXTERN unsigned short TclWinNToHS _ANSI_ARGS_((unsigned short ns)); /* 7 */ -EXTERN TclFile TclpOpenFile _ANSI_ARGS_((CONST char * fname, - int mode)); +EXTERN int TclWinSetSockOpt _ANSI_ARGS_((int s, int level, + int optname, CONST char *optval, int optlen)); /* 8 */ -EXTERN int TclUnixWaitForFile _ANSI_ARGS_((int fd, int mask, +EXTERN int TclUnixWaitForFile _ANSI_ARGS_((int fd, int mask, int timeout)); /* 9 */ EXTERN int TclWinGetPlatformId _ANSI_ARGS_((void)); /* 10 */ -EXTERN Tcl_DirEntry * TclpReaddir _ANSI_ARGS_((DIR * dir)); +EXTERN Tcl_DirEntry * TclpReaddir _ANSI_ARGS_((DIR *dir)); /* 11 */ EXTERN struct tm * TclpLocaltime_unix _ANSI_ARGS_(( TclpTime_t_CONST clock)); @@ -66,25 +70,40 @@ EXTERN struct tm * TclpGmtime_unix _ANSI_ARGS_((TclpTime_t_CONST clock)); /* 13 */ EXTERN char * TclpInetNtoa _ANSI_ARGS_((struct in_addr addr)); /* Slot 14 is reserved */ -/* Slot 15 is reserved */ +/* 15 */ +EXTERN int TclMacOSXGetFileAttribute _ANSI_ARGS_(( + Tcl_Interp *interp, int objIndex, + Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr)); /* Slot 16 is reserved */ /* Slot 17 is reserved */ -/* Slot 18 is reserved */ -/* Slot 19 is reserved */ -/* Slot 20 is reserved */ +/* 18 */ +EXTERN int TclMacOSXMatchType _ANSI_ARGS_((Tcl_Interp *interp, + CONST char *pathName, CONST char *fileName, + Tcl_StatBuf *statBufPtr, + Tcl_GlobTypeData *types)); +/* 19 */ +EXTERN void TclMacOSXNotifierAddRunLoopMode _ANSI_ARGS_(( + CONST void *runLoopMode)); +/* 20 */ +EXTERN void TclWinAddProcess _ANSI_ARGS_((void *hProcess, + unsigned long id)); /* Slot 21 is reserved */ /* 22 */ -EXTERN TclFile TclpCreateTempFile _ANSI_ARGS_(( - CONST char * contents)); -/* Slot 23 is reserved */ -/* Slot 24 is reserved */ +EXTERN TclFile TclpCreateTempFile _ANSI_ARGS_((CONST char *contents)); +/* 23 */ +EXTERN char * TclpGetTZName _ANSI_ARGS_((int isdst)); +/* 24 */ +EXTERN char * TclWinNoBackslash _ANSI_ARGS_((char *path)); /* Slot 25 is reserved */ -/* Slot 26 is reserved */ -/* Slot 27 is reserved */ -/* Slot 28 is reserved */ +/* 26 */ +EXTERN void TclWinSetInterfaces _ANSI_ARGS_((int wide)); +/* 27 */ +EXTERN void TclWinFlushDirtyChannels _ANSI_ARGS_((void)); +/* 28 */ +EXTERN void TclWinResetInterfaces _ANSI_ARGS_((void)); /* 29 */ -EXTERN int TclWinCPUID _ANSI_ARGS_((unsigned int index, - unsigned int * regs)); +EXTERN int TclWinCPUID _ANSI_ARGS_((unsigned int index, + unsigned int *regs)); #endif /* UNIX */ #ifdef __WIN32__ /* 0 */ @@ -92,20 +111,20 @@ EXTERN void TclWinConvertError _ANSI_ARGS_((DWORD errCode)); /* 1 */ EXTERN void TclWinConvertWSAError _ANSI_ARGS_((DWORD errCode)); /* 2 */ -EXTERN struct servent * TclWinGetServByName _ANSI_ARGS_((CONST char * nm, - CONST char * proto)); +EXTERN struct servent * TclWinGetServByName _ANSI_ARGS_((CONST char *nm, + CONST char *proto)); /* 3 */ -EXTERN int TclWinGetSockOpt _ANSI_ARGS_((SOCKET s, int level, - int optname, char FAR * optval, - int FAR * optlen)); +EXTERN int TclWinGetSockOpt _ANSI_ARGS_((SOCKET s, int level, + int optname, char FAR *optval, + int FAR *optlen)); /* 4 */ EXTERN HINSTANCE TclWinGetTclInstance _ANSI_ARGS_((void)); /* Slot 5 is reserved */ /* 6 */ EXTERN u_short TclWinNToHS _ANSI_ARGS_((u_short ns)); /* 7 */ -EXTERN int TclWinSetSockOpt _ANSI_ARGS_((SOCKET s, int level, - int optname, CONST char FAR * optval, +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)); @@ -113,42 +132,41 @@ EXTERN unsigned long TclpGetPid _ANSI_ARGS_((Tcl_Pid pid)); EXTERN int TclWinGetPlatformId _ANSI_ARGS_((void)); /* Slot 10 is reserved */ /* 11 */ -EXTERN void TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp * interp, +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)); + TclFile readFile, TclFile writeFile, + TclFile errorFile, int numPids, + Tcl_Pid *pidPtr)); /* 14 */ -EXTERN int TclpCreatePipe _ANSI_ARGS_((TclFile * readPipe, - TclFile * writePipe)); +EXTERN int TclpCreatePipe _ANSI_ARGS_((TclFile *readPipe, + TclFile *writePipe)); /* 15 */ -EXTERN int TclpCreateProcess _ANSI_ARGS_((Tcl_Interp * interp, - int argc, CONST char ** argv, - TclFile inputFile, TclFile outputFile, - TclFile errorFile, Tcl_Pid * pidPtr)); +EXTERN int TclpCreateProcess _ANSI_ARGS_((Tcl_Interp *interp, + int argc, CONST char **argv, + TclFile inputFile, TclFile outputFile, + TclFile errorFile, Tcl_Pid *pidPtr)); /* Slot 16 is reserved */ /* Slot 17 is reserved */ /* 18 */ -EXTERN TclFile TclpMakeFile _ANSI_ARGS_((Tcl_Channel channel, +EXTERN TclFile TclpMakeFile _ANSI_ARGS_((Tcl_Channel channel, int direction)); /* 19 */ -EXTERN TclFile TclpOpenFile _ANSI_ARGS_((CONST char * fname, +EXTERN TclFile TclpOpenFile _ANSI_ARGS_((CONST char *fname, int mode)); /* 20 */ -EXTERN void TclWinAddProcess _ANSI_ARGS_((HANDLE hProcess, +EXTERN void TclWinAddProcess _ANSI_ARGS_((HANDLE hProcess, DWORD id)); /* Slot 21 is reserved */ /* 22 */ -EXTERN TclFile TclpCreateTempFile _ANSI_ARGS_(( - CONST char * contents)); +EXTERN TclFile TclpCreateTempFile _ANSI_ARGS_((CONST char *contents)); /* 23 */ EXTERN char * TclpGetTZName _ANSI_ARGS_((int isdst)); /* 24 */ -EXTERN char * TclWinNoBackslash _ANSI_ARGS_((char * path)); +EXTERN char * TclWinNoBackslash _ANSI_ARGS_((char *path)); /* 25 */ EXTERN TclPlatformType * TclWinGetPlatform _ANSI_ARGS_((void)); /* 26 */ @@ -158,16 +176,16 @@ EXTERN void TclWinFlushDirtyChannels _ANSI_ARGS_((void)); /* 28 */ EXTERN void TclWinResetInterfaces _ANSI_ARGS_((void)); /* 29 */ -EXTERN int TclWinCPUID _ANSI_ARGS_((unsigned int index, - unsigned int * regs)); +EXTERN int TclWinCPUID _ANSI_ARGS_((unsigned int index, + unsigned int *regs)); #endif /* __WIN32__ */ #ifdef MAC_TCL /* 0 */ EXTERN VOID * TclpSysAlloc _ANSI_ARGS_((long size, int isBin)); /* 1 */ -EXTERN void TclpSysFree _ANSI_ARGS_((VOID * ptr)); +EXTERN void TclpSysFree _ANSI_ARGS_((VOID *ptr)); /* 2 */ -EXTERN VOID * TclpSysRealloc _ANSI_ARGS_((VOID * cp, +EXTERN VOID * TclpSysRealloc _ANSI_ARGS_((VOID *cp, unsigned int size)); /* 3 */ EXTERN void TclpExit _ANSI_ARGS_((int status)); @@ -176,28 +194,27 @@ 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)); +EXTERN OSErr FSpFindFolder _ANSI_ARGS_((short vRefNum, + OSType folderType, Boolean createFolder, + FSSpec *spec)); /* 7 */ -EXTERN void GetGlobalMouseTcl _ANSI_ARGS_((Point * mouse)); +EXTERN void GetGlobalMouseTcl _ANSI_ARGS_((Point *mouse)); /* 8 */ -EXTERN pascal OSErr FSpGetDirectoryIDTcl _ANSI_ARGS_(( - CONST FSSpec * spec, long * theDirID, - Boolean * isDirectory)); +EXTERN pascal OSErr FSpGetDirectoryIDTcl _ANSI_ARGS_((CONST FSSpec *spec, + long *theDirID, Boolean *isDirectory)); /* 9 */ EXTERN pascal short FSpOpenResFileCompatTcl _ANSI_ARGS_(( - CONST FSSpec * spec, SignedByte permission)); + CONST FSSpec *spec, SignedByte permission)); /* 10 */ EXTERN pascal void FSpCreateResFileCompatTcl _ANSI_ARGS_(( - CONST FSSpec * spec, OSType creator, + CONST FSSpec *spec, OSType creator, OSType fileType, ScriptCode scriptTag)); /* 11 */ -EXTERN int FSpLocationFromPath _ANSI_ARGS_((int length, - CONST char * path, FSSpecPtr theSpec)); +EXTERN int FSpLocationFromPath _ANSI_ARGS_((int length, + CONST char *path, FSSpecPtr theSpec)); /* 12 */ -EXTERN OSErr FSpPathFromLocation _ANSI_ARGS_((FSSpecPtr theSpec, - int * length, Handle * fullPath)); +EXTERN OSErr FSpPathFromLocation _ANSI_ARGS_((FSSpecPtr theSpec, + int *length, Handle *fullPath)); /* 13 */ EXTERN void TclMacExitHandler _ANSI_ARGS_((void)); /* 14 */ @@ -208,30 +225,29 @@ EXTERN OSErr TclMacInstallExitToShellPatch _ANSI_ARGS_(( /* 16 */ EXTERN int TclMacOSErrorToPosixError _ANSI_ARGS_((int error)); /* 17 */ -EXTERN void TclMacRemoveTimer _ANSI_ARGS_((VOID * timerToken)); +EXTERN void TclMacRemoveTimer _ANSI_ARGS_((VOID *timerToken)); /* 18 */ EXTERN VOID * TclMacStartTimer _ANSI_ARGS_((long ms)); /* 19 */ -EXTERN int TclMacTimerExpired _ANSI_ARGS_((VOID * timerToken)); +EXTERN int TclMacTimerExpired _ANSI_ARGS_((VOID *timerToken)); /* 20 */ EXTERN int TclMacRegisterResourceFork _ANSI_ARGS_(( - short fileRef, Tcl_Obj * tokenPtr, - int insert)); + short fileRef, Tcl_Obj *tokenPtr, int insert)); /* 21 */ EXTERN short TclMacUnRegisterResourceFork _ANSI_ARGS_(( - char * tokenPtr, Tcl_Obj * resultPtr)); + char *tokenPtr, Tcl_Obj *resultPtr)); /* 22 */ EXTERN int TclMacCreateEnv _ANSI_ARGS_((void)); /* 23 */ -EXTERN FILE * TclMacFOpenHack _ANSI_ARGS_((CONST char * path, - CONST char * mode)); +EXTERN FILE * TclMacFOpenHack _ANSI_ARGS_((CONST char *path, + CONST char *mode)); /* 24 */ EXTERN char * TclpGetTZName _ANSI_ARGS_((int isdst)); /* 25 */ -EXTERN int TclMacChmod _ANSI_ARGS_((CONST char * path, int mode)); +EXTERN int TclMacChmod _ANSI_ARGS_((CONST char *path, int mode)); /* 26 */ -EXTERN int FSpLLocationFromPath _ANSI_ARGS_((int length, - CONST char * path, FSSpecPtr theSpec)); +EXTERN int FSpLLocationFromPath _ANSI_ARGS_((int length, + CONST char *path, FSSpecPtr theSpec)); #endif /* MAC_TCL */ typedef struct TclIntPlatStubs { @@ -239,97 +255,97 @@ typedef struct TclIntPlatStubs { struct TclIntPlatStubHooks *hooks; #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - void (*tclGetAndDetachPids) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan)); /* 0 */ + 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, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr)); /* 4 */ + 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 (*tclWinGetTclInstance) _ANSI_ARGS_((void)); /* 4 */ void *reserved5; - TclFile (*tclpMakeFile) _ANSI_ARGS_((Tcl_Channel channel, int direction)); /* 6 */ - TclFile (*tclpOpenFile) _ANSI_ARGS_((CONST char * fname, int mode)); /* 7 */ + unsigned short (*tclWinNToHS) _ANSI_ARGS_((unsigned short ns)); /* 6 */ + int (*tclWinSetSockOpt) _ANSI_ARGS_((int s, int level, int optname, CONST char *optval, int optlen)); /* 7 */ int (*tclUnixWaitForFile) _ANSI_ARGS_((int fd, int mask, int timeout)); /* 8 */ int (*tclWinGetPlatformId) _ANSI_ARGS_((void)); /* 9 */ - Tcl_DirEntry * (*tclpReaddir) _ANSI_ARGS_((DIR * dir)); /* 10 */ + Tcl_DirEntry * (*tclpReaddir) _ANSI_ARGS_((DIR *dir)); /* 10 */ struct tm * (*tclpLocaltime_unix) _ANSI_ARGS_((TclpTime_t_CONST clock)); /* 11 */ struct tm * (*tclpGmtime_unix) _ANSI_ARGS_((TclpTime_t_CONST clock)); /* 12 */ char * (*tclpInetNtoa) _ANSI_ARGS_((struct in_addr addr)); /* 13 */ void *reserved14; - void *reserved15; + int (*tclMacOSXGetFileAttribute) _ANSI_ARGS_((Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr)); /* 15 */ void *reserved16; void *reserved17; - void *reserved18; - void *reserved19; - void *reserved20; + int (*tclMacOSXMatchType) _ANSI_ARGS_((Tcl_Interp *interp, CONST char *pathName, CONST char *fileName, Tcl_StatBuf *statBufPtr, Tcl_GlobTypeData *types)); /* 18 */ + void (*tclMacOSXNotifierAddRunLoopMode) _ANSI_ARGS_((CONST void *runLoopMode)); /* 19 */ + void (*tclWinAddProcess) _ANSI_ARGS_((void *hProcess, unsigned long id)); /* 20 */ void *reserved21; - TclFile (*tclpCreateTempFile) _ANSI_ARGS_((CONST char * contents)); /* 22 */ - void *reserved23; - void *reserved24; + TclFile (*tclpCreateTempFile) _ANSI_ARGS_((CONST char *contents)); /* 22 */ + char * (*tclpGetTZName) _ANSI_ARGS_((int isdst)); /* 23 */ + char * (*tclWinNoBackslash) _ANSI_ARGS_((char *path)); /* 24 */ void *reserved25; - void *reserved26; - void *reserved27; - void *reserved28; - int (*tclWinCPUID) _ANSI_ARGS_((unsigned int index, unsigned int * regs)); /* 29 */ + void (*tclWinSetInterfaces) _ANSI_ARGS_((int wide)); /* 26 */ + void (*tclWinFlushDirtyChannels) _ANSI_ARGS_((void)); /* 27 */ + void (*tclWinResetInterfaces) _ANSI_ARGS_((void)); /* 28 */ + int (*tclWinCPUID) _ANSI_ARGS_((unsigned int index, unsigned int *regs)); /* 29 */ #endif /* UNIX */ #ifdef __WIN32__ void (*tclWinConvertError) _ANSI_ARGS_((DWORD errCode)); /* 0 */ void (*tclWinConvertWSAError) _ANSI_ARGS_((DWORD errCode)); /* 1 */ - struct servent * (*tclWinGetServByName) _ANSI_ARGS_((CONST char * nm, CONST char * proto)); /* 2 */ - int (*tclWinGetSockOpt) _ANSI_ARGS_((SOCKET s, int level, int optname, char FAR * optval, int FAR * optlen)); /* 3 */ + struct servent * (*tclWinGetServByName) _ANSI_ARGS_((CONST char *nm, CONST char *proto)); /* 2 */ + int (*tclWinGetSockOpt) _ANSI_ARGS_((SOCKET s, int level, int optname, char FAR *optval, int FAR *optlen)); /* 3 */ HINSTANCE (*tclWinGetTclInstance) _ANSI_ARGS_((void)); /* 4 */ void *reserved5; 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 */ + 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 */ void *reserved10; - void (*tclGetAndDetachPids) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan)); /* 11 */ + 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, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr)); /* 15 */ + 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, CONST char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr)); /* 15 */ void *reserved16; void *reserved17; TclFile (*tclpMakeFile) _ANSI_ARGS_((Tcl_Channel channel, int direction)); /* 18 */ - TclFile (*tclpOpenFile) _ANSI_ARGS_((CONST char * fname, int mode)); /* 19 */ + TclFile (*tclpOpenFile) _ANSI_ARGS_((CONST char *fname, int mode)); /* 19 */ void (*tclWinAddProcess) _ANSI_ARGS_((HANDLE hProcess, DWORD id)); /* 20 */ void *reserved21; - TclFile (*tclpCreateTempFile) _ANSI_ARGS_((CONST char * contents)); /* 22 */ + TclFile (*tclpCreateTempFile) _ANSI_ARGS_((CONST char *contents)); /* 22 */ char * (*tclpGetTZName) _ANSI_ARGS_((int isdst)); /* 23 */ - char * (*tclWinNoBackslash) _ANSI_ARGS_((char * path)); /* 24 */ + char * (*tclWinNoBackslash) _ANSI_ARGS_((char *path)); /* 24 */ TclPlatformType * (*tclWinGetPlatform) _ANSI_ARGS_((void)); /* 25 */ void (*tclWinSetInterfaces) _ANSI_ARGS_((int wide)); /* 26 */ void (*tclWinFlushDirtyChannels) _ANSI_ARGS_((void)); /* 27 */ void (*tclWinResetInterfaces) _ANSI_ARGS_((void)); /* 28 */ - int (*tclWinCPUID) _ANSI_ARGS_((unsigned int index, unsigned int * regs)); /* 29 */ + int (*tclWinCPUID) _ANSI_ARGS_((unsigned int index, unsigned int *regs)); /* 29 */ #endif /* __WIN32__ */ #ifdef MAC_TCL 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 (*tclpSysFree) _ANSI_ARGS_((VOID *ptr)); /* 1 */ + VOID * (*tclpSysRealloc) _ANSI_ARGS_((VOID *cp, unsigned int size)); /* 2 */ void (*tclpExit) _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 (*getGlobalMouseTcl) _ANSI_ARGS_((Point * mouse)); /* 7 */ - pascal OSErr (*fSpGetDirectoryIDTcl) _ANSI_ARGS_((CONST FSSpec * spec, long * theDirID, Boolean * isDirectory)); /* 8 */ - pascal short (*fSpOpenResFileCompatTcl) _ANSI_ARGS_((CONST FSSpec * spec, SignedByte permission)); /* 9 */ - pascal void (*fSpCreateResFileCompatTcl) _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 */ + OSErr (*fSpFindFolder) _ANSI_ARGS_((short vRefNum, OSType folderType, Boolean createFolder, FSSpec *spec)); /* 6 */ + void (*getGlobalMouseTcl) _ANSI_ARGS_((Point *mouse)); /* 7 */ + pascal OSErr (*fSpGetDirectoryIDTcl) _ANSI_ARGS_((CONST FSSpec *spec, long *theDirID, Boolean *isDirectory)); /* 8 */ + pascal short (*fSpOpenResFileCompatTcl) _ANSI_ARGS_((CONST FSSpec *spec, SignedByte permission)); /* 9 */ + pascal void (*fSpCreateResFileCompatTcl) _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 (*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 (*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 */ + FILE * (*tclMacFOpenHack) _ANSI_ARGS_((CONST char *path, CONST char *mode)); /* 23 */ char * (*tclpGetTZName) _ANSI_ARGS_((int isdst)); /* 24 */ - int (*tclMacChmod) _ANSI_ARGS_((CONST char * path, int mode)); /* 25 */ - int (*fSpLLocationFromPath) _ANSI_ARGS_((int length, CONST char * path, FSSpecPtr theSpec)); /* 26 */ + int (*tclMacChmod) _ANSI_ARGS_((CONST char *path, int mode)); /* 25 */ + int (*fSpLLocationFromPath) _ANSI_ARGS_((int length, CONST char *path, FSSpecPtr theSpec)); /* 26 */ #endif /* MAC_TCL */ } TclIntPlatStubs; @@ -364,18 +380,18 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; #define TclpCreatePipe \ (tclIntPlatStubsPtr->tclpCreatePipe) /* 3 */ #endif -#ifndef TclpCreateProcess -#define TclpCreateProcess \ - (tclIntPlatStubsPtr->tclpCreateProcess) /* 4 */ +#ifndef TclWinGetTclInstance +#define TclWinGetTclInstance \ + (tclIntPlatStubsPtr->tclWinGetTclInstance) /* 4 */ #endif /* Slot 5 is reserved */ -#ifndef TclpMakeFile -#define TclpMakeFile \ - (tclIntPlatStubsPtr->tclpMakeFile) /* 6 */ +#ifndef TclWinNToHS +#define TclWinNToHS \ + (tclIntPlatStubsPtr->tclWinNToHS) /* 6 */ #endif -#ifndef TclpOpenFile -#define TclpOpenFile \ - (tclIntPlatStubsPtr->tclpOpenFile) /* 7 */ +#ifndef TclWinSetSockOpt +#define TclWinSetSockOpt \ + (tclIntPlatStubsPtr->tclWinSetSockOpt) /* 7 */ #endif #ifndef TclUnixWaitForFile #define TclUnixWaitForFile \ @@ -402,23 +418,50 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; (tclIntPlatStubsPtr->tclpInetNtoa) /* 13 */ #endif /* Slot 14 is reserved */ -/* Slot 15 is reserved */ +#ifndef TclMacOSXGetFileAttribute +#define TclMacOSXGetFileAttribute \ + (tclIntPlatStubsPtr->tclMacOSXGetFileAttribute) /* 15 */ +#endif /* Slot 16 is reserved */ /* Slot 17 is reserved */ -/* Slot 18 is reserved */ -/* Slot 19 is reserved */ -/* Slot 20 is reserved */ +#ifndef TclMacOSXMatchType +#define TclMacOSXMatchType \ + (tclIntPlatStubsPtr->tclMacOSXMatchType) /* 18 */ +#endif +#ifndef TclMacOSXNotifierAddRunLoopMode +#define TclMacOSXNotifierAddRunLoopMode \ + (tclIntPlatStubsPtr->tclMacOSXNotifierAddRunLoopMode) /* 19 */ +#endif +#ifndef TclWinAddProcess +#define TclWinAddProcess \ + (tclIntPlatStubsPtr->tclWinAddProcess) /* 20 */ +#endif /* Slot 21 is reserved */ #ifndef TclpCreateTempFile #define TclpCreateTempFile \ (tclIntPlatStubsPtr->tclpCreateTempFile) /* 22 */ #endif -/* Slot 23 is reserved */ -/* Slot 24 is reserved */ +#ifndef TclpGetTZName +#define TclpGetTZName \ + (tclIntPlatStubsPtr->tclpGetTZName) /* 23 */ +#endif +#ifndef TclWinNoBackslash +#define TclWinNoBackslash \ + (tclIntPlatStubsPtr->tclWinNoBackslash) /* 24 */ +#endif /* Slot 25 is reserved */ -/* Slot 26 is reserved */ -/* Slot 27 is reserved */ -/* Slot 28 is reserved */ +#ifndef TclWinSetInterfaces +#define TclWinSetInterfaces \ + (tclIntPlatStubsPtr->tclWinSetInterfaces) /* 26 */ +#endif +#ifndef TclWinFlushDirtyChannels +#define TclWinFlushDirtyChannels \ + (tclIntPlatStubsPtr->tclWinFlushDirtyChannels) /* 27 */ +#endif +#ifndef TclWinResetInterfaces +#define TclWinResetInterfaces \ + (tclIntPlatStubsPtr->tclWinResetInterfaces) /* 28 */ +#endif #ifndef TclWinCPUID #define TclWinCPUID \ (tclIntPlatStubsPtr->tclWinCPUID) /* 29 */ @@ -651,8 +694,18 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; #if !defined(__WIN32__) && !defined(MAC_TCL) && !defined(__CYGWIN__) && defined(USE_TCL_STUBS) #undef TclpCreateTempFile -#define TclpCreateTempFile \ - ((TclFile (*)_ANSI_ARGS_((CONST char *))) tclIntPlatStubsPtr->tclWinGetPlatformId) +#define TclpCreateTempFile ((TclFile (*) _ANSI_ARGS_((CONST char *))) \ + tclIntPlatStubsPtr->tclWinGetPlatformId) +#undef TclpCreateProcess +#define TclpCreateProcess ((int (*) _ANSI_ARGS_((Tcl_Interp *, int, \ + CONST char **, TclFile, TclFile, TclFile, Tcl_Pid *))) \ + tclIntPlatStubsPtr->tclWinGetTclInstance) +#undef TclpMakeFile +#define TclpMakeFile ((TclFile (*) _ANSI_ARGS_((Tcl_Channel channel, \ + int direction))) tclIntPlatStubsPtr->tclWinNToHS) +#undef TclpOpenFile +#define TclpOpenFile ((TclFile (*) _ANSI_ARGS_((CONST char *, int))) \ + tclIntPlatStubsPtr->tclWinNToHS) #endif #endif /* _TCLINTPLATDECLS */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 8979119..9ca1750 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -62,6 +62,15 @@ Tcl_NotifierProcs tclOriginalNotifier = { #define TclWinGetPlatformId winGetPlatformId #define Tcl_WinUtfToTChar winUtfToTChar #define Tcl_WinTCharToUtf winTCharToUtf +#define TclWinGetTclInstance winGetTclInstance +#define TclWinNToHS winNToHS +#define TclWinSetSockOpt winSetSockOpt +#define TclWinAddProcess winAddProcess +#define TclpGetTZName pGetTZName +#define TclWinNoBackslash winNoBackslash +#define TclWinSetInterfaces winSetInterfaces +#define TclWinFlushDirtyChannels winFlushDirtyChannels +#define TclWinResetInterfaces winResetInterfaces static Tcl_Encoding winTCharEncoding; @@ -73,6 +82,64 @@ TclWinGetPlatformId() return 2; /* VER_PLATFORM_WIN32_NT */; } +static int TclWinGetTclInstance() +{ + /* TODO: implementation */ + return 0; +} + +static unsigned short +TclWinNToHS(unsigned short ns) +{ + /* TODO: implementation */ + return (unsigned short) -1; +} +static int +TclWinSetSockOpt(int s, int level, int optname, + const char *optval, int optlen) +{ + /* TODO: implementation */ + return -1; +} + +static void +TclWinAddProcess(void *hProcess, unsigned long id) +{ + /* TODO: implementation */ +} + +static char * +TclpGetTZName(int isdst) +{ + /* TODO: implementation */ + return 0; +} + +static char * +TclWinNoBackslash(char *path) +{ + /* TODO: implementation */ + return 0; +} + +static void +TclWinSetInterfaces(int wide) +{ + /* TODO: implementation */ +} + +static void +TclWinFlushDirtyChannels(void) +{ + /* TODO: implementation */ +} + +static void +TclWinResetInterfaces(void) +{ + /* TODO: implementation */ +} + static char * Tcl_WinUtfToTChar(string, len, dsPtr) CONST char *string; @@ -80,20 +147,20 @@ Tcl_WinUtfToTChar(string, len, dsPtr) Tcl_DString *dsPtr; { if (!winTCharEncoding) { - winTCharEncoding = Tcl_GetEncoding(NULL, "unicode"); + winTCharEncoding = Tcl_GetEncoding(0, "unicode"); } return Tcl_UtfToExternalDString(winTCharEncoding, string, len, dsPtr); } static char * -Tcl_WinTCharToUtf(string, len, dsPtr) - CONST char *string; - int len; - Tcl_DString *dsPtr; +Tcl_WinTCharToUtf( + CONST char *string, + int len, + Tcl_DString *dsPtr) { if (!winTCharEncoding) { - winTCharEncoding = Tcl_GetEncoding(NULL, "unicode"); + winTCharEncoding = Tcl_GetEncoding(0, "unicode"); } return Tcl_ExternalToUtfDString(winTCharEncoding, string, len, dsPtr); @@ -103,9 +170,26 @@ Tcl_WinTCharToUtf(string, len, dsPtr) Tcl_Interp *, CONST char *, int, int, char *))) Tcl_WinUtfToTChar #define Tcl_MacOSXOpenVersionedBundleResources (int (*) _ANSI_ARGS_(( \ Tcl_Interp *, CONST char *, CONST char *, int, int, char *))) Tcl_WinTCharToUtf +#define TclMacOSXGetFileAttribute (int(*) _ANSI_ARGS_((Tcl_Interp *, \ + int, Tcl_Obj *, Tcl_Obj **))) TclpCreateProcess +#define TclMacOSXMatchType (int (*) _ANSI_ARGS_((Tcl_Interp *, CONST char *, \ + CONST char *, Tcl_StatBuf *, Tcl_GlobTypeData *))) TclpMakeFile +#define TclMacOSXNotifierAddRunLoopMode (void (*) _ANSI_ARGS_((CONST void *))) TclpOpenFile #elif !defined(__WIN32__) /* UNIX and MAC */ # define TclWinGetPlatformId (int (*)()) TclpCreateTempFile +# define TclWinGetTclInstance (int (*)()) TclpCreateProcess +# define TclWinNToHS (unsigned short (*) _ANSI_ARGS_((unsigned short ns))) TclpMakeFile +# define TclWinSetSockOpt (int (*) _ANSI_ARGS_((int, int, int, const char *, int))) TclpOpenFile +# define TclWinAddProcess 0 +# define TclpGetTZName 0 +# define TclWinNoBackslash 0 +# define TclWinSetInterfaces 0 +# define TclWinFlushDirtyChannels 0 +# define TclWinResetInterfaces 0 +# define TclMacOSXGetFileAttribute 0 /* Only implemented in Tcl >= 8.5 */ +# define TclMacOSXMatchType 0 /* Only implemented in Tcl >= 8.5 */ +# define TclMacOSXNotifierAddRunLoopMode 0 /* Only implemented in Tcl >= 8.5 */ # ifndef MAC_OSX_TCL # define Tcl_MacOSXOpenBundleResources 0 # define Tcl_MacOSXOpenVersionedBundleResources 0 @@ -357,10 +441,10 @@ TclIntPlatStubs tclIntPlatStubs = { TclpCloseFile, /* 1 */ TclpCreateCommandChannel, /* 2 */ TclpCreatePipe, /* 3 */ - TclpCreateProcess, /* 4 */ + TclWinGetTclInstance, /* 4 */ NULL, /* 5 */ - TclpMakeFile, /* 6 */ - TclpOpenFile, /* 7 */ + TclWinNToHS, /* 6 */ + TclWinSetSockOpt, /* 7 */ TclUnixWaitForFile, /* 8 */ TclWinGetPlatformId, /* 9 */ TclpReaddir, /* 10 */ @@ -368,20 +452,20 @@ TclIntPlatStubs tclIntPlatStubs = { TclpGmtime_unix, /* 12 */ TclpInetNtoa, /* 13 */ NULL, /* 14 */ - NULL, /* 15 */ + TclMacOSXGetFileAttribute, /* 15 */ NULL, /* 16 */ NULL, /* 17 */ - NULL, /* 18 */ - NULL, /* 19 */ - NULL, /* 20 */ + TclMacOSXMatchType, /* 18 */ + TclMacOSXNotifierAddRunLoopMode, /* 19 */ + TclWinAddProcess, /* 20 */ NULL, /* 21 */ TclpCreateTempFile, /* 22 */ - NULL, /* 23 */ - NULL, /* 24 */ + TclpGetTZName, /* 23 */ + TclWinNoBackslash, /* 24 */ NULL, /* 25 */ - NULL, /* 26 */ - NULL, /* 27 */ - NULL, /* 28 */ + TclWinSetInterfaces, /* 26 */ + TclWinFlushDirtyChannels, /* 27 */ + TclWinResetInterfaces, /* 28 */ TclWinCPUID, /* 29 */ #endif /* UNIX */ #ifdef __WIN32__ |