diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1997-04-17 00:00:00 +0000 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-04-17 00:00:00 +0000 |
commit | 96e4d5b14cf2dfb0235faa8bc3f701c15b15bb05 (patch) | |
tree | 573ae82e0e6a92c453a5b5cec1b10dc2f99362fe /doio.c | |
parent | 6877a1cf6ff3f0f711772ea75e579e2e7219cc46 (diff) | |
download | perl-96e4d5b14cf2dfb0235faa8bc3f701c15b15bb05.tar.gz |
[inseparable changes from match from perl-5.003_97e to perl-5.003_97f]
CORE LANGUAGE CHANGES
Subject: New operator systell()
From: Chip Salzenberg <chip@perl.com>
Files: doio.c ext/Opcode/Opcode.pm keywords.pl opcode.pl pod/perldelta.pod pod/perldiag.pod pod/perlfunc.pod pp_sys.c t/op/sysio.t toke.c
Subject: Allow constant sub to be optimized when called with parens
From: Chip Salzenberg <chip@perl.com>
Files: toke.c
Subject: Make {,un}pack fail on invalid pack types
From: Chip Salzenberg <chip@perl.com>
Files: pod/perldiag.pod pp.c
CORE PORTABILITY
Subject: Fix bitwise ops and {,un}pack() on Cray CPUs
From: Chip Salzenberg <chip@perl.com>
Files: pp.c
Subject: VMS update
From: Charles Bailey <bailey@hmivax.humgen.upenn.edu>
Files: lib/Cwd.pm lib/File/Path.pm lib/FindBin.pm vms/perly_c.vms vms/vms.c vms/writemain.pl
Subject: Win32 update (three patches)
From: Gurusamy Sarathy <gsar@engin.umich.edu>
Files: lib/Cwd.pm lib/ExtUtils/MM_Unix.pm lib/ExtUtils/MM_Win32.pm lib/File/Basename.pm win32/Makefile win32/makedef.pl win32/perllib.c win32/win32.c win32/win32iop.h
DOCUMENTATION
Subject: Document size restrictions for packed integers
From: Jarkko Hietaniemi <Jarkko.Hietaniemi@cc.hut.fi>
Files: pod/perlfunc.pod
LIBRARY AND EXTENSIONS
Subject: Fix bug in Opcode when (maxo & 15) > 8
From: Chip Salzenberg <chip@perl.com>
Files: ext/Opcode/Makefile.PL ext/Opcode/Opcode.pm ext/Opcode/Opcode.xs
Diffstat (limited to 'doio.c')
-rw-r--r-- | doio.c | 26 |
1 files changed, 11 insertions, 15 deletions
@@ -660,24 +660,20 @@ do_tell(gv) GV *gv; { register IO *io; + register PerlIO *fp; - if (!gv) - goto phooey; - - io = GvIO(gv); - if (!io || !IoIFP(io)) - goto phooey; - + if (gv && (io = GvIO(gv)) && (fp = IoIFP(io))) { #ifdef ULTRIX_STDIO_BOTCH - if (PerlIO_eof(IoIFP(io))) - (void)PerlIO_seek (IoIFP(io), 0L, 2); /* ultrix 1.2 workaround */ + if (PerlIO_eof(fp)) + (void)PerlIO_seek(fp, 0L, 2); /* ultrix 1.2 workaround */ #endif - - return PerlIO_tell(IoIFP(io)); - -phooey: + if (op->op_type == OP_SYSTELL) + return lseek(PerlIO_fileno(fp), 0L, 1); + else + return PerlIO_tell(fp); + } if (dowarn) - warn("tell() on unopened file"); + warn("%s() on unopened file", op_name[op->op_type]); SETERRNO(EBADF,RMS$_IFI); return -1L; } @@ -702,7 +698,7 @@ int whence; return PerlIO_seek(fp, pos, whence) >= 0; } if (dowarn) - warn("seek() on unopened file"); + warn("%s() on unopened file", op_name[op->op_type]); SETERRNO(EBADF,RMS$_IFI); return FALSE; } |