Committing in .
Modified Files: wxWindows/setup.h_vms wxWindows/include/wx/filefn.h wxWindows/include/wx/filename.h wxWindows/src/common/descrip.mms wxWindows/src/common/filename.cpp Updates for OpenVMS, -Updated copmpile support for new files/features -First version of OpenVMS file support (wxPATH_VMS). (will need a lot of testing on OpenVMS systems) ---------------------------------------------------------------------- git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -497,8 +497,9 @@ bool wxFileName::SameAs( const wxFileName &filepath, wxPathFormat format)
|
||||
/* 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 )
|
||||
@@ -544,6 +545,10 @@ wxString wxFileName::GetPathSeparators(wxPathFormat format)
|
||||
case wxPATH_MAC:
|
||||
seps = wxFILE_SEP_PATH_MAC;
|
||||
break;
|
||||
|
||||
case wxPATH_VMS:
|
||||
seps = wxFILE_SEP_PATH_VMS;
|
||||
break;
|
||||
}
|
||||
|
||||
return seps;
|
||||
@@ -646,6 +651,17 @@ wxString wxFileName::GetFullPath( wxPathFormat format ) const
|
||||
}
|
||||
}
|
||||
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++)
|
||||
{
|
||||
@@ -813,6 +829,8 @@ wxPathFormat wxFileName::GetFormat( wxPathFormat format )
|
||||
format = wxPATH_DOS;
|
||||
#elif defined(__WXMAC__) && !defined(__DARWIN__)
|
||||
format = wxPATH_MAC;
|
||||
#elif defined(__VMS)
|
||||
format = wxPATH_VMS;
|
||||
#else
|
||||
format = wxPATH_UNIX;
|
||||
#endif
|
||||
@@ -847,6 +865,18 @@ void wxFileName::SplitPath(const wxString& fullpath,
|
||||
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) &&
|
||||
|
Reference in New Issue
Block a user