/[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 67 - (show annotations) (download) (as text)
Wed Nov 30 16:31:29 2005 UTC (16 years, 5 months ago) by johnpye
File MIME type: text/x-chdr
File size: 4941 byte(s)
Standardised the "if seen" #defines to [ASC|ASCTK|ASCPY|ASCXX]_FILENAME_H
Fixed compile on FC3
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 /** @file
31 * Script procedures.
32 * <pre>
33 * Requires: #include "tcl.h"
34 * #include "utilities/ascConfig.h"
35 * </pre>
36 */
37
38 #ifndef ASCTK_SCRIPTPROC_H
39 #define ASCTK_SCRIPTPROC_H
40
41 extern int Asc_ScriptInterrupt;
42 /**<
43 * The C variable corresponding to the script being interrupted
44 * by an interactive user or call with a trapped exception.
45 */
46
47 extern int Asc_ScriptConfigureInterrupt(int bool, Tcl_Interp *interp);
48 /**<
49 * <!-- err = Asc_ScriptConfigureInterrupt(bool,interp); -->
50 * <!-- int err,bool; -->
51 * Configures the script variable ascScripVect(menubreak) to
52 * shadow the C int Asc_ScriptInterrupt.
53 * Tcl makes sure changes to ascScripVect(menubreak)
54 * are reflected in the C variable.
55 * See the man pages of Tcl_LinkVar, Tcl_UnlinkVar, Tcl_UpdateLinkedVar
56 * for details.
57 *
58 * @param interp The interpretter the ascend application is running in.
59 * @param bool Is 1 at startup and 0 at shutdown.
60 * @return Returns 0 if the call is ok, 1 if the call is not ok.
61 */
62
63 extern int Asc_ScriptEvalCmd(ClientData cdata, Tcl_Interp *interp,
64 int argc, CONST84 char *argv[]);
65 /**<
66 * <!-- int Asc_ScriptEvalCmd; -->
67 * Attempts to evaluate in the global sphere rather than locally.<br><br>
68 *
69 * Registered as : \"script_eval\" string";
70 */
71
72 extern int Asc_ScriptRefineCmd(ClientData cdata, Tcl_Interp *interp,
73 int argc, CONST84 char *argv[]);
74 /**<
75 * Refines the qlfdid given to type if possible. if qlfdid exists and
76 * is none null, return will be as Asc_BrowInstanceRefineCmd().<br><br>
77 *
78 * Registered as: srefine <type> search <qlfdid>
79 */
80
81 extern int Asc_ScriptMergeCmd(ClientData cdata, Tcl_Interp *interp,
82 int argc, CONST84 char *argv[]);
83 /**<
84 * Merges the qlfdid if possible.<br><br>
85 *
86 * Registered as: smerge <qlfdid> <qlfdid>
87 */
88
89 extern int Asc_FastRaiseCmd(ClientData cdata, Tcl_Interp *interp,
90 int argc, CONST84 char *argv[]);
91 /**<
92 * Calls XRaiseWindow rather than the big tk spew which is so slow.<br><br>
93 *
94 * Registered as: asc_raise windowname
95 */
96
97 STDHLF_H(Asc_TimeCmd);
98
99 extern int Asc_TimeCmd(ClientData cdata, Tcl_Interp *interp,
100 int argc, CONST84 char *argv[]);
101 /**<
102 * Timing function.
103 * string is a valid tcl script to be evaluated globally as script_eval.
104 * n is the number of times to evaluate the script for an average time.
105 * n defaults to 1 since many ASCEND scripts are not repeatable.<br><br>
106 *
107 * Registered as: asc_clock <string> [n]
108 */
109
110 /** Long help text part 1 */
111 #define Asc_TimeCmdHL1 \
112 "\
113 * Returns a list of numbers: \n\
114 * {real_time_avg time_avg clock_avg clock_max clock_min CPS} \n\
115 * real_time_avg- average real seconds consumed per evaluation of string. \n\
116 * time_avg- average cpu seconds consumed per evaluation of string. \n\
117 "
118 /** Long help text part 2 */
119 #define Asc_TimeCmdHL2 \
120 "\
121 * clock_avg- average clock units consumed per evaluation of string. \n\
122 * clock_max- most clock units consumed by a single call \n\
123 * clock_min- least clock units consumed by a single call \n\
124 * CPS- CLOCKS_PER_SEC value by which times are computed from clocks. \n\
125 "
126
127 extern int Asc_StringCompact(ClientData cdata, Tcl_Interp *interp,
128 int argc, CONST84 char *argv[]);
129 /**<
130 * Takes a string and eats away any extra blanks or tabs that are
131 * not protected by matched {}. replaces unprotected tabs with a
132 * single space. trims leading/trailing blanks/tabs. Doesn't
133 * treat \n as a special character.<br><br>
134 *
135 * Registered as: stringcompact <string>
136 */
137
138 #endif /* ASCTK_SCRIPTPROC_H */
139

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