os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/generic/tclPlatDecls.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2  * tclPlatDecls.h --
     3  *
     4  *	Declarations of platform specific Tcl APIs.
     5  *
     6  * Copyright (c) 1998-1999 by Scriptics Corporation.
     7  * All rights reserved.
     8  * Portions Copyright (c) 2007 Nokia Corporation and/or its subsidiaries. All rights reserved.   
     9  *
    10  * RCS: @(#) $Id: tclPlatDecls.h,v 1.18.2.5 2004/06/10 17:17:45 andreas_kupries Exp $
    11  */
    12 
    13 #ifndef _TCLPLATDECLS
    14 #define _TCLPLATDECLS
    15 
    16 /*
    17  *  Pull in the typedef of TCHAR for windows.
    18  */
    19 #if defined(__CYGWIN__)
    20     typedef char TCHAR;
    21 #elif defined(__WIN32__) && !defined(_TCHAR_DEFINED)
    22 #ifdef __SYMBIAN32__
    23     typedef char TCHAR;  
    24 #else
    25 #   include <tchar.h>
    26 #endif
    27     typedef char TCHAR;  
    28 #   ifndef _TCHAR_DEFINED
    29 	/* Borland seems to forget to set this. */
    30 #ifdef __SYMBIAN32__
    31     typedef char TCHAR;
    32 #else
    33     typedef _TCHAR TCHAR;
    34 #endif
    35 #	define _TCHAR_DEFINED
    36 #   endif
    37 #   if defined(_MSC_VER) && defined(__STDC__)
    38 	/* MSVC++ misses this. */
    39 	typedef _TCHAR TCHAR;
    40 #   endif
    41 #endif
    42 
    43 /* !BEGIN!: Do not edit below this line. */
    44 
    45 /*
    46  * Exported function declarations:
    47  */
    48 
    49 #ifdef __WIN32__
    50 /* 0 */
    51 EXTERN TCHAR *		Tcl_WinUtfToTChar _ANSI_ARGS_((CONST char * str, 
    52 				int len, Tcl_DString * dsPtr));
    53 /* 1 */
    54 EXTERN char *		Tcl_WinTCharToUtf _ANSI_ARGS_((CONST TCHAR * str, 
    55 				int len, Tcl_DString * dsPtr));
    56 #endif /* __WIN32__ */
    57 #ifdef MAC_TCL
    58 /* 0 */
    59 EXTERN void		Tcl_MacSetEventProc _ANSI_ARGS_((
    60 				Tcl_MacConvertEventPtr procPtr));
    61 /* 1 */
    62 EXTERN char *		Tcl_MacConvertTextResource _ANSI_ARGS_((
    63 				Handle resource));
    64 /* 2 */
    65 EXTERN int		Tcl_MacEvalResource _ANSI_ARGS_((Tcl_Interp * interp, 
    66 				CONST char * resourceName, 
    67 				int resourceNumber, CONST char * fileName));
    68 /* 3 */
    69 EXTERN Handle		Tcl_MacFindResource _ANSI_ARGS_((Tcl_Interp * interp, 
    70 				long resourceType, CONST char * resourceName, 
    71 				int resourceNumber, CONST char * resFileRef, 
    72 				int * releaseIt));
    73 /* 4 */
    74 EXTERN int		Tcl_GetOSTypeFromObj _ANSI_ARGS_((
    75 				Tcl_Interp * interp, Tcl_Obj * objPtr, 
    76 				OSType * osTypePtr));
    77 /* 5 */
    78 EXTERN void		Tcl_SetOSTypeObj _ANSI_ARGS_((Tcl_Obj * objPtr, 
    79 				OSType osType));
    80 /* 6 */
    81 EXTERN Tcl_Obj *	Tcl_NewOSTypeObj _ANSI_ARGS_((OSType osType));
    82 /* 7 */
    83 EXTERN int		strncasecmp _ANSI_ARGS_((CONST char * s1, 
    84 				CONST char * s2, size_t n));
    85 /* 8 */
    86 EXTERN int		strcasecmp _ANSI_ARGS_((CONST char * s1, 
    87 				CONST char * s2));
    88 #endif /* MAC_TCL */
    89 #ifdef MAC_OSX_TCL
    90 /* 0 */
    91 EXTERN int		Tcl_MacOSXOpenBundleResources _ANSI_ARGS_((
    92 				Tcl_Interp * interp, CONST char * bundleName, 
    93 				int hasResourceFile, int maxPathLen, 
    94 				char * libraryPath));
    95 /* 1 */
    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 */
   102 
   103 typedef struct TclPlatStubs {
   104     int magic;
   105     struct TclPlatStubHooks *hooks;
   106 
   107 #ifdef __WIN32__
   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__ */
   111 #ifdef MAC_TCL
   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 */
   121 #endif /* MAC_TCL */
   122 #ifdef MAC_OSX_TCL
   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 */
   126 } TclPlatStubs;
   127 
   128 #ifdef __cplusplus
   129 extern "C" {
   130 #endif
   131 extern TclPlatStubs *tclPlatStubsPtr;
   132 #ifdef __cplusplus
   133 }
   134 #endif
   135 
   136 #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
   137 
   138 /*
   139  * Inline function declarations:
   140  */
   141 
   142 #ifdef __WIN32__
   143 #ifndef Tcl_WinUtfToTChar
   144 #define Tcl_WinUtfToTChar \
   145 	(tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */
   146 #endif
   147 #ifndef Tcl_WinTCharToUtf
   148 #define Tcl_WinTCharToUtf \
   149 	(tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */
   150 #endif
   151 #endif /* __WIN32__ */
   152 #ifdef MAC_TCL
   153 #ifndef Tcl_MacSetEventProc
   154 #define Tcl_MacSetEventProc \
   155 	(tclPlatStubsPtr->tcl_MacSetEventProc) /* 0 */
   156 #endif
   157 #ifndef Tcl_MacConvertTextResource
   158 #define Tcl_MacConvertTextResource \
   159 	(tclPlatStubsPtr->tcl_MacConvertTextResource) /* 1 */
   160 #endif
   161 #ifndef Tcl_MacEvalResource
   162 #define Tcl_MacEvalResource \
   163 	(tclPlatStubsPtr->tcl_MacEvalResource) /* 2 */
   164 #endif
   165 #ifndef Tcl_MacFindResource
   166 #define Tcl_MacFindResource \
   167 	(tclPlatStubsPtr->tcl_MacFindResource) /* 3 */
   168 #endif
   169 #ifndef Tcl_GetOSTypeFromObj
   170 #define Tcl_GetOSTypeFromObj \
   171 	(tclPlatStubsPtr->tcl_GetOSTypeFromObj) /* 4 */
   172 #endif
   173 #ifndef Tcl_SetOSTypeObj
   174 #define Tcl_SetOSTypeObj \
   175 	(tclPlatStubsPtr->tcl_SetOSTypeObj) /* 5 */
   176 #endif
   177 #ifndef Tcl_NewOSTypeObj
   178 #define Tcl_NewOSTypeObj \
   179 	(tclPlatStubsPtr->tcl_NewOSTypeObj) /* 6 */
   180 #endif
   181 #ifndef strncasecmp
   182 #define strncasecmp \
   183 	(tclPlatStubsPtr->strncasecmp) /* 7 */
   184 #endif
   185 #ifndef strcasecmp
   186 #define strcasecmp \
   187 	(tclPlatStubsPtr->strcasecmp) /* 8 */
   188 #endif
   189 #endif /* MAC_TCL */
   190 #ifdef MAC_OSX_TCL
   191 #ifndef Tcl_MacOSXOpenBundleResources
   192 #define Tcl_MacOSXOpenBundleResources \
   193 	(tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */
   194 #endif
   195 #ifndef Tcl_MacOSXOpenVersionedBundleResources
   196 #define Tcl_MacOSXOpenVersionedBundleResources \
   197 	(tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */
   198 #endif
   199 #endif /* MAC_OSX_TCL */
   200 #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
   201 
   202 /* !END!: Do not edit above this line. */
   203 
   204 #endif /* _TCLPLATDECLS */
   205 
   206