1050 verror(char *fmt, va_list args)
1051 {
1052 if (fnames[ifno][0])
1053 fprintf(stderr, "%s: ", fnames[ifno]);
1054 fprintf(stderr, "%d: ",lineno[ifno]);
1055
1056 (void)vfprintf(stderr, fmt, args);
1057 fputc('\n', stderr);
1058 }
1059
1060 /* VARARGS1 */
1061 void
1062 pperror(char *fmt, ...)
1063 {
1064 va_list args;
1065
1066 va_start(args, fmt);
1067 verror(fmt, args);
1068 va_end(args);
1069
1070 ++exfail;
1071 }
1072
1073 /* VARARGS1 */
1074 void
1075 yyerror(char *fmt, ...)
1076 {
1077 va_list args;
1078
1079 va_start(args, fmt);
1080 verror(fmt, args);
1081 va_end(args);
1082 }
1083
1084 /* VARARGS1 */
1085 static void
1086 ppwarn(char *fmt, ...)
1087 {
1088 va_list args;
1089 int fail = exfail;
1090 exfail = -1;
1091
1092 va_start(args, fmt);
1093 verror(fmt, args);
1094 va_end(args);
1095
1096 exfail = fail;
1097 }
1098
1099 struct symtab *
1100 lookup(namep, enterf)
1101 char *namep;
1102 int enterf;
1103 {
1104 register char *np, *snp;
1105 register int c, i; int around;
1106 register struct symtab *sp;
1107
1108 /* namep had better not be too long (currently, <=symlen chars) */
1109 np=namep; around=0; i=cinit;
1110 while ((c = *np++) != '\0')
|
1050 verror(char *fmt, va_list args)
1051 {
1052 if (fnames[ifno][0])
1053 fprintf(stderr, "%s: ", fnames[ifno]);
1054 fprintf(stderr, "%d: ",lineno[ifno]);
1055
1056 (void)vfprintf(stderr, fmt, args);
1057 fputc('\n', stderr);
1058 }
1059
1060 /* VARARGS1 */
1061 void
1062 pperror(char *fmt, ...)
1063 {
1064 va_list args;
1065
1066 va_start(args, fmt);
1067 verror(fmt, args);
1068 va_end(args);
1069
1070 exfail = 1;
1071 }
1072
1073 /* VARARGS1 */
1074 void
1075 yyerror(char *fmt, ...)
1076 {
1077 va_list args;
1078
1079 va_start(args, fmt);
1080 verror(fmt, args);
1081 va_end(args);
1082 }
1083
1084 /* VARARGS1 */
1085 static void
1086 ppwarn(char *fmt, ...)
1087 {
1088 va_list args;
1089 int fail = exfail;
1090
1091 va_start(args, fmt);
1092 verror(fmt, args);
1093 va_end(args);
1094
1095 exfail = fail;
1096 }
1097
1098 struct symtab *
1099 lookup(namep, enterf)
1100 char *namep;
1101 int enterf;
1102 {
1103 register char *np, *snp;
1104 register int c, i; int around;
1105 register struct symtab *sp;
1106
1107 /* namep had better not be too long (currently, <=symlen chars) */
1108 np=namep; around=0; i=cinit;
1109 while ((c = *np++) != '\0')
|