#ifndef _TCLINTPLATDECLS
#define _TCLINTPLATDECLS
#if !defined(__WIN32__) && !defined(MAC_TCL)
EXTERN void TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp * interp,
Tcl_Channel chan));
EXTERN int TclpCloseFile _ANSI_ARGS_((TclFile file));
EXTERN Tcl_Channel TclpCreateCommandChannel _ANSI_ARGS_((
TclFile readFile, TclFile writeFile,
TclFile errorFile, int numPids,
Tcl_Pid * pidPtr));
EXTERN int TclpCreatePipe _ANSI_ARGS_((TclFile * readPipe,
TclFile * writePipe));
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));
EXTERN int TclUnixWaitForFile _ANSI_ARGS_((int fd, int mask,
int timeout));
EXTERN TclFile TclpCreateTempFile _ANSI_ARGS_((
CONST char * contents));
EXTERN Tcl_DirEntry * TclpReaddir _ANSI_ARGS_((DIR * dir));
EXTERN struct tm * TclpLocaltime _ANSI_ARGS_((time_t * clock));
EXTERN struct tm * TclpGmtime _ANSI_ARGS_((time_t * clock));
EXTERN char * TclpInetNtoa _ANSI_ARGS_((struct in_addr addr));
#endif
#ifdef __WIN32__
EXTERN void TclWinConvertError _ANSI_ARGS_((DWORD errCode));
EXTERN void TclWinConvertWSAError _ANSI_ARGS_((DWORD errCode));
EXTERN struct servent * TclWinGetServByName _ANSI_ARGS_((CONST char * nm,
CONST char * proto));
EXTERN int TclWinGetSockOpt _ANSI_ARGS_((SOCKET s, int level,
int optname, char FAR * optval,
int FAR * optlen));
EXTERN HINSTANCE TclWinGetTclInstance _ANSI_ARGS_((void));
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));
EXTERN unsigned long TclpGetPid _ANSI_ARGS_((Tcl_Pid pid));
EXTERN int TclWinGetPlatformId _ANSI_ARGS_((void));
EXTERN void TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp * interp,
Tcl_Channel chan));
EXTERN int TclpCloseFile _ANSI_ARGS_((TclFile file));
EXTERN Tcl_Channel TclpCreateCommandChannel _ANSI_ARGS_((
TclFile readFile, TclFile writeFile,
TclFile errorFile, int numPids,
Tcl_Pid * pidPtr));
EXTERN int TclpCreatePipe _ANSI_ARGS_((TclFile * readPipe,
TclFile * writePipe));
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));
EXTERN void TclWinAddProcess _ANSI_ARGS_((HANDLE hProcess,
DWORD id));
EXTERN TclFile TclpCreateTempFile _ANSI_ARGS_((
CONST char * contents));
EXTERN char * TclpGetTZName _ANSI_ARGS_((int isdst));
EXTERN char * TclWinNoBackslash _ANSI_ARGS_((char * path));
EXTERN TclPlatformType * TclWinGetPlatform _ANSI_ARGS_((void));
EXTERN void TclWinSetInterfaces _ANSI_ARGS_((int wide));
EXTERN void TclWinFlushDirtyChannels _ANSI_ARGS_((void));
#endif
#ifdef MAC_TCL
EXTERN VOID * TclpSysAlloc _ANSI_ARGS_((long size, int isBin));
EXTERN void TclpSysFree _ANSI_ARGS_((VOID * ptr));
EXTERN VOID * TclpSysRealloc _ANSI_ARGS_((VOID * cp,
unsigned int size));
EXTERN void TclpExit _ANSI_ARGS_((int status));
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 GetGlobalMouseTcl _ANSI_ARGS_((Point * mouse));
EXTERN pascal OSErr FSpGetDirectoryIDTcl _ANSI_ARGS_((
CONST FSSpec * spec, long * theDirID,
Boolean * isDirectory));
EXTERN pascal short FSpOpenResFileCompatTcl _ANSI_ARGS_((
CONST FSSpec * spec, SignedByte permission));
EXTERN pascal void FSpCreateResFileCompatTcl _ANSI_ARGS_((
CONST FSSpec * spec, OSType creator,
OSType fileType, ScriptCode scriptTag));
EXTERN int FSpLocationFromPath _ANSI_ARGS_((int length,
CONST char * path, FSSpecPtr theSpec));
EXTERN OSErr FSpPathFromLocation _ANSI_ARGS_((FSSpecPtr theSpec,
int * length, Handle * fullPath));
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));
EXTERN int TclMacCreateEnv _ANSI_ARGS_((void));
EXTERN FILE * TclMacFOpenHack _ANSI_ARGS_((CONST char * path,
CONST char * mode));
EXTERN char * TclpGetTZName _ANSI_ARGS_((int isdst));
EXTERN int TclMacChmod _ANSI_ARGS_((CONST char * path, int mode));
EXTERN int FSpLLocationFromPath _ANSI_ARGS_((int length,
CONST char * path, FSSpecPtr theSpec));
#endif
typedef struct TclIntPlatStubs {
int magic;
struct TclIntPlatStubHooks *hooks;
#if !defined(__WIN32__) && !defined(MAC_TCL)
void (*tclGetAndDetachPids) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan));
int (*tclpCloseFile) _ANSI_ARGS_((TclFile file));
Tcl_Channel (*tclpCreateCommandChannel) _ANSI_ARGS_((TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr));
int (*tclpCreatePipe) _ANSI_ARGS_((TclFile * readPipe, TclFile * writePipe));
int (*tclpCreateProcess) _ANSI_ARGS_((Tcl_Interp * interp, int argc, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr));
void *reserved5;
TclFile (*tclpMakeFile) _ANSI_ARGS_((Tcl_Channel channel, int direction));
TclFile (*tclpOpenFile) _ANSI_ARGS_((CONST char * fname, int mode));
int (*tclUnixWaitForFile) _ANSI_ARGS_((int fd, int mask, int timeout));
TclFile (*tclpCreateTempFile) _ANSI_ARGS_((CONST char * contents));
Tcl_DirEntry * (*tclpReaddir) _ANSI_ARGS_((DIR * dir));
struct tm * (*tclpLocaltime) _ANSI_ARGS_((time_t * clock));
struct tm * (*tclpGmtime) _ANSI_ARGS_((time_t * clock));
char * (*tclpInetNtoa) _ANSI_ARGS_((struct in_addr addr));
#endif
#ifdef __WIN32__
void (*tclWinConvertError) _ANSI_ARGS_((DWORD errCode));
void (*tclWinConvertWSAError) _ANSI_ARGS_((DWORD errCode));
struct servent * (*tclWinGetServByName) _ANSI_ARGS_((CONST char * nm, CONST char * proto));
int (*tclWinGetSockOpt) _ANSI_ARGS_((SOCKET s, int level, int optname, char FAR * optval, int FAR * optlen));
HINSTANCE (*tclWinGetTclInstance) _ANSI_ARGS_((void));
void *reserved5;
u_short (*tclWinNToHS) _ANSI_ARGS_((u_short ns));
int (*tclWinSetSockOpt) _ANSI_ARGS_((SOCKET s, int level, int optname, CONST char FAR * optval, int optlen));
unsigned long (*tclpGetPid) _ANSI_ARGS_((Tcl_Pid pid));
int (*tclWinGetPlatformId) _ANSI_ARGS_((void));
void *reserved10;
void (*tclGetAndDetachPids) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan));
int (*tclpCloseFile) _ANSI_ARGS_((TclFile file));
Tcl_Channel (*tclpCreateCommandChannel) _ANSI_ARGS_((TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr));
int (*tclpCreatePipe) _ANSI_ARGS_((TclFile * readPipe, TclFile * writePipe));
int (*tclpCreateProcess) _ANSI_ARGS_((Tcl_Interp * interp, int argc, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr));
void *reserved16;
void *reserved17;
TclFile (*tclpMakeFile) _ANSI_ARGS_((Tcl_Channel channel, int direction));
TclFile (*tclpOpenFile) _ANSI_ARGS_((CONST char * fname, int mode));
void (*tclWinAddProcess) _ANSI_ARGS_((HANDLE hProcess, DWORD id));
void *reserved21;
TclFile (*tclpCreateTempFile) _ANSI_ARGS_((CONST char * contents));
char * (*tclpGetTZName) _ANSI_ARGS_((int isdst));
char * (*tclWinNoBackslash) _ANSI_ARGS_((char * path));
TclPlatformType * (*tclWinGetPlatform) _ANSI_ARGS_((void));
void (*tclWinSetInterfaces) _ANSI_ARGS_((int wide));
void (*tclWinFlushDirtyChannels) _ANSI_ARGS_((void));
#endif
#ifdef MAC_TCL
VOID * (*tclpSysAlloc) _ANSI_ARGS_((long size, int isBin));
void (*tclpSysFree) _ANSI_ARGS_((VOID * ptr));
VOID * (*tclpSysRealloc) _ANSI_ARGS_((VOID * cp, unsigned int size));
void (*tclpExit) _ANSI_ARGS_((int status));
int (*fSpGetDefaultDir) _ANSI_ARGS_((FSSpecPtr theSpec));
int (*fSpSetDefaultDir) _ANSI_ARGS_((FSSpecPtr theSpec));
OSErr (*fSpFindFolder) _ANSI_ARGS_((short vRefNum, OSType folderType, Boolean createFolder, FSSpec * spec));
void (*getGlobalMouseTcl) _ANSI_ARGS_((Point * mouse));
pascal OSErr (*fSpGetDirectoryIDTcl) _ANSI_ARGS_((CONST FSSpec * spec, long * theDirID, Boolean * isDirectory));
pascal short (*fSpOpenResFileCompatTcl) _ANSI_ARGS_((CONST FSSpec * spec, SignedByte permission));
pascal void (*fSpCreateResFileCompatTcl) _ANSI_ARGS_((CONST FSSpec * spec, OSType creator, OSType fileType, ScriptCode scriptTag));
int (*fSpLocationFromPath) _ANSI_ARGS_((int length, CONST char * path, FSSpecPtr theSpec));
OSErr (*fSpPathFromLocation) _ANSI_ARGS_((FSSpecPtr theSpec, int * length, Handle * fullPath));
void (*tclMacExitHandler) _ANSI_ARGS_((void));
void (*tclMacInitExitToShell) _ANSI_ARGS_((int usePatch));
OSErr (*tclMacInstallExitToShellPatch) _ANSI_ARGS_((ExitToShellProcPtr newProc));
int (*tclMacOSErrorToPosixError) _ANSI_ARGS_((int error));
void (*tclMacRemoveTimer) _ANSI_ARGS_((void * timerToken));
void * (*tclMacStartTimer) _ANSI_ARGS_((long ms));
int (*tclMacTimerExpired) _ANSI_ARGS_((void * timerToken));
int (*tclMacRegisterResourceFork) _ANSI_ARGS_((short fileRef, Tcl_Obj * tokenPtr, int insert));
short (*tclMacUnRegisterResourceFork) _ANSI_ARGS_((char * tokenPtr, Tcl_Obj * resultPtr));
int (*tclMacCreateEnv) _ANSI_ARGS_((void));
FILE * (*tclMacFOpenHack) _ANSI_ARGS_((CONST char * path, CONST char * mode));
char * (*tclpGetTZName) _ANSI_ARGS_((int isdst));
int (*tclMacChmod) _ANSI_ARGS_((CONST char * path, int mode));
int (*fSpLLocationFromPath) _ANSI_ARGS_((int length, CONST char * path, FSSpecPtr theSpec));
#endif
} TclIntPlatStubs;
#ifdef __cplusplus
extern "C" {
#endif
extern TclIntPlatStubs *tclIntPlatStubsPtr;
#ifdef __cplusplus
}
#endif
#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
#if !defined(__WIN32__) && !defined(MAC_TCL)
#ifndef TclGetAndDetachPids
#define TclGetAndDetachPids \
(tclIntPlatStubsPtr->tclGetAndDetachPids)
#endif
#ifndef TclpCloseFile
#define TclpCloseFile \
(tclIntPlatStubsPtr->tclpCloseFile)
#endif
#ifndef TclpCreateCommandChannel
#define TclpCreateCommandChannel \
(tclIntPlatStubsPtr->tclpCreateCommandChannel)
#endif
#ifndef TclpCreatePipe
#define TclpCreatePipe \
(tclIntPlatStubsPtr->tclpCreatePipe)
#endif
#ifndef TclpCreateProcess
#define TclpCreateProcess \
(tclIntPlatStubsPtr->tclpCreateProcess)
#endif
#ifndef TclpMakeFile
#define TclpMakeFile \
(tclIntPlatStubsPtr->tclpMakeFile)
#endif
#ifndef TclpOpenFile
#define TclpOpenFile \
(tclIntPlatStubsPtr->tclpOpenFile)
#endif
#ifndef TclUnixWaitForFile
#define TclUnixWaitForFile \
(tclIntPlatStubsPtr->tclUnixWaitForFile)
#endif
#ifndef TclpCreateTempFile
#define TclpCreateTempFile \
(tclIntPlatStubsPtr->tclpCreateTempFile)
#endif
#ifndef TclpReaddir
#define TclpReaddir \
(tclIntPlatStubsPtr->tclpReaddir)
#endif
#ifndef TclpLocaltime
#define TclpLocaltime \
(tclIntPlatStubsPtr->tclpLocaltime)
#endif
#ifndef TclpGmtime
#define TclpGmtime \
(tclIntPlatStubsPtr->tclpGmtime)
#endif
#ifndef TclpInetNtoa
#define TclpInetNtoa \
(tclIntPlatStubsPtr->tclpInetNtoa)
#endif
#endif
#ifdef __WIN32__
#ifndef TclWinConvertError
#define TclWinConvertError \
(tclIntPlatStubsPtr->tclWinConvertError)
#endif
#ifndef TclWinConvertWSAError
#define TclWinConvertWSAError \
(tclIntPlatStubsPtr->tclWinConvertWSAError)
#endif
#ifndef TclWinGetServByName
#define TclWinGetServByName \
(tclIntPlatStubsPtr->tclWinGetServByName)
#endif
#ifndef TclWinGetSockOpt
#define TclWinGetSockOpt \
(tclIntPlatStubsPtr->tclWinGetSockOpt)
#endif
#ifndef TclWinGetTclInstance
#define TclWinGetTclInstance \
(tclIntPlatStubsPtr->tclWinGetTclInstance)
#endif
#ifndef TclWinNToHS
#define TclWinNToHS \
(tclIntPlatStubsPtr->tclWinNToHS)
#endif
#ifndef TclWinSetSockOpt
#define TclWinSetSockOpt \
(tclIntPlatStubsPtr->tclWinSetSockOpt)
#endif
#ifndef TclpGetPid
#define TclpGetPid \
(tclIntPlatStubsPtr->tclpGetPid)
#endif
#ifndef TclWinGetPlatformId
#define TclWinGetPlatformId \
(tclIntPlatStubsPtr->tclWinGetPlatformId)
#endif
#ifndef TclGetAndDetachPids
#define TclGetAndDetachPids \
(tclIntPlatStubsPtr->tclGetAndDetachPids)
#endif
#ifndef TclpCloseFile
#define TclpCloseFile \
(tclIntPlatStubsPtr->tclpCloseFile)
#endif
#ifndef TclpCreateCommandChannel
#define TclpCreateCommandChannel \
(tclIntPlatStubsPtr->tclpCreateCommandChannel)
#endif
#ifndef TclpCreatePipe
#define TclpCreatePipe \
(tclIntPlatStubsPtr->tclpCreatePipe)
#endif
#ifndef TclpCreateProcess
#define TclpCreateProcess \
(tclIntPlatStubsPtr->tclpCreateProcess)
#endif
#ifndef TclpMakeFile
#define TclpMakeFile \
(tclIntPlatStubsPtr->tclpMakeFile)
#endif
#ifndef TclpOpenFile
#define TclpOpenFile \
(tclIntPlatStubsPtr->tclpOpenFile)
#endif
#ifndef TclWinAddProcess
#define TclWinAddProcess \
(tclIntPlatStubsPtr->tclWinAddProcess)
#endif
#ifndef TclpCreateTempFile
#define TclpCreateTempFile \
(tclIntPlatStubsPtr->tclpCreateTempFile)
#endif
#ifndef TclpGetTZName
#define TclpGetTZName \
(tclIntPlatStubsPtr->tclpGetTZName)
#endif
#ifndef TclWinNoBackslash
#define TclWinNoBackslash \
(tclIntPlatStubsPtr->tclWinNoBackslash)
#endif
#ifndef TclWinGetPlatform
#define TclWinGetPlatform \
(tclIntPlatStubsPtr->tclWinGetPlatform)
#endif
#ifndef TclWinSetInterfaces
#define TclWinSetInterfaces \
(tclIntPlatStubsPtr->tclWinSetInterfaces)
#endif
#ifndef TclWinFlushDirtyChannels
#define TclWinFlushDirtyChannels \
(tclIntPlatStubsPtr->tclWinFlushDirtyChannels)
#endif
#endif
#ifdef MAC_TCL
#ifndef TclpSysAlloc
#define TclpSysAlloc \
(tclIntPlatStubsPtr->tclpSysAlloc)
#endif
#ifndef TclpSysFree
#define TclpSysFree \
(tclIntPlatStubsPtr->tclpSysFree)
#endif
#ifndef TclpSysRealloc
#define TclpSysRealloc \
(tclIntPlatStubsPtr->tclpSysRealloc)
#endif
#ifndef TclpExit
#define TclpExit \
(tclIntPlatStubsPtr->tclpExit)
#endif
#ifndef FSpGetDefaultDir
#define FSpGetDefaultDir \
(tclIntPlatStubsPtr->fSpGetDefaultDir)
#endif
#ifndef FSpSetDefaultDir
#define FSpSetDefaultDir \
(tclIntPlatStubsPtr->fSpSetDefaultDir)
#endif
#ifndef FSpFindFolder
#define FSpFindFolder \
(tclIntPlatStubsPtr->fSpFindFolder)
#endif
#ifndef GetGlobalMouseTcl
#define GetGlobalMouseTcl \
(tclIntPlatStubsPtr->getGlobalMouseTcl)
#endif
#ifndef FSpGetDirectoryIDTcl
#define FSpGetDirectoryIDTcl \
(tclIntPlatStubsPtr->fSpGetDirectoryIDTcl)
#endif
#ifndef FSpOpenResFileCompatTcl
#define FSpOpenResFileCompatTcl \
(tclIntPlatStubsPtr->fSpOpenResFileCompatTcl)
#endif
#ifndef FSpCreateResFileCompatTcl
#define FSpCreateResFileCompatTcl \
(tclIntPlatStubsPtr->fSpCreateResFileCompatTcl)
#endif
#ifndef FSpLocationFromPath
#define FSpLocationFromPath \
(tclIntPlatStubsPtr->fSpLocationFromPath)
#endif
#ifndef FSpPathFromLocation
#define FSpPathFromLocation \
(tclIntPlatStubsPtr->fSpPathFromLocation)
#endif
#ifndef TclMacExitHandler
#define TclMacExitHandler \
(tclIntPlatStubsPtr->tclMacExitHandler)
#endif
#ifndef TclMacInitExitToShell
#define TclMacInitExitToShell \
(tclIntPlatStubsPtr->tclMacInitExitToShell)
#endif
#ifndef TclMacInstallExitToShellPatch
#define TclMacInstallExitToShellPatch \
(tclIntPlatStubsPtr->tclMacInstallExitToShellPatch)
#endif
#ifndef TclMacOSErrorToPosixError
#define TclMacOSErrorToPosixError \
(tclIntPlatStubsPtr->tclMacOSErrorToPosixError)
#endif
#ifndef TclMacRemoveTimer
#define TclMacRemoveTimer \
(tclIntPlatStubsPtr->tclMacRemoveTimer)
#endif
#ifndef TclMacStartTimer
#define TclMacStartTimer \
(tclIntPlatStubsPtr->tclMacStartTimer)
#endif
#ifndef TclMacTimerExpired
#define TclMacTimerExpired \
(tclIntPlatStubsPtr->tclMacTimerExpired)
#endif
#ifndef TclMacRegisterResourceFork
#define TclMacRegisterResourceFork \
(tclIntPlatStubsPtr->tclMacRegisterResourceFork)
#endif
#ifndef TclMacUnRegisterResourceFork
#define TclMacUnRegisterResourceFork \
(tclIntPlatStubsPtr->tclMacUnRegisterResourceFork)
#endif
#ifndef TclMacCreateEnv
#define TclMacCreateEnv \
(tclIntPlatStubsPtr->tclMacCreateEnv)
#endif
#ifndef TclMacFOpenHack
#define TclMacFOpenHack \
(tclIntPlatStubsPtr->tclMacFOpenHack)
#endif
#ifndef TclpGetTZName
#define TclpGetTZName \
(tclIntPlatStubsPtr->tclpGetTZName)
#endif
#ifndef TclMacChmod
#define TclMacChmod \
(tclIntPlatStubsPtr->tclMacChmod)
#endif
#ifndef FSpLLocationFromPath
#define FSpLLocationFromPath \
(tclIntPlatStubsPtr->fSpLLocationFromPath)
#endif
#endif
#endif
#endif