diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-04-09 23:41:01 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-04-09 23:41:01 +0000 |
commit | 1e2c6ed7b1d7c43be9a4422286be5333f4f3b7f8 (patch) | |
tree | ba0b412d4648f777cd8444a01d056e00d86358a3 /ext/File | |
parent | fcb875d4741190d167d6a2773683d7421a2a5279 (diff) | |
download | perl-1e2c6ed7b1d7c43be9a4422286be5333f4f3b7f8.tar.gz |
Retract the UTF-8 filenames patch. This may be
better dealt with in Perl level, a la File::Spec
(since the whole mess is strongly filesystem-specific).
p4raw-id: //depot/perl@15835
Diffstat (limited to 'ext/File')
-rw-r--r-- | ext/File/Glob/Glob.pm | 26 | ||||
-rw-r--r-- | ext/File/Glob/Glob.xs | 2 | ||||
-rw-r--r-- | ext/File/Glob/Makefile.PL | 2 | ||||
-rw-r--r-- | ext/File/Glob/bsd_glob.h | 1 | ||||
-rw-r--r-- | ext/File/Glob/t/utf8.t | 17 |
5 files changed, 5 insertions, 43 deletions
diff --git a/ext/File/Glob/Glob.pm b/ext/File/Glob/Glob.pm index 1ae894f048..a704b567bb 100644 --- a/ext/File/Glob/Glob.pm +++ b/ext/File/Glob/Glob.pm @@ -31,7 +31,6 @@ use XSLoader (); GLOB_NOSPACE GLOB_QUOTE GLOB_TILDE - GLOB_UTF8 ); %EXPORT_TAGS = ( @@ -52,7 +51,6 @@ use XSLoader (); GLOB_NOSPACE GLOB_QUOTE GLOB_TILDE - GLOB_UTF8 glob bsd_glob ) ], @@ -64,11 +62,10 @@ sub import { require Exporter; my $i = 1; while ($i < @_) { - if ($_[$i] =~ /^:(case|nocase|globally|utf8)$/) { + if ($_[$i] =~ /^:(case|nocase|globally)$/) { splice(@_, $i, 1); $DEFAULT_FLAGS &= ~GLOB_NOCASE() if $1 eq 'case'; $DEFAULT_FLAGS |= GLOB_NOCASE() if $1 eq 'nocase'; - $DEFAULT_FLAGS |= GLOB_UTF8() if $1 eq 'utf8'; if ($1 eq 'globally') { local $^W; *CORE::GLOBAL::glob = \&File::Glob::csh_glob; @@ -206,19 +203,15 @@ File::Glob - Perl extension for BSD glob routine ## override the core glob (CORE::glob() does this automatically ## by default anyway, since v5.6.0) use File::Glob ':globally'; - my @sources = <*.{c,h,y}>; + my @sources = <*.{c,h,y}> ## override the core glob, forcing case sensitivity use File::Glob qw(:globally :case); - my @sources = <*.{c,h,y}>; + my @sources = <*.{c,h,y}> ## override the core glob forcing case insensitivity use File::Glob qw(:globally :nocase); - my @sources = <*.{c,h,y}>; - - ## override the core glob forcing UTF-8 names - use File::Glob qw(:globally :utf8); - my @sources = <*.{c,h,y}>; + my @sources = <*.{c,h,y}> =head1 DESCRIPTION @@ -328,17 +321,6 @@ order (case does not matter) rather than in ASCII order. =back -The following flag has been added in the Perl implementation for -Unicode compatibility: - -=over 4 - -=item C<GLOB_UTF8> - -The filenames returned will be marked as being in UTF-8 encoding of -Unicode. Note that it is your responsibility to ascertain that the -filesystem you are globbing in returns valid UTF-8 filenames. - =head1 DIAGNOSTICS bsd_glob() returns a list of matching paths, possibly zero length. If an diff --git a/ext/File/Glob/Glob.xs b/ext/File/Glob/Glob.xs index 1bb5fc4392..bc58b6a934 100644 --- a/ext/File/Glob/Glob.xs +++ b/ext/File/Glob/Glob.xs @@ -63,8 +63,6 @@ PPCODE: strlen(pglob.gl_pathv[i]))); TAINT; SvTAINT(tmp); - if (pglob.gl_flags & GLOB_UTF8 && !IN_BYTES) - SvUTF8_on(tmp); PUSHs(tmp); } diff --git a/ext/File/Glob/Makefile.PL b/ext/File/Glob/Makefile.PL index a24b6635e7..0d4267a25b 100644 --- a/ext/File/Glob/Makefile.PL +++ b/ext/File/Glob/Makefile.PL @@ -26,7 +26,7 @@ WriteConstants( NAME => 'File::Glob', NAMES => [qw(GLOB_ABEND GLOB_ALPHASORT GLOB_ALTDIRFUNC GLOB_BRACE GLOB_ERR GLOB_LIMIT GLOB_MARK GLOB_NOCASE GLOB_NOCHECK GLOB_NOMAGIC - GLOB_NOSORT GLOB_NOSPACE GLOB_QUOTE GLOB_TILDE GLOB_UTF8), + GLOB_NOSORT GLOB_NOSPACE GLOB_QUOTE GLOB_TILDE), {name=>"GLOB_ERROR", macro=>["#ifdef GLOB_ERROR\n\tdMY_CXT;\n\n","#endif\n"]}], BREAKOUT_AT => 8, ); diff --git a/ext/File/Glob/bsd_glob.h b/ext/File/Glob/bsd_glob.h index ef46c001e0..af92c04ea2 100644 --- a/ext/File/Glob/bsd_glob.h +++ b/ext/File/Glob/bsd_glob.h @@ -76,7 +76,6 @@ typedef struct { #define GLOB_ALPHASORT 0x2000 /* Alphabetic, not ASCII sort, like csh. */ #define GLOB_LIMIT 0x4000 /* Limit pattern match output to ARG_MAX (usually from limits.h). */ -#define GLOB_UTF8 0x8000 /* Return UTF-8. (Perl extension.) */ #define GLOB_NOSPACE (-1) /* Malloc call failed. */ #define GLOB_ABEND (-2) /* Unignored error. */ diff --git a/ext/File/Glob/t/utf8.t b/ext/File/Glob/t/utf8.t deleted file mode 100644 index 97d0b2c6bf..0000000000 --- a/ext/File/Glob/t/utf8.t +++ /dev/null @@ -1,17 +0,0 @@ -use File::Glob qw(:globally :utf8); - -# Can't really depend on Tru64 UTF-8 filenames being so must just see -# that things don't crash and that *if* UTF-8 were to be received, it's -# valid. (Maybe later add checks that are run if we are on NTFS/HFS+.) -# (see also t/op/readdir.t) - -print "1..2\n"; - -my $a = <*>; - -print utf8::valid($a) ? "ok 1\n" : "not ok 1\n"; - -my @a=<*>; - -print utf8::valid($a[0]) ? "ok 2\n" : "not ok 2\n"; - |