|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _TCLPLATDECLS |
|
#define _TCLPLATDECLS |
|
|
|
#undef TCL_STORAGE_CLASS |
|
#ifdef BUILD_tcl |
|
# define TCL_STORAGE_CLASS DLLEXPORT |
|
#else |
|
# ifdef USE_TCL_STUBS |
|
# define TCL_STORAGE_CLASS |
|
# else |
|
# define TCL_STORAGE_CLASS DLLIMPORT |
|
# endif |
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(_TCHAR_DEFINED) |
|
# if defined(_UNICODE) |
|
typedef wchar_t TCHAR; |
|
# else |
|
typedef char TCHAR; |
|
# endif |
|
# define _TCHAR_DEFINED |
|
#endif |
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
extern "C" { |
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if defined(_WIN32) || defined(__CYGWIN__) |
|
|
|
EXTERN TCHAR * Tcl_WinUtfToTChar(const char *str, int len, |
|
Tcl_DString *dsPtr); |
|
|
|
EXTERN char * Tcl_WinTCharToUtf(const TCHAR *str, int len, |
|
Tcl_DString *dsPtr); |
|
#endif |
|
#ifdef MAC_OSX_TCL |
|
|
|
EXTERN int Tcl_MacOSXOpenBundleResources(Tcl_Interp *interp, |
|
const char *bundleName, int hasResourceFile, |
|
int maxPathLen, char *libraryPath); |
|
|
|
EXTERN int Tcl_MacOSXOpenVersionedBundleResources( |
|
Tcl_Interp *interp, const char *bundleName, |
|
const char *bundleVersion, |
|
int hasResourceFile, int maxPathLen, |
|
char *libraryPath); |
|
|
|
EXTERN void TclUnusedStubEntry(void); |
|
#endif |
|
|
|
typedef struct TclPlatStubs { |
|
int magic; |
|
void *hooks; |
|
|
|
#if defined(_WIN32) || defined(__CYGWIN__) |
|
TCHAR * (*tcl_WinUtfToTChar) (const char *str, int len, Tcl_DString *dsPtr); |
|
char * (*tcl_WinTCharToUtf) (const TCHAR *str, int len, Tcl_DString *dsPtr); |
|
#endif |
|
#ifdef MAC_OSX_TCL |
|
int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp *interp, const char *bundleName, int hasResourceFile, int maxPathLen, char *libraryPath); |
|
int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp *interp, const char *bundleName, const char *bundleVersion, int hasResourceFile, int maxPathLen, char *libraryPath); |
|
void (*tclUnusedStubEntry) (void); |
|
#endif |
|
} TclPlatStubs; |
|
|
|
extern const TclPlatStubs *tclPlatStubsPtr; |
|
|
|
#ifdef __cplusplus |
|
} |
|
#endif |
|
|
|
#if defined(USE_TCL_STUBS) |
|
|
|
|
|
|
|
|
|
|
|
#if defined(_WIN32) || defined(__CYGWIN__) |
|
#define Tcl_WinUtfToTChar \ |
|
(tclPlatStubsPtr->tcl_WinUtfToTChar) |
|
#define Tcl_WinTCharToUtf \ |
|
(tclPlatStubsPtr->tcl_WinTCharToUtf) |
|
#endif |
|
#ifdef MAC_OSX_TCL |
|
#define Tcl_MacOSXOpenBundleResources \ |
|
(tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) |
|
#define Tcl_MacOSXOpenVersionedBundleResources \ |
|
(tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) |
|
#define TclUnusedStubEntry \ |
|
(tclPlatStubsPtr->tclUnusedStubEntry) |
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
#undef TclUnusedStubEntry |
|
#ifdef MAC_OSX_TCL |
|
#undef Tcl_MacOSXOpenBundleResources |
|
#define Tcl_MacOSXOpenBundleResources(a,b,c,d,e) Tcl_MacOSXOpenVersionedBundleResources(a,b,NULL,c,d,e) |
|
#endif |
|
|
|
#undef TCL_STORAGE_CLASS |
|
#define TCL_STORAGE_CLASS DLLIMPORT |
|
|
|
#endif |
|
|
|
|
|
|