diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c988ea946e..def4d675ef 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,11 @@ +19990804-00:40 EDT Paul Tucker + * source/rtl/gt/gtwin.c + * corrected screen buffer size for dispbegin + * makefile.vc + + adir.prg + * Corrections to Achoice, filesys + * re-enabled gtDispbegin/end calls in gtBox + 19990804-00:20 EDT David G. Holm + tests/working/build.bat + New batch file to build and run individual PRG files diff --git a/harbour/makefile.vc b/harbour/makefile.vc index a35f6abebd..3167501cfb 100644 --- a/harbour/makefile.vc +++ b/harbour/makefile.vc @@ -51,6 +51,8 @@ HARBOURFLAGS=-iinclude -n # HARBOUR_LIB_OBJS = \ + $(OBJ_DIR)\achoice.obj \ + $(OBJ_DIR)\adir.obj \ $(OBJ_DIR)\alert.obj \ $(OBJ_DIR)\arrays.obj \ $(OBJ_DIR)\asort.obj \ @@ -69,7 +71,7 @@ HARBOUR_LIB_OBJS = \ $(OBJ_DIR)\errorapi.obj \ $(OBJ_DIR)\errorsys.obj \ $(OBJ_DIR)\extend.obj \ - $(OBJ_DIR)\files.obj \ + $(OBJ_DIR)\filesys.obj \ $(OBJ_DIR)\fm.obj \ $(OBJ_DIR)\gtapi.obj \ $(OBJ_DIR)\hardcr.obj \ @@ -259,6 +261,12 @@ $(RTL_DIR)\achoice.c : $(RTL_DIR)\achoice.prg $(OBJ_DIR)\achoice.obj : $(RTL_DIR)\achoice.c $(CC) $(CLIBFLAGS) -Fo$@ $** +$(RTL_DIR)\adir.c : $(RTL_DIR)\adir.prg + $(HARBOUR_EXE) $** $(HARBOURFLAGS) -o$(**D) + +$(OBJ_DIR)\adir.obj : $(RTL_DIR)\adir.c + $(CC) $(CLIBFLAGS) -Fo$@ $** + $(RTL_DIR)\alert.c : $(RTL_DIR)\alert.prg $(HARBOUR_EXE) $** $(HARBOURFLAGS) -o$(**D) @@ -325,7 +333,7 @@ $(OBJ_DIR)\error.obj : $(RTL_DIR)\error.c $(OBJ_DIR)\extend.obj : $(RTL_DIR)\extend.c $(CC) $(CLIBFLAGS) -Fo$@ $** -$(OBJ_DIR)\files.obj : $(RTL_DIR)\filesys.c +$(OBJ_DIR)\filesys.obj : $(RTL_DIR)\filesys.c $(CC) $(CLIBFLAGS) -Fo$@ $** $(OBJ_DIR)\fm.obj : $(RTL_DIR)\fm.c diff --git a/harbour/source/rtl/gt/gtwin.c b/harbour/source/rtl/gt/gtwin.c index 0758f9a123..c4588a0712 100644 --- a/harbour/source/rtl/gt/gtwin.c +++ b/harbour/source/rtl/gt/gtwin.c @@ -137,7 +137,6 @@ void hb_gt_SetCursorStyle(int style) cursor state is erratic - doesn't turn off, etc. */ break; - } SetConsoleCursorInfo(HCursor, &cci); @@ -191,7 +190,7 @@ void hb_gt_Puts(char cRow, char cCol, char attr, char *str, int len) coord.X = (DWORD) (cCol); coord.Y = (DWORD) (cRow); WriteConsoleOutputCharacterA(HOutput, str, (DWORD)len, coord, &dwlen); - FillConsoleOutputAttribute(HOutput, (WORD)((unsigned char)attr&0xff), (DWORD)len, coord, &dwlen); + FillConsoleOutputAttribute(HOutput, (WORD)((unsigned char)attr&0xff)|0x8000, (DWORD)len, coord, &dwlen); } void hb_gt_GetText(char cTop, char cLeft, char cBottom, char cRight, char *dest) @@ -258,7 +257,7 @@ void hb_gt_PutText(char cTop, char cLeft, char cBottom, char cRight, char *srce) { *(pstr + i) = *srce; srce++; - *(pwattr + i) = (WORD)((unsigned char)*srce)&0xff; + *(pwattr + i) = (WORD)((unsigned char)*srce)&0xff | 0x8000; *pwattr |= 0x8000; srce++; } @@ -391,6 +390,8 @@ void hb_gt_DispBegin(void) CONSOLE_TEXTMODE_BUFFER, /* Type of buffer */ NULL); /* reserved */ + SetConsoleScreenBufferSize(HOutput, coBuf); + WriteConsoleOutput(HOutput, /* output handle */ pCharInfo, /* data to write */ coBuf, /* col/row size of source buffer */ diff --git a/harbour/source/rtl/gtapi.c b/harbour/source/rtl/gtapi.c index 8fcc6deea0..8094bb9c7d 100644 --- a/harbour/source/rtl/gtapi.c +++ b/harbour/source/rtl/gtapi.c @@ -72,12 +72,12 @@ static USHORT s_uiColorIndex = 0; static USHORT s_uiMaxCol=80; static USHORT s_uiMaxRow=24; -int *_Color; /* masks: 0x0007 Background - 0x0070 Foreground - 0x0008 Blink - 0x0080 Bright - 0x0800 Underline background - 0x8000 Underline foreground +int *_Color; /* masks: 0x0007 Foreground + 0x0070 Background + 0x0008 Bright + 0x0080 Blink + 0x0800 Underline foreground + 0x8000 Underline background */ int _ColorCount; @@ -88,13 +88,14 @@ ULONG *_ScrnBuffer; void hb_gtInit(void) { /* ptucker */ - _Color = (int *)hb_xgrab(5*sizeof(int)); - _ColorCount = 5; _ScrnBuffer = (ULONG *)hb_xgrab( sizeof( ULONG ) ); + _Color = (int *)hb_xgrab(5*sizeof( int ) ); + _ColorCount = 5; hb_gt_Init(); hb_gtSetColorStr( hb_set.HB_SET_COLOR ); hb_gtSetMode( hb_gtMaxRow()+1, hb_gtMaxCol()+1 ); hb_gtSetPos( hb_gt_Row(), hb_gt_Col() ); + hb_gtSetCursor(1); } void hb_gtExit(void) @@ -172,7 +173,7 @@ int hb_gtBox (USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT uiRight, char /* Draw the box or line as specified */ height = uiBottom - uiTop + 1; width = uiRight - uiLeft + 1; -/* hb_gtDispBegin(); */ + hb_gtDispBegin(); if( height > 1 && width > 1 ) { @@ -212,7 +213,7 @@ int hb_gtBox (USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT uiRight, char } /* speed issue for now */ -/* hb_gtDispEnd(); */ + hb_gtDispEnd(); hb_gtSetPos(uiTopBak + 1, uiLeftBak + 1); @@ -530,13 +531,18 @@ int hb_gtRectSize(USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT uiRight, USHORT uiMRow = s_uiMaxRow; USHORT uiMCol = s_uiMaxCol; + if( uiBottom > uiMRow ) + uiBottom = uiMRow; + if( uiRight > uiMCol ) + uiRight = uiMCol; + if( uiTop > uiMRow || uiBottom > uiMRow || uiLeft > uiMCol || uiRight > uiMCol || uiTop > uiBottom || uiLeft > uiRight ) { return(1); } - + *uipBuffSize = (uiBottom - uiTop+1) * (uiRight - uiLeft+1) * 2; return(0);