From d61fdf59913cfb008f67b05adf92407bfc51358c Mon Sep 17 00:00:00 2001 From: "David G. Holm" Date: Mon, 19 Jul 1999 21:06:14 +0000 Subject: [PATCH] See ChangeLog entry 19990719-16:50 EDT David G. Holm --- harbour/ChangeLog | 35 ++++++++++++++++++++++++++++++ harbour/config/dos/bcc31.cf | 2 +- harbour/include/set.h | 8 ++++++- harbour/include/version.h | 9 +++++--- harbour/source/compiler/harbour.y | 11 +++++----- harbour/source/rtl/console.c | 15 ++++++++----- harbour/source/rtl/setcolor.c | 11 ---------- harbour/source/vm/hvm.c | 4 ++-- harbour/tests/working/scroll.prg | 10 +++++++-- harbour/tests/working/tstcolor.prg | 6 ----- 10 files changed, 74 insertions(+), 37 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 08e1606356..867982c7fe 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,38 @@ +19990719-16:50 EDT David G. Holm + * config/dos/bcc31.cf + + Added -DHARBOUR_USE_GTAPI and -DHARBOUR_USE_DOS_GTAPI + to the C preprocessor options + * include/set.h + + Added prototypes for hb_consoleInitialize() and + hb_consoleRelease(), because console doesn't own + an include file and these two functions were added + to allow synchronization with hb_setInitialize() and + hb_setRelease(), both of which are prototyped here + * include/version.h + * Updated build to 29, set revision to "", and set date + to 1999, 7, 19, in anticipation of a new public release + * source/compiler/harbour.y + + Added #include "version.h" + * Changed version printout to use hb_build from version.h + * Changed version printout us use "Summer" instead of "Spring" + * Removed newline from middle of version printout + * Moved prinout of version ahead of command line option checks, + so that the version is always displayed, like in Clipper + * source/rtl/console.c + + Added hb_consoleRelease() function that calls hb_gtExit() + * Converted InitializeConsole() from an HB_CALL_ON_STARTUP + function to a normal function named hb_consoleInitialize() + * source/rtl/setcolor.c + - Removed HARBOUR GTEXIT() function + * source/vm/hvm.c + + Added call to hb_consoleInitialize() immediately following call to + hb_setInitialize and added call to hb_consoleRelease() immediately + prior to calling hb_setRelease(). + * tests/working scroll.prg + * Changed the introductory text message + * tests/working/tstcolor.prg + - Removed GTEXIT() call + 19990719-16:15 EDT Paul Tucker * source/rtl/gtapi.c * Minor change to catch last color parameter diff --git a/harbour/config/dos/bcc31.cf b/harbour/config/dos/bcc31.cf index 252dbf62b2..997eb5a150 100644 --- a/harbour/config/dos/bcc31.cf +++ b/harbour/config/dos/bcc31.cf @@ -24,7 +24,7 @@ endif CC = bcc CC_IN = -c CC_OUT = -o -CPPFLAGS = -I$($(HB_ARCHITECTURE)_$(HB_COMPILER)_GRANDP) -I$(_HB_INC_COMPILE) +CPPFLAGS = -I$($(HB_ARCHITECTURE)_$(HB_COMPILER)_GRANDP) -I$(_HB_INC_COMPILE) -DHARBOUR_USE_GTAPI -DHARBOUR_USE_DOS_GTAPI CFLAGS = -O2 -mh #Note: The empty line below HAVE TO exist! diff --git a/harbour/include/set.h b/harbour/include/set.h index 14866628df..050653ad92 100644 --- a/harbour/include/set.h +++ b/harbour/include/set.h @@ -29,7 +29,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit their web site at http://www.gnu.org/). - V 1.47 David G. Holm Changed hb_set.HB_SET_COLOR to be a + V 1.16 David G. Holm Added prototypes for hb_consoleRelease + and hb_consoleInitialize, because set + must be initialized before console and + released after console. + V 1.15 David G. Holm Changed hb_set.HB_SET_COLOR to be a fixed 64 byte buffer. Added prototype for hb_setColor() V 1.14 David G. Holm Removed the obsolete hb_set_fixed @@ -67,7 +71,9 @@ HARBOUR HB_SET (void); HARBOUR HB_SETCENTURY (void); char * hb_setColor (char *); void hb_setInitialize (void); +void hb_consoleInitialize (void); void hb_setRelease (void); +void hb_consoleRelease (void); typedef enum { diff --git a/harbour/include/version.h b/harbour/include/version.h index 6e9331d8af..2424a611a5 100644 --- a/harbour/include/version.h +++ b/harbour/include/version.h @@ -29,6 +29,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit their web site at http://www.gnu.org/). + V 1.12 David G. Holm Bumped build to 29, reset revision + code to an empty string, and updated + date, anticipating a public release. V 1.11 Patrick Mast Bumped build to 28 and updated date for new public release. V 1.10 David G. Holm Added my email address. @@ -64,10 +67,10 @@ #define hb_major 0 /* Major version number */ #define hb_minor 0 /* Minor version number */ - #define hb_revision "d" /* Revision letter */ - #define hb_build 28 /* Build number */ + #define hb_revision "" /* Revision letter */ + #define hb_build 29 /* Build number */ #define hb_year 1999 /* Build year */ #define hb_month 7 /* Build month */ - #define hb_day 18 /* Build day */ + #define hb_day 19 /* Build day */ #endif /* HB_VER_H_ */ diff --git a/harbour/source/compiler/harbour.y b/harbour/source/compiler/harbour.y index 3a44b23fba..aa81c8c585 100644 --- a/harbour/source/compiler/harbour.y +++ b/harbour/source/compiler/harbour.y @@ -5,7 +5,7 @@ /* * Harbour compiler (yacc rules and actions) - * Build 27 summer 1999 + * Build 29 summer 1999 * Usage: bison -d -v harbour.y * You may find Bison at www.harbour.project.org * @@ -36,8 +36,6 @@ * partial copyright regarding generation portable objects */ -#define BUILD 27 /* current harbour.y build */ - #include #include #include @@ -50,6 +48,7 @@ #include "compiler.h" #include "hberrors.h" #include "hbpp.h" +#include "version.h" #define debug_msg( x, z ) @@ -1175,6 +1174,9 @@ int harbour_main( int argc, char * argv[] ) char *szOutPath =""; FILENAME *pFileName =NULL; + if( !_iQuiet ) + printf( "Harbour compiler build %i Summer 1999\n", hb_build ); + if( argc > 1 ) { Hbpp_init(); /* Initialization of preprocessor arrays */ @@ -1323,9 +1325,6 @@ int harbour_main( int argc, char * argv[] ) iArg++; } - if( !_iQuiet ) - printf( "Harbour compiler\nbuild %i Spring 1999\n", BUILD ); - if( pFileName ) { if( !pFileName->extension ) diff --git a/harbour/source/rtl/console.c b/harbour/source/rtl/console.c index 8f8972f9a6..de2b3818df 100644 --- a/harbour/source/rtl/console.c +++ b/harbour/source/rtl/console.c @@ -127,7 +127,15 @@ HB_INIT_SYMBOLS_END( Console__InitSymbols ); static unsigned short dev_row, dev_col, p_row, p_col; static char CrLf [ CRLF_BUFFER_LEN ]; -HB_CALL_ON_STARTUP_BEGIN( InitializeConsole ) +void hb_consoleRelease( void ) +{ +#ifdef HARBOUR_USE_GTAPI + hb_gtExit (); +#endif +} + +void hb_consoleInitialize( void ) +{ #if defined(OS_DOS_COMPATIBLE) CrLf [0] = 13; CrLf [1] = 10; @@ -145,10 +153,7 @@ HB_CALL_ON_STARTUP_BEGIN( InitializeConsole ) dev_col = 0; #endif p_row = p_col = 0; -HB_CALL_ON_STARTUP_END( InitializeConsole ); -#if ! defined(__GNUC__) -#pragma startup InitializeConsole -#endif +} WORD hb_max_row( void ) { diff --git a/harbour/source/rtl/setcolor.c b/harbour/source/rtl/setcolor.c index 8f1ed4adbd..780bba9b4a 100644 --- a/harbour/source/rtl/setcolor.c +++ b/harbour/source/rtl/setcolor.c @@ -61,11 +61,9 @@ char *hb_setColor( char *sColor ) } HARBOUR HB_SETCOLOR( void ); -HARBOUR HB_GTEXIT( void ); HB_INIT_SYMBOLS_BEGIN( SETCOLOR__InitSymbols ) { "SETCOLOR", FS_PUBLIC, HB_SETCOLOR, 0 }, -{ "GTEXIT", FS_PUBLIC, HB_GTEXIT, 0 } HB_INIT_SYMBOLS_END( SETCOLOR__InitSymbols ); #if ! defined(__GNUC__) #pragma startup SETCOLOR__InitSymbols @@ -75,12 +73,3 @@ HARBOUR HB_SETCOLOR( void ) { hb_retc( hb_setColor( hb_pcount() ? hb_parc(1) : NULL ) ); } - -/* TODO: This is a temporary fix - Call it on exit if you use SetColor() */ - -HARBOUR HB_GTEXIT( void ) -{ -#ifdef HARBOUR_USE_GTAPI - hb_gtExit(); -#endif -} diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index 29960c0f3a..2c9a3266d6 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -56,7 +56,6 @@ HARBOUR HB_EVAL( void ); /* Evaluates a codeblock from Harbour */ HARBOUR HB_MAIN( void ); /* fixed entry point by now */ HARBOUR HB_VALTYPE( void ); /* returns a string description of a value */ -/* extern void InitializeConsole(void); This prototype is needed by C++ compilers */ extern void InitSymbolTable(void); /* This prototype is needed by C++ compilers */ /* currently supported virtual machine actions */ @@ -225,8 +224,8 @@ BYTE bErrorLevel = 0; /* application exit errorlevel */ StackInit(); NewDynSym( &symEval ); /* initialize dynamic symbol for evaluating codeblocks */ hb_setInitialize(); /* initialize Sets */ + hb_consoleInitialize(); /* initialize Console */ hb_MemvarInit(); -/* InitializeConsole(); initialize Console */ #ifdef HARBOUR_OBJ_GENERATION ProcessObjSymbols(); /* initialize Harbour generated OBJs symbols */ #endif @@ -266,6 +265,7 @@ BYTE bErrorLevel = 0; /* application exit errorlevel */ ReleaseClasses(); ReleaseLocalSymbols(); /* releases the local modules linked list */ ReleaseDynamicSymbols(); /* releases the dynamic symbol table */ + hb_consoleRelease(); /* releases Console */ hb_setRelease(); /* releases Sets */ hb_MemvarRelease(); StackFree(); diff --git a/harbour/tests/working/scroll.prg b/harbour/tests/working/scroll.prg index ff2dcbe34e..2b2743e1fe 100644 --- a/harbour/tests/working/scroll.prg +++ b/harbour/tests/working/scroll.prg @@ -11,8 +11,14 @@ function main() - CLS - @ MAXROW(), 0 SAY "If the GT API was linked in, the rest of the screen should be blank now." + DEVPOS(MAXROW(),0) + ? "If you have the GT API linked in, the screen will be blanked, a text block" + ? "will be drawn in the upper-left hand corner of the screen, and then the inside" + ? "of the text block will be scrolled around. Otherwise, you will see the screen" + ? "scroll, the text block will be drawn starting from the bottom right and scroll" + ? "up, but there will be no scrolling inside the text block." + ? + ? Pause() CLS @ 0,0 SAY "01234567890123456789012345678901" diff --git a/harbour/tests/working/tstcolor.prg b/harbour/tests/working/tstcolor.prg index 981c58d794..0ee6cc9354 100644 --- a/harbour/tests/working/tstcolor.prg +++ b/harbour/tests/working/tstcolor.prg @@ -27,9 +27,3 @@ proc main ? "input ", cColor ? "return ", setcolor() ? set(_SET_COLOR ) - - -/* TODO: gt_exit needs to be called! */ - -gtexit() -