diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-08-04 04:06:30 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-08-04 04:06:30 +0000 |
commit | 377c3f7e6a3b00402177bc5f16bcffe1b2b869d7 (patch) | |
tree | d29ddcd441d66850812e030b60e6b2964f47d4c3 /doio.c | |
parent | ac736f088d7908c5178439d162728889cab0dd5b (diff) | |
download | perl-377c3f7e6a3b00402177bc5f16bcffe1b2b869d7.tar.gz |
In the warnings call filehandles consistently so;
add "unopened" warning for stat().
p4raw-id: //depot/perl@6519
Diffstat (limited to 'doio.c')
-rw-r--r-- | doio.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -812,7 +812,7 @@ Perl_do_close(pTHX_ GV *gv, bool not_implicit) dTHR; if (ckWARN(WARN_UNOPENED)) Perl_warner(aTHX_ WARN_UNOPENED, - "Close on unopened file %s",GvENAME(gv)); + "close() on unopened filehandle %s",GvENAME(gv)); SETERRNO(EBADF,SS$_IVCHAN); } return FALSE; @@ -926,7 +926,7 @@ Perl_do_tell(pTHX_ GV *gv) { dTHR; if (ckWARN(WARN_UNOPENED)) - Perl_warner(aTHX_ WARN_UNOPENED, "tell() on unopened file"); + Perl_warner(aTHX_ WARN_UNOPENED, "tell() on unopened filehandle"); } SETERRNO(EBADF,RMS$_IFI); return (Off_t)-1; @@ -948,7 +948,7 @@ Perl_do_seek(pTHX_ GV *gv, Off_t pos, int whence) { dTHR; if (ckWARN(WARN_UNOPENED)) - Perl_warner(aTHX_ WARN_UNOPENED, "seek() on unopened file"); + Perl_warner(aTHX_ WARN_UNOPENED, "seek() on unopened filehandle"); } SETERRNO(EBADF,RMS$_IFI); return FALSE; @@ -965,7 +965,7 @@ Perl_do_sysseek(pTHX_ GV *gv, Off_t pos, int whence) { dTHR; if (ckWARN(WARN_UNOPENED)) - Perl_warner(aTHX_ WARN_UNOPENED, "sysseek() on unopened file"); + Perl_warner(aTHX_ WARN_UNOPENED, "sysseek() on unopened filehandle"); } SETERRNO(EBADF,RMS$_IFI); return (Off_t)-1; @@ -1196,8 +1196,8 @@ Perl_my_stat(pTHX) if (tmpgv == PL_defgv) return PL_laststatval; if (ckWARN(WARN_UNOPENED)) - Perl_warner(aTHX_ WARN_UNOPENED, "Stat on unopened file %s", - GvENAME(tmpgv)); + Perl_warner(aTHX_ WARN_UNOPENED, "%s on unopened filehandle %s", + PL_op_desc[PL_op->op_type], GvENAME(tmpgv)); PL_statgv = Nullgv; sv_setpv(PL_statname,""); return (PL_laststatval = -1); |