diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 23b03e896f..effd17bfad 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,11 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2003-06-06 15:53 UTC+0200 Tomaz Zupan + * source/rtl/console.c + + Added a PRG-callable functions HB_GETSTDIN and HB_GETSTDOUT, + to get stdin and stdout file handle. + 2003-06-06 10:51 UTC+0100 Antonio Linares * makefile.bc * makefile.vc @@ -127,8 +132,8 @@ * contrib/rdd_ads/adsfunc.c * contrib/rdd_ads/rddads.h + Added support for DBINFO(DBI_DB_VERSION), DBINFO(DBI_RDD_VERSION), - and ADSVERSION([]) (but only for nType == 0 and nType == 3 - and without date and time information for nType == 3). + and ADSVERSION([]) (but only for nType == 0 and nType == 3 + and without date and time information for nType == 3). 2003-05-21 20:34 UTC+0100 Antonio Linares * source/vm/hvm.c diff --git a/harbour/source/rtl/console.c b/harbour/source/rtl/console.c index 5fb2db6b6b..4d2b9caaec 100644 --- a/harbour/source/rtl/console.c +++ b/harbour/source/rtl/console.c @@ -129,8 +129,8 @@ void hb_conInit( void ) if( iStderr < 0 ) /* //STDERR not used or invalid */ #if defined(X__WIN32__) - s_iFilenoStderr = GetStdHandle( STD_ERROR_HANDLE ); - #else + s_iFilenoStderr = GetStdHandle( STD_ERROR_HANDLE ); + #else s_iFilenoStderr = fileno( stderr ); #endif else if( iStderr == 0 ) /* //STDERR with no parameter or 0 */ @@ -140,8 +140,8 @@ void hb_conInit( void ) } #else #if defined(X__WIN32__) - s_iFilenoStderr = GetStdHandle( STD_ERROR_HANDLE ); - #else + s_iFilenoStderr = GetStdHandle( STD_ERROR_HANDLE ); + #else s_iFilenoStderr = fileno( stderr ); #endif #endif @@ -554,3 +554,13 @@ HB_FUNC( DISPOUTAT ) /* writes a single value to the screen at speficic position } +HB_FUNC( HB_GETSTDIN ) /* Return Handel for STDIN */ +{ + hb_retni( s_iFilenoStdin ); +} + +HB_FUNC( HB_GETSTDOUT ) /* Return Handel for STDOUT */ +{ + hb_retni( s_iFilenoStdout ); +} +