| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
#ifndef _TCLPLATDECLS |
| 13 |
#define _TCLPLATDECLS |
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
#if defined(__CYGWIN__) |
| 19 |
typedef char TCHAR; |
| 20 |
#elif defined(__WIN32__) && !defined(_TCHAR_DEFINED) |
| 21 |
# include <tchar.h> |
| 22 |
# ifndef _TCHAR_DEFINED |
| 23 |
|
| 24 |
typedef _TCHAR TCHAR; |
| 25 |
# define _TCHAR_DEFINED |
| 26 |
# endif |
| 27 |
# if defined(_MSC_VER) && defined(__STDC__) |
| 28 |
|
| 29 |
typedef _TCHAR TCHAR; |
| 30 |
# endif |
| 31 |
#endif |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
#ifdef __WIN32__ |
| 40 |
|
| 41 |
EXTERN TCHAR * Tcl_WinUtfToTChar _ANSI_ARGS_((CONST char * str, |
| 42 |
int len, Tcl_DString * dsPtr)); |
| 43 |
|
| 44 |
EXTERN char * Tcl_WinTCharToUtf _ANSI_ARGS_((CONST TCHAR * str, |
| 45 |
int len, Tcl_DString * dsPtr)); |
| 46 |
#endif |
| 47 |
#ifdef MAC_TCL |
| 48 |
|
| 49 |
EXTERN void Tcl_MacSetEventProc _ANSI_ARGS_(( |
| 50 |
Tcl_MacConvertEventPtr procPtr)); |
| 51 |
|
| 52 |
EXTERN char * Tcl_MacConvertTextResource _ANSI_ARGS_(( |
| 53 |
Handle resource)); |
| 54 |
|
| 55 |
EXTERN int Tcl_MacEvalResource _ANSI_ARGS_((Tcl_Interp * interp, |
| 56 |
CONST char * resourceName, |
| 57 |
int resourceNumber, CONST char * fileName)); |
| 58 |
|
| 59 |
EXTERN Handle Tcl_MacFindResource _ANSI_ARGS_((Tcl_Interp * interp, |
| 60 |
long resourceType, CONST char * resourceName, |
| 61 |
int resourceNumber, CONST char * resFileRef, |
| 62 |
int * releaseIt)); |
| 63 |
|
| 64 |
EXTERN int Tcl_GetOSTypeFromObj _ANSI_ARGS_(( |
| 65 |
Tcl_Interp * interp, Tcl_Obj * objPtr, |
| 66 |
OSType * osTypePtr)); |
| 67 |
|
| 68 |
EXTERN void Tcl_SetOSTypeObj _ANSI_ARGS_((Tcl_Obj * objPtr, |
| 69 |
OSType osType)); |
| 70 |
|
| 71 |
EXTERN Tcl_Obj * Tcl_NewOSTypeObj _ANSI_ARGS_((OSType osType)); |
| 72 |
|
| 73 |
EXTERN int strncasecmp _ANSI_ARGS_((CONST char * s1, |
| 74 |
CONST char * s2, size_t n)); |
| 75 |
|
| 76 |
EXTERN int strcasecmp _ANSI_ARGS_((CONST char * s1, |
| 77 |
CONST char * s2)); |
| 78 |
#endif |
| 79 |
#ifdef MAC_OSX_TCL |
| 80 |
|
| 81 |
EXTERN int Tcl_MacOSXOpenBundleResources _ANSI_ARGS_(( |
| 82 |
Tcl_Interp * interp, CONST char * bundleName, |
| 83 |
int hasResourceFile, int maxPathLen, |
| 84 |
char * libraryPath)); |
| 85 |
|
| 86 |
EXTERN int Tcl_MacOSXOpenVersionedBundleResources _ANSI_ARGS_(( |
| 87 |
Tcl_Interp * interp, CONST char * bundleName, |
| 88 |
CONST char * bundleVersion, |
| 89 |
int hasResourceFile, int maxPathLen, |
| 90 |
char * libraryPath)); |
| 91 |
#endif |
| 92 |
|
| 93 |
typedef struct TclPlatStubs { |
| 94 |
int magic; |
| 95 |
struct TclPlatStubHooks *hooks; |
| 96 |
|
| 97 |
#ifdef __WIN32__ |
| 98 |
TCHAR * (*tcl_WinUtfToTChar) _ANSI_ARGS_((CONST char * str, int len, Tcl_DString * dsPtr)); |
| 99 |
char * (*tcl_WinTCharToUtf) _ANSI_ARGS_((CONST TCHAR * str, int len, Tcl_DString * dsPtr)); |
| 100 |
#endif |
| 101 |
#ifdef MAC_TCL |
| 102 |
void (*tcl_MacSetEventProc) _ANSI_ARGS_((Tcl_MacConvertEventPtr procPtr)); |
| 103 |
char * (*tcl_MacConvertTextResource) _ANSI_ARGS_((Handle resource)); |
| 104 |
int (*tcl_MacEvalResource) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * resourceName, int resourceNumber, CONST char * fileName)); |
| 105 |
Handle (*tcl_MacFindResource) _ANSI_ARGS_((Tcl_Interp * interp, long resourceType, CONST char * resourceName, int resourceNumber, CONST char * resFileRef, int * releaseIt)); |
| 106 |
int (*tcl_GetOSTypeFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, OSType * osTypePtr)); |
| 107 |
void (*tcl_SetOSTypeObj) _ANSI_ARGS_((Tcl_Obj * objPtr, OSType osType)); |
| 108 |
Tcl_Obj * (*tcl_NewOSTypeObj) _ANSI_ARGS_((OSType osType)); |
| 109 |
int (*strncasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2, size_t n)); |
| 110 |
int (*strcasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2)); |
| 111 |
#endif |
| 112 |
#ifdef MAC_OSX_TCL |
| 113 |
int (*tcl_MacOSXOpenBundleResources) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * bundleName, int hasResourceFile, int maxPathLen, char * libraryPath)); |
| 114 |
int (*tcl_MacOSXOpenVersionedBundleResources) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * bundleName, CONST char * bundleVersion, int hasResourceFile, int maxPathLen, char * libraryPath)); |
| 115 |
#endif |
| 116 |
} TclPlatStubs; |
| 117 |
|
| 118 |
#ifdef __cplusplus |
| 119 |
extern "C" { |
| 120 |
#endif |
| 121 |
extern TclPlatStubs *tclPlatStubsPtr; |
| 122 |
#ifdef __cplusplus |
| 123 |
} |
| 124 |
#endif |
| 125 |
|
| 126 |
#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) |
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
#ifdef __WIN32__ |
| 133 |
#ifndef Tcl_WinUtfToTChar |
| 134 |
#define Tcl_WinUtfToTChar \ |
| 135 |
(tclPlatStubsPtr->tcl_WinUtfToTChar) |
| 136 |
#endif |
| 137 |
#ifndef Tcl_WinTCharToUtf |
| 138 |
#define Tcl_WinTCharToUtf \ |
| 139 |
(tclPlatStubsPtr->tcl_WinTCharToUtf) |
| 140 |
#endif |
| 141 |
#endif |
| 142 |
#ifdef MAC_TCL |
| 143 |
#ifndef Tcl_MacSetEventProc |
| 144 |
#define Tcl_MacSetEventProc \ |
| 145 |
(tclPlatStubsPtr->tcl_MacSetEventProc) |
| 146 |
#endif |
| 147 |
#ifndef Tcl_MacConvertTextResource |
| 148 |
#define Tcl_MacConvertTextResource \ |
| 149 |
(tclPlatStubsPtr->tcl_MacConvertTextResource) |
| 150 |
#endif |
| 151 |
#ifndef Tcl_MacEvalResource |
| 152 |
#define Tcl_MacEvalResource \ |
| 153 |
(tclPlatStubsPtr->tcl_MacEvalResource) |
| 154 |
#endif |
| 155 |
#ifndef Tcl_MacFindResource |
| 156 |
#define Tcl_MacFindResource \ |
| 157 |
(tclPlatStubsPtr->tcl_MacFindResource) |
| 158 |
#endif |
| 159 |
#ifndef Tcl_GetOSTypeFromObj |
| 160 |
#define Tcl_GetOSTypeFromObj \ |
| 161 |
(tclPlatStubsPtr->tcl_GetOSTypeFromObj) |
| 162 |
#endif |
| 163 |
#ifndef Tcl_SetOSTypeObj |
| 164 |
#define Tcl_SetOSTypeObj \ |
| 165 |
(tclPlatStubsPtr->tcl_SetOSTypeObj) |
| 166 |
#endif |
| 167 |
#ifndef Tcl_NewOSTypeObj |
| 168 |
#define Tcl_NewOSTypeObj \ |
| 169 |
(tclPlatStubsPtr->tcl_NewOSTypeObj) |
| 170 |
#endif |
| 171 |
#ifndef strncasecmp |
| 172 |
#define strncasecmp \ |
| 173 |
(tclPlatStubsPtr->strncasecmp) |
| 174 |
#endif |
| 175 |
#ifndef strcasecmp |
| 176 |
#define strcasecmp \ |
| 177 |
(tclPlatStubsPtr->strcasecmp) |
| 178 |
#endif |
| 179 |
#endif |
| 180 |
#ifdef MAC_OSX_TCL |
| 181 |
#ifndef Tcl_MacOSXOpenBundleResources |
| 182 |
#define Tcl_MacOSXOpenBundleResources \ |
| 183 |
(tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) |
| 184 |
#endif |
| 185 |
#ifndef Tcl_MacOSXOpenVersionedBundleResources |
| 186 |
#define Tcl_MacOSXOpenVersionedBundleResources \ |
| 187 |
(tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) |
| 188 |
#endif |
| 189 |
#endif |
| 190 |
|
| 191 |
#endif |
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
#endif |
| 196 |
|
| 197 |
|