diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 4ce698af23..11ac69bdcd 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,19 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-10-14 18:46 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbwin/win_misc.c + * contrib/hbwin/wapi_shellapi.c + + Added _SET_OSCODEPAGE support for WAPI_SHELLEXECUTE() and + WIN_RUNDETACHED(). This may make these functions incompatible + in some situations. This clears to TODOs in source. + + * INSTALL + * Minor. + + * ChangeLog + + Item marked DONE. + 2009-10-14 17:18 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/bin/hb-func.sh ! do not look for .c files as result of hbcmp script executed @@ -43,6 +56,7 @@ ; TODO: with gcc family compilers use 'gcc -MM' mode for header parsing. Probably needs separate control, as (at first) it seems to be much slower than current simple method. + [DONE] * src/codepage/cpes850c.c ! Updated to be compatible with CA-Cl*pper. @@ -1949,7 +1963,7 @@ * config/dyn.mk + Attempt to add link creation for dynlibs. Not tested yet. - ; TODO: darwin needs even more sopthistication. [DONE] + ; TODO: darwin needs even more sophistication. [DONE] ; TODO: clean support is missing yet. [DONE] ; TODO: add this to rest of targets. [DONE] ; TODO: install support? [DONE] diff --git a/harbour/INSTALL b/harbour/INSTALL index ecdbe41507..1e4595b518 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -408,7 +408,7 @@ HARBOUR (MS-DOS compatible systems also work, like dosemu) os2 - OS/2 / eComStation - You can use HB_COMPILER values to select compilers: + You can use HB_COMPILER values to manually select compilers: linux ----- diff --git a/harbour/contrib/hbwin/wapi_shellapi.c b/harbour/contrib/hbwin/wapi_shellapi.c index 8cdfc98ce5..942679bfb1 100644 --- a/harbour/contrib/hbwin/wapi_shellapi.c +++ b/harbour/contrib/hbwin/wapi_shellapi.c @@ -56,17 +56,25 @@ #include -/* TODO: Add hb_osEncodeCP(). */ - HB_FUNC( WAPI_SHELLEXECUTE ) { #if defined( HB_OS_WIN_CE ) hb_retnint( -1 ); #else - LPTSTR lpOperation = HB_ISCHAR( 2 ) ? HB_TCHAR_CONVTO( hb_parc( 2 ) ) : NULL; - LPTSTR lpFile = HB_TCHAR_CONVTO( hb_parcx( 3 ) ); - LPTSTR lpParameters = HB_ISCHAR( 4 ) ? HB_TCHAR_CONVTO( hb_parc( 4 ) ) : NULL; - LPTSTR lpDirectory = HB_ISCHAR( 5 ) ? HB_TCHAR_CONVTO( hb_parc( 5 ) ) : NULL; + char * pszFreeOperation = NULL; + char * pszFreeFile = NULL; + char * pszFreeParameters = NULL; + char * pszFreeDirectory = NULL; + + const char * pszOperation = HB_ISCHAR( 2 ) ? hb_osEncodeCP( hb_parc( 2 ), &pszFreeOperation, NULL ) : NULL; + const char * pszFile = hb_osEncodeCP( hb_parcx( 3 ), &pszFreeFile, NULL ); + const char * pszParameters = HB_ISCHAR( 4 ) ? hb_osEncodeCP( hb_parc( 4 ), &pszFreeParameters, NULL ) : NULL; + const char * pszDirectory = HB_ISCHAR( 5 ) ? hb_osEncodeCP( hb_parc( 5 ), &pszFreeDirectory, NULL ) : NULL; + + LPTSTR lpOperation = pszOperation ? HB_TCHAR_CONVTO( pszOperation ) : NULL; + LPTSTR lpFile = pszFile ? HB_TCHAR_CONVTO( pszFile ) : NULL; + LPTSTR lpParameters = pszParameters ? HB_TCHAR_CONVTO( pszParameters ) : NULL; + LPTSTR lpDirectory = pszDirectory ? HB_TCHAR_CONVTO( pszDirectory ) : NULL; hb_retnint( ( HB_PTRDIFF ) ShellExecute( ( HWND ) hb_parptr( 1 ), ( LPCTSTR ) lpOperation, /* edit, explore, open, print, play?, properties? */ @@ -75,12 +83,15 @@ HB_FUNC( WAPI_SHELLEXECUTE ) ( LPCTSTR ) lpDirectory, HB_ISNUM( 6 ) ? hb_parni( 6 ) : SW_SHOWNORMAL /* nShowCmd */ ) ); - if( lpOperation ) - HB_TCHAR_FREE( lpOperation ); - HB_TCHAR_FREE( lpFile ); - if( lpParameters ) - HB_TCHAR_FREE( lpParameters ); - if( lpDirectory ) - HB_TCHAR_FREE( lpDirectory ); + if( lpOperation ) HB_TCHAR_FREE( lpOperation ); + if( lpFile ) HB_TCHAR_FREE( lpFile ); + if( lpParameters ) HB_TCHAR_FREE( lpParameters ); + if( lpDirectory ) HB_TCHAR_FREE( lpDirectory ); + + if( pszFreeOperation ) hb_xfree( pszFreeOperation ); + if( pszFreeFile ) hb_xfree( pszFreeFile ); + if( pszFreeParameters ) hb_xfree( pszFreeParameters ); + if( pszFreeDirectory ) hb_xfree( pszFreeDirectory ); + #endif } diff --git a/harbour/contrib/hbwin/win_misc.c b/harbour/contrib/hbwin/win_misc.c index 6039ce7d54..b02fa22e12 100644 --- a/harbour/contrib/hbwin/win_misc.c +++ b/harbour/contrib/hbwin/win_misc.c @@ -69,12 +69,16 @@ #define QS_ALLPOSTMESSAGE 0x0100 #endif -/* TODO: Add hb_osEncodeCP(). */ - HB_FUNC( WIN_RUNDETACHED ) { - LPTSTR lpCommandName = HB_ISCHAR( 1 ) ? HB_TCHAR_CONVTO( hb_parc( 1 ) ) : NULL; - LPTSTR lpCommandLine = HB_ISCHAR( 2 ) ? HB_TCHAR_CONVTO( hb_parc( 2 ) ) : NULL; + char * pszFreeCommandName = NULL; + char * pszFreeCommandLine = NULL; + + const char * pszCommandName = HB_ISCHAR( 1 ) ? hb_osEncodeCP( hb_parc( 1 ), &pszFreeCommandName, NULL ) : NULL; + const char * pszCommandLine = HB_ISCHAR( 2 ) ? hb_osEncodeCP( hb_parc( 2 ), &pszFreeCommandLine, NULL ) : NULL; + + LPTSTR lpCommandName = pszCommandName ? HB_TCHAR_CONVTO( pszCommandName ) : NULL; + LPTSTR lpCommandLine = pszCommandLine ? HB_TCHAR_CONVTO( pszCommandLine ) : NULL; #if ! defined( HB_OS_WIN_CE ) STARTUPINFO si; @@ -123,10 +127,11 @@ HB_FUNC( WIN_RUNDETACHED ) hb_retl( FALSE ); } - if( lpCommandName ) - HB_TCHAR_FREE( lpCommandName ); - if( lpCommandLine ) - HB_TCHAR_FREE( lpCommandLine ); + if( lpCommandName ) HB_TCHAR_FREE( lpCommandName ); + if( lpCommandLine ) HB_TCHAR_FREE( lpCommandLine ); + + if( pszFreeCommandName ) hb_xfree( pszFreeCommandName ); + if( pszFreeCommandLine ) hb_xfree( pszFreeCommandLine ); } HB_FUNC( WIN_LOADRESOURCE )