diff options
Diffstat (limited to 'generic/tclPlatDecls.h')
-rw-r--r-- | generic/tclPlatDecls.h | 157 |
1 files changed, 51 insertions, 106 deletions
diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h index b288296..8652e8d 100644 --- a/generic/tclPlatDecls.h +++ b/generic/tclPlatDecls.h @@ -10,6 +10,17 @@ #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 + /* * TCHAR is needed here for win32, so if it is not defined yet do it here. * This way, we don't need to include <tchar.h> just for one define. @@ -29,82 +40,51 @@ * Exported function declarations: */ -#if defined(__WIN32__) || defined(__CYGWIN__) -/* 0 */ -EXTERN TCHAR * Tcl_WinUtfToTChar _ANSI_ARGS_((CONST char *str, - int len, Tcl_DString *dsPtr)); -/* 1 */ -EXTERN char * Tcl_WinTCharToUtf _ANSI_ARGS_((CONST TCHAR *str, - int len, Tcl_DString *dsPtr)); -#endif /* __WIN32__ */ -#ifdef MAC_TCL +#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ +#ifndef Tcl_WinUtfToTChar_TCL_DECLARED +#define Tcl_WinUtfToTChar_TCL_DECLARED /* 0 */ -EXTERN void Tcl_MacSetEventProc _ANSI_ARGS_(( - Tcl_MacConvertEventPtr procPtr)); +EXTERN TCHAR * Tcl_WinUtfToTChar(CONST char *str, int len, + Tcl_DString *dsPtr); +#endif +#ifndef Tcl_WinTCharToUtf_TCL_DECLARED +#define Tcl_WinTCharToUtf_TCL_DECLARED /* 1 */ -EXTERN char * Tcl_MacConvertTextResource _ANSI_ARGS_(( - Handle resource)); -/* 2 */ -EXTERN int Tcl_MacEvalResource _ANSI_ARGS_((Tcl_Interp *interp, - CONST char *resourceName, int resourceNumber, - CONST char *fileName)); -/* 3 */ -EXTERN Handle Tcl_MacFindResource _ANSI_ARGS_((Tcl_Interp *interp, - long resourceType, CONST char *resourceName, - int resourceNumber, CONST char *resFileRef, - int *releaseIt)); -/* 4 */ -EXTERN int Tcl_GetOSTypeFromObj _ANSI_ARGS_((Tcl_Interp *interp, - Tcl_Obj *objPtr, OSType *osTypePtr)); -/* 5 */ -EXTERN void Tcl_SetOSTypeObj _ANSI_ARGS_((Tcl_Obj *objPtr, - OSType osType)); -/* 6 */ -EXTERN Tcl_Obj * Tcl_NewOSTypeObj _ANSI_ARGS_((OSType osType)); -/* 7 */ -EXTERN int strncasecmp _ANSI_ARGS_((CONST char *s1, - CONST char *s2, size_t n)); -/* 8 */ -EXTERN int strcasecmp _ANSI_ARGS_((CONST char *s1, - CONST char *s2)); -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TCL +EXTERN char * Tcl_WinTCharToUtf(CONST TCHAR *str, int len, + Tcl_DString *dsPtr); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_MacOSXOpenBundleResources_TCL_DECLARED +#define Tcl_MacOSXOpenBundleResources_TCL_DECLARED /* 0 */ -EXTERN int Tcl_MacOSXOpenBundleResources _ANSI_ARGS_(( - Tcl_Interp *interp, CONST char *bundleName, - int hasResourceFile, int maxPathLen, - char *libraryPath)); +EXTERN int Tcl_MacOSXOpenBundleResources(Tcl_Interp *interp, + CONST char *bundleName, int hasResourceFile, + int maxPathLen, char *libraryPath); +#endif +#ifndef Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED +#define Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED /* 1 */ -EXTERN int Tcl_MacOSXOpenVersionedBundleResources _ANSI_ARGS_(( +EXTERN int Tcl_MacOSXOpenVersionedBundleResources( Tcl_Interp *interp, CONST char *bundleName, CONST char *bundleVersion, int hasResourceFile, int maxPathLen, - char *libraryPath)); -#endif /* MAC_OSX_TCL */ + char *libraryPath); +#endif +#endif /* MACOSX */ typedef struct TclPlatStubs { int magic; struct TclPlatStubHooks *hooks; -#if defined(__WIN32__) || defined(__CYGWIN__) - TCHAR * (*tcl_WinUtfToTChar) _ANSI_ARGS_((CONST char *str, int len, Tcl_DString *dsPtr)); /* 0 */ - char * (*tcl_WinTCharToUtf) _ANSI_ARGS_((CONST TCHAR *str, int len, Tcl_DString *dsPtr)); /* 1 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - void (*tcl_MacSetEventProc) _ANSI_ARGS_((Tcl_MacConvertEventPtr procPtr)); /* 0 */ - char * (*tcl_MacConvertTextResource) _ANSI_ARGS_((Handle resource)); /* 1 */ - int (*tcl_MacEvalResource) _ANSI_ARGS_((Tcl_Interp *interp, CONST char *resourceName, int resourceNumber, CONST char *fileName)); /* 2 */ - Handle (*tcl_MacFindResource) _ANSI_ARGS_((Tcl_Interp *interp, long resourceType, CONST char *resourceName, int resourceNumber, CONST char *resFileRef, int *releaseIt)); /* 3 */ - int (*tcl_GetOSTypeFromObj) _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *objPtr, OSType *osTypePtr)); /* 4 */ - void (*tcl_SetOSTypeObj) _ANSI_ARGS_((Tcl_Obj *objPtr, OSType osType)); /* 5 */ - Tcl_Obj * (*tcl_NewOSTypeObj) _ANSI_ARGS_((OSType osType)); /* 6 */ - int (*strncasecmp) _ANSI_ARGS_((CONST char *s1, CONST char *s2, size_t n)); /* 7 */ - int (*strcasecmp) _ANSI_ARGS_((CONST char *s1, CONST char *s2)); /* 8 */ -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TCL - int (*tcl_MacOSXOpenBundleResources) _ANSI_ARGS_((Tcl_Interp *interp, CONST char *bundleName, int hasResourceFile, int maxPathLen, char *libraryPath)); /* 0 */ - int (*tcl_MacOSXOpenVersionedBundleResources) _ANSI_ARGS_((Tcl_Interp *interp, CONST char *bundleName, CONST char *bundleVersion, int hasResourceFile, int maxPathLen, char *libraryPath)); /* 1 */ -#endif /* MAC_OSX_TCL */ +#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ + TCHAR * (*tcl_WinUtfToTChar) (CONST char *str, int len, Tcl_DString *dsPtr); /* 0 */ + char * (*tcl_WinTCharToUtf) (CONST TCHAR *str, int len, Tcl_DString *dsPtr); /* 1 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp *interp, CONST char *bundleName, int hasResourceFile, int maxPathLen, char *libraryPath); /* 0 */ + int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp *interp, CONST char *bundleName, CONST char *bundleVersion, int hasResourceFile, int maxPathLen, char *libraryPath); /* 1 */ +#endif /* MACOSX */ } TclPlatStubs; #ifdef __cplusplus @@ -121,7 +101,7 @@ extern TclPlatStubs *tclPlatStubsPtr; * Inline function declarations: */ -#if defined(__WIN32__) || defined(__CYGWIN__) +#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ #ifndef Tcl_WinUtfToTChar #define Tcl_WinUtfToTChar \ (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */ @@ -130,46 +110,8 @@ extern TclPlatStubs *tclPlatStubsPtr; #define Tcl_WinTCharToUtf \ (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */ #endif -#endif /* __WIN32__ */ -#ifdef MAC_TCL -#ifndef Tcl_MacSetEventProc -#define Tcl_MacSetEventProc \ - (tclPlatStubsPtr->tcl_MacSetEventProc) /* 0 */ -#endif -#ifndef Tcl_MacConvertTextResource -#define Tcl_MacConvertTextResource \ - (tclPlatStubsPtr->tcl_MacConvertTextResource) /* 1 */ -#endif -#ifndef Tcl_MacEvalResource -#define Tcl_MacEvalResource \ - (tclPlatStubsPtr->tcl_MacEvalResource) /* 2 */ -#endif -#ifndef Tcl_MacFindResource -#define Tcl_MacFindResource \ - (tclPlatStubsPtr->tcl_MacFindResource) /* 3 */ -#endif -#ifndef Tcl_GetOSTypeFromObj -#define Tcl_GetOSTypeFromObj \ - (tclPlatStubsPtr->tcl_GetOSTypeFromObj) /* 4 */ -#endif -#ifndef Tcl_SetOSTypeObj -#define Tcl_SetOSTypeObj \ - (tclPlatStubsPtr->tcl_SetOSTypeObj) /* 5 */ -#endif -#ifndef Tcl_NewOSTypeObj -#define Tcl_NewOSTypeObj \ - (tclPlatStubsPtr->tcl_NewOSTypeObj) /* 6 */ -#endif -#ifndef strncasecmp -#define strncasecmp \ - (tclPlatStubsPtr->strncasecmp) /* 7 */ -#endif -#ifndef strcasecmp -#define strcasecmp \ - (tclPlatStubsPtr->strcasecmp) /* 8 */ -#endif -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TCL +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ #ifndef Tcl_MacOSXOpenBundleResources #define Tcl_MacOSXOpenBundleResources \ (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */ @@ -178,12 +120,15 @@ extern TclPlatStubs *tclPlatStubsPtr; #define Tcl_MacOSXOpenVersionedBundleResources \ (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */ #endif -#endif /* MAC_OSX_TCL */ +#endif /* MACOSX */ #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ /* !END!: Do not edit above this line. */ +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + #endif /* _TCLPLATDECLS */ |