Casts added to remove warnings

This commit is contained in:
Paul Tucker
2000-03-15 23:04:44 +00:00
parent 9b561c4f7a
commit 0ded8c8fde
4 changed files with 16 additions and 10 deletions

View File

@@ -1,3 +1,9 @@
20000315-18:00 EST Paul Tucker <ptucker@sympatico.ca>
* 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 <dholm@ sd-llc.com>
* source/rtl/tone.c
! Rearranged include file #elif list to test for __CYGWIN__

View File

@@ -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++ )
{

View File

@@ -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;
}

View File

@@ -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)) ||