summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/sed/compile.c6
-rw-r--r--usr.bin/sed/defs.h10
2 files changed, 7 insertions, 9 deletions
diff --git a/usr.bin/sed/compile.c b/usr.bin/sed/compile.c
index e26e4c89778..b2f7d36995b 100644
--- a/usr.bin/sed/compile.c
+++ b/usr.bin/sed/compile.c
@@ -1,4 +1,4 @@
-/* $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.
@@ -784,7 +784,7 @@ fixuplabel(struct s_command *cp, struct s_command *end)
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 '{':
@@ -809,7 +809,7 @@ enterlabel(struct s_command *cp)
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;
diff --git a/usr.bin/sed/defs.h b/usr.bin/sed/defs.h
index eaea6b5564e..f7089ce34be 100644
--- a/usr.bin/sed/defs.h
+++ b/usr.bin/sed/defs.h
@@ -1,4 +1,4 @@
-/* $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
@@ -136,11 +136,9 @@ typedef struct {
/*
* 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