# Fileifying directory specs
__down_:[__the_.__garden_.__path_] fileify __down_:[__the_.__garden_]__path_.dir;1 ^
[.__down_.__the_.__garden_.__path_] fileify [.__down_.__the_.__garden_]__path_.dir;1 ^
-/__down_/__the_/__garden_/__path_ fileify /__down_/__the_/__garden_/__path_.dir;1 /__down_/__the_/__garden_/__path_
-/__down_/__the_/__garden_/__path_/ fileify /__down_/__the_/__garden_/__path_.dir;1 /__down_/__the_/__garden_/__path_
-__down_/__the_/__garden_/__path_ fileify __down_/__the_/__garden_/__path_.dir;1 __down_/__the_/__garden_/__path_
+/__down_/__the_/__garden_/__path_ fileify /__down_/__the_/__garden_/__path_.dir;1 ^
+/__down_/__the_/__garden_/__path_/ fileify /__down_/__the_/__garden_/__path_.dir;1 ^
+__down_/__the_/__garden_/__path_ fileify __down_/__the_/__garden_/__path_.dir;1 ^
__down_:[__the_.__garden_]__path_ fileify __down_:[__the_.__garden_]__path_.dir;1 ^
__down_:[__the_.__garden_]__path_. fileify ^ __down_:[__the_.__garden_]__path_^..dir;1 # N.B. trailing . ==> null type
__down_:[__the_]__garden_.__path_ fileify ^ __down_:[__the_]__garden_^.__path_.dir;1 #undef
-/__down_/__the_/__garden_/__path_. fileify ^ /__down_/__the_/__garden_/__path_. # N.B. trailing . ==> null type
-/__down_/__the_/__garden_.__path_ fileify ^ /__down_/__the_/__garden_.__path_
+/__down_/__the_/__garden_/__path_. fileify ^ /__down_/__the_/__garden_/__path_..dir;1 # N.B. trailing . ==> null type
+/__down_/__the_/__garden_.__path_ fileify ^ /__down_/__the_/__garden_.__path_.dir;1
# and pathifying them
__down_:[__the_.__garden_]__path_.dir;1 pathify __down_:[__the_.__garden_.__path_] ^
char *cp1, *cp2, *lastdir;
char *trndir, *vmsdir;
unsigned short int trnlnm_iter_count;
- int is_vms = 0;
- int is_unix = 0;
int sts;
if (utf8_fl != NULL)
*utf8_fl = 0;
cp1 = strpbrk(trndir,"]:>");
if (hasfilename || !cp1) { /* filename present or not VMS */
- if (decc_efs_charset && !cp1) {
-
- /* EFS handling for UNIX mode */
-
- /* Just remove the trailing '/' and we should be done */
- STRLEN trndir_len;
- trndir_len = strlen(trndir);
-
- if (trndir_len > 1) {
- trndir_len--;
- if (trndir[trndir_len] == '/') {
- trndir[trndir_len] = '\0';
- }
- }
- my_strlcpy(buf, trndir, VMS_MAXRSS);
- PerlMem_free(trndir);
- PerlMem_free(vmsdir);
- return buf;
- }
-
- /* For non-EFS mode, this is left for backwards compatibility */
- /* For EFS mode, this is only done for VMS format filespecs as */
- /* Perl programs generally have problems when a UNIX format spec */
- /* returns a VMS format spec */
if (trndir[0] == '.') {
if (trndir[1] == '\0' || (trndir[1] == '/' && trndir[2] == '\0')) {
PerlMem_free(trndir);
/* We've picked up everything up to the directory file name.
Now just add the type and version, and we're set. */
-
- /* We should only add type for VMS syntax, but historically Perl
- has added it for UNIX style also */
-
- /* Fix me - we should not be using the same routine for VMS and
- UNIX format files. Things are too tangled so we need to lookup
- what syntax the output is */
-
- is_unix = 0;
- is_vms = 0;
- lastdir = strrchr(trndir,'/');
- if (lastdir) {
- is_unix = 1;
- } else {
- lastdir = strpbrk(trndir,"]:>");
- if (lastdir) {
- is_vms = 1;
- }
- }
-
- if ((is_vms == 0) && (is_unix == 0)) {
- /* We still do not know? */
- is_unix = decc_filename_unix_report;
- if (is_unix == 0)
- is_vms = 1;
- }
-
- if ((is_unix && !decc_efs_charset) || is_vms) {
-
- /* It is a bug to add a .dir to a UNIX format directory spec */
- /* However Perl on VMS may have programs that expect this so */
- /* If not using EFS character specifications allow it. */
-
- if ((!decc_efs_case_preserve) && vms_process_case_tolerant) {
- /* Traditionally Perl expects filenames in lower case */
- strcat(buf, ".dir");
- } else {
- /* VMS expects the .DIR to be in upper case */
- strcat(buf, ".DIR");
- }
-
- /* It is also a bug to put a VMS format version on a UNIX file */
- /* specification. Perl self tests are looking for this */
- if (is_vms || !(decc_efs_charset || decc_filename_unix_report))
- strcat(buf, ";1");
- }
+ if ((!decc_efs_case_preserve) && vms_process_case_tolerant)
+ strcat(buf,".dir;1");
+ else
+ strcat(buf,".DIR;1");
PerlMem_free(trndir);
PerlMem_free(vmsdir);
return buf;