Annotation of 41BSD/cmd/f77/error.c, revision 1.1

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: 
        !            23: errstr(s, t)
        !            24: char *s, *t;
        !            25: {
        !            26: char buff[100];
        !            27: sprintf(buff, s, t);
        !            28: err(buff);
        !            29: }
        !            30: 
        !            31: 
        !            32: 
        !            33: erri(s,t)
        !            34: char *s;
        !            35: int t;
        !            36: {
        !            37: char buff[100];
        !            38: sprintf(buff, s, t);
        !            39: err(buff);
        !            40: }
        !            41: 
        !            42: 
        !            43: err(s)
        !            44: char *s;
        !            45: {
        !            46: fprintf(diagfile, "Error on line %d of %s: %s\n", lineno, infname, s);
        !            47: ++nerr;
        !            48: }
        !            49: 
        !            50: 
        !            51: yyerror(s)
        !            52: char *s;
        !            53: { err(s); }
        !            54: 
        !            55: 
        !            56: 
        !            57: dclerr(s, v)
        !            58: char *s;
        !            59: Namep v;
        !            60: {
        !            61: char buff[100];
        !            62: 
        !            63: if(v)
        !            64:        {
        !            65:        sprintf(buff, "Declaration error for %s: %s", varstr(VL, v->varname), s);
        !            66:        err(buff);
        !            67:        }
        !            68: else
        !            69:        errstr("Declaration error %s", s);
        !            70: }
        !            71: 
        !            72: 
        !            73: 
        !            74: execerr(s, n)
        !            75: char *s, *n;
        !            76: {
        !            77: char buf1[100], buf2[100];
        !            78: 
        !            79: sprintf(buf1, "Execution error %s", s);
        !            80: sprintf(buf2, buf1, n);
        !            81: err(buf2);
        !            82: }
        !            83: 
        !            84: 
        !            85: fatal(t)
        !            86: char *t;
        !            87: {
        !            88: fprintf(diagfile, "Compiler error line %d of %s: %s\n", lineno, infname, t);
        !            89: if(debugflag)
        !            90:        abort();
        !            91: done(3);
        !            92: exit(3);
        !            93: }
        !            94: 
        !            95: 
        !            96: 
        !            97: 
        !            98: fatalstr(t,s)
        !            99: char *t, *s;
        !           100: {
        !           101: char buff[100];
        !           102: sprintf(buff, t, s);
        !           103: fatal(buff);
        !           104: }
        !           105: 
        !           106: 
        !           107: 
        !           108: fatali(t,d)
        !           109: char *t;
        !           110: int d;
        !           111: {
        !           112: char buff[100];
        !           113: sprintf(buff, t, d);
        !           114: fatal(buff);
        !           115: }
        !           116: 
        !           117: 
        !           118: 
        !           119: badthing(thing, r, t)
        !           120: char *thing, *r;
        !           121: int t;
        !           122: {
        !           123: char buff[50];
        !           124: sprintf(buff, "Impossible %s %d in routine %s", thing, t, r);
        !           125: fatal(buff);
        !           126: }
        !           127: 
        !           128: 
        !           129: 
        !           130: badop(r, t)
        !           131: char *r;
        !           132: int t;
        !           133: {
        !           134: badthing("opcode", r, t);
        !           135: }
        !           136: 
        !           137: 
        !           138: 
        !           139: badtag(r, t)
        !           140: char *r;
        !           141: int t;
        !           142: {
        !           143: badthing("tag", r, t);
        !           144: }
        !           145: 
        !           146: 
        !           147: 
        !           148: 
        !           149: 
        !           150: badstg(r, t)
        !           151: char *r;
        !           152: int t;
        !           153: {
        !           154: badthing("storage class", r, t);
        !           155: }
        !           156: 
        !           157: 
        !           158: 
        !           159: 
        !           160: badtype(r, t)
        !           161: char *r;
        !           162: int t;
        !           163: {
        !           164: badthing("type", r, t);
        !           165: }
        !           166: 
        !           167: 
        !           168: many(s, c)
        !           169: char *s, c;
        !           170: {
        !           171: char buff[25];
        !           172: 
        !           173: sprintf(buff, "Too many %s.  Try the -N%c option", s, c);
        !           174: fatal(buff);
        !           175: }
        !           176: 
        !           177: 
        !           178: err66(s)
        !           179: char *s;
        !           180: {
        !           181: errstr("Fortran 77 feature used: %s", s);
        !           182: }
        !           183: 
        !           184: 
        !           185: 
        !           186: errext(s)
        !           187: char *s;
        !           188: {
        !           189: errstr("F77 compiler extension used: %s", s);
        !           190: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.