OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tix/] [generic/] [tixItcl.h] - Blame information for rev 1781

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
/*
2
 * tixItcl.h --
3
 *
4
 *      Compatibility functions and macros that allow Tix to work
5
 *      under Incr Tcl.
6
 *
7
 * Copyright (c) 1996, Expert Interface Technologies
8
 *
9
 * See the file "license.terms" for information on usage and
10
 * redistribution of this file, and for a DISCLAIMER OF ALL
11
 * WARRANTIES.
12
 *
13
 */
14
 
15
/*
16
 * With Tcl 8.0, namespaces moved from Itcl to Tcl, and so
17
 * the Tix hacks have to be used in any verison of 8.0,
18
 * regardless of the presence of Itcl...
19
 */
20
 
21
#include "tix.h"
22
#ifdef TK_8_0_OR_LATER
23
 
24
#ifndef _TCLINT
25
#include <tclInt.h>
26
#endif
27
 
28
/*
29
 * Structure to store Tcl 8.0 name space information.
30
 */
31
 
32
typedef struct _TixItclNameSp {
33
    Interp *iPtr;
34
    CallFrame *savedVarFramePtr;
35
} TixItclNameSp;
36
 
37
#define DECLARE_ITCL_NAMESP(x,i) \
38
    TixItclNameSp x; \
39
    x.iPtr = (Interp*)(i);
40
 
41
EXTERN int              TixItclSetGlobalNameSp _ANSI_ARGS_((
42
                            TixItclNameSp * nameSpPtr, Tcl_Interp * interp));
43
EXTERN void             TixItclRestoreGlobalNameSp _ANSI_ARGS_((
44
                            TixItclNameSp * nameSpPtr, Tcl_Interp * interp));
45
 
46
#else
47
#ifdef ITCL_2
48
 
49
#ifndef _TCLINT
50
#include <tclInt.h>
51
#endif
52
/*
53
 * Structure to store ITcl name space information.
54
 */
55
typedef struct _TixItclNameSp {
56
    Interp *iPtr;
57
    CallFrame *savedVarFramePtr;
58
    Itcl_ActiveNamespace nsToken;
59
} TixItclNameSp;
60
 
61
#define DECLARE_ITCL_NAMESP(x,i) \
62
    TixItclNameSp x; \
63
    x.iPtr = (Interp*)(i); \
64
    x.nsToken = NULL;
65
 
66
EXTERN int              TixItclSetGlobalNameSp _ANSI_ARGS_((
67
                            TixItclNameSp * nameSpPtr, Tcl_Interp * interp));
68
EXTERN void             TixItclRestoreGlobalNameSp _ANSI_ARGS_((
69
                            TixItclNameSp * nameSpPtr, Tcl_Interp * interp));
70
 
71
#else
72
 
73
#define DECLARE_ITCL_NAMESP(x,i)
74
#define TixItclSetGlobalNameSp(a,b)     (1)
75
#define TixItclRestoreGlobalNameSp(a,b)
76
 
77
#endif /* ITCL_2 */
78
#endif /* TK_8_0_OR_LATER */

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.