diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2003-06-07 12:02:36 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2003-06-07 12:02:36 +0000 |
commit | 675003c9c839f0faa7e4e3885add7dd475b5b211 (patch) | |
tree | 294ecbdc739bf8382879a2b163d3009484d85cad /usr.bin | |
parent | 13dce5e53df38674a7ed5093b4059559635aa47b (diff) |
Show filename and line number in regexp error.
Okay fries@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/m4/gnum4.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/m4/gnum4.c b/usr.bin/m4/gnum4.c index 0383ef4c745..6ca4d9a45cd 100644 --- a/usr.bin/m4/gnum4.c +++ b/usr.bin/m4/gnum4.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gnum4.c,v 1.18 2002/04/26 16:15:16 espie Exp $ */ +/* $OpenBSD: gnum4.c,v 1.19 2003/06/07 12:02:35 espie Exp $ */ /* * Copyright (c) 1999 Marc Espie @@ -250,7 +250,8 @@ exit_regerror(int er, regex_t *re) errlen = regerror(er, re, NULL, 0); errbuf = xalloc(errlen); regerror(er, re, errbuf, errlen); - errx(1, "regular expression error: %s", errbuf); + errx(1, "%s at line %lu: regular expression error: %s", + CURRENT_NAME, CURRENT_LINE, errbuf); } static void |