/[ascend]/trunk/base/generic/compiler/procio.h
ViewVC logotype

Contents of /trunk/base/generic/compiler/procio.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 54 - (show annotations) (download) (as text)
Tue Aug 2 11:20:09 2005 UTC (19 years, 4 months ago) by jds
File MIME type: text/x-chdr
File size: 4839 byte(s)
Manual rework of doxygen comments in all headers.
- Added @file comment to all headers.
- Added parameter names to all function declarations in headers.
- Corrected comment referencing where necessary.
- Split some comments which documented blocks of declarations.
- Converted notes about required work into @todo comments so doxygen can generate a todo list.
Minor bug fixes.
1 /*
2 * Procedure Output
3 * by Benjamin Allan
4 * Created: 3/12/98
5 * Version: $Revision: 1.6 $
6 * Version control file: $RCSfile: procio.h,v $
7 * Date last modified: $Date: 1998/03/17 22:09:21 $
8 * Last modified by: $Author: ballan $
9 *
10 * This file is part of the Ascend Language Interpreter.
11 *
12 * Copyright (C) 1998 Carnegie Mellon University
13 *
14 * The Ascend Language Interpreter 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 Language Interpreter 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 along
25 * with the program; if not, write to the Free Software Foundation, Inc., 675
26 * Mass Ave, Cambridge, MA 02139 USA. Check the file named COPYING.
27 */
28
29 /** @file
30 * Procedure Output.
31 * <pre>
32 * When #including procio.h, make sure these files are #included first:
33 * #include <stdio.h>
34 * #include "utilities/ascConfig.h"
35 * #include "compiler.h"
36 * #include "proc.h"
37 * </pre>
38 */
39
40 #ifndef __PROCIO_H_SEEN__
41 #define __PROCIO_H_SEEN__
42
43 /** Codes for old-style external call messaging. */
44 enum ProcExtError {
45 PE_unloaded,
46 PE_nulleval,
47 PE_argswrong,
48 PE_badarg,
49 PE_evalerr
50 };
51
52 /** METHODs equivalent of WSEM. Should go away soon. */
53 extern void WriteInitWarn(struct procFrame *fm, char *str);
54 /** METHODs equivalent of WSEM. Should go away soon. */
55 extern void WriteInitErr(struct procFrame *fm, char *str);
56
57 /* error message services */
58
59 /**
60 * <!-- ProcWriteCaseError(fm,arm,pos); -->
61 * Write error encountered while evaluating SWITCH.
62 * arm gives the number of the case in question. pos
63 * gives the position of the error in the var list.
64 */
65 extern void ProcWriteCaseError(struct procFrame *fm, int arm, int pos);
66
67 /**
68 * <!-- ProcWriteForError(fm); -->
69 * Write error encountered while evaluating FOR/DO.
70 */
71 extern void ProcWriteForError(struct procFrame *fm);
72
73 /**
74 * <!-- ProcWriteAssignmentError(fm); -->
75 * Write error encountered while evaluating := assignment.
76 */
77 extern void ProcWriteAssignmentError(struct procFrame *fm);
78
79 /**
80 * <!-- ProcWriteIfError(fm,cname); -->
81 * Write error encountered while evaluating boolean flow control.
82 * cname is normally "IF" or "WHILE".
83 */
84 extern void ProcWriteIfError(struct procFrame *fm, CONST char *cname);
85
86 /**
87 * <!-- ProcWriteRunError(fm); -->
88 * Write error encountered while evaluating RUN arguments.
89 */
90 extern void ProcWriteRunError(struct procFrame *fm);
91
92 /**
93 * <!-- ProcWriteExtError(fm,funcname,err,pos); -->
94 * Write error encountered while evaluating Ext arguments.
95 */
96 extern void ProcWriteExtError(struct procFrame *fm,
97 CONST char *funcmane,
98 enum ProcExtError err,
99 int pos);
100
101 /* backtrace output functions. */
102
103 /**
104 * Issue a message if we blew the stack limit or are
105 * unwinding the stack.
106 */
107 extern void ProcWriteStackCheck(struct procFrame *fm,
108 struct Name *class,
109 struct Name *name);
110
111 /**
112 * <!-- WriteProcedureBlock(fp,initstack,str); -->
113 * Writes a line to file fp. Write format resembles:
114 * ("%s %s in %s\n",str,stack->last->proc,stack->last->context)
115 * For example:
116 * <pre>
117 * WriteProcedureBlock(ASCERR,stack,"Entering ");
118 * --> "Entering METHOD myproc in mysim.myinstance[3]"
119 * </pre>
120 * str may be empty or NULL.
121 * The format is subject to change as this feature is in development.
122 */
123 extern void WriteProcedureBlock(FILE *fp,
124 struct gl_list_t *initstack,
125 CONST char *str);
126
127 /**
128 * <!-- WriteProcedureLine(fp,initstack,str); -->
129 * Writes a line to file fp. Write format resembles:
130 * ("%s %d: %s in %s\n",str,line,proc,context)
131 * For example:
132 * <pre>
133 * WriteProcedureLine(ASCERR,initstack,"Executing line ");
134 * --> "Executing line 137 of myprocname in mysim.myinstance[3]"
135 * </pre>
136 * The format is subject to change as this feature is in development.
137 */
138 extern void WriteProcedureLine(FILE *fp,
139 struct gl_list_t *initstack,
140 CONST char *str);
141
142 #endif /* __PROCIO_H_SEEN__ */
143

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