/[ascend]/trunk/tcltk98/generic/interface/Commands.c
ViewVC logotype

Annotation of /trunk/tcltk98/generic/interface/Commands.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 67 - (hide annotations) (download) (as text)
Wed Nov 30 16:31:29 2005 UTC (16 years, 7 months ago) by johnpye
File MIME type: text/x-csrc
File size: 50623 byte(s)
Standardised the "if seen" #defines to [ASC|ASCTK|ASCPY|ASCXX]_FILENAME_H
Fixed compile on FC3
1 aw0a 1 /*
2     * Commands.c
3     * by Kirk Abbott and Ben Allan
4     * Created: 1/94
5     * Version: $Revision: 1.62 $
6     * Version control file: $RCSfile: Commands.c,v $
7     * Date last modified: $Date: 1998/04/25 13:10:16 $
8     * Last modified by: $Author: ballan $
9     *
10     * This file is part of the ASCEND Tcl/Tk interface
11     *
12     * Copyright 1997, Carnegie Mellon University
13     *
14     * The ASCEND Tcl/Tk interface is free software; you can redistribute
15     * it and/or modify it under the terms of the GNU General Public License as
16     * published by the Free Software Foundation; either version 2 of the
17     * License, or (at your option) any later version.
18     *
19     * The ASCEND Tcl/Tk interface is distributed in hope that it will be
20     * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
21     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22     * General Public License for more details.
23     *
24     * You should have received a copy of the GNU General Public License
25     * along with the program; if not, write to the Free Software Foundation,
26     * Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check the file named
27     * COPYING. COPYING is found in ../compiler.
28     */
29    
30     #define KILLBDAG 0
31     #define REIMPLEMENT 0
32    
33 johnpye 67 #include <tcl.h>
34     #include <tk.h>
35 aw0a 1 #include "utilities/ascConfig.h"
36     #include "general/list.h"
37     #include "compiler/compiler.h"
38     #include "compiler/instance_enum.h"
39     #include "compiler/fractions.h"
40     #include "compiler/dimen.h"
41     #include "compiler/instance_name.h"
42     #include "compiler/units.h"
43     #include "solver/slv_types.h"
44     #include "solver/mtx.h"
45     #include "solver/var.h"
46     #include "solver/rel.h"
47     #include "solver/discrete.h"
48     #include "solver/logrel.h"
49     #include "solver/slv_common.h"
50     #include "interface/HelpProc.h"
51     #include "interface/Commands.h"
52     #include "interface/LibraryProc.h"
53     #include "interface/DisplayProc.h"
54 johnpye 67
55     #include "interface/Qlfdid.h"
56     #ifndef ASCTK_QLFDID_H
57     # error "ASCTK_QLFDID_H not defined in Commands.c???"
58     #endif
59    
60 aw0a 1 #include "interface/SimsProc.h"
61     #include "interface/BrowserProc.h"
62     #include "interface/BrowserMethod.h"
63     #include "interface/BrowserQuery.h"
64     #if KILLBDAG
65 johnpye 67 # include "interface/BrowserDag.h"
66 aw0a 1 #endif
67     #include "interface/BrowserRel_io.h"
68     #include "interface/BrowLogRel_io.h"
69     #include "interface/BrowWhen_io.h"
70     #include "interface/ProbeProc.h"
71     #include "interface/UserData.h"
72     #include "interface/SolverProc.h"
73     #include "interface/DebugProc.h"
74     #include "interface/MtxProc.h"
75     #include "interface/SlvProc.h"
76     #include "interface/EnvVarProc.h"
77     #if REIMPLEMENT
78 johnpye 67 # include "interface/CodeGen.h"
79 aw0a 1 #endif
80     #include "interface/UnitsProc.h"
81     #include "interface/ScriptProc.h"
82     #include "interface/Integrators.h"
83     #include "interface/Sensitivity.h" /* only for Asc_MtxNormsCmd */
84     #include "interface/typelex.h"
85     #include "interface/Driver.h"
86    
87    
88     #ifndef lint
89     static CONST char CommandsID[] = "$Id: Commands.c,v 1.62 1998/04/25 13:10:16 ballan Exp $";
90     #endif
91    
92    
93     void Asc_AddCommand(Tcl_Interp *interp, char *cmdName, Tcl_CmdProc *proc,
94     ClientData cdata, Tcl_CmdDeleteProc *deleteProc,
95     CONST char *group, CONST char *usage,
96     CONST char *shorth, HLFunc longh)
97     {
98     Tcl_CreateCommand(interp,cmdName,proc,cdata,deleteProc);
99     Asc_HelpDefine(cmdName,group,usage,shorth,longh);
100     }
101    
102     /*
103     * Any new commands that need to be registered should be added here.
104     */
105     void Asc_CreateCommands(Tcl_Interp *interp)
106     {
107     /*Tcl_Interp *interp = g_interp; */
108     /* create a local pointer to the global Tcl Interpreter (from GUIinit) */
109    
110     Asc_HelpDefineGroup("system",
111     "Explanation: functions that do various system call type activities.");
112    
113     /* All commands should eventually look like this one */
114     ASCADDCOM(interp,Asc_HelpCmdHN,Asc_HelpCmd,
115     "system", Asc_HelpCmdHU, Asc_HelpCmdHS, Asc_HelpCmdHLF);
116    
117     ASCADDCOM(interp,Asc_EnvVarCmdHN,Asc_EnvVarCmd,
118     "system", Asc_EnvVarCmdHU, Asc_EnvVarCmdHS, Asc_EnvVarCmdHLF);
119    
120     ASCADDCOM(interp,"asc_clock", Asc_TimeCmd,
121     "system",
122     "asc_clock <string> [n]",
123     "returns clock info from evaluating 'string' n times in Tcl global scope",
124     Asc_TimeCmdHLF
125     /* the stuff above should be replaced with header macros. */
126     );
127    
128     ASCADDCOM(interp,"script_eval", Asc_ScriptEvalCmd,
129     "system",
130     "script_eval <string>",
131     "Evaluates 'string' in Tcl global scope",
132     NULL
133     /* the stuff above should be replaced with header macros. */
134     );
135    
136    
137     ASCADDCOM(interp,"fastraise", Asc_FastRaiseCmd,
138     "system",
139     "fastraise windowname",
140     "calls XRaiseWindow on the toplevel given, rather than going through tk."
141     "\nThis function exists because tk/X can be very very slow. It's not \
142     highly portable and may be lost in a tk8 port.",
143     NULL
144     /* the stuff above should be replaced with header macros. */
145     );
146    
147    
148     Asc_HelpDefineGroup("miscellaneous",
149     "Explanation: functions that do unclassifiable things.");
150    
151     ASCADDCOM(interp,"stringcompact", Asc_StringCompact,
152     "miscellaneous",
153     "stringcompact <string>",
154     "returns a string constructed from the input by removing extra whitespace"
155     "\nThis function reduces all extra tabs, newlines and blanks to a space, \
156     and ascplot depends on it heavily to insure sanity",
157     NULL
158     /* the stuff above should be replaced with header macros. */
159     );
160    
161     Asc_HelpDefineGroup("library",
162     "Explanation: functions that operate on the ascend type library");
163    
164     ASCADDCOM(interp, Asc_LibrQueryTypeCmdHN, Asc_LibrQueryTypeCmd,
165     "library", Asc_LibrQueryTypeCmdHU, Asc_LibrQueryTypeCmdHS,
166     Asc_LibrQueryTypeCmdHLF);
167    
168     ASCADDCOM(interp, Asc_LibrOptionsCmdHN, Asc_LibrOptionsCmd,
169     "library", Asc_LibrOptionsCmdHU, Asc_LibrOptionsCmdHS,
170     Asc_LibrOptionsCmdHLF);
171    
172     ASCADDCOM(interp, Asc_LibrParseCmdHN, Asc_LibrParseCmd,
173     "library", Asc_LibrParseCmdHU, Asc_LibrParseCmdHS,
174     Asc_LibrParseCmdHLF);
175    
176     ASCADDCOM(interp, Asc_LibrReadCmdHN, Asc_LibrReadCmd,
177     "library", Asc_LibrReadCmdHU, Asc_LibrReadCmdHS,
178     Asc_LibrReadCmdHLF);
179    
180     ASCADDCOM(interp, Asc_LibrModuleInfoCmdHN, Asc_LibrModuleInfoCmd,
181     "library", Asc_LibrModuleInfoCmdHU, Asc_LibrModuleInfoCmdHS,
182     Asc_LibrModuleInfoCmdHLF);
183    
184     ASCADDCOM(interp, Asc_LibrDestroyTypesCmdHN, Asc_LibrDestroyTypesCmd,
185     "library", Asc_LibrDestroyTypesCmdHU, Asc_LibrDestroyTypesCmdHS,
186     Asc_LibrDestroyTypesCmdHLF);
187    
188     ASCADDCOM(interp, Asc_LibrHideTypeCmdHN, Asc_LibrHideTypeCmd,
189     "library", Asc_LibrHideTypeCmdHU, Asc_LibrHideTypeCmdHS,
190     Asc_LibrHideTypeCmdHLF);
191    
192     ASCADDCOM(interp, Asc_LibrUnHideTypeCmdHN, Asc_LibrUnHideTypeCmd,
193     "library", Asc_LibrUnHideTypeCmdHU, Asc_LibrUnHideTypeCmdHS,
194     Asc_LibrUnHideTypeCmdHLF);
195    
196     ASCADDCOM(interp, Asc_LibrTypeIsShownCmdHN, Asc_LibrTypeIsShownCmd,
197     "library", Asc_LibrTypeIsShownCmdHU, Asc_LibrTypeIsShownCmdHS,
198     Asc_LibrTypeIsShownCmdHLF);
199    
200     ASCADDCOM(interp, Asc_LibrTypeListCmdHN, Asc_LibrTypeListCmd,
201     "library", Asc_LibrTypeListCmdHU, Asc_LibrTypeListCmdHS,
202     Asc_LibrTypeListCmdHLF);
203    
204     ASCADDCOM(interp, Asc_ExtractTypeHN, Asc_ExtractType,
205     "library", Asc_ExtractTypeHU, Asc_ExtractTypeHS, Asc_ExtractTypeHLF);
206    
207    
208 johnpye 67 #ifndef ASCTK_QLFDID_H
209     # error "ASCTK_QLFDID_H not yet defined???"
210     #endif
211    
212 aw0a 1 /* Browser Routines */
213     ASCADDCOM(interp,"qlfdid",Asc_BrowQlfdidSearchCmd,
214     "miscellaneous",
215     NULL,
216     "qlfdid -- searches for the inst of a qualified name",
217     NULL
218     /* the stuff above should be replaced with header macros. */
219     );
220    
221     Asc_HelpDefineGroup("fileio",
222     "Explanation: functions that read/write files");
223     ASCADDCOM(interp,"bwritevalues", Asc_BrowWriteValues,
224     "fileio",
225     NULL,
226     NULL,
227     NULL
228     /* the stuff above should be replaced with header macros. */
229     );
230    
231     ASCADDCOM(interp,"__brow_find_type", Asc_BrowFindTypeCmd,
232     "browser",
233     NULL,
234     NULL,
235     NULL
236     /* the stuff above should be replaced with header macros. */
237     );
238    
239     ASCADDCOM(interp,"__brow_reln_relop", Asc_BrowRelationRelopCmd,
240     "browser",
241     NULL,
242     NULL,
243     NULL
244     /* the stuff above should be replaced with header macros. */
245     );
246    
247     /* Future work
248     ASCADDCOM(interp,"__brow_lrel_relop", BrowLogRelRelopCmd,
249     (ClientData) NULL,(Tcl_CmdDeleteProc *) NULL); */
250    
251     ASCADDCOM(interp,"btransfer", Asc_BrowTransferCmd,
252     "browser",
253     NULL,
254     NULL,
255     NULL
256     /* the stuff above should be replaced with header macros. */
257     );
258    
259     ASCADDCOM(interp,"rootinit", Asc_BrowRootInitCmd,
260     "browser",
261     NULL,
262     NULL,
263     NULL
264     /* the stuff above should be replaced with header macros. */
265     );
266    
267     ASCADDCOM(interp,"root", Asc_BrowRootCmd,
268     "browser",
269     NULL,
270     "root -- sets the root instance for queries",
271     NULL
272     /* the stuff above should be replaced with header macros. */
273     );
274    
275     ASCADDCOM(interp,"oldinst", Asc_BrowRootBackupCmd,
276     "browser",
277     NULL,
278     "oldinst -- backup to parent instance",
279     NULL
280     /* the stuff above should be replaced with header macros. */
281     );
282    
283     ASCADDCOM(interp,"rootn", Asc_BrowRootNCmd,
284     "browser",
285     NULL,
286     "rootn -- backup to ancestor instance",
287     NULL
288     /* the stuff above should be replaced with header macros. */
289     );
290    
291     ASCADDCOM(interp,"slist", Asc_BrowSimListCmd,
292     "simulations",
293     NULL,
294     "slist -- prints the list of all simulations",
295     NULL
296     /* the stuff above should be replaced with header macros. */
297     );
298    
299     ASCADDCOM(interp,"simtype", Asc_BrowSimTypeCmd,
300     "simulations",
301     NULL,
302     NULL,
303     NULL
304     /* the stuff above should be replaced with header macros. */
305     );
306    
307     ASCADDCOM(interp,"bstatistics",Asc_BrowInstStatCmd,
308     "browser",
309     NULL,
310     "bstatistics - inst tree stats",
311     NULL
312     /* the stuff above should be replaced with header macros. */
313     );
314    
315     ASCADDCOM(interp,"ilist",Asc_BrowInstListCmd,
316     "miscellaneous",
317     NULL,
318     "ilist -- prints the list of all working instances",
319     NULL
320     /* the stuff above should be replaced with header macros. */
321     );
322    
323     ASCADDCOM(interp,"is_type_refined",Asc_BrowRefinesMeCmd,
324     "miscellaneous",
325     NULL,
326     NULL,
327     NULL
328     /* the stuff above should be replaced with header macros. */
329     );
330    
331    
332     ASCADDCOM(interp,"bprint", Asc_BrowPrintCmd,
333     "miscellaneous",
334     NULL,
335     "bprint -- prints the contents of an instance",
336     NULL
337     /* the stuff above should be replaced with header macros. */
338     );
339    
340     ASCADDCOM(interp,"inst", Asc_BrowInstQueryCmd,
341     "browser",
342     NULL,
343     "inst -- general inst query routines",
344     NULL
345     /* the stuff above should be replaced with header macros. */
346     );
347    
348     ASCADDCOM(interp,"bgetproc", Asc_BrowWriteProcedure,
349     "browser",
350     NULL,
351     NULL,
352     NULL
353     /* the stuff above should be replaced with header macros. */
354     );
355    
356     ASCADDCOM(interp, Asc_BrowInitializeCmdHN, Asc_BrowInitializeCmd,
357     "browser", Asc_BrowInitializeCmdHU, Asc_BrowInitializeCmdHS,
358     Asc_BrowInitializeCmdHLF
359     );
360    
361     ASCADDCOM(interp,"brow_assign", Asc_BrowRunAssignmentCmd,
362     "browser",
363     NULL,
364     "assigns a value to the current or search atomic instance",
365     NULL
366     /* the stuff above should be replaced with header macros. */
367     );
368    
369     ASCADDCOM(interp,"qassgn2", Asc_BrowRunAssignQlfdidCmd2,
370     "miscellaneous",
371     NULL,
372     "qassgn -- assigns a value to a qlfdid atomic instance",
373     NULL
374     /* the stuff above should be replaced with header macros. */
375     );
376    
377     ASCADDCOM(interp,"qassgn3", Asc_BrowRunAssignQlfdidCmd3,
378     "miscellaneous",
379     NULL,
380     NULL,
381     NULL
382     /* the stuff above should be replaced with header macros. */
383     );
384    
385    
386     ASCADDCOM(interp,"__brow_iname", Asc_BrowWriteInstanceNameCmd,
387     "browser",
388     NULL,
389     "iname -- returns the name of the working instance",
390     NULL
391     /* the stuff above should be replaced with header macros. */
392     );
393    
394     ASCADDCOM(interp,"__brow_isrelation", Asc_BrowIsRelationCmd,
395     "browser",
396     NULL,
397     NULL,
398     NULL
399     /* the stuff above should be replaced with header macros. */
400     );
401    
402     ASCADDCOM(interp,"__brow_ismodel", Asc_BrowIsModelCmd,
403     "browser",
404     NULL,
405     NULL,
406     NULL
407     /* the stuff above should be replaced with header macros. */
408     );
409    
410     ASCADDCOM(interp,"bgetrels", Asc_BrowWriteRelListCmd,
411     "browser",
412     NULL,
413     NULL,
414     NULL
415     /* the stuff above should be replaced with header macros. */
416     );
417    
418     ASCADDCOM(interp,"bgetrelspf", Asc_BrowWriteRelListPostfixCmd,
419     "browser",
420     NULL,
421     NULL,
422     NULL
423     /* the stuff above should be replaced with header macros. */
424     );
425    
426     ASCADDCOM(interp,"__brow_relsforatom", Asc_BrowWriteRelsForAtomCmd,
427     "browser",
428     NULL,
429     NULL,
430     NULL
431     /* the stuff above should be replaced with header macros. */
432     );
433    
434    
435     ASCADDCOM(interp,"__brow_islogrel", Asc_BrowIsLogRelCmd,
436     "browser",
437     NULL,
438     NULL,
439     NULL
440     /* the stuff above should be replaced with header macros. */
441     );
442    
443     ASCADDCOM(interp,"bgetlogrels", Asc_BrowWriteLogRelListCmd,
444     "browser",
445     NULL,
446     NULL,
447     NULL
448     /* the stuff above should be replaced with header macros. */
449     );
450    
451     ASCADDCOM(interp,"bgetlogrelspf", Asc_BrowWriteLogRelListPostfixCmd,
452     "browser",
453     NULL,
454     NULL,
455     NULL
456     /* the stuff above should be replaced with header macros. */
457     );
458    
459     ASCADDCOM(interp,"__brow_logrelsforatom", Asc_BrowWriteLogRelsForAtomCmd,
460     "browser",
461     NULL,
462     NULL,
463     NULL
464     /* the stuff above should be replaced with header macros. */
465     );
466    
467    
468     ASCADDCOM(interp,"bgetcondrels", Asc_BrowWriteCondRelListCmd,
469     "browser",
470     NULL,
471     NULL,
472     NULL
473     /* the stuff above should be replaced with header macros. */
474     );
475    
476     ASCADDCOM(interp,"bgetcondlogrels", Asc_BrowWriteCondLogRelListCmd,
477     "browser",
478     NULL,
479     NULL,
480     NULL
481     /* the stuff above should be replaced with header macros. */
482     );
483    
484    
485     ASCADDCOM(interp,"__brow_iswhen", Asc_BrowIsWhenCmd,
486     "browser",
487     NULL,
488     NULL,
489     NULL
490     /* the stuff above should be replaced with header macros. */
491     );
492    
493     ASCADDCOM(interp,"__brow_isinstanceinwhen",
494     Asc_BrowIsInstanceInWhenCmd,
495     "browser",
496     NULL,
497     NULL,
498     NULL
499     /* the stuff above should be replaced with header macros. */
500     );
501    
502     ASCADDCOM(interp,"bgetwhens", Asc_BrowWriteWhenListCmd,
503     "browser",
504     NULL,
505     NULL,
506     NULL
507     /* the stuff above should be replaced with header macros. */
508     );
509    
510     ASCADDCOM(interp,"__brow_whensforinstance",
511     Asc_BrowWriteWhensForInstanceCmd,
512     "browser",
513     NULL,
514     NULL,
515     NULL
516     /* the stuff above should be replaced with header macros. */
517     );
518    
519     ASCADDCOM(interp,"bwritependings", Asc_BrowWritePendingsSTDOUT,
520     "browser",
521     NULL,
522     NULL,
523     NULL
524     /* the stuff above should be replaced with header macros. */
525     );
526    
527     ASCADDCOM(interp,"bnumpendings", Asc_BrowShowPendings,
528     "browser",
529     NULL,
530     NULL,
531     NULL
532     /* the stuff above should be replaced with header macros. */
533     );
534    
535     ASCADDCOM(interp,"count_names", Asc_BrowCountNamesCmd,
536     "browser",
537     NULL,
538     "count_names-- counts things slowly. see output for details",
539     NULL
540     /* the stuff above should be replaced with header macros. */
541     );
542    
543     ASCADDCOM(interp,"aliases", Asc_BrowWriteAliasesCmd,
544     "browser",
545     NULL,
546     "aliases -- returns the aliases of an instance",
547     NULL
548     /* the stuff above should be replaced with header macros. */
549     );
550    
551     ASCADDCOM(interp,"isas", Asc_BrowWriteISAsCmd,
552     "browser",
553     NULL,
554     "returns the constructions of an instance",
555     NULL
556     /* the stuff above should be replaced with header macros. */
557     );
558    
559     ASCADDCOM(interp,"cliques", Asc_BrowWriteCliqueCmd,
560     "browser",
561     NULL,
562     "returns all the members in the same ARE_ALIKE clique",
563     NULL
564     /* the stuff above should be replaced with header macros. */
565     );
566    
567     ASCADDCOM(interp,Asc_BrowWriteInstanceCmdHN, Asc_BrowWriteInstanceCmd,
568     "browser",
569     Asc_BrowWriteInstanceCmdHU,
570     "returns formatted info for the Browser",
571     NULL
572     /* the stuff above should be replaced with header macros. */
573     );
574    
575     ASCADDCOM(interp,"bmerge", Asc_BrowInstanceMergeCmd,
576     "browser",
577     NULL,
578     "merge current and search instances",
579     NULL
580     /* the stuff above should be replaced with header macros. */
581     );
582    
583     ASCADDCOM(interp,"brefine",Asc_BrowInstanceRefineCmd,
584     "browser",
585     NULL,
586     "refine current or search inst to type given",
587     NULL
588     /* the stuff above should be replaced with header macros. */
589     );
590    
591     ASCADDCOM(interp,"bmakealike",Asc_BrowMakeAlikeCmd,
592     "browser",
593     NULL,
594     "ARE_ALIKE current and search instances",
595     NULL
596     /* the stuff above should be replaced with header macros. */
597     );
598    
599     ASCADDCOM(interp,"b_isplottable", Asc_BrowIsPlotAllowedCmd,
600     "browser",
601     NULL,
602     "return boolean value TRUE if instance is a plot",
603     NULL
604     /* the stuff above should be replaced with header macros. */
605     );
606    
607     ASCADDCOM(interp,"b_prepplotfile", Asc_BrowPreparePlotFileCmd,
608     "browser",
609     NULL,
610     NULL,
611     NULL
612     /* the stuff above should be replaced with header macros. */
613     );
614    
615     ASCADDCOM(interp,"free_all_vars",Asc_BrowClearVarsCmd,
616     "browser",
617     NULL,
618     NULL,
619     NULL
620     /* the stuff above should be replaced with header macros. */
621     );
622    
623    
624     /* Simulation Routines */
625     ASCADDCOM(interp, Asc_SimBinTokenSetOptionsHN, Asc_SimBinTokenSetOptions,
626     "library", Asc_SimBinTokenSetOptionsHU, Asc_SimBinTokenSetOptionsHS,
627     Asc_SimBinTokenSetOptionsHLF);
628    
629     ASCADDCOM(interp,"sims", Asc_SimsQueryCmd,
630     "simulations",
631     NULL,
632     "return list of simulation names in the instance universe",
633     NULL
634     /* the stuff above should be replaced with header macros. */
635     );
636    
637     ASCADDCOM(interp,"sim_instantiate",Asc_SimsCreateInstanceCmd,
638     "simulations",
639     NULL,
640     "create a simulation in the instance universe",
641     NULL
642     /* the stuff above should be replaced with header macros. */
643     );
644    
645     ASCADDCOM(interp,"sim_unique",Asc_SimsUniqueNameCmd,
646     "simulations",
647     NULL,
648     "boolean check for potential simulation name not currently in use",
649     NULL
650     /* the stuff above should be replaced with header macros. */
651     );
652    
653     ASCADDCOM(interp,"sim_reinstantiate",Asc_SimsResumeInstantiateCmd,
654     "simulations",
655     NULL,
656     "sim_reinstantiate - resume compiling a simulation specified",
657     NULL
658     /* the stuff above should be replaced with header macros. */
659     );
660    
661     ASCADDCOM(interp,"__sims_copy",Asc_SimsCopyInstanceCmd,
662     "broken",
663     NULL,
664     NULL,
665     NULL
666     /* the stuff above should be replaced with header macros. */
667     );
668    
669     ASCADDCOM(interp,"__sims_proto",Asc_SimsProtoTypeInstanceCmd,
670     "broken",
671     NULL,
672     NULL,
673     NULL
674     /* the stuff above should be replaced with header macros. */
675     );
676    
677     ASCADDCOM(interp,"__sims_saveinst",Asc_SimsSaveInstanceCmd,
678     "broken",
679     NULL,
680     NULL,
681     NULL
682     /* the stuff above should be replaced with header macros. */
683     );
684    
685     ASCADDCOM(interp,"__sims_update",Asc_SimsUpdateInstanceCmd,
686     "broken",
687     NULL,
688     NULL,
689     NULL
690     /* the stuff above should be replaced with header macros. */
691     );
692    
693     ASCADDCOM(interp,"sim_destroy",Asc_SimsDestroySimulationCmd,
694     "simulations",
695     NULL,
696     "sim_destroy -- destroy a simulation",
697     NULL
698     /* the stuff above should be replaced with header macros. */
699     );
700    
701     ASCADDCOM(interp,"simlistpending",Asc_SimListPending,
702     "simulations",
703     NULL,
704     NULL,
705     NULL
706     /* the stuff above should be replaced with header macros. */
707     );
708    
709    
710     /* Display and Type query */
711     ASCADDCOM(interp,"ddefine", Asc_DispDefineCmd,
712     "library",
713     NULL,
714     "ddefine -- list all the types, or details of a type",
715     NULL
716     /* the stuff above should be replaced with header macros. */
717     );
718    
719     ASCADDCOM(interp,"ddiffdefine", Asc_DispDiffDefineCmd,
720     "library",
721     NULL,
722     "ddiffdefine -- list the details of a type differing from parent",
723     NULL
724     /* the stuff above should be replaced with header macros. */
725     );
726    
727     ASCADDCOM(interp,"disp", Asc_DispQueryCmd,
728     "miscellaneous",
729     NULL,
730     NULL,
731     NULL
732     /* the stuff above should be replaced with header macros. */
733     );
734    
735     ASCADDCOM(interp,"hier", Asc_DispHierarchyCmd,
736     "library",
737     NULL,
738     "hier -- list the hierarchy of a given type",
739     NULL
740     /* the stuff above should be replaced with header macros. */
741     );
742    
743     ASCADDCOM(interp,"file_by_type", Asc_DispFileByTypeCmd,
744     "fileio",
745     NULL,
746     NULL,
747     NULL
748     /* the stuff above should be replaced with header macros. */
749     );
750    
751     ASCADDCOM(interp,"dchild", Asc_DispChildOneCmd,
752     "miscellaneous",
753     NULL,
754     NULL,
755     NULL
756     /* the stuff above should be replaced with header macros. */
757     );
758    
759     ASCADDCOM(interp,"drefines_me", Asc_DispRefinesMeCmd,
760     "library",
761     NULL,
762     "drefines_me - list the immediate refinements of a given type",
763     NULL
764     /* the stuff above should be replaced with header macros. */
765     );
766    
767    
768     Asc_AddCommand(interp,"drefines_meall", Asc_DispRefinesMeCmd,
769     (ClientData) 1, (Tcl_CmdDeleteProc *)NULL,
770     "library",
771     NULL,
772     "drefines_meall - list all refinements of a given type",
773     NULL
774     /* the stuff above should be replaced with header macros. */
775     );
776    
777     ASCADDCOM(interp,"drefinement_tree", Asc_DispRefinesMeTreeCmd,
778     "library",
779     NULL,
780     "drefinement_tree - list the refinement hierarchy based on type",
781     NULL
782     /* the stuff above should be replaced with header macros. */
783     );
784    
785     ASCADDCOM(interp,"dgetparts", Asc_DispTypePartsCmd,
786     "library",
787     NULL,
788     "dgetparts -- list the types of parts IN a type.",
789     NULL
790     /* the stuff above should be replaced with header macros. */
791     );
792    
793     ASCADDCOM(interp,"disroot_type", Asc_DispIsRootTypeCmd,
794     "library",
795     NULL,
796     NULL,
797     NULL
798     /* the stuff above should be replaced with header macros. */
799     );
800    
801     /* Probe Routine */
802     ASCADDCOM(interp,Asc_ProbeCmdHN, Asc_ProbeCmd,
803     "probe-list",Asc_ProbeCmdHU,Asc_ProbeCmdHS,Asc_ProbeCmdHLF);
804    
805     /* slv query routines */
806     ASCADDCOM(interp,"__var_analyze", Asc_VarAnalyzeCmd,
807     "miscellaneous",
808     NULL,
809     NULL,
810     NULL
811     /* the stuff above should be replaced with header macros. */
812     );
813    
814     ASCADDCOM(interp,"__rel_analyze", Asc_RelAnalyzeCmd,
815     "miscellaneous",
816     NULL,
817     NULL,
818     NULL
819     /* the stuff above should be replaced with header macros. */
820     );
821    
822     /* UserData Routines */
823     ASCADDCOM(interp,"__userdata_init", Asc_UserDataInitializeCmd,
824     "user-list",
825     NULL,
826     NULL,
827     NULL
828     /* the stuff above should be replaced with header macros. */
829     );
830    
831     ASCADDCOM(interp,"__userdata_create", Asc_UserDataCreateCmd,
832     "user-list",
833     NULL,
834     NULL,
835     NULL
836     /* the stuff above should be replaced with header macros. */
837     );
838    
839     ASCADDCOM(interp,"__userdata_destroy", Asc_UserDataDestroyCmd,
840     "user-list",
841     NULL,
842     NULL,
843     NULL
844     /* the stuff above should be replaced with header macros. */
845     );
846    
847     ASCADDCOM(interp,"__userdata_save", Asc_UserDataSaveValuesCmd,
848     "user-list",
849     NULL,
850     NULL,
851     NULL
852     /* the stuff above should be replaced with header macros. */
853     );
854    
855     ASCADDCOM(interp,"__userdata_restore", Asc_UserDataRestoreValuesCmd,
856     "user-list",
857     NULL,
858     NULL,
859     NULL
860     /* the stuff above should be replaced with header macros. */
861     );
862    
863     ASCADDCOM(interp,"__userdata_query", Asc_UserDataQueryCmd,
864     "user-list",
865     NULL,
866     NULL,
867     NULL
868     /* the stuff above should be replaced with header macros. */
869     );
870    
871     ASCADDCOM(interp,"__userdata_print", Asc_UserDataPrintLibrary,
872     "user-list",
873     NULL,
874     NULL,
875     NULL
876     /* the stuff above should be replaced with header macros. */
877     );
878    
879     /* Solver Routines */
880     /* Solve_* are routines calling the commandline solver */
881     /* Solv_[SOLVERNAME_]<cfunction> are commands for the windowed solvers */
882    
883     #if DELETEME
884     ASCADDCOM(interp,"bexp_s",Asc_Brow2Solve,
885     "miscellaneous",
886     NULL,
887     "bexp_s -- export browser instance to solver context",
888     NULL
889     /* the stuff above should be replaced with header macros. */
890     );
891     #endif /* DELETEME */
892    
893     ASCADDCOM(interp,"get_model_children",Asc_SolvGetModKids,
894     "solver",
895     NULL,
896     NULL,
897     NULL
898     /* the stuff above should be replaced with header macros. */
899     );
900    
901     #if DELETEME
902     ASCADDCOM(interp,"slv_import_sim",Asc_Sims2Solve,
903     "solver",
904     NULL,
905     NULL,
906     NULL
907     /* the stuff above should be replaced with header macros. */
908     );
909    
910     ASCADDCOM(interp,"ssolve",Asc_SolvSimInst,
911     "solver",
912     NULL,
913     "ssolve -- fire up commandline solver <n> on <name>. DON'T.",
914     NULL
915     /* the stuff above should be replaced with header macros. */
916     );
917     #endif /* DELETEME */
918    
919     ASCADDCOM(interp,"solve",Asc_SolvCurInst,
920     "solver",
921     NULL,
922     "solve -- fire up commandline solver <n>. on g_curinst. DON'T.",
923     NULL
924     /* the stuff above should be replaced with header macros. */
925     );
926    
927     ASCADDCOM(interp,"slv_trapfp",Asc_SolvTrapFP,
928     "solver",
929     NULL,
930     NULL,
931     NULL
932     /* the stuff above should be replaced with header macros. */
933     );
934    
935     ASCADDCOM(interp,"slv_untrapfp",Asc_SolvUnTrapFP,
936     "solver",
937     NULL,
938     NULL,
939     NULL
940     /* the stuff above should be replaced with header macros. */
941     );
942    
943     ASCADDCOM(interp,"slv_checksim",Asc_SolvIncompleteSim,
944     "solver",
945     NULL,
946     NULL,
947     NULL
948     /* the stuff above should be replaced with header macros. */
949     );
950    
951     ASCADDCOM(interp,"slv_checksys",Asc_SolvCheckSys,
952     "solver",
953     NULL,
954     NULL,
955     NULL
956     /* the stuff above should be replaced with header macros. */
957     );
958    
959     ASCADDCOM(interp,"slv_get_obj_list",Asc_SolvGetObjList,
960     "solver",
961     NULL,
962     NULL,
963     NULL
964     /* the stuff above should be replaced with header macros. */
965     );
966    
967     ASCADDCOM(interp,"slv_set_obj_by_num",Asc_SolvSetObjByNum,
968     "solver",
969     NULL,
970     NULL,
971     NULL
972     /* the stuff above should be replaced with header macros. */
973     );
974    
975     ASCADDCOM(interp,Asc_SolvGetObjNumCmdHN,Asc_SolvGetObjNumCmd,
976     "solver",Asc_SolvGetObjNumCmdHU,Asc_SolvGetObjNumCmdHS,
977     Asc_SolvGetObjNumCmdHLF);
978    
979     ASCADDCOM(interp,"slv_get_parms",Asc_SolvGetSlvParms,
980     "solver",
981     NULL,
982     NULL,
983     NULL
984     /* the stuff above should be replaced with header macros. */
985     );
986    
987     ASCADDCOM(interp,"set_slv_parms",Asc_SolvSetSlvParms,
988     "solver",
989     NULL,
990     NULL,
991     NULL
992     /* the stuff above should be replaced with header macros. */
993     );
994    
995     ASCADDCOM(interp,"set_slv_parmsnew",Asc_SolvSetSlvParmsNew,
996     "solver",
997     NULL,
998     NULL,
999     NULL
1000     /* the stuff above should be replaced with header macros. */
1001     );
1002    
1003     ASCADDCOM(interp,"slv_get_parmsnew",Asc_SolvGetSlvParmsNew,
1004     "solver",
1005     NULL,
1006     NULL,
1007     NULL
1008     /* the stuff above should be replaced with header macros. */
1009     );
1010    
1011     /* what's up with this? */
1012     /* Tcl_CreateCommand(interp,"slv_get_bool_parms",Asc_SolvGetSlvBoolParms,
1013     * (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
1014     *Tcl_CreateCommand(interp,"slv_get_real_parms",Asc_SolvGetSlvRealParms,
1015     * (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
1016     */
1017    
1018     ASCADDCOM(interp,"slv_get_insttype",Asc_SolvGetInstType,
1019     "solver",
1020     NULL,
1021     NULL,
1022     NULL
1023     /* the stuff above should be replaced with header macros. */
1024     );
1025    
1026     ASCADDCOM(interp,"slv_get_cost_page",Asc_SolvGetSlvCostPage,
1027     "solver",
1028     NULL,
1029     NULL,
1030     NULL
1031     /* the stuff above should be replaced with header macros. */
1032     );
1033    
1034     ASCADDCOM(interp,"slv_get_stat_page",Asc_SolvGetSlvStatPage,
1035     "solver",
1036     NULL,
1037     NULL,
1038     NULL
1039     /* the stuff above should be replaced with header macros. */
1040     );
1041    
1042     ASCADDCOM(interp,"slv_get_objval",Asc_SolvGetObjectiveVal,
1043     "solver",
1044     NULL,
1045     NULL,
1046     NULL
1047     /* the stuff above should be replaced with header macros. */
1048     );
1049    
1050     ASCADDCOM(interp,"slv_get_instname",Asc_SolvGetInstName,
1051     "solver",
1052     NULL,
1053     NULL,
1054     NULL
1055     /* the stuff above should be replaced with header macros. */
1056     );
1057    
1058     ASCADDCOM(interp,"slv_get_pathname",Asc_SolvGetPathName,
1059     "solver",
1060     NULL,
1061     NULL,
1062     NULL
1063     /* the stuff above should be replaced with header macros. */
1064     );
1065    
1066     ASCADDCOM(interp,"slv_get_vr",Asc_SolvGetVRCounts,
1067     "solver",
1068     NULL,
1069     NULL,
1070     NULL
1071     /* the stuff above should be replaced with header macros. */
1072     );
1073    
1074     ASCADDCOM(interp,"slvdump",Asc_SolvSlvDumpInt,
1075     "solver",
1076     NULL,
1077     NULL,
1078     NULL
1079     /* the stuff above should be replaced with header macros. */
1080     );
1081    
1082     ASCADDCOM(interp,"slv_presolve",Asc_SolvSlvPresolve,
1083     "solver",
1084     NULL,
1085     NULL,
1086     NULL
1087     /* the stuff above should be replaced with header macros. */
1088     );
1089    
1090     ASCADDCOM(interp,"slv_reanalyze",Asc_SolvReanalyze,
1091     "solver",
1092     NULL,
1093     NULL,
1094     NULL
1095     /* the stuff above should be replaced with header macros. */
1096     );
1097    
1098     ASCADDCOM(interp,"slv_check_and_reanalyze",Asc_SolvCheckAndReanalyze,
1099     "solver",
1100     NULL,
1101     NULL,
1102     NULL
1103     /* the stuff above should be replaced with header macros. */
1104     );
1105    
1106     ASCADDCOM(interp,"slv_set_independent",Asc_SolvMakeIndependent,
1107     "solver",
1108     NULL,
1109     NULL,
1110     NULL
1111     /* the stuff above should be replaced with header macros. */
1112     );
1113    
1114     ASCADDCOM(interp,"slv_resolve",Asc_SolvSlvResolve,
1115     "solver",
1116     NULL,
1117     NULL,
1118     NULL
1119     /* the stuff above should be replaced with header macros. */
1120     );
1121    
1122     ASCADDCOM(interp,"slv_solve",Asc_SolvSlvSolve,
1123     "solver",
1124     NULL,
1125     NULL,
1126     NULL
1127     /* the stuff above should be replaced with header macros. */
1128     );
1129    
1130     ASCADDCOM(interp,"slv_iterate",Asc_SolvSlvIterate,
1131     "solver",
1132     NULL,
1133     NULL,
1134     NULL
1135     /* the stuff above should be replaced with header macros. */
1136     );
1137    
1138     ASCADDCOM(interp,"slv_available",Asc_SolvAvailSolver,
1139     "solver",
1140     NULL,
1141     NULL,
1142     NULL
1143     /* the stuff above should be replaced with header macros. */
1144     );
1145    
1146     ASCADDCOM(interp,"slv_linsol_names",Asc_SolvLinsolNames,
1147     "solver",
1148     NULL,
1149     NULL,
1150     NULL
1151     /* the stuff above should be replaced with header macros. */
1152     );
1153    
1154     ASCADDCOM(interp,"slv_eligible_solver",Asc_SolvEligSolver,
1155     "solver",
1156     NULL,
1157     NULL,
1158     NULL
1159     /* the stuff above should be replaced with header macros. */
1160     );
1161    
1162     ASCADDCOM(interp,"slv_select_solver",Asc_SolvSelectSolver,
1163     "solver",
1164     NULL,
1165     NULL,
1166     NULL
1167     /* the stuff above should be replaced with header macros. */
1168     );
1169    
1170     ASCADDCOM(interp,"slv_get_solver",Asc_SolvGetSelectedSolver,
1171     "solver",
1172     NULL,
1173     NULL,
1174     NULL
1175     /* the stuff above should be replaced with header macros. */
1176     );
1177    
1178     ASCADDCOM(interp,"slv_flush_solver",Asc_SolvFlushSolver,
1179     "solver",
1180     NULL,
1181     NULL,
1182     NULL
1183     /* the stuff above should be replaced with header macros. */
1184     );
1185    
1186     ASCADDCOM(interp,"slv_import_qlfdid",Asc_SolvImportQlfdid,
1187     "solver",
1188     NULL,
1189     NULL,
1190     NULL
1191     /* the stuff above should be replaced with header macros. */
1192     );
1193    
1194     ASCADDCOM(interp,"slv_lnmget",Asc_SolvGetLnmEpsilon,
1195     "solver",
1196     NULL,
1197     NULL,
1198     NULL
1199     /* the stuff above should be replaced with header macros. */
1200     );
1201    
1202     ASCADDCOM(interp,"slv_lnmset",Asc_SolvSetLnmEpsilon,
1203     "solver",
1204     NULL,
1205     NULL,
1206     NULL
1207     /* the stuff above should be replaced with header macros. */
1208     );
1209    
1210     ASCADDCOM(interp,"slv_set_haltflag",Asc_SolvSetCHaltFlag,
1211     "solver",
1212     NULL,
1213     NULL,
1214     NULL
1215     /* the stuff above should be replaced with header macros. */
1216     );
1217    
1218     ASCADDCOM(interp,"slvhelp",Asc_SolvHelpList,
1219     "solver",
1220     NULL,
1221     "slvhelp -- give tcl/[s]hort/[l]ong solver primitive list",
1222     NULL
1223     /* the stuff above should be replaced with header macros. */
1224     );
1225    
1226     ASCADDCOM(interp,"slv_near_bounds",Asc_SolvNearBounds,
1227     "solver",
1228     NULL,
1229     NULL,
1230     NULL
1231     /* the stuff above should be replaced with header macros. */
1232     );
1233    
1234     ASCADDCOM(interp,"slv_far_from_nominals",Asc_SolvFarFromNominal,
1235     "solver",
1236     NULL,
1237     NULL,
1238     NULL
1239     /* the stuff above should be replaced with header macros. */
1240     );
1241    
1242     ASCADDCOM(interp,Asc_SolveMonitorCmdHN,Asc_SolveMonitorCmd,"solver",
1243     Asc_SolveMonitorCmdHU, Asc_SolveMonitorCmdHS, Asc_SolveMonitorCmdHLF);
1244    
1245    
1246    
1247    
1248     /* solver Debugger commands */
1249     ASCADDCOM(interp,"dbg_get_blk_of_var",Asc_DebuGetBlkOfVar,
1250     "debugger",
1251     NULL,
1252     NULL,
1253     NULL
1254     /* the stuff above should be replaced with header macros. */
1255     );
1256    
1257     ASCADDCOM(interp,"dbg_get_blk_of_eqn",Asc_DebuGetBlkOfEqn,
1258     "debugger",
1259     NULL,
1260     NULL,
1261     NULL
1262     /* the stuff above should be replaced with header macros. */
1263     );
1264    
1265     ASCADDCOM(interp,"dbg_get_blk_coords",Asc_DebuGetBlkCoords,
1266     "debugger",
1267     NULL,
1268     NULL,
1269     NULL
1270     /* the stuff above should be replaced with header macros. */
1271     );
1272    
1273     ASCADDCOM(interp,"dbg_get_eqn_of_var",Asc_DebuGetEqnOfVar,
1274     "debugger",
1275     NULL,
1276     NULL,
1277     NULL
1278     /* the stuff above should be replaced with header macros. */
1279     );
1280    
1281     ASCADDCOM(interp,"dbg_get_varpartition",Asc_DebuGetVarPartition,
1282     "debugger",
1283     NULL,
1284     NULL,
1285     NULL
1286     /* the stuff above should be replaced with header macros. */
1287     );
1288    
1289     ASCADDCOM(interp,"dbg_get_eqnpartition",Asc_DebuGetEqnPartition,
1290     "debugger",
1291     NULL,
1292     NULL,
1293     NULL
1294     /* the stuff above should be replaced with header macros. */
1295     );
1296    
1297     ASCADDCOM(interp,"dbg_list_rels",Asc_DebuListRels,
1298     "debugger",
1299     NULL,
1300     NULL,
1301     NULL
1302     /* the stuff above should be replaced with header macros. */
1303     );
1304    
1305     ASCADDCOM(interp,"dbg_list_vars",Asc_DebuListVars,
1306     "debugger",
1307     NULL,
1308     NULL,
1309     NULL
1310     /* the stuff above should be replaced with header macros. */
1311     );
1312    
1313     ASCADDCOM(interp,"dbg_write_var",Asc_DebuWriteVar,
1314     "debugger",
1315     NULL,
1316     NULL,
1317     NULL
1318     /* the stuff above should be replaced with header macros. */
1319     );
1320    
1321     ASCADDCOM(interp,"dbg_write_unattvar",Asc_DebuWriteUnattachedVar,
1322     "debugger",
1323     NULL,
1324     NULL,
1325     NULL
1326     /* the stuff above should be replaced with header macros. */
1327     );
1328    
1329     Asc_AddCommand(interp,"brow_write_var",Asc_DebuWriteVar,
1330     (ClientData) 1, (Tcl_CmdDeleteProc *) NULL,
1331     "miscellaneous",
1332     NULL,
1333     NULL,
1334     NULL
1335     /* the stuff above should be replaced with header macros. */
1336     );
1337    
1338    
1339     ASCADDCOM(interp,"dbg_write_rel",Asc_DebuWriteRel,
1340     "debugger",
1341     NULL,
1342     NULL,
1343     NULL
1344     /* the stuff above should be replaced with header macros. */
1345     );
1346    
1347     /* do we need this function? */
1348     Asc_AddCommand(interp,"brow_write_rel",Asc_DebuWriteRel,
1349     (ClientData) 1, (Tcl_CmdDeleteProc *) NULL,
1350     "miscellaneous",
1351     NULL,
1352     NULL,
1353     NULL
1354     /* the stuff above should be replaced with header macros. */
1355     );
1356    
1357     ASCADDCOM(interp,"dbg_write_obj",Asc_DebuWriteObj,
1358     "debugger",
1359     NULL,
1360     NULL,
1361     NULL
1362     /* the stuff above should be replaced with header macros. */
1363     );
1364    
1365     /* do we need this function? */
1366     Asc_AddCommand(interp,"brow_write_obj",Asc_DebuWriteObj,
1367     (ClientData) 1, (Tcl_CmdDeleteProc *) NULL,
1368     "miscellaneous",
1369     NULL,
1370     NULL,
1371     NULL
1372     /* the stuff above should be replaced with header macros. */
1373     );
1374    
1375     ASCADDCOM(interp,"dbg_write_varattr",Asc_DebuWriteVarAttr,
1376     "debugger",
1377     NULL,
1378     NULL,
1379     NULL
1380     /* the stuff above should be replaced with header macros. */
1381     );
1382    
1383     Asc_AddCommand(interp,"dbg_write_qlfattr",Asc_DebuWriteVarAttr,
1384     (ClientData)1, (Tcl_CmdDeleteProc *) NULL,
1385     "debugger",
1386     NULL,
1387     NULL,
1388     NULL
1389     /* the stuff above should be replaced with header macros. */
1390     );
1391    
1392     ASCADDCOM(interp,"dbg_rel_included",Asc_DebuRelIncluded,
1393     "debugger",
1394     NULL,
1395     NULL,
1396     NULL
1397     /* the stuff above should be replaced with header macros. */
1398     );
1399    
1400     ASCADDCOM(interp,"dbg_var_fixed",Asc_DebuVarFixed,
1401     "debugger",
1402     NULL,
1403     NULL,
1404     NULL
1405     /* the stuff above should be replaced with header macros. */
1406     );
1407    
1408     ASCADDCOM(interp,"dbg_get_incidence",Asc_DebuGetIncidence,
1409     "debugger",
1410     NULL,
1411     NULL,
1412     NULL
1413     /* the stuff above should be replaced with header macros. */
1414     );
1415    
1416     ASCADDCOM(interp,"dbg_get_order",Asc_DebuGetOrder,
1417     "debugger",
1418     NULL,
1419     NULL,
1420     NULL
1421     /* the stuff above should be replaced with header macros. */
1422     );
1423    
1424     ASCADDCOM(interp,"dbg_write_incidence",Asc_DebuWriteIncidence,
1425     "debugger",
1426     NULL,
1427     NULL,
1428     NULL
1429     /* the stuff above should be replaced with header macros. */
1430     );
1431    
1432     ASCADDCOM(interp,"dbg_find_eligible",Asc_DebuFindEligible,
1433     "debugger",
1434     NULL,
1435     NULL,
1436     NULL
1437     /* the stuff above should be replaced with header macros. */
1438     );
1439    
1440     ASCADDCOM(interp,"brow_find_eligible",Asc_DebuInstEligible,
1441     "debugger",
1442     NULL,
1443     NULL,
1444     NULL
1445     /* the stuff above should be replaced with header macros. */
1446     );
1447    
1448     ASCADDCOM(interp,"dbg_consistency_analysis",Asc_DebuConsistencyAnalysis,
1449     "debugger",
1450     NULL,
1451     NULL,
1452     NULL
1453     /* the stuff above should be replaced with header macros. */
1454     );
1455    
1456     ASCADDCOM(interp,"dbg_global_eligible",Asc_DebuFindGlobalEligible,
1457     "debugger",
1458     NULL,
1459     NULL,
1460     NULL
1461     /* the stuff above should be replaced with header macros. */
1462     );
1463    
1464    
1465     ASCADDCOM(interp,"dbg_find_activerels",Asc_DebuFindActive,
1466     "debugger",
1467     NULL,
1468     NULL,
1469     NULL
1470     /* the stuff above should be replaced with header macros. */
1471     );
1472    
1473     ASCADDCOM(interp,"brow_find_activerels",Asc_DebuInstActive,
1474     "debugger",
1475     NULL,
1476     NULL,
1477     NULL
1478     /* the stuff above should be replaced with header macros. */
1479     );
1480    
1481     ASCADDCOM(interp,"dbg_struct_singular",Asc_DebuStructSing,
1482     "debugger",
1483     NULL,
1484     NULL,
1485     NULL
1486     /* the stuff above should be replaced with header macros. */
1487     );
1488    
1489     ASCADDCOM(interp,"dbg_num_block_singular",Asc_DebuNumBlockSing,
1490     "debugger",
1491     NULL,
1492     NULL,
1493     NULL
1494     /* the stuff above should be replaced with header macros. */
1495     );
1496    
1497     ASCADDCOM(interp,"var_free2nom",Asc_DebuVarFree2Nom,
1498     "debugger",
1499     NULL,
1500     NULL,
1501     NULL
1502     /* the stuff above should be replaced with header macros. */
1503     );
1504    
1505     ASCADDCOM(interp,"var_nom2free",Asc_DebuVarNom2Free,
1506     "debugger",
1507     NULL,
1508     NULL,
1509     NULL
1510     /* the stuff above should be replaced with header macros. */
1511     );
1512    
1513     ASCADDCOM(interp,"dbg_calc_relnoms",Asc_DebuCalcRelNominals,
1514     "debugger",
1515     NULL,
1516     NULL,
1517     NULL
1518     /* the stuff above should be replaced with header macros. */
1519     );
1520    
1521     ASCADDCOM(interp,"dbg_check_rels",Asc_DebuCheckRelFp,
1522     "debugger",
1523     NULL,
1524     NULL,
1525     NULL
1526     /* the stuff above should be replaced with header macros. */
1527     );
1528    
1529     ASCADDCOM(interp,"dbg_write_slv0_xsys",Asc_DebuWriteSystem,
1530     "fileio",
1531     NULL,
1532     NULL,
1533     NULL
1534     /* the stuff above should be replaced with header macros. */
1535     );
1536    
1537    
1538     Asc_AddCommand(interp,"dbg_write_slv0_sys",Asc_DebuWriteSystem,
1539     (ClientData) 1, (Tcl_CmdDeleteProc *) NULL,
1540     "debugger",
1541     NULL,
1542     NULL,
1543     NULL
1544     /* the stuff above should be replaced with header macros. */
1545     );
1546    
1547     Asc_AddCommand(interp,"dbg_mtxwriteplot",Asc_DebuMtxWritePlotCmd,
1548     (ClientData) 1, (Tcl_CmdDeleteProc *) NULL,
1549     "debugger",
1550     NULL,
1551     NULL,
1552     NULL
1553     /* the stuff above should be replaced with header macros. */
1554     );
1555    
1556     Asc_AddCommand(interp,"dbg_calc_jacobian",Asc_DebuMtxCalcJacobianCmd,
1557     (ClientData) 1, (Tcl_CmdDeleteProc *) NULL,
1558     "debugger",
1559     NULL,
1560     NULL,
1561     NULL
1562     /* the stuff above should be replaced with header macros. */
1563     );
1564    
1565     ASCADDCOM(interp,"dbghelp",Asc_DebuHelpList,
1566     "debugger",
1567     NULL,
1568     "dbghelp -- give tcl/[s]hort/[l]ong debugger primitives list",
1569     NULL
1570     /* the stuff above should be replaced with header macros. */
1571     );
1572    
1573    
1574     /* ivp solver commands */
1575     ASCADDCOM(interp,"integrate_setup", Asc_IntegSetupCmd,
1576     "solver",
1577     NULL,
1578     NULL,
1579     NULL
1580     /* the stuff above should be replaced with header macros. */
1581     );
1582    
1583     ASCADDCOM(interp,"integrate_cleanup", Asc_IntegCleanupCmd,
1584     "solver",
1585     NULL,
1586     NULL,
1587     NULL
1588     /* the stuff above should be replaced with header macros. */
1589     );
1590    
1591     ASCADDCOM(interp,"integrate_set_y_file", Asc_IntegSetYFileCmd,
1592     "solver",
1593     NULL,
1594     NULL,
1595     NULL
1596     /* the stuff above should be replaced with header macros. */
1597     );
1598    
1599     ASCADDCOM(interp,"integrate_set_obs_file", Asc_IntegSetObsFileCmd,
1600     "solver",
1601     NULL,
1602     NULL,
1603     NULL
1604     /* the stuff above should be replaced with header macros. */
1605     );
1606    
1607     ASCADDCOM(interp,"integrate_logunits", Asc_IntegSetFileUnitsCmd,
1608     "solver",
1609     NULL,
1610     NULL,
1611     NULL
1612     /* the stuff above should be replaced with header macros. */
1613     );
1614    
1615     ASCADDCOM(interp,"integrate_logformat", Asc_IntegSetFileFormatCmd,
1616     "solver",
1617     NULL,
1618     NULL,
1619     NULL
1620     /* the stuff above should be replaced with header macros. */
1621     );
1622    
1623     ASCADDCOM(interp,"integrate_get_samples", Asc_IntegGetXSamplesCmd,
1624     "solver",
1625     NULL,
1626     NULL,
1627     NULL
1628     /* the stuff above should be replaced with header macros. */
1629     );
1630    
1631     ASCADDCOM(interp,"integrate_set_samples", Asc_IntegSetXSamplesCmd,
1632     "solver",
1633     NULL,
1634     NULL,
1635     NULL
1636     /* the stuff above should be replaced with header macros. */
1637     );
1638    
1639     ASCADDCOM(interp,"integrate_able", Asc_IntegInstIntegrableCmd,
1640     "solver",
1641     NULL,
1642     NULL,
1643     NULL
1644     /* the stuff above should be replaced with header macros. */
1645     );
1646    
1647     /* This code is in Sensitivity.[ch] but needs a home */
1648     /* Also need a different name as the Mtx name space is already taken. */
1649     ASCADDCOM(interp,"__mtx_norms", Asc_MtxNormsCmd,
1650     "solver",
1651     NULL,
1652     NULL,
1653     NULL
1654     /* the stuff above should be replaced with header macros. */
1655     );
1656    
1657     /* Working very hard to avoid direct X code, here we make a command
1658     set for handling incidence matrices via Tcl/tk without the
1659     amazing overhead of a tcl interpreter getting in the way.
1660     Avoids a _lot_ of list operations.
1661     */
1662     /* mtx incidence commands */
1663     ASCADDCOM(interp,"mtx_gui_plot_incidence",Asc_MtxGUIPlotIncidence,
1664     "mtxplot",
1665     NULL,
1666     NULL,
1667     NULL
1668     /* the stuff above should be replaced with header macros. */
1669     );
1670    
1671     ASCADDCOM(interp,"mtxhelp",Asc_MtxHelpList,
1672     "mtxplot",
1673     NULL,
1674     "mtxhelp -- give tcl/[s]hort/[l]ong incid matrix primitives.",
1675     NULL
1676     /* the stuff above should be replaced with header macros. */
1677     );
1678    
1679     /* Units window stuff */
1680     ASCADDCOM(interp,"u_destroy_units",Asc_UnitDestroyDisplayList,
1681     "units",
1682     NULL,
1683     NULL,
1684     NULL
1685     /* the stuff above should be replaced with header macros. */
1686     );
1687    
1688     ASCADDCOM(interp,"u_setSIdef",Asc_UnitDefaultBaseUnits,
1689     "units",
1690     NULL,
1691     NULL,
1692     NULL
1693     /* the stuff above should be replaced with header macros. */
1694     );
1695    
1696     ASCADDCOM(interp,"u_getbasedef",Asc_UnitGetBaseUnits,
1697     "units",
1698     NULL,
1699     NULL,
1700     NULL
1701     /* the stuff above should be replaced with header macros. */
1702     );
1703    
1704     ASCADDCOM(interp,"u_dump",Asc_UnitDump,
1705     "units",
1706     NULL,
1707     NULL,
1708     NULL
1709     /* the stuff above should be replaced with header macros. */
1710     );
1711    
1712     ASCADDCOM(interp,"u_dims",Asc_DimenDump,
1713     "units",
1714     NULL,
1715     NULL,
1716     NULL
1717     /* the stuff above should be replaced with header macros. */
1718     );
1719    
1720     ASCADDCOM(interp,"u_dim_setverify",Asc_DimenRelCheck,
1721     "units",
1722     NULL,
1723     NULL,
1724     NULL
1725     /* the stuff above should be replaced with header macros. */
1726     );
1727    
1728     ASCADDCOM(interp,"u_dim2num",Asc_UnitBaseDimToNum,
1729     "units",
1730     NULL,
1731     NULL,
1732     NULL
1733     /* the stuff above should be replaced with header macros. */
1734     );
1735    
1736     ASCADDCOM(interp,"u_num2dim",Asc_UnitNumToBaseDim,
1737     "units",
1738     NULL,
1739     NULL,
1740     NULL
1741     /* the stuff above should be replaced with header macros. */
1742     );
1743    
1744     ASCADDCOM(interp,"u_frombasedim",Asc_UnitMatchBaseDim,
1745     "units",
1746     NULL,
1747     NULL,
1748     NULL
1749     /* the stuff above should be replaced with header macros. */
1750     );
1751    
1752     ASCADDCOM(interp,"u_fromatomdim",Asc_UnitMatchAtomDim,
1753     "units",
1754     NULL,
1755     NULL,
1756     NULL
1757     /* the stuff above should be replaced with header macros. */
1758     );
1759    
1760     ASCADDCOM(interp,"u_getdimatoms",Asc_UnitGetAtomList,
1761     "units",
1762     NULL,
1763     NULL,
1764     NULL
1765     /* the stuff above should be replaced with header macros. */
1766     );
1767    
1768     ASCADDCOM(interp,"u_change_baseunit",Asc_UnitChangeBaseUnit,
1769     "units",
1770     NULL,
1771     NULL,
1772     NULL
1773     /* the stuff above should be replaced with header macros. */
1774     );
1775    
1776     ASCADDCOM(interp,"u_getprec",Asc_UnitGetPrec,
1777     "units",
1778     NULL,
1779     NULL,
1780     NULL
1781     /* the stuff above should be replaced with header macros. */
1782     );
1783    
1784     ASCADDCOM(interp,"u_setprec",Asc_UnitSetPrec,
1785     "units",
1786     NULL,
1787     NULL,
1788     NULL
1789     /* the stuff above should be replaced with header macros. */
1790     );
1791    
1792     ASCADDCOM(interp,"u_get_atoms",Asc_UnitGetAtomsForUnit,
1793     "units",
1794     NULL,
1795     NULL,
1796     NULL
1797     /* the stuff above should be replaced with header macros. */
1798     );
1799    
1800    
1801     ASCADDCOM(interp,"u_get_units",Asc_UnitGetUnits,
1802     "units",
1803     NULL,
1804     NULL,
1805     NULL
1806     /* the stuff above should be replaced with header macros. */
1807     );
1808    
1809     ASCADDCOM(interp,"u_set_user",Asc_UnitSetUser,
1810     "units",
1811     NULL,
1812     NULL,
1813     NULL
1814     /* the stuff above should be replaced with header macros. */
1815     );
1816    
1817     ASCADDCOM(interp,"u_get_user",Asc_UnitGetUser,
1818     "units",
1819     NULL,
1820     NULL,
1821     NULL
1822     /* the stuff above should be replaced with header macros. */
1823     );
1824    
1825     ASCADDCOM(interp,"u_get_list",Asc_UnitGetList,
1826     "units",
1827     NULL,
1828     NULL,
1829     NULL
1830     /* the stuff above should be replaced with header macros. */
1831     );
1832    
1833     ASCADDCOM(interp,"u_clear_user",Asc_UnitClearUser,
1834     "units",
1835     NULL,
1836     NULL,
1837     NULL
1838     /* the stuff above should be replaced with header macros. */
1839     );
1840    
1841     ASCADDCOM(interp,"u_getval",Asc_UnitGetVal,
1842     "units",
1843     NULL,
1844     NULL,
1845     NULL
1846     /* the stuff above should be replaced with header macros. */
1847     );
1848    
1849     ASCADDCOM(interp,"u_browgetval",Asc_UnitBrowGetVal,
1850     "units",
1851     NULL,
1852     NULL,
1853     NULL
1854     /* the stuff above should be replaced with header macros. */
1855     );
1856    
1857     ASCADDCOM(interp,"u_slvgetrelval",Asc_UnitSlvGetRelVal,
1858     "units",
1859     NULL,
1860     NULL,
1861     NULL
1862     /* the stuff above should be replaced with header macros. */
1863     );
1864    
1865     ASCADDCOM(interp,"u_slvgetvarval",Asc_UnitSlvGetVarVal,
1866     "units",
1867     NULL,
1868     NULL,
1869     NULL
1870     /* the stuff above should be replaced with header macros. */
1871     );
1872    
1873     ASCADDCOM(interp,"u_slvgetobjval",Asc_UnitSlvGetObjVal,
1874     "units",
1875     NULL,
1876     NULL,
1877     NULL
1878     /* the stuff above should be replaced with header macros. */
1879     );
1880    
1881     ASCADDCOM(interp,"uhelp",Asc_UnitHelpList,
1882     "units",
1883     NULL,
1884     "uhelp -- give tcl/[s]hort/[l]ong units primitives list.",
1885     NULL
1886     /* the stuff above should be replaced with header macros. */
1887     );
1888    
1889     /*Script callbacks */
1890     ASCADDCOM(interp,"srefine", Asc_ScriptRefineCmd,
1891     "scripting",
1892     NULL,
1893     "srefine -- refine qlfdid to type given",
1894     NULL
1895     /* the stuff above should be replaced with header macros. */
1896     );
1897    
1898     ASCADDCOM(interp,"smerge", Asc_ScriptMergeCmd,
1899     "scripting",
1900     NULL,
1901     "smerge -- merge 2 qlfdids",
1902     NULL
1903     /* the stuff above should be replaced with header macros. */
1904     );
1905    
1906     /* Auxiliaries and Window Management */
1907     ASCADDCOM(interp,"ascloadwin",Asc_LoadWin,
1908     "miscellaneous",
1909     NULL,
1910     NULL,
1911     NULL
1912     /* the stuff above should be replaced with header macros. */
1913     );
1914    
1915     ASCADDCOM(interp,"gnutext",Asc_GNUTextCmd,
1916     "miscellaneous",
1917     NULL,
1918     "gnutext -- give compiler license [l] or warranty [w]",
1919     NULL
1920     /* the stuff above should be replaced with header macros. */
1921     );
1922    
1923    
1924     #if REIMPLEMENT
1925     Tcl_CreateCommand(interp,"dbg_write_kirk_xsys",Asc_DebuWriteKirkSystem,
1926     (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
1927     Tcl_CreateCommand(interp,"dbg_write_gams_xsys",Asc_DebuWriteGAMSSystem,
1928     (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
1929     #endif
1930     #if REIMPLEMENT
1931     /* code generation commands */
1932     Tcl_CreateCommand(interp,"__codegen_parsedata",Asc_CodeGenParseDataCmd,
1933     (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
1934     Tcl_CreateCommand(interp,"__codegen_general",Asc_CodeGenGeneralCmd,
1935     (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
1936     Tcl_CreateCommand(interp,"__codegen_c",Asc_CodeGenCCmd,
1937     (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
1938     Tcl_CreateCommand(interp,"__codegen_gams",Asc_CodeGenGamsCmd,
1939     (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
1940     Tcl_CreateCommand(interp,"__codegen_write",Asc_CodeGenWriteCmd,
1941     (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
1942     Tcl_CreateCommand(interp,"__codegen_read",Asc_CodeGenReadCmd,
1943     (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
1944     #endif
1945     /* some experimental stuff */
1946     #if REIMPLEMENT
1947     Tcl_CreateCommand(interp,"__codegen_types",Asc_CodeGenTypesCmd,
1948     (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
1949     #endif
1950     /* Dag Routines */
1951     #if KILLBDAG
1952     Tcl_CreateCommand(interp,"__brow_tree_list", Asc_BrowTreeListCmd,
1953     (ClientData) NULL,(Tcl_CmdDeleteProc *) NULL);
1954    
1955     Tcl_CreateCommand(interp,"__dag_write_instdag", Asc_DagWriteInstDagCmd,
1956     (ClientData) NULL,(Tcl_CmdDeleteProc *) NULL);
1957     Tcl_CreateCommand(interp,"__dag_write_modeldag", Asc_DagWriteModelDagCmd,
1958     (ClientData) NULL,(Tcl_CmdDeleteProc *) NULL);
1959     Tcl_CreateCommand(interp,"__dag_partition", Asc_DagPartitionCmd,
1960     (ClientData) NULL,(Tcl_CmdDeleteProc *) NULL);
1961     Tcl_CreateCommand(interp,"__dag_countrelns", Asc_DagCountRelnsCmd,
1962     (ClientData) NULL,(Tcl_CmdDeleteProc *) NULL);
1963    
1964     Tcl_CreateCommand(interp,"__dag_coupling_relns", Asc_DagCouplingRelnsCmd,
1965     (ClientData) NULL,(Tcl_CmdDeleteProc *) NULL);
1966     Tcl_CreateCommand(interp,"__dag_model_relns", Asc_DagModelRelnsCmd,
1967     (ClientData) NULL,(Tcl_CmdDeleteProc *) NULL);
1968    
1969     Tcl_CreateCommand(interp,"__dag_build", Asc_DagBuildDagCmd,
1970     (ClientData) NULL,(Tcl_CmdDeleteProc *) NULL);
1971     Tcl_CreateCommand(interp,"__dag_prepare", Asc_DagPrepareCmd,
1972     (ClientData) NULL,(Tcl_CmdDeleteProc *) NULL);
1973     Tcl_CreateCommand(interp,"__dag_shutdown", Asc_DagShutdownCmd,
1974     (ClientData) NULL,(Tcl_CmdDeleteProc *) NULL);
1975     #endif /* killbdag */
1976     #ifdef DEBUG_MALLOC
1977     /* See GUIinit.[ch] for definition of Asc_DebugMallocCmd */
1978     Tcl_CreateCommand(interp,"__dbmalloc",Asc_DebugMallocCmd,
1979     (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
1980     #endif
1981    
1982     #ifdef BALLAN /* testing crap not checked in */
1983    
1984     ASCADDCOM(interp, Asc_LibrAnonTypesCmdHN, Asc_LibrAnonTypesCmd,
1985     "library", Asc_LibrAnonTypesCmdHU, Asc_LibrAnonTypesCmdHS,
1986     Asc_LibrAnonTypesCmdHLF);
1987    
1988     ASCADDCOM(interp, Asc_DotCmdHN, Asc_DotCmd, "browser",
1989     Asc_DotCmdHU, Asc_DotCmdHS, Asc_DotCmdHLF);
1990    
1991     #endif /* ballan */
1992    
1993     }
1994    

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22