summaryrefslogtreecommitdiff
path: root/gs/src/gp_vms.c
diff options
context:
space:
mode:
authorIgor Melichev <igor.melichev@artifex.com>2003-03-02 22:52:26 +0000
committerIgor Melichev <igor.melichev@artifex.com>2003-03-02 22:52:26 +0000
commit297a3c9045c59aedcbd895040418b492249c5573 (patch)
tree58c1a447173541e369ec02dde11660437e439f5f /gs/src/gp_vms.c
parent2c590c11a9a463dd4544f204e93d07da36b5d93b (diff)
gp_file_name_combine : Adding more helpers for OpenVMS support.
DETAILS: The previous patch unintentionally set NEW_COMBINE_PATH=1. This one repairs it. OpenVMS uses different separators for directory and file items - '.' and ']'. More helpers added to resolve this. gp_file_name_conbine_generic now checks which one is needed for concatenating paths. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@3681 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs/src/gp_vms.c')
-rw-r--r--gs/src/gp_vms.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/gs/src/gp_vms.c b/gs/src/gp_vms.c
index 82ddfd197..b1829a2bd 100644
--- a/gs/src/gp_vms.c
+++ b/gs/src/gp_vms.c
@@ -537,9 +537,11 @@ uint gs_file_name_check_separator(const char *fname, int len, const char *item)
if (len > 0) {
/*
* Ghostscript specifics : an extended syntax like Mac OS.
- * We intentionally don't consider ':', '[' and ']' as separators
+ * We intentionally don't consider ':' and '[' as separators
* in forward search, see gp_file_name_combine.
*/
+ if (fname[0] == ']')
+ return 1; /* It is a file separator. */
if (fname[0] == '.') {
if (fname == item + 1 && item[0] == '.')
return 1; /* It is a separator after parent. */
@@ -565,6 +567,14 @@ bool gp_file_name_is_current(const char *fname, uint len)
}
const char *gp_file_name_separator(void)
+{ return "]";
+}
+
+const char *gp_file_name_directory_separator(void)
+{ return ".";
+}
+
+const char *gp_file_name_parent(void)
{ return ".";
}
@@ -586,6 +596,9 @@ gp_file_name_combine(const char *prefix, uint plen,
{
/*
* Reduce it to the MacOS case.
+ *
+ * Implementation restriction : fname must not contain a part of
+ * "device:[root.]["
*/
uint rlen, flen1 = flen, plen1 = plen;
const char *fname1 = fname;