From 46acc039f3c6650d6815f2b53df056eea8c64c3f Mon Sep 17 00:00:00 2001 From: Antonio Linares Date: Wed, 12 Dec 2001 13:55:39 +0000 Subject: [PATCH] minor fixes --- harbour/source/common/hbfhnd.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/harbour/source/common/hbfhnd.c b/harbour/source/common/hbfhnd.c index ecc37edc97..3f56574acc 100644 --- a/harbour/source/common/hbfhnd.c +++ b/harbour/source/common/hbfhnd.c @@ -59,14 +59,13 @@ #endif #define _NFILE_ 600 + #include #include #include - #include - #ifdef __cplusplus extern "C" { #endif - + unsigned _RTLENTRY _EXPDATA _nfile = _NFILE_; void hb_files_setup( void ); extern void _RTLENTRY _init_handles( void ); extern void _RTLENTRY _init_streams( void ); @@ -91,6 +90,18 @@ void hb_fhnd_ForceLink( void ) #if defined(__BORLANDC__) +#define _F_STDIN (_F_READ | _F_TERM | _F_LBUF) +#define _F_STDOUT (_F_WRIT | _F_TERM | _F_LBUF) +#define _F_STDERR (_F_WRIT | _F_TERM) + +FILE _RTLENTRY _EXPDATA _streams [_NFILE_] = +{ + { NULL, NULL, 0, 0, 0, _F_STDIN, 0, 0, 0 }, + { NULL, NULL, 0, 0, 0, _F_STDOUT, 0, 1, 0 }, + { NULL, NULL, 0, 0, 0, _F_STDERR, 0, 2, 0 } +}; + + unsigned int _RTLENTRY _openfd[_NFILE_] = { O_RDONLY | O_TEXT | O_DEVICE,