annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/tclIntPlatDecls.h @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 /*
jpayne@69 2 * tclIntPlatDecls.h --
jpayne@69 3 *
jpayne@69 4 * This file contains the declarations for all platform dependent
jpayne@69 5 * unsupported functions that are exported by the Tcl library. These
jpayne@69 6 * interfaces are not guaranteed to remain the same between
jpayne@69 7 * versions. Use at your own risk.
jpayne@69 8 *
jpayne@69 9 * Copyright (c) 1998-1999 by Scriptics Corporation.
jpayne@69 10 * All rights reserved.
jpayne@69 11 */
jpayne@69 12
jpayne@69 13 #ifndef _TCLINTPLATDECLS
jpayne@69 14 #define _TCLINTPLATDECLS
jpayne@69 15
jpayne@69 16 #undef TCL_STORAGE_CLASS
jpayne@69 17 #ifdef BUILD_tcl
jpayne@69 18 # define TCL_STORAGE_CLASS DLLEXPORT
jpayne@69 19 #else
jpayne@69 20 # ifdef USE_TCL_STUBS
jpayne@69 21 # define TCL_STORAGE_CLASS
jpayne@69 22 # else
jpayne@69 23 # define TCL_STORAGE_CLASS DLLIMPORT
jpayne@69 24 # endif
jpayne@69 25 #endif
jpayne@69 26
jpayne@69 27 /*
jpayne@69 28 * WARNING: This file is automatically generated by the tools/genStubs.tcl
jpayne@69 29 * script. Any modifications to the function declarations below should be made
jpayne@69 30 * in the generic/tclInt.decls script.
jpayne@69 31 */
jpayne@69 32
jpayne@69 33 /* !BEGIN!: Do not edit below this line. */
jpayne@69 34
jpayne@69 35 #ifdef __cplusplus
jpayne@69 36 extern "C" {
jpayne@69 37 #endif
jpayne@69 38
jpayne@69 39 /*
jpayne@69 40 * Exported function declarations:
jpayne@69 41 */
jpayne@69 42
jpayne@69 43 #if !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MAC_OSX_TCL) /* UNIX */
jpayne@69 44 /* 0 */
jpayne@69 45 EXTERN void TclGetAndDetachPids(Tcl_Interp *interp,
jpayne@69 46 Tcl_Channel chan);
jpayne@69 47 /* 1 */
jpayne@69 48 EXTERN int TclpCloseFile(TclFile file);
jpayne@69 49 /* 2 */
jpayne@69 50 EXTERN Tcl_Channel TclpCreateCommandChannel(TclFile readFile,
jpayne@69 51 TclFile writeFile, TclFile errorFile,
jpayne@69 52 int numPids, Tcl_Pid *pidPtr);
jpayne@69 53 /* 3 */
jpayne@69 54 EXTERN int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe);
jpayne@69 55 /* 4 */
jpayne@69 56 EXTERN int TclpCreateProcess(Tcl_Interp *interp, int argc,
jpayne@69 57 const char **argv, TclFile inputFile,
jpayne@69 58 TclFile outputFile, TclFile errorFile,
jpayne@69 59 Tcl_Pid *pidPtr);
jpayne@69 60 /* 5 */
jpayne@69 61 EXTERN int TclUnixWaitForFile_(int fd, int mask, int timeout);
jpayne@69 62 /* 6 */
jpayne@69 63 EXTERN TclFile TclpMakeFile(Tcl_Channel channel, int direction);
jpayne@69 64 /* 7 */
jpayne@69 65 EXTERN TclFile TclpOpenFile(const char *fname, int mode);
jpayne@69 66 /* 8 */
jpayne@69 67 EXTERN int TclUnixWaitForFile(int fd, int mask, int timeout);
jpayne@69 68 /* 9 */
jpayne@69 69 EXTERN TclFile TclpCreateTempFile(const char *contents);
jpayne@69 70 /* 10 */
jpayne@69 71 EXTERN Tcl_DirEntry * TclpReaddir(TclDIR *dir);
jpayne@69 72 /* 11 */
jpayne@69 73 EXTERN struct tm * TclpLocaltime_unix(const time_t *clock);
jpayne@69 74 /* 12 */
jpayne@69 75 EXTERN struct tm * TclpGmtime_unix(const time_t *clock);
jpayne@69 76 /* 13 */
jpayne@69 77 EXTERN char * TclpInetNtoa(struct in_addr addr);
jpayne@69 78 /* 14 */
jpayne@69 79 EXTERN int TclUnixCopyFile(const char *src, const char *dst,
jpayne@69 80 const Tcl_StatBuf *statBufPtr,
jpayne@69 81 int dontCopyAtts);
jpayne@69 82 /* 15 */
jpayne@69 83 EXTERN int TclMacOSXGetFileAttribute(Tcl_Interp *interp,
jpayne@69 84 int objIndex, Tcl_Obj *fileName,
jpayne@69 85 Tcl_Obj **attributePtrPtr);
jpayne@69 86 /* 16 */
jpayne@69 87 EXTERN int TclMacOSXSetFileAttribute(Tcl_Interp *interp,
jpayne@69 88 int objIndex, Tcl_Obj *fileName,
jpayne@69 89 Tcl_Obj *attributePtr);
jpayne@69 90 /* 17 */
jpayne@69 91 EXTERN int TclMacOSXCopyFileAttributes(const char *src,
jpayne@69 92 const char *dst,
jpayne@69 93 const Tcl_StatBuf *statBufPtr);
jpayne@69 94 /* 18 */
jpayne@69 95 EXTERN int TclMacOSXMatchType(Tcl_Interp *interp,
jpayne@69 96 const char *pathName, const char *fileName,
jpayne@69 97 Tcl_StatBuf *statBufPtr,
jpayne@69 98 Tcl_GlobTypeData *types);
jpayne@69 99 /* 19 */
jpayne@69 100 EXTERN void TclMacOSXNotifierAddRunLoopMode(
jpayne@69 101 const void *runLoopMode);
jpayne@69 102 /* Slot 20 is reserved */
jpayne@69 103 /* Slot 21 is reserved */
jpayne@69 104 /* 22 */
jpayne@69 105 EXTERN TclFile TclpCreateTempFile_(const char *contents);
jpayne@69 106 /* Slot 23 is reserved */
jpayne@69 107 /* Slot 24 is reserved */
jpayne@69 108 /* Slot 25 is reserved */
jpayne@69 109 /* Slot 26 is reserved */
jpayne@69 110 /* Slot 27 is reserved */
jpayne@69 111 /* Slot 28 is reserved */
jpayne@69 112 /* 29 */
jpayne@69 113 EXTERN int TclWinCPUID(unsigned int index, unsigned int *regs);
jpayne@69 114 /* 30 */
jpayne@69 115 EXTERN int TclUnixOpenTemporaryFile(Tcl_Obj *dirObj,
jpayne@69 116 Tcl_Obj *basenameObj, Tcl_Obj *extensionObj,
jpayne@69 117 Tcl_Obj *resultingNameObj);
jpayne@69 118 #endif /* UNIX */
jpayne@69 119 #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
jpayne@69 120 /* 0 */
jpayne@69 121 EXTERN void TclWinConvertError(DWORD errCode);
jpayne@69 122 /* 1 */
jpayne@69 123 EXTERN void TclWinConvertWSAError(DWORD errCode);
jpayne@69 124 /* 2 */
jpayne@69 125 EXTERN struct servent * TclWinGetServByName(const char *nm,
jpayne@69 126 const char *proto);
jpayne@69 127 /* 3 */
jpayne@69 128 EXTERN int TclWinGetSockOpt(SOCKET s, int level, int optname,
jpayne@69 129 char *optval, int *optlen);
jpayne@69 130 /* 4 */
jpayne@69 131 EXTERN HINSTANCE TclWinGetTclInstance(void);
jpayne@69 132 /* 5 */
jpayne@69 133 EXTERN int TclUnixWaitForFile(int fd, int mask, int timeout);
jpayne@69 134 /* 6 */
jpayne@69 135 EXTERN unsigned short TclWinNToHS(unsigned short ns);
jpayne@69 136 /* 7 */
jpayne@69 137 EXTERN int TclWinSetSockOpt(SOCKET s, int level, int optname,
jpayne@69 138 const char *optval, int optlen);
jpayne@69 139 /* 8 */
jpayne@69 140 EXTERN int TclpGetPid(Tcl_Pid pid);
jpayne@69 141 /* 9 */
jpayne@69 142 EXTERN int TclWinGetPlatformId(void);
jpayne@69 143 /* 10 */
jpayne@69 144 EXTERN Tcl_DirEntry * TclpReaddir(TclDIR *dir);
jpayne@69 145 /* 11 */
jpayne@69 146 EXTERN void TclGetAndDetachPids(Tcl_Interp *interp,
jpayne@69 147 Tcl_Channel chan);
jpayne@69 148 /* 12 */
jpayne@69 149 EXTERN int TclpCloseFile(TclFile file);
jpayne@69 150 /* 13 */
jpayne@69 151 EXTERN Tcl_Channel TclpCreateCommandChannel(TclFile readFile,
jpayne@69 152 TclFile writeFile, TclFile errorFile,
jpayne@69 153 int numPids, Tcl_Pid *pidPtr);
jpayne@69 154 /* 14 */
jpayne@69 155 EXTERN int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe);
jpayne@69 156 /* 15 */
jpayne@69 157 EXTERN int TclpCreateProcess(Tcl_Interp *interp, int argc,
jpayne@69 158 const char **argv, TclFile inputFile,
jpayne@69 159 TclFile outputFile, TclFile errorFile,
jpayne@69 160 Tcl_Pid *pidPtr);
jpayne@69 161 /* 16 */
jpayne@69 162 EXTERN int TclpIsAtty(int fd);
jpayne@69 163 /* 17 */
jpayne@69 164 EXTERN int TclUnixCopyFile(const char *src, const char *dst,
jpayne@69 165 const Tcl_StatBuf *statBufPtr,
jpayne@69 166 int dontCopyAtts);
jpayne@69 167 /* 18 */
jpayne@69 168 EXTERN TclFile TclpMakeFile(Tcl_Channel channel, int direction);
jpayne@69 169 /* 19 */
jpayne@69 170 EXTERN TclFile TclpOpenFile(const char *fname, int mode);
jpayne@69 171 /* 20 */
jpayne@69 172 EXTERN void TclWinAddProcess(HANDLE hProcess, DWORD id);
jpayne@69 173 /* 21 */
jpayne@69 174 EXTERN char * TclpInetNtoa(struct in_addr addr);
jpayne@69 175 /* 22 */
jpayne@69 176 EXTERN TclFile TclpCreateTempFile(const char *contents);
jpayne@69 177 /* Slot 23 is reserved */
jpayne@69 178 /* 24 */
jpayne@69 179 EXTERN char * TclWinNoBackslash(char *path);
jpayne@69 180 /* Slot 25 is reserved */
jpayne@69 181 /* 26 */
jpayne@69 182 EXTERN void TclWinSetInterfaces(int wide);
jpayne@69 183 /* 27 */
jpayne@69 184 EXTERN void TclWinFlushDirtyChannels(void);
jpayne@69 185 /* 28 */
jpayne@69 186 EXTERN void TclWinResetInterfaces(void);
jpayne@69 187 /* 29 */
jpayne@69 188 EXTERN int TclWinCPUID(unsigned int index, unsigned int *regs);
jpayne@69 189 /* 30 */
jpayne@69 190 EXTERN int TclUnixOpenTemporaryFile(Tcl_Obj *dirObj,
jpayne@69 191 Tcl_Obj *basenameObj, Tcl_Obj *extensionObj,
jpayne@69 192 Tcl_Obj *resultingNameObj);
jpayne@69 193 #endif /* WIN */
jpayne@69 194 #ifdef MAC_OSX_TCL /* MACOSX */
jpayne@69 195 /* 0 */
jpayne@69 196 EXTERN void TclGetAndDetachPids(Tcl_Interp *interp,
jpayne@69 197 Tcl_Channel chan);
jpayne@69 198 /* 1 */
jpayne@69 199 EXTERN int TclpCloseFile(TclFile file);
jpayne@69 200 /* 2 */
jpayne@69 201 EXTERN Tcl_Channel TclpCreateCommandChannel(TclFile readFile,
jpayne@69 202 TclFile writeFile, TclFile errorFile,
jpayne@69 203 int numPids, Tcl_Pid *pidPtr);
jpayne@69 204 /* 3 */
jpayne@69 205 EXTERN int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe);
jpayne@69 206 /* 4 */
jpayne@69 207 EXTERN int TclpCreateProcess(Tcl_Interp *interp, int argc,
jpayne@69 208 const char **argv, TclFile inputFile,
jpayne@69 209 TclFile outputFile, TclFile errorFile,
jpayne@69 210 Tcl_Pid *pidPtr);
jpayne@69 211 /* 5 */
jpayne@69 212 EXTERN int TclUnixWaitForFile_(int fd, int mask, int timeout);
jpayne@69 213 /* 6 */
jpayne@69 214 EXTERN TclFile TclpMakeFile(Tcl_Channel channel, int direction);
jpayne@69 215 /* 7 */
jpayne@69 216 EXTERN TclFile TclpOpenFile(const char *fname, int mode);
jpayne@69 217 /* 8 */
jpayne@69 218 EXTERN int TclUnixWaitForFile(int fd, int mask, int timeout);
jpayne@69 219 /* 9 */
jpayne@69 220 EXTERN TclFile TclpCreateTempFile(const char *contents);
jpayne@69 221 /* 10 */
jpayne@69 222 EXTERN Tcl_DirEntry * TclpReaddir(TclDIR *dir);
jpayne@69 223 /* 11 */
jpayne@69 224 EXTERN struct tm * TclpLocaltime_unix(const time_t *clock);
jpayne@69 225 /* 12 */
jpayne@69 226 EXTERN struct tm * TclpGmtime_unix(const time_t *clock);
jpayne@69 227 /* 13 */
jpayne@69 228 EXTERN char * TclpInetNtoa(struct in_addr addr);
jpayne@69 229 /* 14 */
jpayne@69 230 EXTERN int TclUnixCopyFile(const char *src, const char *dst,
jpayne@69 231 const Tcl_StatBuf *statBufPtr,
jpayne@69 232 int dontCopyAtts);
jpayne@69 233 /* 15 */
jpayne@69 234 EXTERN int TclMacOSXGetFileAttribute(Tcl_Interp *interp,
jpayne@69 235 int objIndex, Tcl_Obj *fileName,
jpayne@69 236 Tcl_Obj **attributePtrPtr);
jpayne@69 237 /* 16 */
jpayne@69 238 EXTERN int TclMacOSXSetFileAttribute(Tcl_Interp *interp,
jpayne@69 239 int objIndex, Tcl_Obj *fileName,
jpayne@69 240 Tcl_Obj *attributePtr);
jpayne@69 241 /* 17 */
jpayne@69 242 EXTERN int TclMacOSXCopyFileAttributes(const char *src,
jpayne@69 243 const char *dst,
jpayne@69 244 const Tcl_StatBuf *statBufPtr);
jpayne@69 245 /* 18 */
jpayne@69 246 EXTERN int TclMacOSXMatchType(Tcl_Interp *interp,
jpayne@69 247 const char *pathName, const char *fileName,
jpayne@69 248 Tcl_StatBuf *statBufPtr,
jpayne@69 249 Tcl_GlobTypeData *types);
jpayne@69 250 /* 19 */
jpayne@69 251 EXTERN void TclMacOSXNotifierAddRunLoopMode(
jpayne@69 252 const void *runLoopMode);
jpayne@69 253 /* Slot 20 is reserved */
jpayne@69 254 /* Slot 21 is reserved */
jpayne@69 255 /* 22 */
jpayne@69 256 EXTERN TclFile TclpCreateTempFile_(const char *contents);
jpayne@69 257 /* Slot 23 is reserved */
jpayne@69 258 /* Slot 24 is reserved */
jpayne@69 259 /* Slot 25 is reserved */
jpayne@69 260 /* Slot 26 is reserved */
jpayne@69 261 /* Slot 27 is reserved */
jpayne@69 262 /* Slot 28 is reserved */
jpayne@69 263 /* 29 */
jpayne@69 264 EXTERN int TclWinCPUID(unsigned int index, unsigned int *regs);
jpayne@69 265 /* 30 */
jpayne@69 266 EXTERN int TclUnixOpenTemporaryFile(Tcl_Obj *dirObj,
jpayne@69 267 Tcl_Obj *basenameObj, Tcl_Obj *extensionObj,
jpayne@69 268 Tcl_Obj *resultingNameObj);
jpayne@69 269 #endif /* MACOSX */
jpayne@69 270
jpayne@69 271 typedef struct TclIntPlatStubs {
jpayne@69 272 int magic;
jpayne@69 273 void *hooks;
jpayne@69 274
jpayne@69 275 #if !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MAC_OSX_TCL) /* UNIX */
jpayne@69 276 void (*tclGetAndDetachPids) (Tcl_Interp *interp, Tcl_Channel chan); /* 0 */
jpayne@69 277 int (*tclpCloseFile) (TclFile file); /* 1 */
jpayne@69 278 Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr); /* 2 */
jpayne@69 279 int (*tclpCreatePipe) (TclFile *readPipe, TclFile *writePipe); /* 3 */
jpayne@69 280 int (*tclpCreateProcess) (Tcl_Interp *interp, int argc, const char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr); /* 4 */
jpayne@69 281 int (*tclUnixWaitForFile_) (int fd, int mask, int timeout); /* 5 */
jpayne@69 282 TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */
jpayne@69 283 TclFile (*tclpOpenFile) (const char *fname, int mode); /* 7 */
jpayne@69 284 int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */
jpayne@69 285 TclFile (*tclpCreateTempFile) (const char *contents); /* 9 */
jpayne@69 286 Tcl_DirEntry * (*tclpReaddir) (TclDIR *dir); /* 10 */
jpayne@69 287 struct tm * (*tclpLocaltime_unix) (const time_t *clock); /* 11 */
jpayne@69 288 struct tm * (*tclpGmtime_unix) (const time_t *clock); /* 12 */
jpayne@69 289 char * (*tclpInetNtoa) (struct in_addr addr); /* 13 */
jpayne@69 290 int (*tclUnixCopyFile) (const char *src, const char *dst, const Tcl_StatBuf *statBufPtr, int dontCopyAtts); /* 14 */
jpayne@69 291 int (*tclMacOSXGetFileAttribute) (Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr); /* 15 */
jpayne@69 292 int (*tclMacOSXSetFileAttribute) (Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj *attributePtr); /* 16 */
jpayne@69 293 int (*tclMacOSXCopyFileAttributes) (const char *src, const char *dst, const Tcl_StatBuf *statBufPtr); /* 17 */
jpayne@69 294 int (*tclMacOSXMatchType) (Tcl_Interp *interp, const char *pathName, const char *fileName, Tcl_StatBuf *statBufPtr, Tcl_GlobTypeData *types); /* 18 */
jpayne@69 295 void (*tclMacOSXNotifierAddRunLoopMode) (const void *runLoopMode); /* 19 */
jpayne@69 296 void (*reserved20)(void);
jpayne@69 297 void (*reserved21)(void);
jpayne@69 298 TclFile (*tclpCreateTempFile_) (const char *contents); /* 22 */
jpayne@69 299 void (*reserved23)(void);
jpayne@69 300 void (*reserved24)(void);
jpayne@69 301 void (*reserved25)(void);
jpayne@69 302 void (*reserved26)(void);
jpayne@69 303 void (*reserved27)(void);
jpayne@69 304 void (*reserved28)(void);
jpayne@69 305 int (*tclWinCPUID) (unsigned int index, unsigned int *regs); /* 29 */
jpayne@69 306 int (*tclUnixOpenTemporaryFile) (Tcl_Obj *dirObj, Tcl_Obj *basenameObj, Tcl_Obj *extensionObj, Tcl_Obj *resultingNameObj); /* 30 */
jpayne@69 307 #endif /* UNIX */
jpayne@69 308 #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
jpayne@69 309 void (*tclWinConvertError) (DWORD errCode); /* 0 */
jpayne@69 310 void (*tclWinConvertWSAError) (DWORD errCode); /* 1 */
jpayne@69 311 struct servent * (*tclWinGetServByName) (const char *nm, const char *proto); /* 2 */
jpayne@69 312 int (*tclWinGetSockOpt) (SOCKET s, int level, int optname, char *optval, int *optlen); /* 3 */
jpayne@69 313 HINSTANCE (*tclWinGetTclInstance) (void); /* 4 */
jpayne@69 314 int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 5 */
jpayne@69 315 unsigned short (*tclWinNToHS) (unsigned short ns); /* 6 */
jpayne@69 316 int (*tclWinSetSockOpt) (SOCKET s, int level, int optname, const char *optval, int optlen); /* 7 */
jpayne@69 317 int (*tclpGetPid) (Tcl_Pid pid); /* 8 */
jpayne@69 318 int (*tclWinGetPlatformId) (void); /* 9 */
jpayne@69 319 Tcl_DirEntry * (*tclpReaddir) (TclDIR *dir); /* 10 */
jpayne@69 320 void (*tclGetAndDetachPids) (Tcl_Interp *interp, Tcl_Channel chan); /* 11 */
jpayne@69 321 int (*tclpCloseFile) (TclFile file); /* 12 */
jpayne@69 322 Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr); /* 13 */
jpayne@69 323 int (*tclpCreatePipe) (TclFile *readPipe, TclFile *writePipe); /* 14 */
jpayne@69 324 int (*tclpCreateProcess) (Tcl_Interp *interp, int argc, const char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr); /* 15 */
jpayne@69 325 int (*tclpIsAtty) (int fd); /* 16 */
jpayne@69 326 int (*tclUnixCopyFile) (const char *src, const char *dst, const Tcl_StatBuf *statBufPtr, int dontCopyAtts); /* 17 */
jpayne@69 327 TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 18 */
jpayne@69 328 TclFile (*tclpOpenFile) (const char *fname, int mode); /* 19 */
jpayne@69 329 void (*tclWinAddProcess) (HANDLE hProcess, DWORD id); /* 20 */
jpayne@69 330 char * (*tclpInetNtoa) (struct in_addr addr); /* 21 */
jpayne@69 331 TclFile (*tclpCreateTempFile) (const char *contents); /* 22 */
jpayne@69 332 void (*reserved23)(void);
jpayne@69 333 char * (*tclWinNoBackslash) (char *path); /* 24 */
jpayne@69 334 void (*reserved25)(void);
jpayne@69 335 void (*tclWinSetInterfaces) (int wide); /* 26 */
jpayne@69 336 void (*tclWinFlushDirtyChannels) (void); /* 27 */
jpayne@69 337 void (*tclWinResetInterfaces) (void); /* 28 */
jpayne@69 338 int (*tclWinCPUID) (unsigned int index, unsigned int *regs); /* 29 */
jpayne@69 339 int (*tclUnixOpenTemporaryFile) (Tcl_Obj *dirObj, Tcl_Obj *basenameObj, Tcl_Obj *extensionObj, Tcl_Obj *resultingNameObj); /* 30 */
jpayne@69 340 #endif /* WIN */
jpayne@69 341 #ifdef MAC_OSX_TCL /* MACOSX */
jpayne@69 342 void (*tclGetAndDetachPids) (Tcl_Interp *interp, Tcl_Channel chan); /* 0 */
jpayne@69 343 int (*tclpCloseFile) (TclFile file); /* 1 */
jpayne@69 344 Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr); /* 2 */
jpayne@69 345 int (*tclpCreatePipe) (TclFile *readPipe, TclFile *writePipe); /* 3 */
jpayne@69 346 int (*tclpCreateProcess) (Tcl_Interp *interp, int argc, const char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr); /* 4 */
jpayne@69 347 int (*tclUnixWaitForFile_) (int fd, int mask, int timeout); /* 5 */
jpayne@69 348 TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */
jpayne@69 349 TclFile (*tclpOpenFile) (const char *fname, int mode); /* 7 */
jpayne@69 350 int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */
jpayne@69 351 TclFile (*tclpCreateTempFile) (const char *contents); /* 9 */
jpayne@69 352 Tcl_DirEntry * (*tclpReaddir) (TclDIR *dir); /* 10 */
jpayne@69 353 struct tm * (*tclpLocaltime_unix) (const time_t *clock); /* 11 */
jpayne@69 354 struct tm * (*tclpGmtime_unix) (const time_t *clock); /* 12 */
jpayne@69 355 char * (*tclpInetNtoa) (struct in_addr addr); /* 13 */
jpayne@69 356 int (*tclUnixCopyFile) (const char *src, const char *dst, const Tcl_StatBuf *statBufPtr, int dontCopyAtts); /* 14 */
jpayne@69 357 int (*tclMacOSXGetFileAttribute) (Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr); /* 15 */
jpayne@69 358 int (*tclMacOSXSetFileAttribute) (Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj *attributePtr); /* 16 */
jpayne@69 359 int (*tclMacOSXCopyFileAttributes) (const char *src, const char *dst, const Tcl_StatBuf *statBufPtr); /* 17 */
jpayne@69 360 int (*tclMacOSXMatchType) (Tcl_Interp *interp, const char *pathName, const char *fileName, Tcl_StatBuf *statBufPtr, Tcl_GlobTypeData *types); /* 18 */
jpayne@69 361 void (*tclMacOSXNotifierAddRunLoopMode) (const void *runLoopMode); /* 19 */
jpayne@69 362 void (*reserved20)(void);
jpayne@69 363 void (*reserved21)(void);
jpayne@69 364 TclFile (*tclpCreateTempFile_) (const char *contents); /* 22 */
jpayne@69 365 void (*reserved23)(void);
jpayne@69 366 void (*reserved24)(void);
jpayne@69 367 void (*reserved25)(void);
jpayne@69 368 void (*reserved26)(void);
jpayne@69 369 void (*reserved27)(void);
jpayne@69 370 void (*reserved28)(void);
jpayne@69 371 int (*tclWinCPUID) (unsigned int index, unsigned int *regs); /* 29 */
jpayne@69 372 int (*tclUnixOpenTemporaryFile) (Tcl_Obj *dirObj, Tcl_Obj *basenameObj, Tcl_Obj *extensionObj, Tcl_Obj *resultingNameObj); /* 30 */
jpayne@69 373 #endif /* MACOSX */
jpayne@69 374 } TclIntPlatStubs;
jpayne@69 375
jpayne@69 376 extern const TclIntPlatStubs *tclIntPlatStubsPtr;
jpayne@69 377
jpayne@69 378 #ifdef __cplusplus
jpayne@69 379 }
jpayne@69 380 #endif
jpayne@69 381
jpayne@69 382 #if defined(USE_TCL_STUBS)
jpayne@69 383
jpayne@69 384 /*
jpayne@69 385 * Inline function declarations:
jpayne@69 386 */
jpayne@69 387
jpayne@69 388 #if !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MAC_OSX_TCL) /* UNIX */
jpayne@69 389 #define TclGetAndDetachPids \
jpayne@69 390 (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 0 */
jpayne@69 391 #define TclpCloseFile \
jpayne@69 392 (tclIntPlatStubsPtr->tclpCloseFile) /* 1 */
jpayne@69 393 #define TclpCreateCommandChannel \
jpayne@69 394 (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 2 */
jpayne@69 395 #define TclpCreatePipe \
jpayne@69 396 (tclIntPlatStubsPtr->tclpCreatePipe) /* 3 */
jpayne@69 397 #define TclpCreateProcess \
jpayne@69 398 (tclIntPlatStubsPtr->tclpCreateProcess) /* 4 */
jpayne@69 399 #define TclUnixWaitForFile_ \
jpayne@69 400 (tclIntPlatStubsPtr->tclUnixWaitForFile_) /* 5 */
jpayne@69 401 #define TclpMakeFile \
jpayne@69 402 (tclIntPlatStubsPtr->tclpMakeFile) /* 6 */
jpayne@69 403 #define TclpOpenFile \
jpayne@69 404 (tclIntPlatStubsPtr->tclpOpenFile) /* 7 */
jpayne@69 405 #define TclUnixWaitForFile \
jpayne@69 406 (tclIntPlatStubsPtr->tclUnixWaitForFile) /* 8 */
jpayne@69 407 #define TclpCreateTempFile \
jpayne@69 408 (tclIntPlatStubsPtr->tclpCreateTempFile) /* 9 */
jpayne@69 409 #define TclpReaddir \
jpayne@69 410 (tclIntPlatStubsPtr->tclpReaddir) /* 10 */
jpayne@69 411 #define TclpLocaltime_unix \
jpayne@69 412 (tclIntPlatStubsPtr->tclpLocaltime_unix) /* 11 */
jpayne@69 413 #define TclpGmtime_unix \
jpayne@69 414 (tclIntPlatStubsPtr->tclpGmtime_unix) /* 12 */
jpayne@69 415 #define TclpInetNtoa \
jpayne@69 416 (tclIntPlatStubsPtr->tclpInetNtoa) /* 13 */
jpayne@69 417 #define TclUnixCopyFile \
jpayne@69 418 (tclIntPlatStubsPtr->tclUnixCopyFile) /* 14 */
jpayne@69 419 #define TclMacOSXGetFileAttribute \
jpayne@69 420 (tclIntPlatStubsPtr->tclMacOSXGetFileAttribute) /* 15 */
jpayne@69 421 #define TclMacOSXSetFileAttribute \
jpayne@69 422 (tclIntPlatStubsPtr->tclMacOSXSetFileAttribute) /* 16 */
jpayne@69 423 #define TclMacOSXCopyFileAttributes \
jpayne@69 424 (tclIntPlatStubsPtr->tclMacOSXCopyFileAttributes) /* 17 */
jpayne@69 425 #define TclMacOSXMatchType \
jpayne@69 426 (tclIntPlatStubsPtr->tclMacOSXMatchType) /* 18 */
jpayne@69 427 #define TclMacOSXNotifierAddRunLoopMode \
jpayne@69 428 (tclIntPlatStubsPtr->tclMacOSXNotifierAddRunLoopMode) /* 19 */
jpayne@69 429 /* Slot 20 is reserved */
jpayne@69 430 /* Slot 21 is reserved */
jpayne@69 431 #define TclpCreateTempFile_ \
jpayne@69 432 (tclIntPlatStubsPtr->tclpCreateTempFile_) /* 22 */
jpayne@69 433 /* Slot 23 is reserved */
jpayne@69 434 /* Slot 24 is reserved */
jpayne@69 435 /* Slot 25 is reserved */
jpayne@69 436 /* Slot 26 is reserved */
jpayne@69 437 /* Slot 27 is reserved */
jpayne@69 438 /* Slot 28 is reserved */
jpayne@69 439 #define TclWinCPUID \
jpayne@69 440 (tclIntPlatStubsPtr->tclWinCPUID) /* 29 */
jpayne@69 441 #define TclUnixOpenTemporaryFile \
jpayne@69 442 (tclIntPlatStubsPtr->tclUnixOpenTemporaryFile) /* 30 */
jpayne@69 443 #endif /* UNIX */
jpayne@69 444 #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
jpayne@69 445 #define TclWinConvertError \
jpayne@69 446 (tclIntPlatStubsPtr->tclWinConvertError) /* 0 */
jpayne@69 447 #define TclWinConvertWSAError \
jpayne@69 448 (tclIntPlatStubsPtr->tclWinConvertWSAError) /* 1 */
jpayne@69 449 #define TclWinGetServByName \
jpayne@69 450 (tclIntPlatStubsPtr->tclWinGetServByName) /* 2 */
jpayne@69 451 #define TclWinGetSockOpt \
jpayne@69 452 (tclIntPlatStubsPtr->tclWinGetSockOpt) /* 3 */
jpayne@69 453 #define TclWinGetTclInstance \
jpayne@69 454 (tclIntPlatStubsPtr->tclWinGetTclInstance) /* 4 */
jpayne@69 455 #define TclUnixWaitForFile \
jpayne@69 456 (tclIntPlatStubsPtr->tclUnixWaitForFile) /* 5 */
jpayne@69 457 #define TclWinNToHS \
jpayne@69 458 (tclIntPlatStubsPtr->tclWinNToHS) /* 6 */
jpayne@69 459 #define TclWinSetSockOpt \
jpayne@69 460 (tclIntPlatStubsPtr->tclWinSetSockOpt) /* 7 */
jpayne@69 461 #define TclpGetPid \
jpayne@69 462 (tclIntPlatStubsPtr->tclpGetPid) /* 8 */
jpayne@69 463 #define TclWinGetPlatformId \
jpayne@69 464 (tclIntPlatStubsPtr->tclWinGetPlatformId) /* 9 */
jpayne@69 465 #define TclpReaddir \
jpayne@69 466 (tclIntPlatStubsPtr->tclpReaddir) /* 10 */
jpayne@69 467 #define TclGetAndDetachPids \
jpayne@69 468 (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 11 */
jpayne@69 469 #define TclpCloseFile \
jpayne@69 470 (tclIntPlatStubsPtr->tclpCloseFile) /* 12 */
jpayne@69 471 #define TclpCreateCommandChannel \
jpayne@69 472 (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 13 */
jpayne@69 473 #define TclpCreatePipe \
jpayne@69 474 (tclIntPlatStubsPtr->tclpCreatePipe) /* 14 */
jpayne@69 475 #define TclpCreateProcess \
jpayne@69 476 (tclIntPlatStubsPtr->tclpCreateProcess) /* 15 */
jpayne@69 477 #define TclpIsAtty \
jpayne@69 478 (tclIntPlatStubsPtr->tclpIsAtty) /* 16 */
jpayne@69 479 #define TclUnixCopyFile \
jpayne@69 480 (tclIntPlatStubsPtr->tclUnixCopyFile) /* 17 */
jpayne@69 481 #define TclpMakeFile \
jpayne@69 482 (tclIntPlatStubsPtr->tclpMakeFile) /* 18 */
jpayne@69 483 #define TclpOpenFile \
jpayne@69 484 (tclIntPlatStubsPtr->tclpOpenFile) /* 19 */
jpayne@69 485 #define TclWinAddProcess \
jpayne@69 486 (tclIntPlatStubsPtr->tclWinAddProcess) /* 20 */
jpayne@69 487 #define TclpInetNtoa \
jpayne@69 488 (tclIntPlatStubsPtr->tclpInetNtoa) /* 21 */
jpayne@69 489 #define TclpCreateTempFile \
jpayne@69 490 (tclIntPlatStubsPtr->tclpCreateTempFile) /* 22 */
jpayne@69 491 /* Slot 23 is reserved */
jpayne@69 492 #define TclWinNoBackslash \
jpayne@69 493 (tclIntPlatStubsPtr->tclWinNoBackslash) /* 24 */
jpayne@69 494 /* Slot 25 is reserved */
jpayne@69 495 #define TclWinSetInterfaces \
jpayne@69 496 (tclIntPlatStubsPtr->tclWinSetInterfaces) /* 26 */
jpayne@69 497 #define TclWinFlushDirtyChannels \
jpayne@69 498 (tclIntPlatStubsPtr->tclWinFlushDirtyChannels) /* 27 */
jpayne@69 499 #define TclWinResetInterfaces \
jpayne@69 500 (tclIntPlatStubsPtr->tclWinResetInterfaces) /* 28 */
jpayne@69 501 #define TclWinCPUID \
jpayne@69 502 (tclIntPlatStubsPtr->tclWinCPUID) /* 29 */
jpayne@69 503 #define TclUnixOpenTemporaryFile \
jpayne@69 504 (tclIntPlatStubsPtr->tclUnixOpenTemporaryFile) /* 30 */
jpayne@69 505 #endif /* WIN */
jpayne@69 506 #ifdef MAC_OSX_TCL /* MACOSX */
jpayne@69 507 #define TclGetAndDetachPids \
jpayne@69 508 (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 0 */
jpayne@69 509 #define TclpCloseFile \
jpayne@69 510 (tclIntPlatStubsPtr->tclpCloseFile) /* 1 */
jpayne@69 511 #define TclpCreateCommandChannel \
jpayne@69 512 (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 2 */
jpayne@69 513 #define TclpCreatePipe \
jpayne@69 514 (tclIntPlatStubsPtr->tclpCreatePipe) /* 3 */
jpayne@69 515 #define TclpCreateProcess \
jpayne@69 516 (tclIntPlatStubsPtr->tclpCreateProcess) /* 4 */
jpayne@69 517 #define TclUnixWaitForFile_ \
jpayne@69 518 (tclIntPlatStubsPtr->tclUnixWaitForFile_) /* 5 */
jpayne@69 519 #define TclpMakeFile \
jpayne@69 520 (tclIntPlatStubsPtr->tclpMakeFile) /* 6 */
jpayne@69 521 #define TclpOpenFile \
jpayne@69 522 (tclIntPlatStubsPtr->tclpOpenFile) /* 7 */
jpayne@69 523 #define TclUnixWaitForFile \
jpayne@69 524 (tclIntPlatStubsPtr->tclUnixWaitForFile) /* 8 */
jpayne@69 525 #define TclpCreateTempFile \
jpayne@69 526 (tclIntPlatStubsPtr->tclpCreateTempFile) /* 9 */
jpayne@69 527 #define TclpReaddir \
jpayne@69 528 (tclIntPlatStubsPtr->tclpReaddir) /* 10 */
jpayne@69 529 #define TclpLocaltime_unix \
jpayne@69 530 (tclIntPlatStubsPtr->tclpLocaltime_unix) /* 11 */
jpayne@69 531 #define TclpGmtime_unix \
jpayne@69 532 (tclIntPlatStubsPtr->tclpGmtime_unix) /* 12 */
jpayne@69 533 #define TclpInetNtoa \
jpayne@69 534 (tclIntPlatStubsPtr->tclpInetNtoa) /* 13 */
jpayne@69 535 #define TclUnixCopyFile \
jpayne@69 536 (tclIntPlatStubsPtr->tclUnixCopyFile) /* 14 */
jpayne@69 537 #define TclMacOSXGetFileAttribute \
jpayne@69 538 (tclIntPlatStubsPtr->tclMacOSXGetFileAttribute) /* 15 */
jpayne@69 539 #define TclMacOSXSetFileAttribute \
jpayne@69 540 (tclIntPlatStubsPtr->tclMacOSXSetFileAttribute) /* 16 */
jpayne@69 541 #define TclMacOSXCopyFileAttributes \
jpayne@69 542 (tclIntPlatStubsPtr->tclMacOSXCopyFileAttributes) /* 17 */
jpayne@69 543 #define TclMacOSXMatchType \
jpayne@69 544 (tclIntPlatStubsPtr->tclMacOSXMatchType) /* 18 */
jpayne@69 545 #define TclMacOSXNotifierAddRunLoopMode \
jpayne@69 546 (tclIntPlatStubsPtr->tclMacOSXNotifierAddRunLoopMode) /* 19 */
jpayne@69 547 /* Slot 20 is reserved */
jpayne@69 548 /* Slot 21 is reserved */
jpayne@69 549 #define TclpCreateTempFile_ \
jpayne@69 550 (tclIntPlatStubsPtr->tclpCreateTempFile_) /* 22 */
jpayne@69 551 /* Slot 23 is reserved */
jpayne@69 552 /* Slot 24 is reserved */
jpayne@69 553 /* Slot 25 is reserved */
jpayne@69 554 /* Slot 26 is reserved */
jpayne@69 555 /* Slot 27 is reserved */
jpayne@69 556 /* Slot 28 is reserved */
jpayne@69 557 #define TclWinCPUID \
jpayne@69 558 (tclIntPlatStubsPtr->tclWinCPUID) /* 29 */
jpayne@69 559 #define TclUnixOpenTemporaryFile \
jpayne@69 560 (tclIntPlatStubsPtr->tclUnixOpenTemporaryFile) /* 30 */
jpayne@69 561 #endif /* MACOSX */
jpayne@69 562
jpayne@69 563 #endif /* defined(USE_TCL_STUBS) */
jpayne@69 564
jpayne@69 565 /* !END!: Do not edit above this line. */
jpayne@69 566
jpayne@69 567 #undef TCL_STORAGE_CLASS
jpayne@69 568 #define TCL_STORAGE_CLASS DLLIMPORT
jpayne@69 569 #undef TclpLocaltime_unix
jpayne@69 570 #undef TclpGmtime_unix
jpayne@69 571 #undef TclWinConvertWSAError
jpayne@69 572 #define TclWinConvertWSAError TclWinConvertError
jpayne@69 573 #undef TclpInetNtoa
jpayne@69 574 #define TclpInetNtoa inet_ntoa
jpayne@69 575
jpayne@69 576 #undef TclpCreateTempFile_
jpayne@69 577 #undef TclUnixWaitForFile_
jpayne@69 578 #ifndef MAC_OSX_TCL /* not accessable on Win32/UNIX */
jpayne@69 579 #undef TclMacOSXGetFileAttribute /* 15 */
jpayne@69 580 #undef TclMacOSXSetFileAttribute /* 16 */
jpayne@69 581 #undef TclMacOSXCopyFileAttributes /* 17 */
jpayne@69 582 #undef TclMacOSXMatchType /* 18 */
jpayne@69 583 #undef TclMacOSXNotifierAddRunLoopMode /* 19 */
jpayne@69 584 #endif
jpayne@69 585
jpayne@69 586 #if defined(_WIN32)
jpayne@69 587 # undef TclWinNToHS
jpayne@69 588 # undef TclWinGetServByName
jpayne@69 589 # undef TclWinGetSockOpt
jpayne@69 590 # undef TclWinSetSockOpt
jpayne@69 591 # define TclWinNToHS ntohs
jpayne@69 592 # define TclWinGetServByName getservbyname
jpayne@69 593 # define TclWinGetSockOpt getsockopt
jpayne@69 594 # define TclWinSetSockOpt setsockopt
jpayne@69 595 #else
jpayne@69 596 # undef TclpGetPid
jpayne@69 597 # define TclpGetPid(pid) ((unsigned long) (pid))
jpayne@69 598 #endif
jpayne@69 599
jpayne@69 600 #endif /* _TCLINTPLATDECLS */