diff options
author | stanton <stanton> | 1998-09-24 23:58:14 (GMT) |
---|---|---|
committer | stanton <stanton> | 1998-09-24 23:58:14 (GMT) |
commit | 9995355714bc90faf7c2e345b3d6a1d041447097 (patch) | |
tree | 2ad97c5b1994495118cef4df947cf16b55e326f2 /generic/tcl.h | |
parent | e13392595faf8e8d0d1c3c514ce160cfadc3d372 (diff) | |
download | tcl-9995355714bc90faf7c2e345b3d6a1d041447097.zip tcl-9995355714bc90faf7c2e345b3d6a1d041447097.tar.gz tcl-9995355714bc90faf7c2e345b3d6a1d041447097.tar.bz2 |
merging changes from 8.0.3 into 8.1a2
Diffstat (limited to 'generic/tcl.h')
-rw-r--r-- | generic/tcl.h | 90 |
1 files changed, 80 insertions, 10 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 296d4f6..75923d8 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * SCCS: @(#) tcl.h 1.352 98/02/19 13:53:28 + * RCS: @(#) $Id: tcl.h,v 1.1.2.2 1998/09/24 23:58:39 stanton Exp $ */ #ifndef _TCL @@ -21,7 +21,8 @@ * When version numbers change here, must also go into the following files * and update the version numbers: * - * library/init.tcl + * README + * library/init.tcl (only if major.minor changes, not patchlevel) * unix/configure.in * unix/pkginfo * win/makefile.bc @@ -75,11 +76,6 @@ # ifndef USE_TCLALLOC # define USE_TCLALLOC 1 # endif -# ifndef STRINGIFY -# define STRINGIFY(x) STRINGIFY1(x) -# define STRINGIFY1(x) #x -# endif -# define INLINE #endif /* __WIN32__ */ /* @@ -100,6 +96,34 @@ # define INLINE #endif +/* + * Utility macros: STRINGIFY takes an argument and wraps it in "" (double + * quotation marks), JOIN joins two arguments. + */ + +#define VERBATIM(x) x +#ifdef _MSC_VER +# define STRINGIFY(x) STRINGIFY1(x) +# define STRINGIFY1(x) #x +# define JOIN(a,b) JOIN1(a,b) +# define JOIN1(a,b) a##b +#else +# ifdef RESOURCE_INCLUDED +# define STRINGIFY(x) STRINGIFY1(x) +# define STRINGIFY1(x) #x +# define JOIN(a,b) JOIN1(a,b) +# define JOIN1(a,b) a##b +# else +# ifdef __STDC__ +# define STRINGIFY(x) #x +# define JOIN(a,b) a##b +# else +# define STRINGIFY(x) "x" +# define JOIN(a,b) VERBATIM(a)VERBATIM(b) +# endif +# endif +#endif + /* * A special definition used to allow this header file to be included * in resource files so that they can get obtain version information from @@ -140,6 +164,45 @@ #endif /* + * Macros used to declare a function to be exported by a DLL. + * Used by Windows, maps to no-op declarations on non-Windows systems. + * The default build on windows is for a DLL, which causes the DLLIMPORT + * and DLLEXPORT macros to be nonempty. To build a static library, the + * macro STATIC_BUILD should be defined. + * The support follows the convention that a macro called BUILD_xxxx, where + * xxxx is the name of a library we are building, is set on the compile line + * for sources that are to be placed in the library. See BUILD_tcl in this + * file for an example of how the macro is to be used. + */ + +#ifdef __WIN32__ +# ifdef STATIC_BUILD +# define DLLIMPORT +# define DLLEXPORT +# else +# ifdef _MSC_VER +# define DLLIMPORT __declspec(dllimport) +# define DLLEXPORT __declspec(dllexport) +# else +# define DLLIMPORT +# define DLLEXPORT +# endif +# endif +#else +# define DLLIMPORT +# define DLLEXPORT +#endif + +#ifdef TCL_STORAGE_CLASS +# undef TCL_STORAGE_CLASS +#endif +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# define TCL_STORAGE_CLASS DLLIMPORT +#endif + +/* * Definitions that allow this header file to be used either with or * without ANSI C features like function prototypes. */ @@ -160,9 +223,9 @@ #endif #ifdef __cplusplus -# define EXTERN extern "C" +# define EXTERN extern "C" TCL_STORAGE_CLASS #else -# define EXTERN extern +# define EXTERN extern TCL_STORAGE_CLASS #endif /* @@ -687,7 +750,7 @@ typedef struct Tcl_DString { #define TCL_TRACE_DESTROYED 0x80 #define TCL_INTERP_DESTROYED 0x100 #define TCL_LEAVE_ERR_MSG 0x200 -#define TCL_TRACE_ARRAY 0x400 +#define TCL_TRACE_ARRAY 0x800 /* * The TCL_PARSE_PART1 flag is deprecated and has no effect. @@ -1447,6 +1510,7 @@ EXTERN int Tcl_GetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp, EXTERN char * Tcl_GetCommandName _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Command command)); EXTERN Tcl_ThreadId Tcl_GetCurrentThread _ANSI_ARGS_((void)); +EXTERN char * Tcl_GetCwd _ANSI_ARGS_((char *buf, int len)); EXTERN int Tcl_GetDouble _ANSI_ARGS_((Tcl_Interp *interp, char *string, double *doublePtr)); EXTERN int Tcl_GetDoubleFromObj _ANSI_ARGS_(( @@ -1477,6 +1541,7 @@ EXTERN int Tcl_GetIntFromObj _ANSI_ARGS_((Tcl_Interp *interp, EXTERN int Tcl_GetLongFromObj _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *objPtr, long *longPtr)); EXTERN Tcl_Interp * Tcl_GetMaster _ANSI_ARGS_((Tcl_Interp *interp)); +EXTERN CONST char * Tcl_GetNameOfExecutable _ANSI_ARGS_((void)); EXTERN Tcl_Obj * Tcl_GetObjResult _ANSI_ARGS_((Tcl_Interp *interp)); EXTERN Tcl_Obj * Tcl_GetObjVar2 _ANSI_ARGS_((Tcl_Interp *interp, char *part1, char *part2, int flags)); @@ -1513,6 +1578,7 @@ EXTERN int Tcl_HideCommand _ANSI_ARGS_((Tcl_Interp *interp, EXTERN int Tcl_Init _ANSI_ARGS_((Tcl_Interp *interp)); EXTERN void Tcl_InitHashTable _ANSI_ARGS_((Tcl_HashTable *tablePtr, int keyType)); +EXTERN void Tcl_InitMemory _ANSI_ARGS_((Tcl_Interp *interp)); EXTERN ClientData Tcl_InitNotifier _ANSI_ARGS_((void)); EXTERN int Tcl_InputBlocked _ANSI_ARGS_((Tcl_Channel chan)); EXTERN int Tcl_InputBuffered _ANSI_ARGS_((Tcl_Channel chan)); @@ -1796,4 +1862,8 @@ EXTERN void Tcl_WrongNumArgs _ANSI_ARGS_((Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], char *message)); #endif /* RESOURCE_INCLUDED */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + #endif /* _TCL */ |