diff options
author | Dan Sugalski <dan@sidhe.org> | 1999-08-13 02:00:42 -0700 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-08-13 14:29:47 +0000 |
commit | ebd8c45cb71addf3d8b647dc8bb0cf8a7de9822e (patch) | |
tree | 1c4ec10881d0fd4d85bf778c5d3bcc55c73cbf03 /vms | |
parent | 20fe1ea270754ae158cd9b7b3775ec869e80438c (diff) | |
download | perl-ebd8c45cb71addf3d8b647dc8bb0cf8a7de9822e.tar.gz |
fix up VMS->unix filename translation a bit
To: perl5-porters@perl.org, vmsperl@perl.org, bailey@newman.upenn.edu,
sarathy@activestate.com
Message-ID: <Pine.LNX.4.10.9908130849390.3950-100000@tuatha.sidhe.org>
p4raw-id: //depot/cfgperl@3979
Diffstat (limited to 'vms')
-rw-r--r-- | vms/vms.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -91,6 +91,10 @@ static struct dsc$descriptor_s *defenv[] = { &fildevdsc, &crtlenvdsc, NULL }; static struct dsc$descriptor_s **env_tables = defenv; static bool will_taint = FALSE; /* tainting active, but no PL_curinterp yet */ +/* True if we shouldn't treat barewords as logicals during directory */ +/* munching */ +static int no_translate_barewords; + /*{{{int vmstrnenv(const char *lnm, char *eqv, unsigned long int idx, struct dsc$descriptor_s **tabvec, unsigned long int flags) */ int vmstrnenv(const char *lnm, char *eqv, unsigned long int idx, @@ -1721,7 +1725,8 @@ static char *do_pathify_dirspec(char *dir,char *buf, int ts) if (*dir) strcpy(trndir,dir); else getcwd(trndir,sizeof trndir - 1); - while (!strpbrk(trndir,"/]:>") && my_trnlnm(trndir,trndir,0)) { + while (!strpbrk(trndir,"/]:>") && !no_translate_barewords + && my_trnlnm(trndir,trndir,0)) { STRLEN trnlen = strlen(trndir); /* Trap simple rooted lnms, and return lnm:[000000] */ @@ -5030,6 +5035,12 @@ init_os_extras() { char* file = __FILE__; dTHX; + char temp_buff[512]; + if (my_trnlnm("DECC$DISABLE_TO_VMS_LOGNAME_TRANSLATION", temp_buff, 0)) { + no_translate_barewords = TRUE; + } else { + no_translate_barewords = FALSE; + } newXSproto("VMS::Filespec::rmsexpand",rmsexpand_fromperl,file,"$;$"); newXSproto("VMS::Filespec::vmsify",vmsify_fromperl,file,"$"); |