00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef _TCLPLATDECLS
00013 #define _TCLPLATDECLS
00014
00015
00016
00017
00018 #if defined(__CYGWIN__)
00019 typedef char TCHAR;
00020 #elif defined(__WIN32__) && !defined(_TCHAR_DEFINED)
00021 # include <tchar.h>
00022 # ifndef _TCHAR_DEFINED
00023
00024 typedef _TCHAR TCHAR;
00025 # define _TCHAR_DEFINED
00026 # endif
00027 # if defined(_MSC_VER) && defined(__STDC__)
00028
00029 typedef _TCHAR TCHAR;
00030 # endif
00031 #endif
00032
00033
00034
00035
00036
00037
00038
00039 #ifdef __WIN32__
00040
00041 EXTERN TCHAR * Tcl_WinUtfToTChar _ANSI_ARGS_((CONST char * str,
00042 int len, Tcl_DString * dsPtr));
00043
00044 EXTERN char * Tcl_WinTCharToUtf _ANSI_ARGS_((CONST TCHAR * str,
00045 int len, Tcl_DString * dsPtr));
00046 #endif
00047 #ifdef MAC_TCL
00048
00049 EXTERN void Tcl_MacSetEventProc _ANSI_ARGS_((
00050 Tcl_MacConvertEventPtr procPtr));
00051
00052 EXTERN char * Tcl_MacConvertTextResource _ANSI_ARGS_((
00053 Handle resource));
00054
00055 EXTERN int Tcl_MacEvalResource _ANSI_ARGS_((Tcl_Interp * interp,
00056 CONST char * resourceName,
00057 int resourceNumber, CONST char * fileName));
00058
00059 EXTERN Handle Tcl_MacFindResource _ANSI_ARGS_((Tcl_Interp * interp,
00060 long resourceType, CONST char * resourceName,
00061 int resourceNumber, CONST char * resFileRef,
00062 int * releaseIt));
00063
00064 EXTERN int Tcl_GetOSTypeFromObj _ANSI_ARGS_((
00065 Tcl_Interp * interp, Tcl_Obj * objPtr,
00066 OSType * osTypePtr));
00067
00068 EXTERN void Tcl_SetOSTypeObj _ANSI_ARGS_((Tcl_Obj * objPtr,
00069 OSType osType));
00070
00071 EXTERN Tcl_Obj * Tcl_NewOSTypeObj _ANSI_ARGS_((OSType osType));
00072
00073 EXTERN int strncasecmp _ANSI_ARGS_((CONST char * s1,
00074 CONST char * s2, size_t n));
00075
00076 EXTERN int strcasecmp _ANSI_ARGS_((CONST char * s1,
00077 CONST char * s2));
00078 #endif
00079 #ifdef MAC_OSX_TCL
00080
00081 EXTERN int Tcl_MacOSXOpenBundleResources _ANSI_ARGS_((
00082 Tcl_Interp * interp, CONST char * bundleName,
00083 int hasResourceFile, int maxPathLen,
00084 char * libraryPath));
00085
00086 EXTERN int Tcl_MacOSXOpenVersionedBundleResources _ANSI_ARGS_((
00087 Tcl_Interp * interp, CONST char * bundleName,
00088 CONST char * bundleVersion,
00089 int hasResourceFile, int maxPathLen,
00090 char * libraryPath));
00091 #endif
00092
00093 typedef struct TclPlatStubs {
00094 int magic;
00095 struct TclPlatStubHooks *hooks;
00096
00097 #ifdef __WIN32__
00098 TCHAR * (*tcl_WinUtfToTChar) _ANSI_ARGS_((CONST char * str, int len, Tcl_DString * dsPtr));
00099 char * (*tcl_WinTCharToUtf) _ANSI_ARGS_((CONST TCHAR * str, int len, Tcl_DString * dsPtr));
00100 #endif
00101 #ifdef MAC_TCL
00102 void (*tcl_MacSetEventProc) _ANSI_ARGS_((Tcl_MacConvertEventPtr procPtr));
00103 char * (*tcl_MacConvertTextResource) _ANSI_ARGS_((Handle resource));
00104 int (*tcl_MacEvalResource) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * resourceName, int resourceNumber, CONST char * fileName));
00105 Handle (*tcl_MacFindResource) _ANSI_ARGS_((Tcl_Interp * interp, long resourceType, CONST char * resourceName, int resourceNumber, CONST char * resFileRef, int * releaseIt));
00106 int (*tcl_GetOSTypeFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, OSType * osTypePtr));
00107 void (*tcl_SetOSTypeObj) _ANSI_ARGS_((Tcl_Obj * objPtr, OSType osType));
00108 Tcl_Obj * (*tcl_NewOSTypeObj) _ANSI_ARGS_((OSType osType));
00109 int (*strncasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2, size_t n));
00110 int (*strcasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2));
00111 #endif
00112 #ifdef MAC_OSX_TCL
00113 int (*tcl_MacOSXOpenBundleResources) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * bundleName, int hasResourceFile, int maxPathLen, char * libraryPath));
00114 int (*tcl_MacOSXOpenVersionedBundleResources) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * bundleName, CONST char * bundleVersion, int hasResourceFile, int maxPathLen, char * libraryPath));
00115 #endif
00116 } TclPlatStubs;
00117
00118 #ifdef __cplusplus
00119 extern "C" {
00120 #endif
00121 extern TclPlatStubs *tclPlatStubsPtr;
00122 #ifdef __cplusplus
00123 }
00124 #endif
00125
00126 #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
00127
00128
00129
00130
00131
00132 #ifdef __WIN32__
00133 #ifndef Tcl_WinUtfToTChar
00134 #define Tcl_WinUtfToTChar \
00135 (tclPlatStubsPtr->tcl_WinUtfToTChar)
00136 #endif
00137 #ifndef Tcl_WinTCharToUtf
00138 #define Tcl_WinTCharToUtf \
00139 (tclPlatStubsPtr->tcl_WinTCharToUtf)
00140 #endif
00141 #endif
00142 #ifdef MAC_TCL
00143 #ifndef Tcl_MacSetEventProc
00144 #define Tcl_MacSetEventProc \
00145 (tclPlatStubsPtr->tcl_MacSetEventProc)
00146 #endif
00147 #ifndef Tcl_MacConvertTextResource
00148 #define Tcl_MacConvertTextResource \
00149 (tclPlatStubsPtr->tcl_MacConvertTextResource)
00150 #endif
00151 #ifndef Tcl_MacEvalResource
00152 #define Tcl_MacEvalResource \
00153 (tclPlatStubsPtr->tcl_MacEvalResource)
00154 #endif
00155 #ifndef Tcl_MacFindResource
00156 #define Tcl_MacFindResource \
00157 (tclPlatStubsPtr->tcl_MacFindResource)
00158 #endif
00159 #ifndef Tcl_GetOSTypeFromObj
00160 #define Tcl_GetOSTypeFromObj \
00161 (tclPlatStubsPtr->tcl_GetOSTypeFromObj)
00162 #endif
00163 #ifndef Tcl_SetOSTypeObj
00164 #define Tcl_SetOSTypeObj \
00165 (tclPlatStubsPtr->tcl_SetOSTypeObj)
00166 #endif
00167 #ifndef Tcl_NewOSTypeObj
00168 #define Tcl_NewOSTypeObj \
00169 (tclPlatStubsPtr->tcl_NewOSTypeObj)
00170 #endif
00171 #ifndef strncasecmp
00172 #define strncasecmp \
00173 (tclPlatStubsPtr->strncasecmp)
00174 #endif
00175 #ifndef strcasecmp
00176 #define strcasecmp \
00177 (tclPlatStubsPtr->strcasecmp)
00178 #endif
00179 #endif
00180 #ifdef MAC_OSX_TCL
00181 #ifndef Tcl_MacOSXOpenBundleResources
00182 #define Tcl_MacOSXOpenBundleResources \
00183 (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources)
00184 #endif
00185 #ifndef Tcl_MacOSXOpenVersionedBundleResources
00186 #define Tcl_MacOSXOpenVersionedBundleResources \
00187 (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources)
00188 #endif
00189 #endif
00190
00191 #endif
00192
00193
00194
00195 #endif
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207