aboutsummaryrefslogtreecommitdiffstats
path: root/interpret.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2014-08-03 22:06:51 +0300
committerArnold D. Robbins <arnold@skeeve.com>2014-08-03 22:06:51 +0300
commit8f2f7ef2872a9a95dc1506504b60225ef98944f1 (patch)
treefc5953eec7188e5088efaca0bd88b30a76312651 /interpret.h
parent9a1a8c22e42af12f5859ef5d159b070f959912e6 (diff)
downloadegawk-8f2f7ef2872a9a95dc1506504b60225ef98944f1.tar.gz
egawk-8f2f7ef2872a9a95dc1506504b60225ef98944f1.tar.bz2
egawk-8f2f7ef2872a9a95dc1506504b60225ef98944f1.zip
Improve inrec setting ERRNO, doc of API get_record for errors.
Diffstat (limited to 'interpret.h')
-rw-r--r--interpret.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/interpret.h b/interpret.h
index ff9ba768..c26a9d46 100644
--- a/interpret.h
+++ b/interpret.h
@@ -1192,9 +1192,12 @@ match_re:
}
if (! inrec(curfile, & errcode)) {
- if (errcode > 0 && (do_traditional || ! pc->has_endfile))
- fatal(_("error reading input file `%s': %s"),
+ if (errcode > 0) {
+ update_ERRNO_int(errcode);
+ if (do_traditional || ! pc->has_endfile)
+ fatal(_("error reading input file `%s': %s"),
curfile->public.name, strerror(errcode));
+ }
JUMPTO(ni);
} /* else