diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-10-10 11:28:44 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-10-10 11:28:44 +0000 |
commit | a3987cb85d43c4b5e6f04382a9391c4ec5aa26ad (patch) | |
tree | a3f6f760eec53f66a9c86d490e89828c66c57cb7 /doio.c | |
parent | 9c57bc35a6059a3272298d81c088224a104e2b5d (diff) | |
download | perl-a3987cb85d43c4b5e6f04382a9391c4ec5aa26ad.tar.gz |
Unix and VMS agree on "*" as a "match any number of any chars"
wildcards, but differ ("?" vs. "%") for their "match any single
char" wildcard. This patch changes "?" chars to "%" before doing a
VMS glob...at no loss of functionality, since "?" isn't a valid
filename char on VMS. From Charles Lane.
p4raw-id: //depot/perl@12388
Diffstat (limited to 'doio.c')
-rw-r--r-- | doio.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -2195,6 +2195,8 @@ Perl_start_glob (pTHX_ SV *tmpglob, IO *io) ok = ((wilddsc.dsc$a_pointer = tovmspath(SvPVX(tmpglob),vmsspec)) != NULL); else ok = ((wilddsc.dsc$a_pointer = tovmsspec(SvPVX(tmpglob),vmsspec)) != NULL); if (ok) wilddsc.dsc$w_length = (unsigned short int) strlen(wilddsc.dsc$a_pointer); + for (cp=wilddsc.dsc$a_pointer; ok && cp && *cp; cp++) + if (*cp == '?') *cp = '%'; /* VMS style single-char wildcard */ while (ok && ((sts = lib$find_file(&wilddsc,&rsdsc,&cxt, &dfltdsc,NULL,NULL,NULL))&1)) { end = rstr + (unsigned long int) *rslt; |