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

Contents of /trunk/tcltk98/generic/interface/LibraryProc.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: 14787 byte(s)
Standardised the "if seen" #defines to [ASC|ASCTK|ASCPY|ASCXX]_FILENAME_H
Fixed compile on FC3
1 /*
2 * LibraryProc.h
3 * by Kirk Abbott and Ben Allan
4 * Created: 1/94
5 * Version: $Revision: 1.22 $
6 * Version control file: $RCSfile: LibraryProc.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 * Ascend Library Procedures.
32 * <pre>
33 * To include this header, you must include the following:
34 * #include <stdio.h>
35 * #include "tcl.h"
36 * #include "utilities/ascConfig.h"
37 * #include "interface/LibraryProc.h"
38 * </pre>
39 */
40
41 #ifndef ASCTK_LIBRARYPROC_H
42 #define ASCTK_LIBRARYPROC_H
43
44 extern int Asc_FileIDCopy(FILE *filein, FILE *fileout);
45 /**<
46 * <!-- int Asc_FileIDCopy -->
47 * <!-- FILE *filein; -->
48 * <!-- FILE *fileout; -->
49 * Copies the input from a file with specified file id to the other.
50 * It is the responsibility of the user to ensure that the files are
51 * open and writable.
52 */
53
54 STDHLF_H(Asc_LibrParseCmd);
55 extern int Asc_LibrParseCmd(ClientData cdata, Tcl_Interp *interp,
56 int argc, CONST84 char**argv);
57 /** Registered as */
58 #define Asc_LibrParseCmdHN "libr_parsestring"
59 /** Usage */
60 #define Asc_LibrParseCmdHU \
61 Asc_LibrParseCmdHN " <ascend code>"
62 /** Short help text */
63 #define Asc_LibrParseCmdHS \
64 "Opens and parses ascend code, a string containing ASCEND statements"
65 /** Long help text */
66 #define Asc_LibrParseCmdHL "\
67 * Opens and parses a string. If the open is successful,\n\
68 * the name of the module is returned, otherwise an error is reported.\n\
69 * it is impossible to detect if there were parse errors from the exit\n\
70 * status of this command, though this may be fixed in the future.\n\
71 "
72
73 STDHLF_H(Asc_LibrReadCmd);
74 extern int Asc_LibrReadCmd(ClientData, Tcl_Interp*, int, CONST84 char**);
75 /** Registered as */
76 #define Asc_LibrReadCmdHN "librread"
77 /** Usage */
78 #define Asc_LibrReadCmdHU \
79 Asc_LibrReadCmdHN " <filename> [parse_relations]"
80 /** Short help text */
81 #define Asc_LibrReadCmdHS \
82 "Opens and parses filename, a file containing ASCEND type definitions"
83 /** Long help text */
84 #define Asc_LibrReadCmdHL "\
85 * Opens and parses filename; relations will be parsed unless the\n\
86 * optional argument parse_relations is zero. If the open is successful,\n\
87 * the name of the module is returned, otherwise an error is reported.\n\
88 * it is impossible to detect if there were parse errors from the exit\n\
89 * status of this command.\n\
90 "
91
92 STDHLF_H(Asc_LibrOptionsCmd);
93 extern int Asc_LibrOptionsCmd(ClientData, Tcl_Interp*, int, CONST84 char**);
94 /** Registered as */
95 #define Asc_LibrOptionsCmdHN "asc_compiler_option"
96 /** Usage */
97 #define Asc_LibrOptionsCmdHU \
98 Asc_LibrOptionsCmdHN " [-<option> [value]]"
99 /** Short help text */
100 #define Asc_LibrOptionsCmdHS \
101 "gets and sets global options for parsing and compiling"
102 /** Long help text */
103 #define Asc_LibrOptionsCmdHL "\
104 * If given no arguments, returns list of current options.\n\
105 * Given an option and value, sets the option accordingly.\n\
106 * Given just the option name, returns the value.\n\
107 * Processes specific options one at a time only.\n\
108 * Options are:\n\
109 * parserWarnings: values > 1 suppress increasingly bad parser messages\n\
110 * compilerWarnings: 0 (do not), >0 (do) issue instantiation warnings\n\
111 * simplifyRelations: 0 (do not), 1 (do) do trivial simplifications\n\
112 * useCopyAnon: 0 (do not), 1 (do) share relations automatically\n\
113 "
114
115 STDHLF_H(Asc_LibrTypeListCmd);
116 extern int Asc_LibrTypeListCmd(ClientData, Tcl_Interp*, int, CONST84 char**);
117 /** Registered as */
118 #define Asc_LibrTypeListCmdHN "libr_types_in_module"
119 /** Usage */
120 #define Asc_LibrTypeListCmdHU \
121 Asc_LibrTypeListCmdHN " <module>"
122 /** Short help text */
123 #define Asc_LibrTypeListCmdHS \
124 "Returns a list of types defined in the module named \"module\""
125 /** Long help text */
126 #define Asc_LibrTypeListCmdHL "\
127 * Returns a list of types defined in the module named \"module\"\n\
128 "
129
130 STDHLF_H(Asc_LibrModuleInfoCmd);
131 extern int Asc_LibrModuleInfoCmd(ClientData, Tcl_Interp*, int, CONST84 char**);
132 /** Registered as */
133 #define Asc_LibrModuleInfoCmdHN "libr_moduleinfo"
134 /** Usage */
135 #define Asc_LibrModuleInfoCmdHU \
136 Asc_LibrModuleInfoCmdHN " <module> [<module>...]"
137 /** Short help text */
138 #define Asc_LibrModuleInfoCmdHS \
139 "For each module, returns name, file or buffer, time or index, {} or string"
140 /** Long help text */
141 #define Asc_LibrModuleInfoCmdHL "\
142 * For each file module, returns the name, filename, time modified and {}.\n\
143 * For each string module, returns the name, name, string parse index, and\n\
144 * string parsed.\n\
145 "
146
147 STDHLF_H(Asc_LibrDestroyTypesCmd);
148 extern int Asc_LibrDestroyTypesCmd(ClientData, Tcl_Interp*, int, CONST84 char**);
149 /** Registered as */
150 #define Asc_LibrDestroyTypesCmdHN "libr_destroy_types"
151 /** Usage */
152 #define Asc_LibrDestroyTypesCmdHU \
153 Asc_LibrDestroyTypesCmdHN " takes no arguments"
154 /** Short help text */
155 #define Asc_LibrDestroyTypesCmdHS \
156 "Reinitializes all base types and the module list"
157 /** Long help text */
158 #define Asc_LibrDestroyTypesCmdHL "\
159 * calls DestroyLibrary from the compiler, redefines basetypes,\n\
160 * and reinitializes interface module list.\n\
161 * Empties prototype library.\n\
162 "
163
164 extern int Asc_GNUTextCmd(ClientData cdata, Tcl_Interp *interp,
165 int argc, CONST84 char**argv);
166 /**<
167 * <!-- Asc_GNUTextCmd -->
168 * gnutext [l,w] returns the string requested from
169 * Tom's license.c. defaults to warranty<br><br>
170 *
171 * Registered as: gnutext
172 */
173
174 STDHLF_H(Asc_LibrHideTypeCmd);
175 extern int Asc_LibrHideTypeCmd(ClientData, Tcl_Interp*, int, CONST84 char**);
176 /** Registered as */
177 #define Asc_LibrHideTypeCmdHN "libr_hide_type"
178 /** Usage */
179 #define Asc_LibrHideTypeCmdHU \
180 Asc_LibrHideTypeCmdHN " <type> [part]"
181 /** Short help text */
182 #define Asc_LibrHideTypeCmdHS \
183 "Causes the instances of type not to be shown when browsing"
184 /** Long help text */
185 #define Asc_LibrHideTypeCmdHL "\
186 * Will set to FALSE the bit TYPESHOW of the Type Description type.\n\
187 * This will cause that the instances of type will not be shown for\n\
188 * browsing purposes.\n\
189 * If part is given, the part named will be hidden when browsing objects\n\
190 * the type given. The part name must be simple, that is no [] or . are\n\
191 * allowed. Parts of arrays cannot be hidden by subscript.\n\
192 "
193
194 STDHLF_H(Asc_LibrUnHideTypeCmd);
195 extern int Asc_LibrUnHideTypeCmd(ClientData, Tcl_Interp*, int, CONST84 char**);
196 /** Registered as */
197 #define Asc_LibrUnHideTypeCmdHN "libr_unhide_type"
198 /** Usage */
199 #define Asc_LibrUnHideTypeCmdHU \
200 Asc_LibrUnHideTypeCmdHN " <type> [part]"
201 /** Short help text */
202 #define Asc_LibrUnHideTypeCmdHS \
203 "Causes the instances of type to be shown when browsing"
204 /** Long help text */
205 #define Asc_LibrUnHideTypeCmdHL "\
206 * Will set to TRUE the bit TYPESHOW of the Type Description type.\n\
207 * This will cause that the instances of type will be shown for\n\
208 * browsing purposes.\n\
209 * If part is given, the part named will be shown when browsing objects\n\
210 * the type given.\n\
211 "
212
213 STDHLF_H(Asc_LibrTypeIsShownCmd);
214 extern int Asc_LibrTypeIsShownCmd(ClientData, Tcl_Interp*, int, CONST84 char**);
215 /** Registered as */
216 #define Asc_LibrTypeIsShownCmdHN "libr_type_is_shown"
217 /** Usage */
218 #define Asc_LibrTypeIsShownCmdHU \
219 Asc_LibrTypeIsShownCmdHN " <type>"
220 /** Short help text */
221 #define Asc_LibrTypeIsShownCmdHS \
222 "Returns 1 if type is being shown, or 0 if not."
223 /** Long help text */
224 #define Asc_LibrTypeIsShownCmdHL "\
225 * Returns 1 is the TYPESHOWN bit of a type description is ON. 0 if is\n\
226 * OFF. Query required for updating the Library Display Buttons.\n\
227 "
228
229 STDHLF_H(Asc_LibrQueryTypeCmd);
230 extern int Asc_LibrQueryTypeCmd(ClientData, Tcl_Interp*, int, CONST84 char**);
231 /** Registered as */
232 #define Asc_LibrQueryTypeCmdHN "libr_query"
233 /** Usage */
234 #define Asc_LibrQueryTypeCmdHU \
235 Asc_LibrQueryTypeCmdHN " -H for more details."
236 /** Short help text */
237 #define Asc_LibrQueryTypeCmdHS \
238 "Returns list of all children of type or info on child or info on info"
239 /** Long help text part 1 */
240 #define Asc_LibrQueryTypeCmdHL1 "\
241 * Should be expanded to handle many other queries and eliminate\n\
242 * most of the libr_ functions. Some of the following are unimplemented\n\
243 "
244 /** Long help text part 10 */
245 #define Asc_LibrQueryTypeCmdHL10 "\
246 * -ancestors -type typename\n\
247 * Returns the names of types that type REFINES from most to least.\n\
248 "
249 /** Long help text part 20 */
250 #define Asc_LibrQueryTypeCmdHL20 "\
251 * -basemethods\n\
252 * Returns the names of methods defined on DEFINITION MODEL.\n\
253 "
254 /** Long help text part 30 */
255 #define Asc_LibrQueryTypeCmdHL30 "\
256 * -catalog\n\
257 * Returns list of all formal types ATOMic and MODEL.\n\
258 "
259 /** Long help text part 40 */
260 #define Asc_LibrQueryTypeCmdHL40 "\
261 * -childnames -type typename\n\
262 * Returns list of children of type.\n\
263 "
264 /** Long help text part 50 */
265 #define Asc_LibrQueryTypeCmdHL50 "\
266 * -childinfo [-type typename [-child childname]]\n\
267 * Returns metasyntactic info if type nor child given.\n\
268 * Returns info for all children if type given but childname omitted.\n\
269 * Returns info for childname if type and child given.\n\
270 "
271 /** Long help text part 60 */
272 #define Asc_LibrQueryTypeCmdHL60 "\
273 * -definition -type typename [-method methodname]\n\
274 * Returns definition of type in standard string form,unless\n\
275 * methodname is given, in which case just gives method.\n\
276 "
277 /** Long help text part 70 */
278 #define Asc_LibrQueryTypeCmdHL70 "\
279 * -exists -type typename\n\
280 * Returns 1 if typename exists, or 0 if not.\n\
281 "
282 /** Long help text part 80 */
283 #define Asc_LibrQueryTypeCmdHL80 "\
284 * -externalfunctions\n\
285 * Returns list of all external functions loaded.\n\
286 "
287 /** Long help text part 85 */
288 #define Asc_LibrQueryTypeCmdHL85 "\
289 * -findtype -type typename\n\
290 * Returns the module defining type.\n\
291 "
292 /** Long help text part 90 */
293 #define Asc_LibrQueryTypeCmdHL90 "\
294 * -filetypes\n\
295 * Returns list of expected ASCEND source code filename suffixes.\n\
296 * Extensions other than these are probably not ascend MODEL/ATOM/unit\n\
297 * code. The compiler will dutifully attempt to eat any file of any\n\
298 * name; it is not restricted to any particular extension, or lack of\n\
299 * extension.\n\
300 "
301 /** Long help text part 100 */
302 #define Asc_LibrQueryTypeCmdHL100 "\
303 * -fundamentals\n\
304 * Returns a list containing the names of the fundamental types.\n\
305 "
306 /** Long help text part 110 */
307 #define Asc_LibrQueryTypeCmdHL110 "\
308 * -language -type typename [-child childname] [-method methodname]\n\
309 * Returns languages of NOTES on typename if no option other than -type\n\
310 * Returns languages of NOTES on childname if given.\n\
311 * Returns languages of NOTES on methodname if given.\n\
312 "
313 /** Long help text part 115 */
314 #define Asc_LibrQueryTypeCmdHL115 "\
315 * -methods -type typename\n\
316 * Returns a list containing the names of the methods on type given.\n\
317 "
318 /** Long help text part 120 */
319 #define Asc_LibrQueryTypeCmdHL120 "\
320 * -modulelist -mtype mt\n\
321 * Returns a list of modules that have types defined if mt == 0\n\
322 * Returns a list of interactive modules if mt == 1\n\
323 * Returns a list of interactive modules with global statements if mt == 2\n\
324 "
325 /** Long help text part 130 */
326 #define Asc_LibrQueryTypeCmdHL130 "\
327 * -notes -dbid $db -record $noteid\n\
328 * Returns data of noteid given, if it is a known record of db.\n\
329 * Data is a tuple {type language child method text}.\n\
330 "
331 /** Long help text part 131 */
332 #define Asc_LibrQueryTypeCmdHL131 "\
333 * -notesdblist\n\
334 * Returns known dbids in a list.\n\
335 "
336 /** Long help text part 132 */
337 #define Asc_LibrQueryTypeCmdHL132 "\
338 * -notes -dbid db -type typename -language keyword \n\
339 * [-child childname] [-method methodname]\n\
340 * Returns token to notes on typename in language keyword\n\
341 * if no modifiers given,\n\
342 * or on childname in type if childname given,\n\
343 * or on methodname in type if methodname given, etc.\n\
344 * The returned token should be destroyed when done with it by\n\
345 "
346 /** Long help text part 133 */
347 #define Asc_LibrQueryTypeCmdHL133 "\
348 * -notes -dbid $db -destroytoken $token\n\
349 * If you forget, destroytoken will be done automagically when\n\
350 * next you delete all types in the library or exit.\n\
351 "
352 /** Long help text part 135 */
353 #define Asc_LibrQueryTypeCmdHL135 "\
354 * -notesdump -dbid db [-textwidth n] [-notestoken token]\n\
355 * Returns the list of all notes, with texts abbreviated,\n\
356 * unless -notestoken $token given in which case returns just those.\n\
357 * If a string is empty in some field, it becomes ~\n\
358 * If n < 5, n=5 is assumed. If n not specified, n = 15.\n\
359 * List is a tuple of identically sorted lists:\n\
360 * {types} {langs} {names} {methods} {textabbrs} {filelines} {recnums}\n\
361 "
362 /** Long help text part 136 */
363 #define Asc_LibrQueryTypeCmdHL136 "\
364 * -notekinds -dbid db\n\
365 * Returns the list of languages known in the database.\n\
366 "
367 /** Long help text part 137 */
368 #define Asc_LibrQueryTypeCmdHL137 "\
369 * -notesmatch -dbid -db -pattern string [-notestoken token]\n\
370 * Returns token to the list of notes with text matching string.\n\
371 * If notestoken is not given, searches whole database, else searches\n\
372 * just those notes in the token.\n\
373 "
374 /** Long help text part 140 */
375 #define Asc_LibrQueryTypeCmdHL140 "\
376 * -roottypes\n\
377 * Returns a list of all types (base or otherwise) that are not\n\
378 * refinements of other types. These may be the roots of hierarchies.\n\
379 "
380
381 #endif /* ASCTK_LIBRARYPROC_H */
382

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