1 |
/* |
/** |
2 |
* Procedure Output |
* Procedure Output |
3 |
* by Benjamin Allan |
* by Benjamin Allan |
4 |
* Created: 3/12/98 |
* Created: 3/12/98 |
26 |
* Mass Ave, Cambridge, MA 02139 USA. Check the file named COPYING. |
* Mass Ave, Cambridge, MA 02139 USA. Check the file named COPYING. |
27 |
*/ |
*/ |
28 |
|
|
29 |
/* |
/** |
30 |
* When #including procio.h, make sure these files are #included first: |
* When #including procio.h, make sure these files are #included first: |
31 |
* #include "compiler.h" |
* #include "compiler.h" |
32 |
* #include "proc.h" |
* #include "proc.h" |
35 |
|
|
36 |
#ifndef __PROCIO_H_SEEN__ |
#ifndef __PROCIO_H_SEEN__ |
37 |
#define __PROCIO_H_SEEN__ |
#define __PROCIO_H_SEEN__ |
38 |
/* requires |
/** requires |
39 |
# #include<stdio.h> |
# #include<stdio.h> |
40 |
# #include"proc.h" |
# #include"proc.h" |
41 |
*/ |
*/ |
42 |
|
|
43 |
/* codes for old-style external call messaging */ |
/** codes for old-style external call messaging */ |
44 |
enum ProcExtError { |
enum ProcExtError { |
45 |
PE_unloaded, |
PE_unloaded, |
46 |
PE_nulleval, |
PE_nulleval, |
49 |
PE_evalerr |
PE_evalerr |
50 |
}; |
}; |
51 |
|
|
52 |
/* METHODs equivalent of WSEM. should go away soon. */ |
/** METHODs equivalent of WSEM. should go away soon. */ |
53 |
extern void WriteInitWarn(struct procFrame *, char *); |
extern void WriteInitWarn(struct procFrame *, char *); |
54 |
extern void WriteInitErr(struct procFrame *, char *); |
extern void WriteInitErr(struct procFrame *, char *); |
55 |
|
|
56 |
/** error message services **/ |
/** error message services **/ |
57 |
/* |
/** |
58 |
* ProcWriteCaseError(fm,arm,pos); |
* ProcWriteCaseError(fm,arm,pos); |
59 |
* write error encountered while evaluating SWITCH. |
* write error encountered while evaluating SWITCH. |
60 |
* arm gives the number of the case in question. pos |
* arm gives the number of the case in question. pos |
62 |
*/ |
*/ |
63 |
extern void ProcWriteCaseError(struct procFrame *, int, int); |
extern void ProcWriteCaseError(struct procFrame *, int, int); |
64 |
|
|
65 |
/* |
/** |
66 |
* ProcWriteForError(fm); |
* ProcWriteForError(fm); |
67 |
* write error encountered while evaluating FOR/DO. |
* write error encountered while evaluating FOR/DO. |
68 |
*/ |
*/ |
69 |
extern void ProcWriteForError(struct procFrame *); |
extern void ProcWriteForError(struct procFrame *); |
70 |
|
|
71 |
/* |
/** |
72 |
* ProcWriteAssignmentError(fm); |
* ProcWriteAssignmentError(fm); |
73 |
* write error encountered while evaluating := assignment. |
* write error encountered while evaluating := assignment. |
74 |
*/ |
*/ |
75 |
extern void ProcWriteAssignmentError(struct procFrame *); |
extern void ProcWriteAssignmentError(struct procFrame *); |
76 |
|
|
77 |
/* |
/** |
78 |
* ProcWriteIfError(fm,cname); |
* ProcWriteIfError(fm,cname); |
79 |
* write error encountered while evaluating boolean flow control. |
* write error encountered while evaluating boolean flow control. |
80 |
* cname is normally "IF" or "WHILE". |
* cname is normally "IF" or "WHILE". |
81 |
*/ |
*/ |
82 |
extern void ProcWriteIfError(struct procFrame *, CONST char *); |
extern void ProcWriteIfError(struct procFrame *, CONST char *); |
83 |
|
|
84 |
/* |
/** |
85 |
* ProcWriteRunError(fm); |
* ProcWriteRunError(fm); |
86 |
* write error encountered while evaluating RUN arguments. |
* write error encountered while evaluating RUN arguments. |
87 |
*/ |
*/ |
88 |
extern void ProcWriteRunError(struct procFrame *); |
extern void ProcWriteRunError(struct procFrame *); |
89 |
|
|
90 |
/* |
/** |
91 |
* ProcWriteExtError(fm,funcname,err,pos); |
* ProcWriteExtError(fm,funcname,err,pos); |
92 |
*/ |
*/ |
93 |
extern void ProcWriteExtError(struct procFrame *, CONST char *, |
extern void ProcWriteExtError(struct procFrame *, CONST char *, |
96 |
|
|
97 |
/** backtrace output functions. **/ |
/** backtrace output functions. **/ |
98 |
|
|
99 |
/* |
/** |
100 |
* Issue a message if we blew the stack limit or are |
* Issue a message if we blew the stack limit or are |
101 |
* unwinding the stack. |
* unwinding the stack. |
102 |
*/ |
*/ |
103 |
extern void ProcWriteStackCheck(struct procFrame *, |
extern void ProcWriteStackCheck(struct procFrame *, |
104 |
struct Name *, struct Name *); |
struct Name *, struct Name *); |
105 |
|
|
106 |
/* |
/** |
107 |
* WriteProcedureBlock(fp,initstack,str); |
* WriteProcedureBlock(fp,initstack,str); |
108 |
* Writes a line to file fp in a format resembling: |
* Writes a line to file fp in a format resembling: |
109 |
* ("%s %s in %s\n",str,stack->last->proc,stack->last->context) |
* ("%s %s in %s\n",str,stack->last->proc,stack->last->context) |
115 |
extern void WriteProcedureBlock(FILE *, struct gl_list_t *initstack, |
extern void WriteProcedureBlock(FILE *, struct gl_list_t *initstack, |
116 |
CONST char *); |
CONST char *); |
117 |
|
|
118 |
/* |
/** |
119 |
* WriteProcedureLine(fp,initstack,str); |
* WriteProcedureLine(fp,initstack,str); |
120 |
* Writes a line to file fp in a format resembling: |
* Writes a line to file fp in a format resembling: |
121 |
* ("%s %d: %s in %s\n",str,line,proc,context) |
* ("%s %d: %s in %s\n",str,line,proc,context) |
125 |
*/ |
*/ |
126 |
extern void WriteProcedureLine(FILE *, struct gl_list_t *initstack, |
extern void WriteProcedureLine(FILE *, struct gl_list_t *initstack, |
127 |
CONST char *); |
CONST char *); |
128 |
#endif /* __PROCIO_H_SEEN__ */ |
#endif /** __PROCIO_H_SEEN__ */ |
129 |
|
|