See ChangeLog entry 19990930-15:20 EDT David G. Holm <dholm@jsd-llc.com>

This commit is contained in:
David G. Holm
1999-09-30 19:40:07 +00:00
parent 66a1f16b24
commit b05dff1996
5 changed files with 47 additions and 15 deletions

View File

@@ -1,3 +1,20 @@
19990930-15:20 EDT David G. Holm <dholm@jsd-llc.com>
* include/extend.h
+ Added hb_setCursor() prototype.
* source/rtl/console.c
+ Added hb_gtSetCursor( SC_NORMAL ) to hb_consoleInitialize().
+ Added hb_setCursor(), which does the grunt work that SETCURSOR
used to do, so that it can be called from SET().
% SETCURSOR() is now a shell function that calls hb_setCursor().
* source/rtl/set.c
! SET( _SET_CURSOR [, SC_...] ) now calls hb_setCursor().
* source/runner/stdalone/external.prg
+ Added HB_OSNEWLINE
19990930-21:00 GMT+1 Victor Szel <info@szelvesz.hu>
* include/common.ch
rtl/asort.prg

View File

@@ -387,7 +387,7 @@ extern void hb_consoleRelease( void );
extern char * hb_consoleGetNewLine( void );
extern void hb_outstd( char * pStr, ULONG ulLen );
extern void hb_outerr( char * pStr, ULONG ulLen );
extern USHORT hb_setCursor( BOOL bSetCursor, USHORT usNewCursor );
extern void hb_tone( double dFrequency, double dDuration );
extern char * hb_setColor( char * );

View File

@@ -143,6 +143,7 @@ void hb_consoleInitialize( void )
#ifdef HARBOUR_USE_GTAPI
hb_gtInit();
hb_gtGetPos( &s_uiDevRow, &s_uiDevCol );
hb_gtSetCursor( SC_NORMAL );
#else
s_uiDevRow = 0;
s_uiDevCol = 0;
@@ -1091,19 +1092,28 @@ HARBOUR HB_RESTSCREEN( void )
#endif
}
USHORT hb_setCursor( BOOL bSetCursor, USHORT usNewCursor )
{
USHORT usPreviousCursor;
#ifdef HARBOUR_USE_GTAPI
hb_gtGetCursor( &usPreviousCursor );
if( bSetCursor )
hb_gtSetCursor( usNewCursor );
#else
usPreviousCursor = hb_set.HB_SET_CURSOR;
if( bSetCursor )
hb_set.HB_SET_CURSOR = ( hb_cursor_enum ) usNewCursor;
#endif
return usPreviousCursor;
}
HARBOUR HB_SETCURSOR( void )
{
#ifdef HARBOUR_USE_GTAPI
USHORT usPreviousCursor;
hb_gtGetCursor( &usPreviousCursor );
if( hb_pcount() == 1 )
hb_gtSetCursor( hb_parni( 1 ) );
hb_retni( usPreviousCursor );
#else
hb_retni( SC_NORMAL );
#endif
if( hb_pcount() == 1 && ISNUM( 1 ) )
hb_retni( hb_setCursor( TRUE, hb_parni( 1 ) ) );
else
hb_retni( hb_setCursor( FALSE, 0 ) );
}
HARBOUR HB_SETBLINK( void )

View File

@@ -36,6 +36,8 @@
/*
* ChangeLog:
*
* V 1.81 David G. Holm Corrected _SET_CURSOR to use the GT API
* when available.
* V 1.70 David G. Holm Corrected _SET_COLOR case to only use
* '.asString' if 'IS_STRING', otherwise
* use "" instead of only if 'IS_NIL'.
@@ -736,8 +738,10 @@ HARBOUR HB_SET( void )
if( args > 1 ) hb_set.HB_SET_CONSOLE = set_logical( pArg2 );
break;
case HB_SET_CURSOR :
hb_retni( hb_set.HB_SET_CURSOR );
if( args > 1 ) hb_set.HB_SET_CURSOR = ( HB_cursor_enum ) set_number( pArg2, hb_set.HB_SET_CURSOR );
if( args >= 2 && IS_NUMERIC( pArg2 ) )
hb_retni( hb_setCursor( TRUE, hb_itemGetNI( pArg2 ) ) );
else
hb_retni( hb_setCursor( FALSE, 0 ) );
break;
case HB_SET_DATEFORMAT :
if( hb_set.HB_SET_DATEFORMAT ) hb_retc( hb_set.HB_SET_DATEFORMAT );
@@ -947,7 +951,7 @@ void hb_setInitialize( void )
hb_set.HB_SET_COLOR[ sizeof( hb_set.HB_SET_COLOR ) - 1 ] = '\0';
hb_set.HB_SET_CONFIRM = FALSE;
hb_set.HB_SET_CONSOLE = TRUE;
hb_set.HB_SET_CURSOR = SC_NORMAL;
hb_set.HB_SET_CURSOR = SC_NORMAL; /* Only needed for non-GTAPI */
hb_set.HB_SET_DATEFORMAT = ( char * ) hb_xgrab( 9 );
memcpy( hb_set.HB_SET_DATEFORMAT, "mm/dd/yy", 9 );
hb_set.HB_SET_DEBUG = FALSE;

View File

@@ -158,6 +158,7 @@ EXTERNAL SETMODE
EXTERNAL __ACCEPT
EXTERNAL __ACCEPTSTR
EXTERNAL __COLORINDEX
EXTERNAL HB_OSNEWLINE
//
//symbols from file: rtl\copyfile.c
//