diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 4519ddbd47..420c68d617 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,31 @@ +19990908-21:35 EDT David G. Holm + * include/extend.h + * include/hbdefs.h + * include/hbpp.h + * include/hbsetup.h + * source/vm/hvm.c + ! In order to eliminate a redefinition error for _POSIX_PATH_MAX, + "extend.h" now includes "hbdefs.h", which includes "hbsetup.h", + which includes . + + * source/rtl/gt/gtdos.c + ! Fixed hb_gt_Scroll() by renaming parameter 'attrib' to 'attr', + and assigning all other parameters to variables of the correct + types and names that the code that was cut-and-pasted from the + source/rtl/gtapi.c module expects. + + * source/rtl/gt/gtos2.c + ! Changed the types of the hb_gt_Scroll() parameters to 'char' to + match the source/rtl/gtapi.c usage and changed their names so + that the scrolling logic won't try to use them directly. + + Added local variables to hb_gt_Scroll() with the types and names + expected by the scrolling code and assigned them from their + corresponding parameters. + + Added unsigned char to USHORT conversions for the row and column + scroll values, because negative scroll values were coming through + as positive values greater than 127, because ICC has to default + the char type to unsigned to avoid char type related link failures. + 19990909-01:10 GMT+1 Victor Szel * source/compiler/harbour.y + Modified to add the current date and time (in a packed form as a diff --git a/harbour/include/extend.h b/harbour/include/extend.h index 0d95afbae0..15529eb56a 100644 --- a/harbour/include/extend.h +++ b/harbour/include/extend.h @@ -27,7 +27,6 @@ #ifndef HB_EXTEND_H_ #define HB_EXTEND_H_ -#include "hbsetup.h" #include "hbdefs.h" #include "hb_vmpub.h" diff --git a/harbour/include/hbdefs.h b/harbour/include/hbdefs.h index 0a92745790..3e8e3d9f9f 100644 --- a/harbour/include/hbdefs.h +++ b/harbour/include/hbdefs.h @@ -9,7 +9,7 @@ #include #include #include -#include +#include "hbsetup.h" #if defined(__IBMCPP__) /* With the exception of WORD, the IBM Visual Age C++ compiler has diff --git a/harbour/include/hbpp.h b/harbour/include/hbpp.h index a567ece0e9..12bbbc264f 100644 --- a/harbour/include/hbpp.h +++ b/harbour/include/hbpp.h @@ -7,7 +7,6 @@ #ifndef HB_PP_H_ #define HB_PP_H_ -#include "hbsetup.h" #include "hbdefs.h" typedef struct _PATHNAMES { /* the list of pathnames to search with #include */ diff --git a/harbour/include/hbsetup.h b/harbour/include/hbsetup.h index 8f387a0f0f..5d073ed99d 100644 --- a/harbour/include/hbsetup.h +++ b/harbour/include/hbsetup.h @@ -36,6 +36,8 @@ #ifndef HB_SETUP_H_ #define HB_SETUP_H_ +#include + /* *********************************************************************** * This symbol defines if Harbour is compiled using C compiler * that support strict ANSI C only diff --git a/harbour/source/rtl/gt/gtdos.c b/harbour/source/rtl/gt/gtdos.c index ec8b569f88..7fe1118bee 100644 --- a/harbour/source/rtl/gt/gtdos.c +++ b/harbour/source/rtl/gt/gtdos.c @@ -455,8 +455,14 @@ char hb_gt_Row(void) #endif } -void hb_gt_Scroll( char cTop, char cLeft, char cBottom, char cRight, char attribute, char vert, char horiz ) +void hb_gt_Scroll( char cTop, char cLeft, char cBottom, char cRight, char attr, char vert, char horiz ) { + /* Convert the "low-level" parameters back to the same types they + had when the following code used to be in gtapi.c */ + USHORT uiTop = cTop, uiLeft = cLeft, uiBottom = cBottom, uiRight = cRight; + int iRows = vert, iCols = horiz; + /* End of parameter conversion */ + USHORT uiRow, uiCol, uiSize; int iLength = ( uiRight - uiLeft ) + 1; int iCount, iColOld, iColNew, iColSize; diff --git a/harbour/source/rtl/gt/gtos2.c b/harbour/source/rtl/gt/gtos2.c index cda0fec140..a599e8227c 100644 --- a/harbour/source/rtl/gt/gtos2.c +++ b/harbour/source/rtl/gt/gtos2.c @@ -82,12 +82,16 @@ char hb_gt_Col(void) } -void hb_gt_Scroll( USHORT usTop, USHORT usLeft, USHORT usBottom, USHORT usRight, char attribute, SHORT sVert, SHORT sHoriz ) +void hb_gt_Scroll( char cTop, char cLeft, char cBottom, char cRight, char attribute, char cRows, char cCols ) { /* Chen Kedem */ + USHORT usTop = cTop, usLeft = cLeft, usBottom = cBottom, usRight = cRight; + SHORT sVert = cRows, sHoriz = cCols; BYTE bCell[ 2 ]; /* character/attribute pair */ - + if( sVert > 128 ) sVert = sVert - 256; + if( sHoriz > 128 ) sHoriz = sHoriz - 256; +printf("\nOS/2 hb_gt_Scroll( T %d, L %d, B %d, R %d, A %d, R %d, V %d )", usTop, usLeft, usBottom, usRight, attribute, sVert, sHoriz ); bCell [ 0 ] = ' '; bCell [ 1 ] = (BYTE)attribute; if ( (sVert | sHoriz) == 0 ) /* both zero, clear region */ diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index a1629ac11c..14a39ed47f 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -25,7 +25,6 @@ * You can contact me at: alinares@fivetech.com */ -#include #ifndef __MPW__ #include #endif