Change 31773 by [EMAIL PROTECTED] on 2007/08/31 13:28:46

        Following Jan's advice, remove Cygwin::is_textmount(),
        which duplicates the functionality of is_binmount().

Affected files ...

... //depot/perl/README.cygwin#39 edit
... //depot/perl/cygwin/cygwin.c#20 edit
... //depot/perl/t/lib/cygwin.t#6 edit

Differences ...

==== //depot/perl/README.cygwin#39 (text) ====
Index: perl/README.cygwin
--- perl/README.cygwin#38~31708~        2007-08-13 23:56:00.000000000 -0700
+++ perl/README.cygwin  2007-08-31 06:28:46.000000000 -0700
@@ -409,10 +409,10 @@
 When a file is opened it is in either text or binary mode.  In text mode
 a file is subject to CR/LF/Ctrl-Z translations.  With Cygwin, the default
 mode for an C<open()> is determined by the mode of the mount that underlies
-the file. See C<Cygwin::is_binmount()> and C<Cygwin::is_textmount()>.
-Perl provides a C<binmode()> function to set binary mode on files
-that otherwise would be treated as text.  C<sysopen()> with the C<O_TEXT>
-flag sets text mode on files that otherwise would be treated as binary:
+the file. See C<Cygwin::is_binmount()>. Perl provides a C<binmode()> function
+to set binary mode on files that otherwise would be treated as text.
+C<sysopen()> with the C<O_TEXT> flag sets text mode on files that otherwise
+would be treated as binary:
 
     sysopen(FOO, "bar", O_WRONLY|O_CREAT|O_TEXT)
 
@@ -557,11 +557,6 @@
 Returns true if the given cygwin path is binary mounted, false if the
 path is mounted in textmode.
 
-=item C<Cygwin::is_textmount>
-
-Returns true if the given cygwin path is mounted in textmode (C<"\r\n"> 
C<lt>=C<gt> C<"\n">), 
-false if the path is mounted binary. The result is complementary to 
C<Cygwin::is_binmount()>.
-
 =back
 
 =head1 INSTALL PERL ON CYGWIN

==== //depot/perl/cygwin/cygwin.c#20 (text) ====
Index: perl/cygwin/cygwin.c
--- perl/cygwin/cygwin.c#19~31737~      2007-08-20 06:16:19.000000000 -0700
+++ perl/cygwin/cygwin.c        2007-08-31 06:28:46.000000000 -0700
@@ -347,20 +347,6 @@
     XSRETURN(1);
 }
 
-XS(XS_Cygwin_is_textmount)
-{
-    dXSARGS;
-    char *pathname;
-
-    if (items != 1)
-        Perl_croak(aTHX_ "Usage: Cygwin::is_textmount(pathname)");
-
-    pathname = SvPV_nolen(ST(0));
-
-    ST(0) = boolSV(!cygwin_internal(CW_GET_BINMODE, pathname));
-    XSRETURN(1);
-}
-
 void
 init_os_extras(void)
 {
@@ -376,7 +362,6 @@
     newXSproto("Cygwin::mount_table", XS_Cygwin_mount_table, file, "");
     newXSproto("Cygwin::mount_flags", XS_Cygwin_mount_flags, file, "$");
     newXSproto("Cygwin::is_binmount", XS_Cygwin_is_binmount, file, "$");
-    newXSproto("Cygwin::is_textmount", XS_Cygwin_is_textmount, file, "$");
 
     /* Initialize Win32CORE if it has been statically linked. */
     handle = dlopen(NULL, RTLD_LAZY);

==== //depot/perl/t/lib/cygwin.t#6 (text) ====
Index: perl/t/lib/cygwin.t
--- perl/t/lib/cygwin.t#5~31760~        2007-08-29 01:55:17.000000000 -0700
+++ perl/t/lib/cygwin.t 2007-08-31 06:28:46.000000000 -0700
@@ -9,7 +9,7 @@
     }
 }
 
-use Test::More tests => 15;
+use Test::More tests => 14;
 
 is(Cygwin::winpid_to_pid(Cygwin::pid_to_winpid($$)), $$,
    "perl pid translates to itself");
@@ -46,7 +46,6 @@
 $mount =~ m|on /usr/bin type .+ \((\w+mode)\)|m;
 my $binmode = $1 eq 'binmode';
 is(Cygwin::is_binmount("/"),  $binmode ? 1 : '', "check / for binmount");
-is(Cygwin::is_textmount("/"), $binmode ? '' : 1, "check / for textmount");
 
 my $rootmnt = Cygwin::mount_flags("/");
 ok($binmode ? ($rootmnt =~ /,binmode/) : ($rootmnt =~ /,textmode/), "check / 
mount_flags");
End of Patch.

Reply via email to