|
|
1.1 ! root 1: #include "defs" ! 2: ! 3: ! 4: warn1(s,t) ! 5: char *s, *t; ! 6: { ! 7: char buff[100]; ! 8: sprintf(buff, s, t); ! 9: warn(buff); ! 10: } ! 11: ! 12: ! 13: warn(s) ! 14: char *s; ! 15: { ! 16: if(nowarnflag) ! 17: return; ! 18: fprintf(diagfile, "Warning on line %d of %s: %s\n", lineno, infname, s); ! 19: ++nwarn; ! 20: } ! 21: ! 22: warnb1(s,t) ! 23: char *s, *t; ! 24: { ! 25: int x; ! 26: x = nowarnflag; ! 27: nowarnflag = 0; ! 28: warn1(s,t); ! 29: nowarnflag = x; ! 30: } ! 31: ! 32: warnb(s) ! 33: char *s; ! 34: { ! 35: int x; ! 36: x = nowarnflag; ! 37: nowarnflag = 0; ! 38: warn(s); ! 39: nowarnflag = x; ! 40: } ! 41: ! 42: ! 43: errstr(s, t) ! 44: char *s, *t; ! 45: { ! 46: char buff[100]; ! 47: sprintf(buff, s, t); ! 48: err(buff); ! 49: } ! 50: ! 51: ! 52: ! 53: erri(s,t) ! 54: char *s; ! 55: int t; ! 56: { ! 57: char buff[100]; ! 58: sprintf(buff, s, t); ! 59: err(buff); ! 60: } ! 61: ! 62: ! 63: err(s) ! 64: char *s; ! 65: { ! 66: fprintf(diagfile, "Error on line %d of %s: %s\n", lineno, infname, s); ! 67: ++nerr; ! 68: } ! 69: ! 70: ! 71: yyerror(s) ! 72: char *s; ! 73: { ! 74: err(s); ! 75: } ! 76: ! 77: ! 78: ! 79: dclerr(s, v) ! 80: char *s; ! 81: Namep v; ! 82: { ! 83: char buff[100]; ! 84: ! 85: if(v) ! 86: { ! 87: sprintf(buff, "Declaration error for %s: %s", varstr(VL, v->varname), s); ! 88: err(buff); ! 89: } ! 90: else ! 91: errstr("Declaration error %s", s); ! 92: } ! 93: ! 94: ! 95: ! 96: execerr(s, n) ! 97: char *s, *n; ! 98: { ! 99: char buf1[100], buf2[100]; ! 100: ! 101: sprintf(buf1, "Execution error %s", s); ! 102: sprintf(buf2, buf1, n); ! 103: err(buf2); ! 104: } ! 105: ! 106: ! 107: fatal(t) ! 108: char *t; ! 109: { ! 110: fprintf(diagfile, "Compiler error line %d of %s: %s\n", lineno, infname, t); ! 111: if(debugflag) ! 112: abort(); ! 113: done(3); ! 114: exit(3); ! 115: } ! 116: ! 117: ! 118: ! 119: ! 120: fatalstr(t,s) ! 121: char *t, *s; ! 122: { ! 123: char buff[100]; ! 124: sprintf(buff, t, s); ! 125: fatal(buff); ! 126: } ! 127: ! 128: ! 129: ! 130: fatali(t,d) ! 131: char *t; ! 132: int d; ! 133: { ! 134: char buff[100]; ! 135: sprintf(buff, t, d); ! 136: fatal(buff); ! 137: } ! 138: ! 139: ! 140: ! 141: badthing(thing, r, t) ! 142: char *thing, *r; ! 143: int t; ! 144: { ! 145: char buff[50]; ! 146: sprintf(buff, "Impossible %s %d in routine %s", thing, t, r); ! 147: fatal(buff); ! 148: } ! 149: ! 150: ! 151: ! 152: badop(r, t) ! 153: char *r; ! 154: int t; ! 155: { ! 156: badthing("opcode", r, t); ! 157: } ! 158: ! 159: ! 160: ! 161: badtag(r, t) ! 162: char *r; ! 163: int t; ! 164: { ! 165: badthing("tag", r, t); ! 166: } ! 167: ! 168: ! 169: ! 170: ! 171: ! 172: badstg(r, t) ! 173: char *r; ! 174: int t; ! 175: { ! 176: badthing("storage class", r, t); ! 177: } ! 178: ! 179: ! 180: ! 181: ! 182: badtype(r, t) ! 183: char *r; ! 184: int t; ! 185: { ! 186: badthing("type", r, t); ! 187: } ! 188: ! 189: ! 190: many(s, c, n) ! 191: char *s, c; ! 192: int n; ! 193: { ! 194: char buff[250]; ! 195: ! 196: sprintf(buff, ! 197: "Too many %s.\nTable limit now %d.\nTry recompiling using the -N%c%d option\n", ! 198: s, n, c, 2*n); ! 199: fatal(buff); ! 200: } ! 201: ! 202: ! 203: err66(s) ! 204: char *s; ! 205: { ! 206: errstr("Fortran 77 feature used: %s", s); ! 207: } ! 208: ! 209: ! 210: ! 211: errext(s) ! 212: char *s; ! 213: { ! 214: errstr("F77 compiler extension used: %s", s); ! 215: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.