diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2014-08-03 22:06:51 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2014-08-03 22:06:51 +0300 |
commit | 8f2f7ef2872a9a95dc1506504b60225ef98944f1 (patch) | |
tree | fc5953eec7188e5088efaca0bd88b30a76312651 /interpret.h | |
parent | 9a1a8c22e42af12f5859ef5d159b070f959912e6 (diff) | |
download | egawk-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.h | 7 |
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 |