summaryrefslogtreecommitdiff
path: root/vms
diff options
context:
space:
mode:
Diffstat (limited to 'vms')
-rw-r--r--vms/vms.c122
1 files changed, 61 insertions, 61 deletions
diff --git a/vms/vms.c b/vms/vms.c
index bcfae2cc29..996d4d0b54 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -13243,66 +13243,66 @@ mp_do_vms_realpath(pTHX_ const char *filespec, char *outbuf,
if (haslower) __mystrtolower(rslt);
}
}
-+ } else {
-+
-+ /* Now for some hacks to deal with backwards and forward */
-+ /* compatibilty */
-+ if (!decc_efs_charset) {
-+
-+ /* 1. ODS-2 mode wants to do a syntax only translation */
-+ rslt = do_rmsexpand(filespec, outbuf,
-+ 0, NULL, 0, NULL, utf8_fl);
-+
-+ } else {
-+ if (decc_filename_unix_report) {
-+ char * dir_name;
-+ char * vms_dir_name;
-+ char * file_name;
-+
-+ /* 2. ODS-5 / UNIX report mode should return a failure */
-+ /* if the parent directory also does not exist */
-+ /* Otherwise, get the real path for the parent */
-+ /* and add the child to it.
-+
-+ /* basename / dirname only available for VMS 7.0+ */
-+ /* So we may need to implement them as common routines */
-+
-+ Newx(dir_name, VMS_MAXRSS + 1, char);
-+ Newx(vms_dir_name, VMS_MAXRSS + 1, char);
-+ dir_name[0] = '\0';
-+ file_name = NULL;
-+
-+ /* First try a VMS parse */
-+ sts = vms_split_path
-+ (filespec,
-+ &v_spec,
-+ &v_len,
-+ &r_spec,
-+ &r_len,
-+ &d_spec,
-+ &d_len,
-+ &n_spec,
-+ &n_len,
-+ &e_spec,
-+ &e_len,
-+ &vs_spec,
-+ &vs_len);
-+
-+ if (sts == 0) {
-+ /* This is VMS */
-+
-+ int dir_len = v_len + r_len + d_len + n_len;
-+ if (dir_len > 0) {
-+ strncpy(dir_name, filespec, dir_len);
-+ dir_name[dir_len] = '\0';
-+ file_name = (char *)&filespec[dir_len + 1];
-+ }
-+ } else {
-+ /* This must be UNIX */
-+ char * tchar;
-+
-+ tchar = strrchr(filespec, '/');
-+
+ } else {
+
+ /* Now for some hacks to deal with backwards and forward */
+ /* compatibilty */
+ if (!decc_efs_charset) {
+
+ /* 1. ODS-2 mode wants to do a syntax only translation */
+ rslt = do_rmsexpand(filespec, outbuf,
+ 0, NULL, 0, NULL, utf8_fl);
+
+ } else {
+ if (decc_filename_unix_report) {
+ char * dir_name;
+ char * vms_dir_name;
+ char * file_name;
+
+ /* 2. ODS-5 / UNIX report mode should return a failure */
+ /* if the parent directory also does not exist */
+ /* Otherwise, get the real path for the parent */
+ /* and add the child to it.
+
+ /* basename / dirname only available for VMS 7.0+ */
+ /* So we may need to implement them as common routines */
+
+ Newx(dir_name, VMS_MAXRSS + 1, char);
+ Newx(vms_dir_name, VMS_MAXRSS + 1, char);
+ dir_name[0] = '\0';
+ file_name = NULL;
+
+ /* First try a VMS parse */
+ sts = vms_split_path
+ (filespec,
+ &v_spec,
+ &v_len,
+ &r_spec,
+ &r_len,
+ &d_spec,
+ &d_len,
+ &n_spec,
+ &n_len,
+ &e_spec,
+ &e_len,
+ &vs_spec,
+ &vs_len);
+
+ if (sts == 0) {
+ /* This is VMS */
+
+ int dir_len = v_len + r_len + d_len + n_len;
+ if (dir_len > 0) {
+ strncpy(dir_name, filespec, dir_len);
+ dir_name[dir_len] = '\0';
+ file_name = (char *)&filespec[dir_len + 1];
+ }
+ } else {
+ /* This must be UNIX */
+ char * tchar;
+
+ tchar = strrchr(filespec, '/');
+
if (tchar != NULL) {
int dir_len = tchar - filespec;
strncpy(dir_name, filespec, dir_len);
@@ -13337,7 +13337,7 @@ mp_do_vms_realpath(pTHX_ const char *filespec, char *outbuf,
Safefree(dir_name);
}
}
-
+ }
Safefree(vms_spec);
}
return rslt;