-/* $OpenBSD: compile.c,v 1.39 2015/10/26 14:08:47 mmcc Exp $ */
+/* $OpenBSD: compile.c,v 1.40 2015/10/26 22:24:44 jca Exp $ */
/*-
* Copyright (c) 1992 Diomidis Spinellis.
break;
}
if ((cp->u.c = findlabel(cp->t)) == NULL)
- error(COMPILE2, "undefined label '%s'", cp->t);
+ error(COMPILE, "undefined label '%s'", cp->t);
free(cp->t);
break;
case '{':
lhp = &labels[h & LHMASK];
for (lh = *lhp; lh != NULL; lh = lh->lh_next)
if (lh->lh_hash == h && strcmp(cp->t, lh->lh_cmd->t) == 0)
- error(COMPILE2, "duplicate label '%s'", cp->t);
+ error(COMPILE, "duplicate label '%s'", cp->t);
lh = xmalloc(sizeof *lh);
lh->lh_next = *lhp;
lh->lh_hash = h;
-/* $OpenBSD: defs.h,v 1.6 2015/07/17 20:38:57 jasper Exp $ */
+/* $OpenBSD: defs.h,v 1.7 2015/10/26 22:24:44 jca Exp $ */
/*-
* Copyright (c) 1992 Diomidis Spinellis.
* Copyright (c) 1992, 1993
/*
* Error severity codes:
*/
-#define FATAL 0 /* Exit immediately with 1 */
-#define ERROR 1 /* Continue, but change exit value */
-#define WARNING 2 /* Just print the warning */
-#define COMPILE 3 /* Print error, count and finish script */
-#define COMPILE2 3 /* Print error, count and finish script */
+#define WARNING 0 /* Just print the warning */
+#define FATAL 1 /* Exit immediately with 1 */
+#define COMPILE 2 /* Print error, count and finish script */
/*
* Round up to the nearest multiple of _POSIX2_LINE_MAX