diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a6c913d931..3a8d8e4aac 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,17 @@ The license applies to all entries newer than 2009-04-28. */ +2011-09-12 17:41 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/rtl/filesys.c + * harbour/src/rtl/hbproces.c + ! use hb_fsOsError() instead of errno which can be overwritten by + by hb_fsSetIOError() + + * harbour/tests/gtxfnt.prg + % hb_processRun() instead of hb_processOpen()/fread()/hb_processClose() + + set font attributes: HB_GTI_FONTA_FIXMETRIC, HB_GTI_FONTA_CLRBKG, + HB_GTI_FONTA_DRAWBOX + 2011-09-11 13:00 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbformat/hbfmtcls.prg ! fixed casing of some function names. diff --git a/harbour/src/rtl/filesys.c b/harbour/src/rtl/filesys.c index b2ccea3f6a..c7730811b9 100644 --- a/harbour/src/rtl/filesys.c +++ b/harbour/src/rtl/filesys.c @@ -950,7 +950,8 @@ HB_SIZE hb_fsPipeIsData( HB_FHANDLE hPipeHandle, HB_SIZE nBufferSize, hb_fsSetIOError( iResult >= 0, 0 ); if( nTimeOut < 0 && iResult == 0 ) continue; - if( iResult != -1 || nTimeOut == 0 || errno != EINTR || + if( iResult != -1 || nTimeOut == 0 || + hb_fsOsError() != ( HB_ERRCODE ) EINTR || hb_vmRequestQuery() != 0 ) break; #if !defined( HB_OS_LINUX ) diff --git a/harbour/src/rtl/hbproces.c b/harbour/src/rtl/hbproces.c index 2200a06a19..3d72a9a158 100644 --- a/harbour/src/rtl/hbproces.c +++ b/harbour/src/rtl/hbproces.c @@ -751,7 +751,7 @@ int hb_fsProcessValue( HB_FHANDLE hProcess, HB_BOOL fWait ) iRetStatus = waitpid( pid, &iStatus, fWait ? 0 : WNOHANG ); hb_fsSetIOError( iRetStatus >= 0, 0 ); #ifdef ERESTARTSYS - if( iRetStatus < 0 && errno != ERESTARTSYS ) + if( iRetStatus < 0 && hb_fsOsError() != ( HB_ERRCODE ) ERESTARTSYS ) #else if( iRetStatus < 0 ) #endif diff --git a/harbour/tests/gtxfnt.prg b/harbour/tests/gtxfnt.prg index fde1f1eb31..de2740618c 100644 --- a/harbour/tests/gtxfnt.prg +++ b/harbour/tests/gtxfnt.prg @@ -29,6 +29,8 @@ proc main() n := 2 ? hb_gtVersion( 0 ), hb_gtVersion( 1 ) + hb_gtInfo( HB_GTI_FONTATTRIBUTE, HB_GTI_FONTA_FIXMETRIC + ; + HB_GTI_FONTA_CLRBKG + HB_GTI_FONTA_DRAWBOX ) while n == 2 ? hb_gtInfo( HB_GTI_FONTSEL ) hb_gtInfo( HB_GTI_FONTSEL, xFontSel() ) @@ -43,13 +45,6 @@ proc main() return function xfontsel() - local hProcess, hStdOut, cFontSel, n - hProcess := hb_processOpen( "xfontsel -print",, @hStdOut ) - if hProcess != -1 - cFontSel := space( 256 ) - n := fread( hStdOut, @cFontSel, len( cFontSel ) ) - cFontSel := left( cFontSel, n ) - hb_processClose( hProcess ) - fclose( hStdOut ) - endif -return cFontSel + local cStdOut + hb_processRun( "xfontsel -print",, @cStdOut ) +return cStdOut