#define wxFILE_SEP_PATH_DOS wxT('\\')
#define wxFILE_SEP_PATH_UNIX wxT('/')
#define wxFILE_SEP_PATH_MAC wxT(':')
+#define wxFILE_SEP_PATH_VMS wxT('/') //This is the Unix way, but somtimes
+ //users will give the VMS native paths
+ //and than a ']' is needed.
+ // Jouk
// separator in the path list (as in PATH environment variable)
// there is no PATH variable in Classic Mac OS so just use the
string.obj,\
sysopt.obj,\
tbarbase.obj,\
+ textbuf.obj,\
textcmn.obj,\
textfile.obj,\
timercmn.obj,\
sysopt.cpp,\
string.cpp,\
tbarbase.cpp,\
+ textbuf.cpp,\
textcmn.cpp,\
textfile.cpp,\
timercmn.cpp,\
sysopt.obj : sysopt.cpp
string.obj : string.cpp
tbarbase.obj : tbarbase.cpp
+textbuf.obj : textbuf.cpp
textcmn.obj : textcmn.cpp
textfile.obj : textfile.cpp
timercmn.obj : timercmn.cpp
/* static */
bool wxFileName::IsCaseSensitive( wxPathFormat format )
{
- // only DOS filenames are case-sensitive
- return GetFormat(format) != wxPATH_DOS;
+ // only DOS and OpenVMS filenames are case-sensitive
+ return ( GetFormat(format) != wxPATH_DOS &
+ GetFormat(format) != wxPATH_VMS );
}
bool wxFileName::IsRelative( wxPathFormat format )
case wxPATH_MAC:
seps = wxFILE_SEP_PATH_MAC;
break;
+
+ case wxPATH_VMS:
+ seps = wxFILE_SEP_PATH_VMS;
+ break;
}
return seps;
}
}
else
+ if (format == wxPATH_VMS)
+ {
+ ret += '[';
+ for (size_t i = 0; i < m_dirs.GetCount(); i++)
+ {
+ ret += '.';
+ ret += m_dirs[i];
+ }
+ ret += ']';
+ }
+ else
{
for (size_t i = 0; i < m_dirs.GetCount(); i++)
{
format = wxPATH_DOS;
#elif defined(__WXMAC__) && !defined(__DARWIN__)
format = wxPATH_MAC;
+#elif defined(__VMS)
+ format = wxPATH_VMS;
#else
format = wxPATH_UNIX;
#endif
posLastDot = wxString::npos;
}
}
+ else
+ if ( (posLastDot != wxString::npos) && (format == wxPATH_VMS) )
+ {
+ if ( (posLastDot == 0) ||
+ (fullpath[posLastDot - 1] == ']' ) )
+ {
+ // under OpenVMS, dot may be (and commonly is) the first character of
+ // the filename, don't treat the entire filename as extension in
+ // this case
+ posLastDot = wxString::npos;
+ }
+ }
// if we do have a dot and a slash, check that the dot is in the name part
if ( (posLastDot != wxString::npos) &&