]> git.saurik.com Git - wxWidgets.git/commitdiff
Committing in .
authorJouk Jansen <joukj@hrem.nano.tudelft.nl>
Fri, 23 Nov 2001 13:45:25 +0000 (13:45 +0000)
committerJouk Jansen <joukj@hrem.nano.tudelft.nl>
Fri, 23 Nov 2001 13:45:25 +0000 (13:45 +0000)
 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

include/wx/filefn.h
include/wx/filename.h
setup.h_vms
src/common/descrip.mms
src/common/filename.cpp

index e03a1027050b7aa482705d61a091096ffaf35328..a0fd19d272ef424389522bc0f3fc9273424f8b6a 100644 (file)
@@ -258,6 +258,10 @@ WXDLLEXPORT bool wxRmdir(const wxString& dir, int flags = 0);
 #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
index 58ca5ecc30d669eec67816c49e1462acafb918b1..cf12b36501ea056dd90a0d9151467b08cf52be4a 100644 (file)
@@ -51,6 +51,7 @@ enum wxPathFormat
     wxPATH_UNIX,
     wxPATH_MAC,
     wxPATH_DOS,
+    wxPATH_VMS,
 
     wxPATH_BEOS = wxPATH_UNIX,
     wxPATH_WIN = wxPATH_DOS,
index bc981e106d0d0073d3c95fbf89d19945befcd11a..10e724312fb611e967fdb57d66bb596bfb520e08 100644 (file)
  * Use wxFile class
  */
 #define wxUSE_FILE 1
+/*
+ * Use wxTextBuffer class
+ */
+#define wxUSE_TEXTBUFFER 1
 /*
  * Use wxTextFile class
  */
index d7a7cd9a1c9fc0ef50ca2b00342691b7788c46e3..ca8a36bf51534b06d872dc656aed6493e655fb7f 100644 (file)
@@ -128,6 +128,7 @@ OBJECTS1=framecmn.obj,\
                string.obj,\
                sysopt.obj,\
                tbarbase.obj,\
+               textbuf.obj,\
                textcmn.obj,\
                textfile.obj,\
                timercmn.obj,\
@@ -241,6 +242,7 @@ SOURCES = \
                sysopt.cpp,\
                string.cpp,\
                tbarbase.cpp,\
+               textbuf.cpp,\
                textcmn.cpp,\
                textfile.cpp,\
                timercmn.cpp,\
@@ -386,6 +388,7 @@ stream.obj : stream.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
index 38f20fee49fd8de3840fbf243ddf0d65607349b3..57907ce9e2dc2af7c1a093f929bd8073f4479130 100644 (file)
@@ -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) &&