]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/utils.cpp
pressing PageDown and then PageUp should return to the same item
[wxWidgets.git] / src / msw / utils.cpp
index c941c45a574b2416ebc06cde4e5250a54f73cae7..0b2827e0e798051b7bff6bc53221b70bb4e11ab0 100644 (file)
@@ -56,7 +56,7 @@
     #endif
 #endif  //GNUWIN32
 
-#if defined(__CYGWIN__) && !defined(__TWIN32__)
+#if defined(__CYGWIN__)
     #include <sys/unistd.h>
     #include <sys/stat.h>
     #include <sys/cygwin.h> // for cygwin_conv_to_full_win32_path()
@@ -147,7 +147,7 @@ static const wxChar eUSERID[]    = wxT("UserId");
 // Get hostname only (without domain name)
 bool wxGetHostName(wxChar *buf, int maxSize)
 {
-#if defined(__WIN32__) && !defined(__TWIN32__) && !defined(__WXMICROWIN__)
+#if defined(__WIN32__) && !defined(__WXMICROWIN__)
     DWORD nSize = maxSize;
     if ( !::GetComputerName(buf, &nSize) )
     {
@@ -173,16 +173,14 @@ bool wxGetHostName(wxChar *buf, int maxSize)
 // get full hostname (with domain name if possible)
 bool wxGetFullHostName(wxChar *buf, int maxSize)
 {
-#if defined(__WIN32__) && !defined(__TWIN32__) && !defined(__WXMICROWIN__) && ! (defined(__GNUWIN32__) && !defined(__MINGW32__))
+#if defined(__WIN32__) && !defined(__WXMICROWIN__) && ! (defined(__GNUWIN32__) && !defined(__MINGW32__))
     // TODO should use GetComputerNameEx() when available
 
     // the idea is that if someone had set wxUSE_SOCKETS to 0 the code
     // shouldn't use winsock.dll (a.k.a. ws2_32.dll) at all so only use this
     // code if we link with it anyhow
 #if wxUSE_SOCKETS
-    //FIXME __DIGITALMARS__ why is using sockets not properly turned off in setup.h ??
-    // find which library should contain sockets for Digital Mars CE April 2003
-#ifndef __DIGITALMARS__
+
     WSADATA wsa;
     if ( WSAStartup(MAKEWORD(1, 1), &wsa) == 0 )
     {
@@ -218,7 +216,6 @@ bool wxGetFullHostName(wxChar *buf, int maxSize)
             return TRUE;
         }
     }
-#endif //__DIGITALMARS__
 
 #endif // wxUSE_SOCKETS
 
@@ -230,7 +227,7 @@ bool wxGetFullHostName(wxChar *buf, int maxSize)
 // Get user ID e.g. jacs
 bool wxGetUserId(wxChar *buf, int maxSize)
 {
-#if defined(__WIN32__) && !defined(__win32s__) && !defined(__TWIN32__) && !defined(__WXMICROWIN__)
+#if defined(__WIN32__) && !defined(__win32s__) && !defined(__WXMICROWIN__)
     DWORD nSize = maxSize;
     if ( ::GetUserName(buf, &nSize) == 0 )
     {
@@ -369,7 +366,7 @@ const wxChar* wxGetHomeDir(wxString *pstr)
 {
   wxString& strDir = *pstr;
 
-  #if defined(__UNIX__) && !defined(__TWIN32__)
+  #if defined(__UNIX__)
     const wxChar *szHome = wxGetenv("HOME");
     if ( szHome == NULL ) {
       // we're homeless...
@@ -937,7 +934,7 @@ bool wxShutdown(wxShutdownFlags wFlags)
 // Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX)
 long wxGetFreeMemory()
 {
-#if defined(__WIN32__) && !defined(__BORLANDC__) && !defined(__TWIN32__)
+#if defined(__WIN32__) && !defined(__BORLANDC__)
     MEMORYSTATUS memStatus;
     memStatus.dwLength = sizeof(MEMORYSTATUS);
     GlobalMemoryStatus(&memStatus);
@@ -1319,7 +1316,11 @@ static HCURSOR gs_wxBusyCursor = 0;     // new, busy cursor
 static HCURSOR gs_wxBusyCursorOld = 0;  // old cursor
 static int gs_wxBusyCursorCount = 0;
 
+#ifdef __DIGITALMARS__
+extern "C" HCURSOR wxGetCurrentBusyCursor()
+#else
 extern HCURSOR wxGetCurrentBusyCursor()
+#endif
 {
     return gs_wxBusyCursor;
 }