]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filename.cpp
Set HTML data even in Unicode mode
[wxWidgets.git] / src / common / filename.cpp
index 80ed64811c6c1f524006d98cfc1f69741466987d..d1766a8179453f8f503c5c886f29d6c6a2b12785 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "filename.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -614,11 +610,11 @@ wxFileName::CreateTempFileName(const wxString& prefix, wxFile *fileTemp)
         // FIXME. Create \temp dir?
         dir = wxT("\\");
     }
-    path = dir + wxT("\\") + prefix;
+    path = dir + wxT("\\") + name;
     int i = 1;
     while (FileExists(path))
     {
-        path = dir + wxT("\\") + prefix ;
+        path = dir + wxT("\\") + name ;
         path << i;
         i ++;
     }
@@ -1548,16 +1544,17 @@ wxString wxFileName::GetLongPath() const
 
             wxDynamicLibrary dllKernel(_T("kernel32"));
 
-#ifdef _UNICODE
-    #define ADD_STR_SFX(name) L#name L"W"
-#else
-    #define ADD_STR_SFX(name) #name "A"
-#endif
+            const wxChar* GetLongPathName = _T("GetLongPathName")
+#if wxUSE_UNICODE
+                              _T("W");
+#else // ANSI
+                              _T("A");
+#endif // Unicode/ANSI
 
-            if ( dllKernel.HasSymbol(ADD_STR_SFX(GetLongPathName)) )
+            if ( dllKernel.HasSymbol(GetLongPathName) )
             {
                 s_pfnGetLongPathName = (GET_LONG_PATH_NAME)
-                    dllKernel.GetSymbol(ADD_STR_SFX(GetLongPathName));
+                    dllKernel.GetSymbol(GetLongPathName);
             }
 
             // note that kernel32.dll can be unloaded, it stays in memory
@@ -1893,6 +1890,8 @@ bool wxFileName::SetTimes(const wxDateTime *dtAccess,
         }
     }
 #elif defined(__UNIX_LIKE__) || (defined(__DOS__) && defined(__WATCOMC__))
+    wxUnusedVar(dtCreate);
+
     if ( !dtAccess && !dtMod )
     {
         // can't modify the creation time anyhow, don't try
@@ -1909,6 +1908,9 @@ bool wxFileName::SetTimes(const wxDateTime *dtAccess,
         return true;
     }
 #else // other platform
+    wxUnusedVar(dtAccess);
+    wxUnusedVar(dtMod);
+    wxUnusedVar(dtCreate);
 #endif // platforms
 
     wxLogSysError(_("Failed to modify file times for '%s'"),
@@ -1999,6 +2001,9 @@ bool wxFileName::GetTimes(wxDateTime *dtAccess,
         return true;
     }
 #else // other platform
+    wxUnusedVar(dtAccess);
+    wxUnusedVar(dtMod);
+    wxUnusedVar(dtCreate);
 #endif // platforms
 
     wxLogSysError(_("Failed to retrieve file times for '%s'"),