2016-01-11 17:12 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* src/rtl/spfiles.c
    ! typo in HB_TR_DEBUG message

  * src/rtl/hbproces.c
    - removed unnecessary call to hb_fsSetIOError()
    % variable localization
    ! fixed wrongly located hb_vmLock() - it was not called if
      hb_fsProcessOpen() failed.
This commit is contained in:
Przemysław Czerpak
2016-01-11 17:12:51 +01:00
parent 29fc87a1ef
commit b5a02bcab4
3 changed files with 34 additions and 21 deletions

View File

@@ -10,6 +10,16 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2016-01-11 17:12 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/spfiles.c
! typo in HB_TR_DEBUG message
* src/rtl/hbproces.c
- removed unnecessary call to hb_fsSetIOError()
% variable localization
! fixed wrongly located hb_vmLock() - it was not called if
hb_fsProcessOpen() failed.
2016-01-10 20:42 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/vm/hvm.c
* allow to use == operator for codeblocks

View File

@@ -337,10 +337,7 @@ static int hb_fsProcessExec( const char * pszFileName,
NULL ); /* lpProcessInformation */
hb_fsSetIOError( ! fError, 0 );
if( ! fError )
{
hb_fsSetIOError( ! fError, 0 );
iResult = 0;
}
hb_vmLock();
if( lpAppName )
@@ -457,7 +454,7 @@ static int hb_fsProcessExec( const char * pszFileName,
return iResult;
}
#endif
#endif /* HB_PROCESS_USEFILES */
HB_FHANDLE hb_fsProcessOpen( const char * pszFileName,
HB_FHANDLE * phStdin, HB_FHANDLE * phStdout,
@@ -568,18 +565,12 @@ HB_FHANDLE hb_fsProcessOpen( const char * pszFileName,
#elif defined( HB_OS_OS2 )
HFILE hStdIn = ( HFILE ) FS_ERROR,
hStdErr = ( HFILE ) FS_ERROR,
hStdOut = ( HFILE ) FS_ERROR,
hNull = ( HFILE ) FS_ERROR,
hDup;
HFILE hNull = ( HFILE ) FS_ERROR;
ULONG ulState = 0;
APIRET ret = NO_ERROR;
ULONG ulState, ulStateIn, ulStateOut, ulStateErr;
PID pid = ( PID ) -1;
PHB_GT pGT;
ulStateIn = ulStateOut = ulStateErr = OPEN_FLAGS_NOINHERIT;
ulState = 0;
if( fDetach && ( ! phStdin || ! phStdout || ! phStderr ) )
ret = DosOpen( ( PCSZ ) "NUL:", &hNull, &ulState, 0,
FILE_NORMAL, OPEN_ACCESS_READWRITE,
@@ -607,6 +598,12 @@ HB_FHANDLE hb_fsProcessOpen( const char * pszFileName,
pGT = hb_gt_Base();
if( pGT )
{
ULONG ulStateIn, ulStateOut, ulStateErr;
HFILE hStdIn, hStdErr, hStdOut, hDup;
ulStateIn = ulStateOut = ulStateErr = OPEN_FLAGS_NOINHERIT;
hStdIn = hStdErr = hStdOut = ( HFILE ) FS_ERROR;
if( ret == NO_ERROR && ( phStdin != NULL || fDetach ) )
{
hDup = 0;
@@ -696,6 +693,12 @@ HB_FHANDLE hb_fsProcessOpen( const char * pszFileName,
hb_gt_BaseFree( pGT );
}
else
{
if( hNull != ( HFILE ) FS_ERROR )
DosClose( hNull );
ret = ( APIRET ) FS_ERROR;
}
fError = ret != NO_ERROR;
if( ! fError )
@@ -893,13 +896,13 @@ HB_FHANDLE hb_fsProcessOpen( const char * pszFileName,
hb_fsSetIOError( ! fError, 0 );
#else
int iTODO; /* TODO: for given platform */
int iTODO; /* TODO: for given platform */
HB_SYMBOL_UNUSED( pszFileName );
HB_SYMBOL_UNUSED( fDetach );
HB_SYMBOL_UNUSED( pulPID );
HB_SYMBOL_UNUSED( pszFileName );
HB_SYMBOL_UNUSED( fDetach );
HB_SYMBOL_UNUSED( pulPID );
hb_fsSetError( ( HB_ERRCODE ) FS_ERROR );
hb_fsSetError( ( HB_ERRCODE ) FS_ERROR );
#endif
}
@@ -1185,7 +1188,7 @@ int hb_fsProcessRun( const char * pszFileName,
}
}
#else
#else /* ! HB_PROCESS_USEFILES */
{
HB_FHANDLE hProcess;
@@ -1570,10 +1573,10 @@ int hb_fsProcessRun( const char * pszFileName,
HB_SYMBOL_UNUSED( nStdInLen );
#endif
hb_vmLock();
}
hb_vmLock();
}
#endif
#endif /* ! HB_PROCESS_USEFILES */
if( phStdout )
{

View File

@@ -119,7 +119,7 @@ HB_BOOL hb_spFileExists( const char * pszFileName, char * pszRetPath )
HB_BOOL bIsFile = HB_FALSE;
PHB_FNAME pFilepath;
HB_TRACE( HB_TR_DEBUG, ( "hb_spFile(%s, %p)", pszFileName, pszRetPath ) );
HB_TRACE( HB_TR_DEBUG, ( "hb_spFileExists(%s, %p)", pszFileName, pszRetPath ) );
if( pszRetPath )
pszPath = pszRetPath;