2013-02-01 00:26 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* harbour/include/hbwinuni.h
+ added HB_WINAPI_SYSTEM() macro
* harbour/src/rtl/run.c
* harbour/src/rtl/hbrunfun.c
! use MSCRTL system call in desktop MS-Windows builds of __RUN()
and HB_RUN() functions.
It restores Clipper compatible __RUN() behavior and now both
functions work in the same way on all platforms except WinCE/Mobile
which does not have shell system.
This commit is contained in:
@@ -10,6 +10,18 @@
|
||||
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
|
||||
*/
|
||||
|
||||
2013-02-01 00:26 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* harbour/include/hbwinuni.h
|
||||
+ added HB_WINAPI_SYSTEM() macro
|
||||
|
||||
* harbour/src/rtl/run.c
|
||||
* harbour/src/rtl/hbrunfun.c
|
||||
! use MSCRTL system call in desktop MS-Windows builds of __RUN()
|
||||
and HB_RUN() functions.
|
||||
It restores Clipper compatible __RUN() behavior and now both
|
||||
functions work in the same way on all platforms except WinCE/Mobile
|
||||
which does not have shell system.
|
||||
|
||||
2013-02-01 00:05 UTC+0100 Viktor Szakats (harbour syenar.net)
|
||||
* ChangeLog.txt
|
||||
+ added encoding information to the header, which is UTF-8
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
#define HB_CHARDUPN( str, len ) hb_osStrU16EncodeN( str, len )
|
||||
#define HB_OSSTRDUP( str ) hb_osStrU16Decode( str )
|
||||
#define HB_OSSTRDUP2( str, buf, len ) hb_osStrU16Decode2( str, buf, len )
|
||||
#define HB_WINAPI_SYSTEM( cmd ) _wsystem( cmd )
|
||||
#define HB_WINAPI_FUNCTION_NAME( a ) ( a "W" )
|
||||
#define HB_WINAPI_KERNEL32_DLL() ( hb_iswin9x() ? TEXT( "unicows.dll" ) : TEXT( "kernel32.dll" ) )
|
||||
#else
|
||||
@@ -121,6 +122,7 @@
|
||||
#define HB_CHARDUPN( str, len ) hb_osStrEncodeN( str, len )
|
||||
#define HB_OSSTRDUP( str ) hb_osStrDecode( str )
|
||||
#define HB_OSSTRDUP2( str, buf, len ) hb_osStrDecode2( str, buf, len )
|
||||
#define HB_WINAPI_SYSTEM( cmd ) system( cmd )
|
||||
#define HB_WINAPI_FUNCTION_NAME( a ) ( a "A" )
|
||||
#define HB_WINAPI_KERNEL32_DLL() ( TEXT( "kernel32.dll" ) )
|
||||
#endif
|
||||
|
||||
@@ -56,6 +56,11 @@
|
||||
#include "hbapiitm.h"
|
||||
#include "hbapifs.h"
|
||||
|
||||
#if defined( HB_OS_WIN )
|
||||
#include "hbwinuni.h"
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
HB_FUNC( HB_RUN )
|
||||
{
|
||||
const char * pszCommand = hb_parc( 1 );
|
||||
@@ -66,9 +71,15 @@ HB_FUNC( HB_RUN )
|
||||
|
||||
if( hb_gtSuspend() == HB_SUCCESS )
|
||||
{
|
||||
#if defined( HB_OS_WIN )
|
||||
#if defined( HB_OS_WIN_CE )
|
||||
iResult = hb_fsProcessRun( pszCommand,
|
||||
NULL, 0, NULL, NULL, NULL, NULL, HB_FALSE );
|
||||
#elif defined( HB_OS_WIN )
|
||||
LPTSTR lpCommand;
|
||||
|
||||
lpCommand = HB_CHARDUP( pszCommand );
|
||||
iResult = HB_WINAPI_SYSTEM( lpCommand );
|
||||
hb_xfree( lpCommand );
|
||||
#else
|
||||
char * pszFree = NULL;
|
||||
|
||||
|
||||
@@ -56,6 +56,11 @@
|
||||
#include "hbapiitm.h"
|
||||
#include "hbapifs.h"
|
||||
|
||||
#if defined( HB_OS_WIN )
|
||||
#include "hbwinuni.h"
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
/* TOFIX: The screen buffer handling is not right for all platforms (Windows)
|
||||
The output of the launched (MS-DOS?) app is not visible. */
|
||||
|
||||
@@ -65,12 +70,18 @@ HB_FUNC( __RUN )
|
||||
|
||||
if( pszCommand && hb_gtSuspend() == HB_SUCCESS )
|
||||
{
|
||||
#if defined( HB_OS_WIN )
|
||||
#if defined( HB_OS_WIN_CE )
|
||||
hb_fsProcessRun( pszCommand, NULL, 0, NULL, NULL, NULL, NULL, HB_FALSE );
|
||||
#elif defined( HB_OS_WIN )
|
||||
LPTSTR lpCommand;
|
||||
|
||||
lpCommand = HB_CHARDUP( pszCommand );
|
||||
( void ) HB_WINAPI_SYSTEM( lpCommand );
|
||||
hb_xfree( lpCommand );
|
||||
#else
|
||||
char * pszFree = NULL;
|
||||
|
||||
if( system( hb_osEncodeCP( pszCommand, &pszFree, NULL ) ) != 0 ) {}
|
||||
( void ) system( hb_osEncodeCP( pszCommand, &pszFree, NULL ) );
|
||||
|
||||
if( pszFree )
|
||||
hb_xfree( pszFree );
|
||||
|
||||
Reference in New Issue
Block a user