From d2595567e4d6e74bff06cfcd0c6bd36dffa9009c Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 17 Mar 2000 00:32:30 +0000 Subject: [PATCH] 20000317-01:09 GMT+1 Victor Szakats --- harbour/ChangeLog | 14 ++++++++++++-- harbour/source/rtl/console.c | 13 ++++--------- harbour/source/rtl/gt/gtcrs.c | 2 +- harbour/source/rtl/gt/gtdos.c | 2 +- harbour/source/rtl/gt/gtos2.c | 5 ++++- harbour/source/rtl/gt/gtpca.c | 2 +- harbour/source/rtl/gt/gtwin.c | 5 +++-- harbour/source/vm/cmdarg.c | 19 ++++++++----------- 8 files changed, 34 insertions(+), 28 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8b3c443c5f..3b4520a9a4 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,14 @@ +20000317-01:09 GMT+1 Victor Szakats + * source/rtl/console.c + - Removed the non-GT branch from __ACCEPT(). + * source/vm/cmdarg.c + + PC ANSI added. + - non-GT mode removed. + * source/rtl/gt/gt*.c + ! Fixed some trace calls. + ! One declaration made static. + ! One function call fixed in GTCRS.C. + 20000317-00:13 GMT+1 Victor Szakats * source/rtl/gt/gtpca.c + Some internal functions made static @@ -8,8 +19,7 @@ * source/rtl/maindll.c ! Fixed to compile with BCC45 * source/rtl/console.c - - Removed the GT branch from __ACCEPT(). In CA-Cl*pper ACCEPT doesn't use - the GT system. + ! Some fixes later fixed again (see next session). 20000316-04:10 EST Paul Tucker * source/rtl/gt/gtpca.c diff --git a/harbour/source/rtl/console.c b/harbour/source/rtl/console.c index b2375c4426..a215a17eec 100644 --- a/harbour/source/rtl/console.c +++ b/harbour/source/rtl/console.c @@ -41,7 +41,7 @@ * HB___ACCEPT() * * Copyright 1999 David G. Holm - * adjust_pos(), hb_altout(), hb_devout(), HB_DEVOUT(), hb_devpos(), + * hb_altout(), hb_devout(), HB_DEVOUT(), hb_devpos(), * HB_DEVPOS(), hb_dispout(), HB___EJECT(), HB_MAXCOL(), * HB_MAXROW(), hb_out(), hb_outerr(), HB_OUTERR(), * hb_outstd(), HB_OUTSTD(), HB_PCOL(), HB_PROW(), @@ -849,13 +849,8 @@ HARBOUR HB___ACCEPT( void ) case K_LEFT: if( ulLen > 0 ) { - /* Erase last character from the screen. */ - USHORT user_ferror = hb_fsError(); /* Save current user file error code */ - hb_fsWrite( s_iFilenoStdout, ( BYTE * ) "\x8 \x8", 3 ); - hb_fsSetError( user_ferror ); /* Restore last user file error code */ - - /* Adjust input count to get rid of last character */ - ulLen--; + hb_gtWriteCon( ( BYTE * ) "\x8 \x8", 3 ); /* Erase it from the screen. */ + ulLen--; /* Adjust input count to get rid of last character */ } break; @@ -863,7 +858,7 @@ HARBOUR HB___ACCEPT( void ) if( ulLen < ( ACCEPT_BUFFER_LEN - 1 ) && input >= 32 ) { s_szAcceptResult[ ulLen ] = input; /* Accept the input */ - hb_dispout( &s_szAcceptResult[ ulLen ], sizeof( char ) ); /* Then display it */ + hb_gtWriteCon( ( BYTE * ) &s_szAcceptResult[ ulLen ], sizeof( char ) ); /* Then display it */ ulLen++; /* Then adjust the input count */ } } diff --git a/harbour/source/rtl/gt/gtcrs.c b/harbour/source/rtl/gt/gtcrs.c index a9b3dfb728..6f4e9ce178 100644 --- a/harbour/source/rtl/gt/gtcrs.c +++ b/harbour/source/rtl/gt/gtcrs.c @@ -121,7 +121,7 @@ BOOL hb_gt_AdjustPos( BYTE * pStr, ULONG ulLen ) } } } - hb_gtSetRC( row, col ); + gt_SetRC( row, col ); return TRUE; } diff --git a/harbour/source/rtl/gt/gtdos.c b/harbour/source/rtl/gt/gtdos.c index 0cdf4d5556..b99df79aab 100644 --- a/harbour/source/rtl/gt/gtdos.c +++ b/harbour/source/rtl/gt/gtdos.c @@ -180,7 +180,7 @@ int hb_gt_ReadKey( void ) BOOL hb_gt_AdjustPos( BYTE * pStr, ULONG ulLen ) { - HB_TRACE(HB_TR_DEBUG, ("hb_gt_AdjustPos()")); + HB_TRACE(HB_TR_DEBUG, ("hb_gt_AdjustPos(%s, %lu)", pStr, ulLen )); #if defined(__TURBOC__) { diff --git a/harbour/source/rtl/gt/gtos2.c b/harbour/source/rtl/gt/gtos2.c index 559bf1502e..5d7249d285 100644 --- a/harbour/source/rtl/gt/gtos2.c +++ b/harbour/source/rtl/gt/gtos2.c @@ -71,7 +71,10 @@ BOOL hb_gt_AdjustPos( BYTE * pStr, ULONG ulLen ) { USHORT x, y; - HB_TRACE(HB_TR_DEBUG, ("hb_gt_AdjustPos()")); + HB_TRACE(HB_TR_DEBUG, ("hb_gt_AdjustPos(%s, %lu)", pStr, ulLen )); + + HB_SYMBOL_UNUSED( pStr ); + HB_SYMBOL_UNUSED( ulLen ); VioGetCurPos( &y, &x, 0 ); hb_gtSetPos( ( SHORT ) y, ( SHORT ) x ); diff --git a/harbour/source/rtl/gt/gtpca.c b/harbour/source/rtl/gt/gtpca.c index 9c0406e98b..195baa9ff3 100644 --- a/harbour/source/rtl/gt/gtpca.c +++ b/harbour/source/rtl/gt/gtpca.c @@ -61,7 +61,7 @@ static int s_iAttribute; static BOOL s_bColor; static char s_szSpaces[] = " "; /* 84 spaces */ -void hb_gt_AnsiGetCurPos( USHORT * row, USHORT * col ); +static void hb_gt_AnsiGetCurPos( USHORT * row, USHORT * col ); void hb_gt_Init( int iFilenoStdin, int iFilenoStdout, int iFilenoStderr ) { diff --git a/harbour/source/rtl/gt/gtwin.c b/harbour/source/rtl/gt/gtwin.c index 0dc01d8b12..f48a4a3c4a 100644 --- a/harbour/source/rtl/gt/gtwin.c +++ b/harbour/source/rtl/gt/gtwin.c @@ -226,11 +226,12 @@ int hb_gt_ReadKey( void ) BOOL hb_gt_AdjustPos( BYTE * pStr, ULONG ulLen ) { CONSOLE_SCREEN_BUFFER_INFO csbi; + + HB_TRACE(HB_TR_DEBUG, ("hb_gt_AdjustPos(%s, %lu)", pStr, ulLen )); + HB_SYMBOL_UNUSED( pStr ); HB_SYMBOL_UNUSED( ulLen ); - HB_TRACE(HB_TR_DEBUG, ("hb_gt_Adjust(): %s, %l", pStr, ulLen)); - GetConsoleScreenBufferInfo( s_HActive, &csbi ); hb_gtSetPos( csbi.dwCursorPosition.Y, csbi.dwCursorPosition.X ); diff --git a/harbour/source/vm/cmdarg.c b/harbour/source/vm/cmdarg.c index 7b5504189b..ab89d515ae 100644 --- a/harbour/source/vm/cmdarg.c +++ b/harbour/source/vm/cmdarg.c @@ -326,23 +326,20 @@ void hb_cmdargProcessVM( void ) hb_outerr( hb_consoleGetNewLine(), 0 ); hb_outerr( "GT API support: ", 0 ); -#if defined( HARBOUR_USE_GTAPI ) - hb_outerr( "Yes ", 0 ); #if defined( HARBOUR_USE_STD_GTAPI ) - hb_outerr( "(Standard)", 0 ); + hb_outerr( "Standard", 0 ); +#elif defined( HARBOUR_USE_PCA_GTAPI ) + hb_outerr( "PC ANSI", 0 ); #elif defined( HARBOUR_USE_DOS_GTAPI ) - hb_outerr( "(DOS)", 0 ); + hb_outerr( "DOS", 0 ); #elif defined( HARBOUR_USE_OS2_GTAPI ) - hb_outerr( "(OS/2)", 0 ); + hb_outerr( "OS/2", 0 ); #elif defined( HARBOUR_USE_WIN_GTAPI ) - hb_outerr( "(Windows)", 0 ); + hb_outerr( "Windows", 0 ); #elif defined( HARBOUR_USE_CRS_GTAPI ) - hb_outerr( "(Unix Curses)", 0 ); + hb_outerr( "Unix Curses", 0 ); #elif defined( HARBOUR_USE_SLN_GTAPI ) - hb_outerr( "(Unix Slang)", 0 ); -#endif -#else - hb_outerr( "No", 0 ); + hb_outerr( "Unix Slang", 0 ); #endif hb_outerr( hb_consoleGetNewLine(), 0 );