From 8edb573d978be43fa4354d1af7f192389c5cfc53 Mon Sep 17 00:00:00 2001 From: Paul Tucker Date: Sat, 25 Mar 2000 14:32:07 +0000 Subject: [PATCH] UPdated Dispcount handling --- harbour/source/rtl/gtsln/gtsln.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/harbour/source/rtl/gtsln/gtsln.c b/harbour/source/rtl/gtsln/gtsln.c index d8f57a42e1..9d848032d7 100644 --- a/harbour/source/rtl/gtsln/gtsln.c +++ b/harbour/source/rtl/gtsln/gtsln.c @@ -39,10 +39,14 @@ #include "hbapigt.h" +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; + SLtt_get_terminfo(); SLkp_init(); SLang_init_tty(34, /* Ctrl-G */ @@ -286,6 +290,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? @@ -297,6 +303,8 @@ void hb_gt_DispEnd() { HB_TRACE(HB_TR_DEBUG, ("hb_gt_DispEnd()")); + --s_uiDispCount; + /* TODO: here we flush the buffer, and restore normal screen writes */ } @@ -360,3 +368,8 @@ char * hb_gt_Version( void ) { return "Harbour Terminal: Slang"; } + +USHORT hb_gt_DispCount() +{ + return s_uiDispCount; +}