diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 4325d10556..66497660a9 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,7 @@ +19990818-16:16 EDT Paul Tucker + * source/rtl/console.c source/rtl/gtapi.c source/rtl/gt/gtwin.c + * fixes to my fixes + 19990818-14:33 EDT Paul Tucker * source/rtl/console.c * source/rtl/gtapi.c diff --git a/harbour/makefile.vc b/harbour/makefile.vc index 5dfe0ccc74..56310eec65 100644 --- a/harbour/makefile.vc +++ b/harbour/makefile.vc @@ -177,7 +177,8 @@ HBPP_LIB_OBJS = \ # DEBUG_LIB_OBJS = \ - $(OBJ_DIR)\debugger.obj + $(OBJ_DIR)\debugger.obj \ + $(OBJ_DIR)\tbrwtext.obj # # Our default target @@ -487,6 +488,12 @@ $(DEBUG_DIR)\debugger.c : $(DEBUG_DIR)\debugger.prg $(OBJ_DIR)\debugger.obj : $(DEBUG_DIR)\debugger.c $(CC) $(CLIBFLAGS) -Fo$@ $** +$(DEBUG_DIR)\tbrwtext.c : $(DEBUG_DIR)\tbrwtext.prg + $(HARBOUR_EXE) $** $(HARBOURFLAGS) -o$(**D) + +$(OBJ_DIR)\tbrwtext.obj : $(DEBUG_DIR)\tbrwtext.c + $(CC) $(CLIBFLAGS) -Fo$@ $** + # # VM source dependencies below. Add as needed # diff --git a/harbour/source/rtl/console.c b/harbour/source/rtl/console.c index c33cf4370b..f650289156 100644 --- a/harbour/source/rtl/console.c +++ b/harbour/source/rtl/console.c @@ -345,6 +345,7 @@ static void hb_outerr( char * fpStr, ULONG len ) static void hb_altout( char * fpStr, ULONG len ) { char * fpPtr = fpStr; + if( hb_set.HB_SET_CONSOLE ) { #ifdef HARBOUR_USE_GTAPI @@ -518,7 +519,7 @@ void hb_devpos( WORD row, WORD col ) WORD count; /* Position printer if SET DEVICE TO PRINTER and valid printer file otherwise position console */ - if( hb_stricmp( hb_set.HB_SET_DEVICE, "PRINTER" ) == 0 && hb_set_printhan >= 0 ) + if( hb_set_printhan >= 0 && hb_stricmp( hb_set.HB_SET_DEVICE, "PRINTER" ) == 0 ) { if( row < p_row ) { @@ -540,34 +541,34 @@ void hb_devpos( WORD row, WORD col ) HARBOUR HB_OUTSTD( void ) /* writes a list of values to the standard output device */ { - WORD w; + WORD w, pcount = hb_pcount(); - for( w = 0; w < hb_pcount(); w++ ) + for( w = 1; w <= pcount; w++ ) { - hb_out( w + 1, hb_outstd ); - if( w < hb_pcount() - 1) hb_outstd( " ", 1 ); + hb_out( w, hb_outstd ); + if( w < pcount) hb_outstd( " ", 1 ); } } HARBOUR HB_OUTERR( void ) /* writes a list of values to the standard error device */ { - WORD w; + WORD w, pcount = hb_pcount(); - for( w = 0; w < hb_pcount(); w++ ) + for( w = 1; w <= pcount; w++ ) { - hb_out( w + 1, hb_outerr ); - if( w < hb_pcount() - 1) hb_outerr( " ", 1 ); + hb_out( w, hb_outerr ); + if( w < pcount ) hb_outerr( " ", 1 ); } } HARBOUR HB_QQOUT( void ) /* writes a list of values to the current device (screen or printer) and is affected by SET ALTERNATE */ { - WORD w; + WORD w, pcount = hb_pcount(); - for( w = 0; w < hb_pcount(); w++ ) + for( w = 1; w <= pcount; w++ ) { - hb_out( w + 1, hb_altout ); - if( w < hb_pcount() - 1) hb_altout( " ", 1 ); + hb_out( w, hb_altout ); + if( w < pcount ) hb_altout( " ", 1 ); } } diff --git a/harbour/source/rtl/gt/gtwin.c b/harbour/source/rtl/gt/gtwin.c index 99ba25dd9e..81b58efe65 100644 --- a/harbour/source/rtl/gt/gtwin.c +++ b/harbour/source/rtl/gt/gtwin.c @@ -424,6 +424,7 @@ void hb_gt_DispBegin(void) coBuf, /* col/row size of source buffer */ coDest, /* upper-left cell to write data from in src */ &csbi.srWindow); /* screen buffer rect to write data to */ + SetConsoleCursorPosition(HOutput, csbi.dwCursorPosition); hb_xfree(pCharInfo); } diff --git a/harbour/source/rtl/gtapi.c b/harbour/source/rtl/gtapi.c index 0ac46c922d..0119a87f65 100644 --- a/harbour/source/rtl/gtapi.c +++ b/harbour/source/rtl/gtapi.c @@ -751,10 +751,15 @@ int hb_gtWriteCon(char * fpStr, ULONG length) ++uiRow; ldisp=TRUE; break; + case 13: uiCol = 0; + if( ! (*fpPtr == 0x0a )) + nLen = 0 ; + /* hb_gtSetPos (uiRow, uiCol); */ break; + default: if( ++uiCol > s_uiMaxCol ) {