File indexing completed on 2025-01-17 09:56:08
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _TCLPLATDECLS
0011 #define _TCLPLATDECLS
0012
0013 #undef TCL_STORAGE_CLASS
0014 #ifdef BUILD_tcl
0015 # define TCL_STORAGE_CLASS DLLEXPORT
0016 #else
0017 # ifdef USE_TCL_STUBS
0018 # define TCL_STORAGE_CLASS
0019 # else
0020 # define TCL_STORAGE_CLASS DLLIMPORT
0021 # endif
0022 #endif
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 #if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(_TCHAR_DEFINED)
0035 # if defined(_UNICODE)
0036 typedef wchar_t TCHAR;
0037 # else
0038 typedef char TCHAR;
0039 # endif
0040 # define _TCHAR_DEFINED
0041 #endif
0042
0043
0044
0045 #ifdef __cplusplus
0046 extern "C" {
0047 #endif
0048
0049
0050
0051
0052
0053 #if defined(_WIN32) || defined(__CYGWIN__)
0054
0055 EXTERN TCHAR * Tcl_WinUtfToTChar(const char *str, int len,
0056 Tcl_DString *dsPtr);
0057
0058 EXTERN char * Tcl_WinTCharToUtf(const TCHAR *str, int len,
0059 Tcl_DString *dsPtr);
0060 #endif
0061 #ifdef MAC_OSX_TCL
0062
0063 EXTERN int Tcl_MacOSXOpenBundleResources(Tcl_Interp *interp,
0064 const char *bundleName, int hasResourceFile,
0065 int maxPathLen, char *libraryPath);
0066
0067 EXTERN int Tcl_MacOSXOpenVersionedBundleResources(
0068 Tcl_Interp *interp, const char *bundleName,
0069 const char *bundleVersion,
0070 int hasResourceFile, int maxPathLen,
0071 char *libraryPath);
0072
0073 EXTERN void TclUnusedStubEntry(void);
0074 #endif
0075
0076 typedef struct TclPlatStubs {
0077 int magic;
0078 void *hooks;
0079
0080 #if defined(_WIN32) || defined(__CYGWIN__)
0081 TCHAR * (*tcl_WinUtfToTChar) (const char *str, int len, Tcl_DString *dsPtr);
0082 char * (*tcl_WinTCharToUtf) (const TCHAR *str, int len, Tcl_DString *dsPtr);
0083 #endif
0084 #ifdef MAC_OSX_TCL
0085 int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp *interp, const char *bundleName, int hasResourceFile, int maxPathLen, char *libraryPath);
0086 int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp *interp, const char *bundleName, const char *bundleVersion, int hasResourceFile, int maxPathLen, char *libraryPath);
0087 void (*tclUnusedStubEntry) (void);
0088 #endif
0089 } TclPlatStubs;
0090
0091 extern const TclPlatStubs *tclPlatStubsPtr;
0092
0093 #ifdef __cplusplus
0094 }
0095 #endif
0096
0097 #if defined(USE_TCL_STUBS)
0098
0099
0100
0101
0102
0103 #if defined(_WIN32) || defined(__CYGWIN__)
0104 #define Tcl_WinUtfToTChar \
0105 (tclPlatStubsPtr->tcl_WinUtfToTChar)
0106 #define Tcl_WinTCharToUtf \
0107 (tclPlatStubsPtr->tcl_WinTCharToUtf)
0108 #endif
0109 #ifdef MAC_OSX_TCL
0110 #define Tcl_MacOSXOpenBundleResources \
0111 (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources)
0112 #define Tcl_MacOSXOpenVersionedBundleResources \
0113 (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources)
0114 #define TclUnusedStubEntry \
0115 (tclPlatStubsPtr->tclUnusedStubEntry)
0116 #endif
0117
0118 #endif
0119
0120
0121
0122 #undef TclUnusedStubEntry
0123 #ifdef MAC_OSX_TCL
0124 #undef Tcl_MacOSXOpenBundleResources
0125 #define Tcl_MacOSXOpenBundleResources(a,b,c,d,e) Tcl_MacOSXOpenVersionedBundleResources(a,b,NULL,c,d,e)
0126 #endif
0127
0128 #undef TCL_STORAGE_CLASS
0129 #define TCL_STORAGE_CLASS DLLIMPORT
0130
0131 #endif
0132
0133