summaryrefslogtreecommitdiff
path: root/vms/vms.c
diff options
context:
space:
mode:
Diffstat (limited to 'vms/vms.c')
-rw-r--r--vms/vms.c76
1 files changed, 4 insertions, 72 deletions
diff --git a/vms/vms.c b/vms/vms.c
index 507d3b4d7a..dafb655267 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -5908,8 +5908,6 @@ int_fileify_dirspec(const char *dir, char *buf, int *utf8_fl)
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;
@@ -5992,30 +5990,6 @@ int_fileify_dirspec(const char *dir, char *buf, int *utf8_fl)
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);
@@ -6157,52 +6131,10 @@ int_fileify_dirspec(const char *dir, char *buf, int *utf8_fl)
/* 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;