]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/utilsexc.cpp
wxGTK1 : wx/private/eventloopsourcesmanager.h was missing in evtloop.cpp
[wxWidgets.git] / src / os2 / utilsexc.cpp
index 20d73e6f90eebd7e97afb92b80f4e2414d8ccf82..70e7e5a1edf69d70e39e7cdd0ed2d85d030502b0 100644 (file)
@@ -1,10 +1,9 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        utilsexec.cpp
+// Name:        src/os2/utilsexec.cpp
 // Purpose:     Various utilities
 // Author:      David Webster
 // Modified by:
 // Created:     10/17/99
 // Purpose:     Various utilities
 // Author:      David Webster
 // Modified by:
 // Created:     10/17/99
-// RCS-ID:      $Id$
 // Copyright:   (c) David Webster
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 // Copyright:   (c) David Webster
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 #include "wx/wxprec.h"
 
 #ifndef WX_PRECOMP
 #include "wx/wxprec.h"
 
 #ifndef WX_PRECOMP
-#include "wx/setup.h"
-#include "wx/utils.h"
-#include "wx/app.h"
-#include "wx/intl.h"
+    #include "wx/utils.h"
+    #include "wx/app.h"
+    #include "wx/intl.h"
+    #include "wx/log.h"
 #endif
 
 #endif
 
-#include "wx/log.h"
-
 #include "wx/process.h"
 
 #include "wx/os2/private.h"
 #include "wx/process.h"
 
 #include "wx/os2/private.h"
@@ -130,7 +127,8 @@ MRESULT APIENTRY wxExecuteWindowCbk( HWND   hWnd,
 
 long wxExecute( const wxString& rCommand,
                 int flags,
 
 long wxExecute( const wxString& rCommand,
                 int flags,
-                wxProcess* pHandler)
+                wxProcess* pHandler,
+                const wxExecuteEnv *env)
 {
     if (rCommand.empty())
     {
 {
     if (rCommand.empty())
     {
@@ -158,7 +156,7 @@ long wxExecute( const wxString& rCommand,
                       ,zArgs
                       ,zEnvs
                       ,&vResultCodes
                       ,zArgs
                       ,zEnvs
                       ,&vResultCodes
-                      ,(PSZ)rCommand.c_str()
+                      ,rCommand.c_str()
                      );
     if (rc != NO_ERROR)
     {
                      );
     if (rc != NO_ERROR)
     {
@@ -221,6 +219,7 @@ long wxExecute(
   char**                            ppArgv
 , int                               flags
 , wxProcess*                        pHandler
   char**                            ppArgv
 , int                               flags
 , wxProcess*                        pHandler
+, const wxExecuteEnv *env
 )
 {
     wxString                        sCommand;
 )
 {
     wxString                        sCommand;
@@ -236,32 +235,11 @@ long wxExecute(
     return wxExecute( sCommand
                      ,flags
                      ,pHandler
     return wxExecute( sCommand
                      ,flags
                      ,pHandler
+                     , env
                     );
 }
 
                     );
 }
 
-bool wxGetFullHostName( wxChar* zBuf,
-                        int nMaxSize)
+bool wxGetFullHostName( wxChar* zBuf, int nMaxSize)
 {
 {
-#if wxUSE_NET_API
-    char                            zServer[256];
-    char                            zComputer[256];
-    unsigned long                   ulLevel = 0;
-    unsigned char*                  zBuffer = NULL;
-    unsigned long                   ulBuffer = 256;
-    unsigned long*                  pulTotalAvail = NULL;
-
-    NetBios32GetInfo( (const unsigned char*)zServer
-                     ,(const unsigned char*)zComputer
-                     ,ulLevel
-                     ,zBuffer
-                     ,ulBuffer
-                     ,pulTotalAvail
-                    );
-    strncpy(zBuf, zComputer, nMaxSize);
-    zBuf[nMaxSize] = _T('\0');
-#else
-    wxUnusedVar(nMaxSize);
-    strcpy((char*)zBuf, "noname");
-#endif
-    return *zBuf ? true : false;
+    return wxGetHostName( zBuf, nMaxSize );
 }
 }