From 5bc284905e9c98941ed40751ecfcb9283ece67d6 Mon Sep 17 00:00:00 2001 From: Paul Tucker Date: Sat, 25 Mar 2000 14:31:22 +0000 Subject: [PATCH] UPdated DispCount handling --- harbour/source/rtl/gtos2/gtos2.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/harbour/source/rtl/gtos2/gtos2.c b/harbour/source/rtl/gtos2/gtos2.c index d27de697ec..d9ccd6a804 100644 --- a/harbour/source/rtl/gtos2/gtos2.c +++ b/harbour/source/rtl/gtos2/gtos2.c @@ -72,10 +72,14 @@ static void hb_gt_SetCursorSize( char start, char end, int visible ); static void hb_gt_GetCursorSize( char * start, char * end ); */ +static USHORT s_uiDispCount; + void hb_gt_Init( int iFilenoStdin, int iFilenoStdout, int iFilenoStderr ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_Init()")); + s_uiDispCount = 0; + /* TODO: Is anything required to initialize the video subsystem? */ } @@ -511,6 +515,8 @@ void hb_gt_DispBegin( void ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_DispBegin()")); + ++s_uiDispCount; + /* TODO: Is there a way to change screen buffers? ie: can we write somewhere without it going to the screen and then update the screen from this buffer at a later time? @@ -522,6 +528,8 @@ void hb_gt_DispEnd( void ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_DispEnd()")); + --s_uiDispCount; + /* TODO: here we flush the buffer, and restore normal screen writes */ } @@ -609,3 +617,8 @@ char * hb_gt_Version( void ) { return "Harbour Terminal: OS/2 console"; } + +USHORT hb_gt_DispCount() +{ + return s_uiDispCount; +}