diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 867982c7fe..60c3c3c09c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,12 @@ +19990719-17:55 EDT Paul Tucker + * source/rtl/gtapi.c + - removed temp init line now that init order is fixed. + + added call to gtDone from hb_gtExit + * source/rtl/setcolor.c + * removed a comma + * tests/working tstcolor.prg + + Added 'numeric' color example. + 19990719-16:50 EDT David G. Holm * config/dos/bcc31.cf + Added -DHARBOUR_USE_GTAPI and -DHARBOUR_USE_DOS_GTAPI diff --git a/harbour/source/rtl/gtapi.c b/harbour/source/rtl/gtapi.c index f86c7bd3dd..6d077de355 100644 --- a/harbour/source/rtl/gtapi.c +++ b/harbour/source/rtl/gtapi.c @@ -6,6 +6,8 @@ * GTAPI.C: Generic Terminal for Harbour * * Latest mods: + * 1.30 19990719 ptucker Removed temp init hack + * call gtDone from hb_gtExit * 1.29 19990719 ptucker Minor change to catch last color parameter * that may be empty * 1.28 19990719 ptucker Added support for numeric color strings @@ -48,16 +50,16 @@ int _ColorCount; void hb_gtInit(void) { - gtInit(); - hb_gtSetPos( gtWhereY(), gtWhereX() ); _Color = (int *)hb_xgrab(5*sizeof(int)); _ColorCount = 5; - hb_gtSetColorStr( "W/N,N/W,N/N,N/N,N/W" ); -/* hb_gtSetColorStr( hb_set.HB_SET_COLOR ); */ + gtInit(); + hb_gtSetPos( gtWhereY(), gtWhereX() ); + hb_gtSetColorStr( hb_set.HB_SET_COLOR ); } void hb_gtExit(void) { + gtDone(); hb_xfree( _Color ); } diff --git a/harbour/source/rtl/setcolor.c b/harbour/source/rtl/setcolor.c index 780bba9b4a..414f6ea6fd 100644 --- a/harbour/source/rtl/setcolor.c +++ b/harbour/source/rtl/setcolor.c @@ -63,7 +63,7 @@ char *hb_setColor( char *sColor ) HARBOUR HB_SETCOLOR( void ); HB_INIT_SYMBOLS_BEGIN( SETCOLOR__InitSymbols ) -{ "SETCOLOR", FS_PUBLIC, HB_SETCOLOR, 0 }, +{ "SETCOLOR", FS_PUBLIC, HB_SETCOLOR, 0 } HB_INIT_SYMBOLS_END( SETCOLOR__InitSymbols ); #if ! defined(__GNUC__) #pragma startup SETCOLOR__InitSymbols diff --git a/harbour/tests/working/tstcolor.prg b/harbour/tests/working/tstcolor.prg index 0ee6cc9354..88c6e7cc22 100644 --- a/harbour/tests/working/tstcolor.prg +++ b/harbour/tests/working/tstcolor.prg @@ -5,7 +5,7 @@ // // tstColor // -// This program demonstrates that SetColor() works with +// This program demonstrates that setColor() works with // Set( _SET_COLOR ) and also that the internal representation // of a clipper color string is properly converted back to a // valid string. It also shows that there can be any number of @@ -22,8 +22,10 @@ proc main Local cColor := "r+/bg*,rg*/ng+,w/n,b+/w,rg/b,w+/n*" -? set(_SET_COLOR ) -? "original ", setcolor( cColor ) -? "input ", cColor -? "return ", setcolor() -? set(_SET_COLOR ) +? "original set ", set(_SET_COLOR ) +? "should match ", setColor( cColor ) +? "input 1 ", cColor +? "return ", setColor("1/7,9/15") +? "input 2 ", "1/7,9/15" +? "return ", setColor() +? "final set ", set(_SET_COLOR )