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:
@@ -258,6 +258,10 @@ WXDLLEXPORT bool wxRmdir(const wxString& dir, int flags = 0);
|
|||||||
#define wxFILE_SEP_PATH_DOS wxT('\\')
|
#define wxFILE_SEP_PATH_DOS wxT('\\')
|
||||||
#define wxFILE_SEP_PATH_UNIX wxT('/')
|
#define wxFILE_SEP_PATH_UNIX wxT('/')
|
||||||
#define wxFILE_SEP_PATH_MAC 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)
|
// separator in the path list (as in PATH environment variable)
|
||||||
// there is no PATH variable in Classic Mac OS so just use the
|
// there is no PATH variable in Classic Mac OS so just use the
|
||||||
|
@@ -51,6 +51,7 @@ enum wxPathFormat
|
|||||||
wxPATH_UNIX,
|
wxPATH_UNIX,
|
||||||
wxPATH_MAC,
|
wxPATH_MAC,
|
||||||
wxPATH_DOS,
|
wxPATH_DOS,
|
||||||
|
wxPATH_VMS,
|
||||||
|
|
||||||
wxPATH_BEOS = wxPATH_UNIX,
|
wxPATH_BEOS = wxPATH_UNIX,
|
||||||
wxPATH_WIN = wxPATH_DOS,
|
wxPATH_WIN = wxPATH_DOS,
|
||||||
|
@@ -497,6 +497,10 @@
|
|||||||
* Use wxFile class
|
* Use wxFile class
|
||||||
*/
|
*/
|
||||||
#define wxUSE_FILE 1
|
#define wxUSE_FILE 1
|
||||||
|
/*
|
||||||
|
* Use wxTextBuffer class
|
||||||
|
*/
|
||||||
|
#define wxUSE_TEXTBUFFER 1
|
||||||
/*
|
/*
|
||||||
* Use wxTextFile class
|
* Use wxTextFile class
|
||||||
*/
|
*/
|
||||||
|
@@ -128,6 +128,7 @@ OBJECTS1=framecmn.obj,\
|
|||||||
string.obj,\
|
string.obj,\
|
||||||
sysopt.obj,\
|
sysopt.obj,\
|
||||||
tbarbase.obj,\
|
tbarbase.obj,\
|
||||||
|
textbuf.obj,\
|
||||||
textcmn.obj,\
|
textcmn.obj,\
|
||||||
textfile.obj,\
|
textfile.obj,\
|
||||||
timercmn.obj,\
|
timercmn.obj,\
|
||||||
@@ -241,6 +242,7 @@ SOURCES = \
|
|||||||
sysopt.cpp,\
|
sysopt.cpp,\
|
||||||
string.cpp,\
|
string.cpp,\
|
||||||
tbarbase.cpp,\
|
tbarbase.cpp,\
|
||||||
|
textbuf.cpp,\
|
||||||
textcmn.cpp,\
|
textcmn.cpp,\
|
||||||
textfile.cpp,\
|
textfile.cpp,\
|
||||||
timercmn.cpp,\
|
timercmn.cpp,\
|
||||||
@@ -386,6 +388,7 @@ stream.obj : stream.cpp
|
|||||||
sysopt.obj : sysopt.cpp
|
sysopt.obj : sysopt.cpp
|
||||||
string.obj : string.cpp
|
string.obj : string.cpp
|
||||||
tbarbase.obj : tbarbase.cpp
|
tbarbase.obj : tbarbase.cpp
|
||||||
|
textbuf.obj : textbuf.cpp
|
||||||
textcmn.obj : textcmn.cpp
|
textcmn.obj : textcmn.cpp
|
||||||
textfile.obj : textfile.cpp
|
textfile.obj : textfile.cpp
|
||||||
timercmn.obj : timercmn.cpp
|
timercmn.obj : timercmn.cpp
|
||||||
|
@@ -497,8 +497,9 @@ bool wxFileName::SameAs( const wxFileName &filepath, wxPathFormat format)
|
|||||||
/* static */
|
/* static */
|
||||||
bool wxFileName::IsCaseSensitive( wxPathFormat format )
|
bool wxFileName::IsCaseSensitive( wxPathFormat format )
|
||||||
{
|
{
|
||||||
// only DOS filenames are case-sensitive
|
// only DOS and OpenVMS filenames are case-sensitive
|
||||||
return GetFormat(format) != wxPATH_DOS;
|
return ( GetFormat(format) != wxPATH_DOS &
|
||||||
|
GetFormat(format) != wxPATH_VMS );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFileName::IsRelative( wxPathFormat format )
|
bool wxFileName::IsRelative( wxPathFormat format )
|
||||||
@@ -544,6 +545,10 @@ wxString wxFileName::GetPathSeparators(wxPathFormat format)
|
|||||||
case wxPATH_MAC:
|
case wxPATH_MAC:
|
||||||
seps = wxFILE_SEP_PATH_MAC;
|
seps = wxFILE_SEP_PATH_MAC;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case wxPATH_VMS:
|
||||||
|
seps = wxFILE_SEP_PATH_VMS;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return seps;
|
return seps;
|
||||||
@@ -646,6 +651,17 @@ wxString wxFileName::GetFullPath( wxPathFormat format ) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
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++)
|
for (size_t i = 0; i < m_dirs.GetCount(); i++)
|
||||||
{
|
{
|
||||||
@@ -813,6 +829,8 @@ wxPathFormat wxFileName::GetFormat( wxPathFormat format )
|
|||||||
format = wxPATH_DOS;
|
format = wxPATH_DOS;
|
||||||
#elif defined(__WXMAC__) && !defined(__DARWIN__)
|
#elif defined(__WXMAC__) && !defined(__DARWIN__)
|
||||||
format = wxPATH_MAC;
|
format = wxPATH_MAC;
|
||||||
|
#elif defined(__VMS)
|
||||||
|
format = wxPATH_VMS;
|
||||||
#else
|
#else
|
||||||
format = wxPATH_UNIX;
|
format = wxPATH_UNIX;
|
||||||
#endif
|
#endif
|
||||||
@@ -847,6 +865,18 @@ void wxFileName::SplitPath(const wxString& fullpath,
|
|||||||
posLastDot = wxString::npos;
|
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 we do have a dot and a slash, check that the dot is in the name part
|
||||||
if ( (posLastDot != wxString::npos) &&
|
if ( (posLastDot != wxString::npos) &&
|
||||||
|
Reference in New Issue
Block a user