diff options
Diffstat (limited to 'usr.bin/awk')
-rw-r--r-- | usr.bin/awk/lib.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/usr.bin/awk/lib.c b/usr.bin/awk/lib.c index d491f1a8dd8..173317a85ba 100644 --- a/usr.bin/awk/lib.c +++ b/usr.bin/awk/lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib.c,v 1.40 2020/07/30 17:45:44 millert Exp $ */ +/* $OpenBSD: lib.c,v 1.41 2020/07/30 17:46:54 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved @@ -673,12 +673,11 @@ void error() fprintf(stderr, " source line number %d", curnode->lineno); else if (lineno) fprintf(stderr, " source line number %d", lineno); + if (compile_time == COMPILING && cursource() != NULL) + fprintf(stderr, " source file %s", cursource()); + fprintf(stderr, "\n"); + eprint(); } - - if (compile_time == COMPILING && cursource() != NULL) - fprintf(stderr, " source file %s", cursource()); - fprintf(stderr, "\n"); - eprint(); } void eprint(void) /* try to print context around error */ |