summaryrefslogtreecommitdiff
path: root/vms/vms.c
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2012-11-21 22:03:03 -0600
committerCraig A. Berry <craigberry@mac.com>2012-11-21 22:03:03 -0600
commitb3efb2487fa7bdef70865822dabaa2dc0000dde1 (patch)
treea1c9e51a037f23d5cea9060b3c9dd32b5a7e27a3 /vms/vms.c
parentf7b5f3905f5c8cf217e3bd3c1aa352e1bf502e73 (diff)
downloadperl-b3efb2487fa7bdef70865822dabaa2dc0000dde1.tar.gz
Better pass-through handling for tovmsspec.
When translating filenames from Unix syntax to VMS syntax, there are some unparseable cases that are best left unchanged. We were doing this with extended filename syntax turned off, but we still need it even when extended filename syntax is turned on, such as for unescaped extended characters in a name that has no directory delimiters.
Diffstat (limited to 'vms/vms.c')
-rw-r--r--vms/vms.c32
1 files changed, 8 insertions, 24 deletions
diff --git a/vms/vms.c b/vms/vms.c
index 554befc24e..b08ff18676 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -8355,33 +8355,17 @@ static char *int_tovmsspec
dirend = strrchr(path,'/');
if (dirend == NULL) {
- char *macro_start;
- int has_macro;
-
/* If we get here with no UNIX directory delimiters, then this is
- not a complete file specification, either garbage a UNIX glob
- specification that can not be converted to a VMS wildcard, or
- it a UNIX shell macro. MakeMaker wants shell macros passed
- through AS-IS,
-
- utf8 flag setting needs to be preserved.
+ * not a complete file specification, such as a Unix glob
+ * specification, shell macro, make macro, or even a valid VMS
+ * filespec but with unescaped extended characters. The safest
+ * thing in all these cases is to pass it through as-is.
*/
- hasdir = 0;
-
- has_macro = 0;
- macro_start = strchr(path,'$');
- if (macro_start != NULL) {
- if (macro_start[1] == '(') {
- has_macro = 1;
- }
- }
- if ((decc_efs_charset == 0) || (has_macro)) {
- my_strlcpy(rslt, path, VMS_MAXRSS);
- if (vms_debug_fileify) {
- fprintf(stderr, "int_tovmsspec: rslt = %s\n", rslt);
- }
- return rslt;
+ my_strlcpy(rslt, path, VMS_MAXRSS);
+ if (vms_debug_fileify) {
+ fprintf(stderr, "int_tovmsspec: rslt = %s\n", rslt);
}
+ return rslt;
}
else if (*(dirend+1) == '.') { /* do we have trailing "/." or "/.." or "/..."? */
if (!*(dirend+2)) dirend +=2;