/[ascend]/trunk/tcltk98/generic/interface/ScriptProc.h
ViewVC logotype

Contents of /trunk/tcltk98/generic/interface/ScriptProc.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations) (download) (as text)
Fri Oct 29 20:54:12 2004 UTC (17 years, 7 months ago) by aw0a
Original Path: trunk/ascend4/interface/ScriptProc.h
File MIME type: text/x-chdr
File size: 4464 byte(s)
Setting up web subdirectory in repository
1 /*
2 * ScriptProc.h
3 * by Kirk Abbott and Ben Allan
4 * Created: 1/94
5 * Version: $Revision: 1.9 $
6 * Version control file: $RCSfile: ScriptProc.h,v $
7 * Date last modified: $Date: 2003/08/23 18:43:07 $
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 #ifndef ScriptProc_module_loaded
31 #define ScriptProc_module_loaded
32
33 extern int Asc_ScriptInterrupt;
34 /* The C variable corresponding to the script being interrupted
35 * by an interactive user or call with a trapped exception.
36 */
37
38 extern int Asc_ScriptConfigureInterrupt(int, Tcl_Interp *interp);
39 /*
40 * err = Asc_ScriptConfigureInterrupt(bool,interp);
41 * int err,bool;
42 * interp is the interpretter the ascend application is running in.
43 * err is 0 if the call is ok, err is 1 if the call is not ok.
44 * bool is 1 at startup and 0 at shutdown.
45 * Configures the script variable ascScripVect(menubreak) to
46 * shadow the C int Asc_ScriptInterrupt.
47 * Tcl makes sure changes to ascScripVect(menubreak)
48 * are reflected in the C variable.
49 * See the man pages of Tcl_LinkVar, Tcl_UnlinkVar, Tcl_UpdateLinkedVar
50 * for details.
51 */
52
53 extern int Asc_ScriptEvalCmd(ClientData cdata, Tcl_Interp *interp,
54 int argc, CONST84 char *argv[]);
55 /*
56 * int Asc_ScriptEvalCmd;
57 * Comments :
58 * Registered as : \"script_eval\" string";
59 * Attempts to evaluate in the global spher rather than locally.
60 */
61
62 extern int Asc_ScriptRefineCmd(ClientData cdata, Tcl_Interp *interp,
63 int argc, CONST84 char *argv[]);
64 /*
65 * syntax: srefine <type> search <qlfdid>
66 * refines the qlfdid given to type if possible. if qlfdid exists and
67 * is none null, return will be as Asc_BrowInstanceRefineCmd.
68 */
69
70 extern int Asc_ScriptMergeCmd(ClientData cdata, Tcl_Interp *interp,
71 int argc, CONST84 char *argv[]);
72 /*
73 * syntax: smerge <qlfdid> <qlfdid>
74 * merges the qlfdid if possible.
75 */
76
77 extern int Asc_FastRaiseCmd(ClientData cdata, Tcl_Interp *interp,
78 int argc, CONST84 char *argv[]);
79 /*
80 * asc_raise windowname
81 * calls XRaiseWindow rather than the big tk spew which is so slow.
82 */
83
84 STDHLF_H(Asc_TimeCmd);
85
86 extern int Asc_TimeCmd(ClientData cdata, Tcl_Interp *interp,
87 int argc, CONST84 char *argv[]);
88 /*
89 * usage:
90 * asc_clock <string> [n]
91 * string is a valid tcl script to be evaluated globally as script_eval.
92 * n is the number of times to evaluate the script for an average time.
93 * n defaults to 1 since many ASCEND scripts are not repeatable.
94 */
95 #define Asc_TimeCmdHL1 \
96 "\
97 * Returns a list of numbers: \n\
98 * {real_time_avg time_avg clock_avg clock_max clock_min CPS} \n\
99 * real_time_avg- average real seconds consumed per evaluation of string. \n\
100 * time_avg- average cpu seconds consumed per evaluation of string. \n\
101 "
102 #define Asc_TimeCmdHL2 \
103 "\
104 * clock_avg- average clock units consumed per evaluation of string. \n\
105 * clock_max- most clock units consumed by a single call \n\
106 * clock_min- least clock units consumed by a single call \n\
107 * CPS- CLOCKS_PER_SEC value by which times are computed from clocks. \n\
108 "
109 /*
110 */
111
112 extern int Asc_StringCompact(ClientData cdata, Tcl_Interp *interp,
113 int argc, CONST84 char *argv[]);
114 /*
115 * stringcompact <string>
116 * Takes a string and eats away any extra blanks or tabs that are
117 * not protected by matched {}. replaces unprotected tabs with a
118 * single space. trims leading/trailing blanks/tabs. Doesn't
119 * treat \n as a special character.
120 */
121
122
123 #endif /* ScriptProc_module_loaded */

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