Bell 32V release
[unix-history] / usr / src / cmd / f77 / error.c
CommitLineData
0d57d6f5
TL
1#include "defs"
2
3
4warn1(s,t)
5char *s, *t;
6{
7char buff[100];
8warn( sprintf(buff, s, t) );
9}
10
11
12warn(s)
13char *s;
14{
15if(nowarnflag)
16 return;
17fprintf(diagfile, "Warning on line %d of %s: %s\n", lineno, infname, s);
18++nwarn;
19}
20
21
22
23err2(s,t,u)
24char *s, *t, *u;
25{
26char buff[100];
27err( sprintf(buff, s, t, u) );
28}
29
30
31err1(s,t)
32char *s, *t;
33{
34char buff[100];
35err( sprintf(buff, s, t) );
36}
37
38
39err(s)
40char *s;
41{
42fprintf(diagfile, "Error on line %d of %s: %s\n", lineno, infname, s);
43++nerr;
44}
45
46
47yyerror(s)
48char *s;
49{ err(s); }
50
51
52
53dclerr(s, v)
54char *s;
55struct nameblock *v;
56{
57char buff[100];
58
59if(v)
60 err( sprintf(buff, "Declaration error for %s: %s", varstr(VL, v->varname), s) );
61else
62 err1("Declaration error %s", s);
63}
64
65
66
67execerr(s, n)
68char *s, *n;
69{
70char buf1[100], buf2[100];
71
72sprintf(buf1, "Execution error %s", s);
73err( sprintf(buf2, buf1, n) );
74}
75
76
77fatal(t)
78char *t;
79{
80fprintf(diagfile, "Compiler error line %d of %s: %s\n", lineno, infname, t);
81if(debugflag)
82 abort();
83done(3);
84exit(3);
85}
86
87
88
89
90fatal1(t,d)
91char *t, *d;
92{
93char buff[100];
94fatal( sprintf(buff, t, d) );
95}