2009-07-07 00:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/utils/hbmk2/hbmk2.prg
% use hb_processRun() to execute commands
! fixed typo in hb_pcount() verification in hbmk_run()
This commit is contained in:
@@ -17,6 +17,11 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-07-07 00:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/utils/hbmk2/hbmk2.prg
|
||||
% use hb_processRun() to execute commands
|
||||
! fixed typo in hb_pcount() verification in hbmk_run()
|
||||
|
||||
2009-07-07 00:18 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/source/rtl/gttrm/gttrm.c
|
||||
! do not catch SIGCHLD
|
||||
|
||||
@@ -418,66 +418,12 @@ PROCEDURE Main( ... )
|
||||
#endif
|
||||
|
||||
STATIC FUNCTION hbmk_run( hbmk, cCmd, cStdOut )
|
||||
#if defined( __PLATFORM__DOS )
|
||||
LOCAL nResult
|
||||
LOCAL hFile
|
||||
LOCAL cFileName
|
||||
IF PCount() >= 2
|
||||
hFile := hb_FTempCreateEx( @cFileName )
|
||||
IF hFile != F_ERROR
|
||||
FClose( hFile )
|
||||
cCmd += ">" + cFileName
|
||||
nResult := hb_run( cCmd )
|
||||
cStdOut := hb_MemoRead( cFileName )
|
||||
FErase( cFileName )
|
||||
ELSE
|
||||
nResult := -1
|
||||
cStdOut := ""
|
||||
hbmk_OutErr( hbmk, I_( "Error: Cannot create temporary file." ) )
|
||||
ENDIF
|
||||
RETURN nResult
|
||||
ENDIF
|
||||
RETURN hb_run( cCmd )
|
||||
#else
|
||||
LOCAL hStdOut
|
||||
LOCAL h
|
||||
LOCAL result
|
||||
|
||||
HB_SYMBOL_UNUSED( hbmk )
|
||||
|
||||
IF PCount() >= 2
|
||||
h := hb_ProcessOpen( cCmd,, @hStdOut )
|
||||
ELSE
|
||||
h := hb_ProcessOpen( cCmd )
|
||||
IF PCount() >= 3
|
||||
RETURN hb_processRun( cCmd,, @cStdOut )
|
||||
ENDIF
|
||||
IF h != F_ERROR
|
||||
IF PCount() >= 2
|
||||
cStdOut := hbmk_ReadHnd( hStdOut )
|
||||
ENDIF
|
||||
result := hb_ProcessValue( h )
|
||||
hb_ProcessClose( h, .T. )
|
||||
IF PCount() >= 2
|
||||
FClose( hStdOut )
|
||||
ENDIF
|
||||
ELSE
|
||||
result := -1
|
||||
IF PCount() >= 2
|
||||
cStdOut := ""
|
||||
ENDIF
|
||||
ENDIF
|
||||
RETURN result
|
||||
|
||||
STATIC FUNCTION hbmk_ReadHnd( hFile )
|
||||
LOCAL cBuffer := Space( 4096 )
|
||||
LOCAL cString := ""
|
||||
LOCAL nLen
|
||||
|
||||
DO WHILE ( nLen := FRead( hFile, @cBuffer, Len( cBuffer ) ) ) > 0
|
||||
cString += Left( cBuffer, nLen )
|
||||
ENDDO
|
||||
|
||||
RETURN cString
|
||||
#endif
|
||||
RETURN hb_processRun( cCmd )
|
||||
|
||||
STATIC PROCEDURE hbmk_COMP_Setup( cARCH, cCOMP, cBasePath )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user