ChangeLog 2000-06-13 19:55 UTC+0100

This commit is contained in:
Ryszard Glab
2000-06-13 17:51:13 +00:00
parent 5a862c6043
commit aae392a7ef
5 changed files with 56 additions and 24 deletions

View File

@@ -1,3 +1,18 @@
2000-06-13 19:55 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
*include/hbapigt.h
*added declaration of hb_gt_Suspend()/hb_gt_Resume()
*source/rtl/gtapi.c
*hb_gtPreExt()/hb_gtPostExt() calls driver dependend functions
to save/restore terminal settings
*source/rtl/run.c
*fixed to properly use hb_gtPreExt()/hb_gtPosExt()
*source/rtl/gtcrs/gtcrs.c
*added full support for suspend/resume terminal settings
2000-06-13 08:08 UTC-0800 Ron Pinkas <Ron@Profit-Master.com>
* source/pp/ppcomp.c

View File

@@ -184,6 +184,8 @@ extern void hb_gt_SetPos( SHORT iRow, SHORT iCol );
extern void hb_gt_Tone( double dFrequency, double dDuration );
extern char * hb_gt_Version( void );
extern USHORT hb_gt_VertLine( USHORT uiCol, USHORT uiTop, USHORT uiBottom, BYTE byChar, BYTE byAttr );
extern BOOL hb_gt_Suspend();
extern BOOL hb_gt_Resume();
/* Keyboard related declarations */

View File

@@ -317,6 +317,10 @@ USHORT hb_gtPreExt( void )
while( uidc-- )
hb_gt_DispEnd();
/* call platform depend layer to flush all pending outputs and
* to prepare screen for direct updating
*/
hb_gt_Suspend();
}
s_uiPreCNest = 1;
@@ -333,6 +337,9 @@ USHORT hb_gtPostExt( void )
if( s_uiPreCNest == 1 )
{
/* call platform depend layer to restore all settings */
hb_gt_Resume();
while( s_uiPreCount-- )
hb_gt_DispBegin();

View File

@@ -59,6 +59,7 @@ extern void hb_gt_Exit_Keyboard( void );
static void hb_gt_Initialize_Terminal( void )
{
initscr();
if( has_colors() )
{
int i;
@@ -128,13 +129,19 @@ static void hb_gt_Initialize_Terminal( void )
}
static void hb_gt_Exit_Terminal( void )
{
noraw();
refresh();
endwin();
}
void hb_gt_Init( int iFilenoStdin, int iFilenoStdout, int iFilenoStderr )
{
HB_TRACE(HB_TR_DEBUG, ("hb_gt_Init()"));
s_uiDispCount = 0;
initscr();
hb_gt_Initialize_Terminal();
/* Mouse sub-sytem have to be initialized after ncurses initialization */
hb_gt_Initialize_Mouse();
@@ -146,10 +153,7 @@ void hb_gt_Exit( void )
{
HB_TRACE(HB_TR_DEBUG, ("hb_gt_Exit()"));
noraw();
refresh();
endwin();
hb_gt_Exit_Terminal();
hb_gt_Exit_Mouse();
hb_gt_Exit_Keyboard();
}
@@ -497,19 +501,22 @@ void hb_gt_DispEnd()
BOOL hb_gt_SetMode( USHORT uiRows, USHORT uiCols )
{
BOOL success;
HB_TRACE(HB_TR_DEBUG, ("hb_gt_SetMode(%hu, %hu)", uiRows, uiCols));
/* NOTE: Not tested!!!
Use it on your own risk!
*/
endwin();
success = ( ( resizeterm( uiRows, uiCols) == OK) ? TRUE : FALSE );
initscr();
hb_gt_Initialize_Terminal();
return success;
#if defined(NCURSES_VERSION)
{
BOOL success;
hb_gt_Exit_Terminal();
success = ( ( resizeterm( uiRows, uiCols) == OK) ? TRUE : FALSE );
hb_gt_Initialize_Terminal();
return success;
}
#else
return 0;
#endif
}
BOOL hb_gt_GetBlink()
@@ -747,10 +754,18 @@ USHORT hb_gt_VertLine( USHORT uiCol, USHORT uiTop, USHORT uiBottom, BYTE byChar,
BOOL hb_gt_Suspend()
{
hb_gt_Exit_Terminal();
hb_gt_Exit_Mouse();
hb_gt_Exit_Keyboard();
return 1;
}
BOOL hb_gt_Resume()
{
hb_gt_Initialize_Terminal();
hb_gt_Initialize_Mouse();
hb_gt_Initialize_Keyboard();
return 1;
}

View File

@@ -35,9 +35,7 @@
#include "hbapi.h"
#include "hbapierr.h"
extern BOOL hb_gt_Suspend();
extern BOOL hb_gt_Resume();
#include "hbapigt.h"
/* TOFIX: The screen buffer handling is not right for all platforms (Win32)
The output of the launched (DOS?) app is not visible. */
@@ -47,14 +45,9 @@ HB_FUNC( __RUN )
#if defined(__TURBOC__) || defined(__BORLANDC__) || defined(_MSC_VER) || defined(__IBMCPP__) || defined(__GNUC__)
if( ISCHAR( 1 ) )
{
if ( hb_gt_Suspend() )
{
system( hb_parc( 1 ) );
if ( hb_gt_Resume() )
{
/* indicate internal error here */
}
}
hb_gtPreExt();
system( hb_parc( 1 ) );
hb_gtPostExt();
}
#else
hb_errRT_BASE_Ext1( EG_UNSUPPORTED, 9999, NULL, "__RUN", 0, EF_CANDEFAULT );