os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/generic/tclPlatDecls.h
Update contrib.
4 * Declarations of platform specific Tcl APIs.
6 * Copyright (c) 1998-1999 by Scriptics Corporation.
8 * Portions Copyright (c) 2007 Nokia Corporation and/or its subsidiaries. All rights reserved.
10 * RCS: @(#) $Id: tclPlatDecls.h,v 1.18.2.5 2004/06/10 17:17:45 andreas_kupries Exp $
17 * Pull in the typedef of TCHAR for windows.
19 #if defined(__CYGWIN__)
21 #elif defined(__WIN32__) && !defined(_TCHAR_DEFINED)
28 # ifndef _TCHAR_DEFINED
29 /* Borland seems to forget to set this. */
35 # define _TCHAR_DEFINED
37 # if defined(_MSC_VER) && defined(__STDC__)
38 /* MSVC++ misses this. */
43 /* !BEGIN!: Do not edit below this line. */
46 * Exported function declarations:
51 EXTERN TCHAR * Tcl_WinUtfToTChar _ANSI_ARGS_((CONST char * str,
52 int len, Tcl_DString * dsPtr));
54 EXTERN char * Tcl_WinTCharToUtf _ANSI_ARGS_((CONST TCHAR * str,
55 int len, Tcl_DString * dsPtr));
56 #endif /* __WIN32__ */
59 EXTERN void Tcl_MacSetEventProc _ANSI_ARGS_((
60 Tcl_MacConvertEventPtr procPtr));
62 EXTERN char * Tcl_MacConvertTextResource _ANSI_ARGS_((
65 EXTERN int Tcl_MacEvalResource _ANSI_ARGS_((Tcl_Interp * interp,
66 CONST char * resourceName,
67 int resourceNumber, CONST char * fileName));
69 EXTERN Handle Tcl_MacFindResource _ANSI_ARGS_((Tcl_Interp * interp,
70 long resourceType, CONST char * resourceName,
71 int resourceNumber, CONST char * resFileRef,
74 EXTERN int Tcl_GetOSTypeFromObj _ANSI_ARGS_((
75 Tcl_Interp * interp, Tcl_Obj * objPtr,
78 EXTERN void Tcl_SetOSTypeObj _ANSI_ARGS_((Tcl_Obj * objPtr,
81 EXTERN Tcl_Obj * Tcl_NewOSTypeObj _ANSI_ARGS_((OSType osType));
83 EXTERN int strncasecmp _ANSI_ARGS_((CONST char * s1,
84 CONST char * s2, size_t n));
86 EXTERN int strcasecmp _ANSI_ARGS_((CONST char * s1,
91 EXTERN int Tcl_MacOSXOpenBundleResources _ANSI_ARGS_((
92 Tcl_Interp * interp, CONST char * bundleName,
93 int hasResourceFile, int maxPathLen,
96 EXTERN int Tcl_MacOSXOpenVersionedBundleResources _ANSI_ARGS_((
97 Tcl_Interp * interp, CONST char * bundleName,
98 CONST char * bundleVersion,
99 int hasResourceFile, int maxPathLen,
100 char * libraryPath));
101 #endif /* MAC_OSX_TCL */
103 typedef struct TclPlatStubs {
105 struct TclPlatStubHooks *hooks;
108 TCHAR * (*tcl_WinUtfToTChar) _ANSI_ARGS_((CONST char * str, int len, Tcl_DString * dsPtr)); /* 0 */
109 char * (*tcl_WinTCharToUtf) _ANSI_ARGS_((CONST TCHAR * str, int len, Tcl_DString * dsPtr)); /* 1 */
110 #endif /* __WIN32__ */
112 void (*tcl_MacSetEventProc) _ANSI_ARGS_((Tcl_MacConvertEventPtr procPtr)); /* 0 */
113 char * (*tcl_MacConvertTextResource) _ANSI_ARGS_((Handle resource)); /* 1 */
114 int (*tcl_MacEvalResource) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * resourceName, int resourceNumber, CONST char * fileName)); /* 2 */
115 Handle (*tcl_MacFindResource) _ANSI_ARGS_((Tcl_Interp * interp, long resourceType, CONST char * resourceName, int resourceNumber, CONST char * resFileRef, int * releaseIt)); /* 3 */
116 int (*tcl_GetOSTypeFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, OSType * osTypePtr)); /* 4 */
117 void (*tcl_SetOSTypeObj) _ANSI_ARGS_((Tcl_Obj * objPtr, OSType osType)); /* 5 */
118 Tcl_Obj * (*tcl_NewOSTypeObj) _ANSI_ARGS_((OSType osType)); /* 6 */
119 int (*strncasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2, size_t n)); /* 7 */
120 int (*strcasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2)); /* 8 */
123 int (*tcl_MacOSXOpenBundleResources) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * bundleName, int hasResourceFile, int maxPathLen, char * libraryPath)); /* 0 */
124 int (*tcl_MacOSXOpenVersionedBundleResources) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * bundleName, CONST char * bundleVersion, int hasResourceFile, int maxPathLen, char * libraryPath)); /* 1 */
125 #endif /* MAC_OSX_TCL */
131 extern TclPlatStubs *tclPlatStubsPtr;
136 #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
139 * Inline function declarations:
143 #ifndef Tcl_WinUtfToTChar
144 #define Tcl_WinUtfToTChar \
145 (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */
147 #ifndef Tcl_WinTCharToUtf
148 #define Tcl_WinTCharToUtf \
149 (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */
151 #endif /* __WIN32__ */
153 #ifndef Tcl_MacSetEventProc
154 #define Tcl_MacSetEventProc \
155 (tclPlatStubsPtr->tcl_MacSetEventProc) /* 0 */
157 #ifndef Tcl_MacConvertTextResource
158 #define Tcl_MacConvertTextResource \
159 (tclPlatStubsPtr->tcl_MacConvertTextResource) /* 1 */
161 #ifndef Tcl_MacEvalResource
162 #define Tcl_MacEvalResource \
163 (tclPlatStubsPtr->tcl_MacEvalResource) /* 2 */
165 #ifndef Tcl_MacFindResource
166 #define Tcl_MacFindResource \
167 (tclPlatStubsPtr->tcl_MacFindResource) /* 3 */
169 #ifndef Tcl_GetOSTypeFromObj
170 #define Tcl_GetOSTypeFromObj \
171 (tclPlatStubsPtr->tcl_GetOSTypeFromObj) /* 4 */
173 #ifndef Tcl_SetOSTypeObj
174 #define Tcl_SetOSTypeObj \
175 (tclPlatStubsPtr->tcl_SetOSTypeObj) /* 5 */
177 #ifndef Tcl_NewOSTypeObj
178 #define Tcl_NewOSTypeObj \
179 (tclPlatStubsPtr->tcl_NewOSTypeObj) /* 6 */
182 #define strncasecmp \
183 (tclPlatStubsPtr->strncasecmp) /* 7 */
187 (tclPlatStubsPtr->strcasecmp) /* 8 */
191 #ifndef Tcl_MacOSXOpenBundleResources
192 #define Tcl_MacOSXOpenBundleResources \
193 (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */
195 #ifndef Tcl_MacOSXOpenVersionedBundleResources
196 #define Tcl_MacOSXOpenVersionedBundleResources \
197 (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */
199 #endif /* MAC_OSX_TCL */
200 #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
202 /* !END!: Do not edit above this line. */
204 #endif /* _TCLPLATDECLS */