~ubuntu-branches/ubuntu/precise/xcircuit/precise

« back to all changes in this revision

Viewing changes to xcwrap.c

  • Committer: Bazaar Package Importer
  • Author(s): Aanjhan Ranganathan
  • Date: 2006-04-18 23:51:39 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060418235139-s49pkhwdzxvsxm5k
Tags: 3.4.21-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#endif
24
24
 
25
25
extern int Tk_SimpleObjCmd();
 
26
extern int xctcl_standardaction();
26
27
extern int xctcl_refresh();
27
28
extern int xctcl_library();
28
29
extern int xctcl_font();
 
30
extern int xctcl_cursor();
29
31
extern int xctcl_bind();
30
32
extern int xctcl_filerecover();
31
33
extern int xctcl_color();
35
37
extern int xctcl_quit();
36
38
extern int xctcl_promptsavelib();
37
39
extern int xctcl_promptsavepage();
 
40
extern int xctcl_eventmode();
38
41
extern int xctcl_delete();
39
 
extern int xctcl_undelete();
 
42
extern int xctcl_undo();
 
43
extern int xctcl_redo();
40
44
extern int xctcl_copy();
41
45
extern int xctcl_move();
42
46
extern int xctcl_edit();
47
51
extern int xctcl_pop();
48
52
extern int xctcl_rotate();
49
53
extern int xctcl_flip();
50
 
extern int xctcl_set();
 
54
extern int xctcl_config();
51
55
extern int xctcl_page();
 
56
extern int xctcl_spice();
52
57
extern int xctcl_zoom();
53
58
extern int xctcl_pan();
54
59
extern int xctcl_element();
58
63
extern int xctcl_spline();
59
64
extern int xctcl_path();
60
65
extern int xctcl_arc();
 
66
extern int xctcl_graphic();
61
67
extern int xctcl_object();
62
68
extern int xctcl_here();
63
69
extern int xctcl_start();
64
 
#ifdef SCHEMA
65
70
extern int xctcl_netlist();
66
71
extern int xctcl_symschem();
67
 
#endif
68
72
extern int xctcl_tag();
69
73
 
70
74
typedef struct {
74
78
 
75
79
static cmdstruct xc_commands[] =
76
80
{
 
81
   {"standardaction", (void *)xctcl_standardaction},
77
82
   {"start", (void *)xctcl_start},
78
83
   {"tag", (void *)xctcl_tag},
79
84
   {"refresh", (void *)xctcl_refresh},
80
85
   {"library", (void *)xctcl_library},
81
86
   {"loadfont", (void *)xctcl_font},
 
87
   {"cursor", (void *)xctcl_cursor},
82
88
   {"bindkey", (void *)xctcl_bind},
83
89
   {"filerecover", (void *)xctcl_filerecover},
84
90
   {"color", (void *)xctcl_color},
88
94
   {"quitnocheck", (void *)xctcl_quit},
89
95
   {"promptchecksavelib", (void *)xctcl_promptsavelib},
90
96
   {"promptsavepage", (void *)xctcl_promptsavepage},
 
97
   {"eventmode", (void *)xctcl_eventmode},
91
98
   {"delete", (void *)xctcl_delete},
92
 
   {"undelete", (void *)xctcl_undelete},
 
99
   {"undo", (void *)xctcl_undo},
 
100
   {"redo", (void *)xctcl_redo},
93
101
   {"select", (void *)xctcl_select},
94
102
   {"deselect", (void *)xctcl_deselect},
95
103
   {"copy", (void *)xctcl_copy},
100
108
   {"pop", (void *)xctcl_pop},
101
109
   {"rotate", (void *)xctcl_rotate},
102
110
   {"flip", (void *)xctcl_flip},
103
 
   {"config", (void *)xctcl_set},
 
111
   {"config", (void *)xctcl_config},
104
112
   {"page", (void *)xctcl_page},
105
113
   {"zoom", (void *)xctcl_zoom},
106
114
   {"pan", (void *)xctcl_pan},
111
119
   {"spline", (void *)xctcl_spline},
112
120
   {"path", (void *)xctcl_path},
113
121
   {"arc", (void *)xctcl_arc},
 
122
   {"graphic", (void *)xctcl_graphic},
114
123
   {"object", (void *)xctcl_object},
115
124
   {"here", (void *)xctcl_here},
116
 
#ifdef SCHEMA
117
125
   {"netlist", (void *)xctcl_netlist},
118
126
   {"symbol", (void *)xctcl_symschem},
119
127
   {"schematic", (void *)xctcl_symschem},
120
 
#endif
 
128
   {"spice", (void *)xctcl_spice},
121
129
   {"", NULL}  /* sentinel */
122
130
};
123
131
 
127
135
/* Initialization procedure for Tcl/Tk                          */
128
136
/*--------------------------------------------------------------*/
129
137
 
 
138
#ifdef _MSC_VER
 
139
__declspec(dllexport)
 
140
#endif
130
141
int
131
142
Xcircuit_Init(Tcl_Interp *interp)
132
143
{
135
146
   Tk_Window tktop;
136
147
   char *tmp_s;
137
148
   char *cadhome;
 
149
   char version_string[20];
138
150
 
139
151
   /* Interpreter sanity checks */
140
152
   if (interp == NULL) return TCL_ERROR;
188
200
 
189
201
   Tcl_SetVar(interp, "XCIRCUIT_LIB_DIR", tmp_s, TCL_GLOBAL_ONLY);
190
202
 
191
 
   /* Set $CAD_HOME as a Tcl variable */
 
203
   /* Set $CAD_ROOT as a Tcl variable */
192
204
 
193
 
   cadhome = getenv("CAD_HOME");
 
205
   cadhome = getenv("CAD_ROOT");
194
206
   if (cadhome == NULL) cadhome = CAD_DIR;
195
 
   Tcl_SetVar(interp, "CAD_HOME", cadhome, TCL_GLOBAL_ONLY);
 
207
   Tcl_SetVar(interp, "CAD_ROOT", cadhome, TCL_GLOBAL_ONLY);
 
208
 
 
209
   /* Set $XCIRCUIT_VERSION and $XCIRCUIT_REVISION as Tcl variables */
 
210
 
 
211
   sprintf(version_string, "%d", PROG_REVISION);
 
212
   Tcl_SetVar(interp, "XCIRCUIT_REVISION", version_string, TCL_GLOBAL_ONLY);
 
213
 
 
214
   sprintf(version_string, "%g", PROG_VERSION);
 
215
   Tcl_SetVar(interp, "XCIRCUIT_VERSION", version_string, TCL_GLOBAL_ONLY);
196
216
 
197
217
   /* Export the namespace commands */
198
218
 
199
219
   Tcl_Eval(interp, "namespace eval xcircuit namespace export *");
200
 
   Tcl_PkgProvide(interp, "Xcircuit", "3.0");
 
220
   Tcl_PkgProvide(interp, "Xcircuit", version_string);
201
221
 
202
222
   /* Initialize the console interpreter, if there is one. */
203
223