From 562a7b0c67b6218259506760bd4728f2f0c6093b Mon Sep 17 00:00:00 2001 From: Charles Bailey Date: Wed, 17 Mar 1999 20:10:44 -0400 Subject: applied suggested patch, modulo superseded parts Message-id: <01J8YFGIHW2W001E7S@mail.newman.upenn.edu> Subject: [PATCH 5.005_56] Miscellaneous VMS-specific fixes p4raw-id: //depot/perl@3153 --- vms/ext/Stdio/Stdio.pm | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'vms/ext/Stdio/Stdio.pm') diff --git a/vms/ext/Stdio/Stdio.pm b/vms/ext/Stdio/Stdio.pm index 04b339725f..d485e0e159 100644 --- a/vms/ext/Stdio/Stdio.pm +++ b/vms/ext/Stdio/Stdio.pm @@ -1,8 +1,8 @@ # VMS::Stdio - VMS extensions to Perl's stdio calls # # Author: Charles Bailey bailey@genetics.upenn.edu -# Version: 2.1 -# Revised: 24-Mar-1998 +# Version: 2.2 +# Revised: 19-Jul-1998 # Docs revised: 13-Oct-1998 Dan Sugalski package VMS::Stdio; @@ -13,17 +13,17 @@ use Carp '&croak'; use DynaLoader (); use Exporter (); -$VERSION = '2.1'; +$VERSION = '2.2'; @ISA = qw( Exporter DynaLoader IO::File ); @EXPORT = qw( &O_APPEND &O_CREAT &O_EXCL &O_NDELAY &O_NOWAIT &O_RDONLY &O_RDWR &O_TRUNC &O_WRONLY ); -@EXPORT_OK = qw( &flush &getname &remove &rewind &sync &setdef &tmpnam +@EXPORT_OK = qw( &binmode &flush &getname &remove &rewind &sync &setdef &tmpnam &vmsopen &vmssysopen &waitfh &writeof ); %EXPORT_TAGS = ( CONSTANTS => [ qw( &O_APPEND &O_CREAT &O_EXCL &O_NDELAY &O_NOWAIT &O_RDONLY &O_RDWR &O_TRUNC &O_WRONLY ) ], - FUNCTIONS => [ qw( &flush &getname &remove &rewind &setdef - &sync &tmpnam &vmsopen &vmssysopen + FUNCTIONS => [ qw( &binmode &flush &getname &remove &rewind + &setdef &sync &tmpnam &vmsopen &vmssysopen &waitfh &writeof ) ] ); bootstrap VMS::Stdio $VERSION; @@ -100,6 +100,7 @@ VMS::Stdio - standard I/O functions via VMS extensions close($fh); remove("another.file"); writeof($pipefh); + binmode($fh); =head1 DESCRIPTION @@ -147,6 +148,22 @@ update your code to use the new routines. =over +=item binmode + +This function causes the file handle to be reopened with the CRTL's +carriage control processing disabled; its effect is the same as that +of the C access mode in C. After the file is reopened, +the file pointer is positioned as close to its position before the +call as possible (I as close as fsetpos() can get it -- for +some record-structured files, it's not possible to return to the +exact byte offset in the file). Because the file must be reopened, +this function cannot be used on temporary-delete files. C +returns true if successful, and C if not. + +Note that the effect of C differs from that of the binmode() +function on operating systems such as Windows and MSDOS, and is not +needed to process most types of file. + =item flush This function causes the contents of stdio buffers for the specified -- cgit v1.2.1