Add a script to clean up after Tcl/Tk installation
[git/jnareb-git.git] / mingw / include / jpegtcl.h
blobd959183399be53f262da8aba48b84172fb6e80bf
1 /*
2 * jpegtcl.h --
4 * Interface to libjpeg.
6 * Copyright (c) 2002 Andreas Kupries <andreas_kupries@users.sourceforge.net>
8 * Zveno Pty Ltd makes this software and associated documentation
9 * available free of charge for any purpose. You may make copies
10 * of the software but you must include all of this notice on any copy.
12 * Zveno Pty Ltd does not warrant that this software is error free
13 * or fit for any purpose. Zveno Pty Ltd disclaims any liability for
14 * all claims, expenses, losses, damages and costs any user may incur
15 * as a result of using, copying or modifying the software.
17 * $Id: jpegtcl.h,v 1.3 2004/06/03 21:54:43 andreas_kupries Exp $
21 #ifndef __JPEGTCL_H__
22 #define __JPEGTCL_H__
24 #include <stdio.h>
25 #include "tcl.h"
27 #define JPEGTCL_MAJOR_VERSION 1
28 #define JPEGTCL_MINOR_VERSION 0
29 #define JPEGTCL_RELEASE_LEVEL TCL_RELEASE
30 #define JPEGTCL_RELEASE_SERIAL 0
32 #define JPEGTCL_VERSION "1.0"
33 #define JPEGTCL_PATCH_LEVEL "1.0"
36 * Used to block the rest of this header file from resource compilers so
37 * we can just get the version info.
39 #ifndef RC_INVOKED
41 /* TIP 27 update. If CONST84 is not defined we are compiling against a
42 * core before 8.4 and have to disable some CONST'ness.
45 #ifndef CONST84
46 # define CONST84
47 #endif
50 * Fix the Borland bug that's in the EXTERN macro from tcl.h.
52 #ifndef TCL_EXTERN
53 # undef DLLIMPORT
54 # undef DLLEXPORT
55 # if defined(STATIC_BUILD)
56 # define DLLIMPORT
57 # define DLLEXPORT
58 # elif (defined(__WIN32__) && (defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || (defined(__GNUC__) && defined(__declspec)))) || (defined(MAC_TCL) && FUNCTION_DECLSPEC)
59 # define DLLIMPORT __declspec(dllimport)
60 # define DLLEXPORT __declspec(dllexport)
61 # elif defined(__BORLANDC__)
62 # define OLDBORLAND 1
63 # define DLLIMPORT __import
64 # define DLLEXPORT __export
65 # else
66 # define DLLIMPORT
67 # define DLLEXPORT
68 # endif
69 /* Avoid name mangling from C++ compilers. */
70 # ifdef __cplusplus
71 # define TCL_EXTRNC extern "C"
72 # else
73 # define TCL_EXTRNC extern
74 # endif
75 /* Pre-5.5 Borland requires the attributes be placed after the */
76 /* return type. */
77 # ifdef OLDBORLAND
78 # define TCL_EXTERN(RTYPE) TCL_EXTRNC RTYPE TCL_STORAGE_CLASS
79 # else
80 # define TCL_EXTERN(RTYPE) TCL_EXTRNC TCL_STORAGE_CLASS RTYPE
81 # endif
82 #endif
87 * These macros are used to control whether functions are being declared for
88 * import or export in Windows,
89 * They map to no-op declarations on non-Windows systems.
90 * Assumes that tcl.h defines DLLEXPORT & DLLIMPORT correctly.
91 * The default build on windows is for a DLL, which causes the DLLIMPORT
92 * and DLLEXPORT macros to be nonempty. To build a static library, the
93 * macro STATIC_BUILD should be defined before the inclusion of tcl.h
95 * If a function is being declared while it is being built
96 * to be included in a shared library, then it should have the DLLEXPORT
97 * storage class. If is being declared for use by a module that is going to
98 * link against the shared library, then it should have the DLLIMPORT storage
99 * class. If the symbol is beind declared for a static build or for use from a
100 * stub library, then the storage class should be empty.
102 * The convention is that a macro called BUILD_xxxx, where xxxx is the
103 * name of a library we are building, is set on the compile line for sources
104 * that are to be placed in the library. When this macro is set, the
105 * storage class will be set to DLLEXPORT. At the end of the header file, the
106 * storage class will be reset to DLLIMPORt.
109 #undef TCL_STORAGE_CLASS
110 #ifdef BUILD_jpegtcl
111 # define TCL_STORAGE_CLASS DLLEXPORT
112 #else
113 # ifdef USE_JPEGTCL_STUBS
114 # define TCL_STORAGE_CLASS
115 # else
116 # define TCL_STORAGE_CLASS DLLIMPORT
117 # endif
118 #endif
121 *----------------------------------------------------------------------------
122 * C API for Jpegtcl generic layer
123 *----------------------------------------------------------------------------
127 *----------------------------------------------------------------------------
128 * Function prototypes for publically accessible routines
129 *----------------------------------------------------------------------------
132 #include "jpegtclDecls.h"
135 *----------------------------------------------------------------------------
136 * Function prototypes for stub initialization.
137 *----------------------------------------------------------------------------
140 #ifdef USE_JPEGTCL_STUBS
141 EXTERN CONST char *
142 Jpegtcl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, CONST char *version, int exact));
143 #else
146 * When not using stubs, make it a macro.
149 #define Jpegtcl_InitStubs(interp, version, exact) \
150 Tcl_PkgRequire(interp, "jpegtcl", version, exact)
151 #endif
154 #undef TCL_STORAGE_CLASS
155 #define TCL_STORAGE_CLASS DLLIMPORT
157 #endif /* RC_INVOKED */
158 #endif /* __JPEGTCL_H__ */