diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b409ad137a..c3b66efb49 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,9 @@ +20000315-18:00 EST Paul Tucker + * source/tools/hb_f.c + * source/rtl/gt/gtwin.c + * source/rtl/gtapi.c + * added explicit casts to remove warnings. + 2000-03-15 19:00 GMT-5 David G. Holm * source/rtl/tone.c ! Rearranged include file #elif list to test for __CYGWIN__ diff --git a/harbour/source/rtl/gt/gtwin.c b/harbour/source/rtl/gt/gtwin.c index 7cd462ee07..43d192225e 100644 --- a/harbour/source/rtl/gt/gtwin.c +++ b/harbour/source/rtl/gt/gtwin.c @@ -355,8 +355,8 @@ void hb_gt_Puts( USHORT uiRow, USHORT uiCol, BYTE attr, BYTE * str, ULONG len ) HB_TRACE(HB_TR_DEBUG, ("hb_gt_Puts(%hu, %hu, %d, %p, %lu)", uiRow, uiCol, (int) attr, str, len)); - coord.X = ( DWORD ) uiCol; - coord.Y = ( DWORD ) uiRow; + coord.X = ( SHORT ) uiCol; + coord.Y = ( SHORT ) uiRow; FillConsoleOutputAttribute( s_HOutput, ( WORD )( attr & 0xFF ), ( DWORD ) len, coord, &dwWritten ); WriteConsoleOutputCharacterA( s_HOutput, ( char * ) str, ( DWORD ) len, coord, &dwWritten ); @@ -380,8 +380,8 @@ void hb_gt_GetText( USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT uiRight USHORT i; DWORD dwWritten; - coord.X = ( DWORD ) uiLeft; - coord.Y = ( DWORD ) uiTop; + coord.X = ( SHORT ) uiLeft; + coord.Y = ( SHORT ) uiTop; ReadConsoleOutputCharacterA( s_HOutput, ( char * ) pstr, width, coord, &dwWritten ); ReadConsoleOutputAttribute( s_HOutput, pwattr, width, coord, &dwWritten ); for( i = 0; i < width; i++ ) @@ -422,8 +422,8 @@ void hb_gt_PutText( USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT uiRight *( pwattr + i ) = ( ( WORD )( ( BYTE ) *srce ) & 0xFF ); srce++; } - coord.X = ( DWORD ) uiLeft; - coord.Y = ( DWORD ) uiTop; + coord.X = ( SHORT ) uiLeft; + coord.Y = ( SHORT ) uiTop; WriteConsoleOutputAttribute( s_HOutput, pwattr, width, coord, &dwWritten ); WriteConsoleOutputCharacterA( s_HOutput, ( char * ) pstr, width, coord, &dwWritten ); } @@ -443,7 +443,7 @@ void hb_gt_SetAttribute( USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT ui width = uiRight - uiLeft + 1; - coord.X = ( DWORD ) uiLeft; + coord.X = ( SHORT ) uiLeft; for( ; uiTop <= uiBottom; uiTop++ ) { @@ -487,7 +487,7 @@ void hb_gt_Scroll( USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT uiRight, COORD coord; USHORT width = uiRight - uiLeft + 1; - coord.X = ( DWORD ) uiLeft; + coord.X = ( SHORT ) uiLeft; for( ; uiTop <= uiBottom; uiTop++ ) { diff --git a/harbour/source/rtl/gtapi.c b/harbour/source/rtl/gtapi.c index f4c05f21fb..1c6db5d785 100644 --- a/harbour/source/rtl/gtapi.c +++ b/harbour/source/rtl/gtapi.c @@ -838,7 +838,7 @@ USHORT hb_gtWrite( BYTE * fpStr, ULONG length ) hb_gt_Puts( s_iCurrentRow, s_iCurrentCol, attr, fpStr, size ); } /* Finally, save the new cursor position, even if off-screen */ - hb_gtSetPos( s_iCurrentRow, s_iCurrentCol + length ); + hb_gtSetPos( s_iCurrentRow, s_iCurrentCol + (SHORT) length ); return 0; } diff --git a/harbour/source/tools/hb_f.c b/harbour/source/tools/hb_f.c index a9bffa73ff..f1cbd759a5 100644 --- a/harbour/source/tools/hb_f.c +++ b/harbour/source/tools/hb_f.c @@ -161,7 +161,7 @@ static long hb_hbfskip( int recs ) } hb_fsSeek( handles[area], read_pos, SEEK_SET ); - read_len = hb_fsRead( handles[area], ( BYTE * ) b, read_len ); + read_len = hb_fsRead( handles[area], ( BYTE * ) b, ( USHORT )read_len ); for (x = read_len - 4; x >= 0; x-- ) { if ( ((*(b + x) == 13) && (*(b + x + 1) == 10)) ||