summaryrefslogtreecommitdiff
path: root/gs/src/gp_vms.c
diff options
context:
space:
mode:
authorIgor Melichev <igor.melichev@artifex.com>2003-03-07 14:57:47 +0000
committerIgor Melichev <igor.melichev@artifex.com>2003-03-07 14:57:47 +0000
commitf6ca60536a0f619b209898951e331cd32f94bf72 (patch)
treede65c67aa71bf097619795ddfcba5806fe3511f6 /gs/src/gp_vms.c
parent49d3fe45ea8f49e253d2e0e6570bf9705e8061be (diff)
Fix (file_name_combine) : Improving the OpenVMS path syntax.
DETAILS : This patch does not change any behavior with regular build. With NEW_COMBINE_PATH 1 it allows to combine with filenames like (x]y) . git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@3699 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs/src/gp_vms.c')
-rw-r--r--gs/src/gp_vms.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gs/src/gp_vms.c b/gs/src/gp_vms.c
index 62cf5623c..94eabc758 100644
--- a/gs/src/gp_vms.c
+++ b/gs/src/gp_vms.c
@@ -625,8 +625,10 @@ gp_file_name_combine(const char *prefix, uint plen, const char *fname, uint flen
*blen = flen1;
return gp_combine_success;
}
- if (((prefix[plen - 1] == ']' || prefix[plen - 1] == ':') && fname[0] != '[') ||
- (prefix[plen - 1] == ':' && fname[0] == '[')) {
+ if ( (prefix[plen - 1] == ':' && fname[0] == '[') ||
+ ((prefix[plen - 1] == ']' || prefix[plen - 1] == ':') &&
+ memchr(fname, ']', flen) == 0)
+ ) {
/* Just concatenate. */
if (plen + flen + 1 > *blen)
return gp_combine_small_buffer;