projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix warnings about parameters shadowing member variables
[wxWidgets.git]
/
src
/
msw
/
utils.cpp
diff --git
a/src/msw/utils.cpp
b/src/msw/utils.cpp
index c236c47c4e6e4909da60fc150f58d8e42ceb9185..c0efa166b7e964f6134be6bf0dade8abfa83db23 100644
(file)
--- a/
src/msw/utils.cpp
+++ b/
src/msw/utils.cpp
@@
-514,7
+514,7
@@
bool wxGetDiskSpace(const wxString& WXUNUSED_IN_WINCE(path),
ULARGE_INTEGER bytesFree, bytesTotal;
// may pass the path as is, GetDiskFreeSpaceEx() is smart enough
ULARGE_INTEGER bytesFree, bytesTotal;
// may pass the path as is, GetDiskFreeSpaceEx() is smart enough
- if ( !pGetDiskFreeSpaceEx(path,
+ if ( !pGetDiskFreeSpaceEx(path
.fn_str()
,
&bytesFree,
&bytesTotal,
NULL) )
&bytesFree,
&bytesTotal,
NULL) )
@@
-564,7
+564,7
@@
bool wxGetDiskSpace(const wxString& WXUNUSED_IN_WINCE(path),
// FIXME: this is wrong, we should extract the root drive from path
// instead, but this is the job for wxFileName...
// FIXME: this is wrong, we should extract the root drive from path
// instead, but this is the job for wxFileName...
- if ( !::GetDiskFreeSpace(path,
+ if ( !::GetDiskFreeSpace(path
.fn_str()
,
&lSectorsPerCluster,
&lBytesPerSector,
&lNumberOfFreeClusters,
&lSectorsPerCluster,
&lBytesPerSector,
&lNumberOfFreeClusters,
@@
-608,7
+608,7
@@
bool wxGetEnv(const wxString& WXUNUSED_IN_WINCE(var),
return false;
#else // Win32
// first get the size of the buffer
return false;
#else // Win32
// first get the size of the buffer
- DWORD dwRet = ::GetEnvironmentVariable(var, NULL, 0);
+ DWORD dwRet = ::GetEnvironmentVariable(var
.wx_str()
, NULL, 0);
if ( !dwRet )
{
// this means that there is no such variable
if ( !dwRet )
{
// this means that there is no such variable
@@
-617,7
+617,8
@@
bool wxGetEnv(const wxString& WXUNUSED_IN_WINCE(var),
if ( value )
{
if ( value )
{
- (void)::GetEnvironmentVariable(var, wxStringBuffer(*value, dwRet),
+ (void)::GetEnvironmentVariable(var.wx_str(),
+ wxStringBuffer(*value, dwRet),
dwRet);
}
dwRet);
}
@@
-625,8
+626,8
@@
bool wxGetEnv(const wxString& WXUNUSED_IN_WINCE(var),
#endif // WinCE/32
}
#endif // WinCE/32
}
-bool wxSetEnv(const wxString& WXUNUSED_IN_WINCE(var),
- const wxChar *WXUNUSED_IN_WINCE(value))
+bool wx
Do
SetEnv(const wxString& WXUNUSED_IN_WINCE(var),
+
const wxChar *WXUNUSED_IN_WINCE(value))
{
// some compilers have putenv() or _putenv() or _wputenv() but it's better
// to always use Win32 function directly instead of dealing with them
{
// some compilers have putenv() or _putenv() or _wputenv() but it's better
// to always use Win32 function directly instead of dealing with them
@@
-634,7
+635,7
@@
bool wxSetEnv(const wxString& WXUNUSED_IN_WINCE(var),
// no environment variables under CE
return false;
#else
// no environment variables under CE
return false;
#else
- if ( !::SetEnvironmentVariable(var, value) )
+ if ( !::SetEnvironmentVariable(var
.wx_str()
, value) )
{
wxLogLastError(_T("SetEnvironmentVariable"));
{
wxLogLastError(_T("SetEnvironmentVariable"));
@@
-645,6
+646,16
@@
bool wxSetEnv(const wxString& WXUNUSED_IN_WINCE(var),
#endif
}
#endif
}
+bool wxSetEnv(const wxString& variable, const wxString& value)
+{
+ return wxDoSetEnv(variable, value.wx_str());
+}
+
+bool wxUnsetEnv(const wxString& variable)
+{
+ return wxDoSetEnv(variable, NULL);
+}
+
// ----------------------------------------------------------------------------
// process management
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// process management
// ----------------------------------------------------------------------------
@@
-1444,7
+1455,7
@@
extern WXDLLIMPEXP_BASE long wxEncodingToCodepage(wxFontEncoding encoding)
return (long) ret;
}
return (long) ret;
}
-extern long wxCharsetToCodepage(const
wxC
har *name)
+extern long wxCharsetToCodepage(const
c
har *name)
{
// first get the font encoding for this charset
if ( !name )
{
// first get the font encoding for this charset
if ( !name )
@@
-1463,7
+1474,7
@@
extern long wxCharsetToCodepage(const wxChar *name)
#include "wx/msw/registry.h"
// this should work if Internet Exploiter is installed
#include "wx/msw/registry.h"
// this should work if Internet Exploiter is installed
-extern long wxCharsetToCodepage(const
wxC
har *name)
+extern long wxCharsetToCodepage(const
c
har *name)
{
if (!name)
return GetACP();
{
if (!name)
return GetACP();