2008-09-06 11:07 UTC+0200 Viktor Szakats (harbour.01 syenar hu)

* make_vc.bat
   * contrib/mtpl_vc.bat
     + Added -nologo to nmake.exe command line.

   * source/vm/memvars.c
   * source/rtl/scroll.c
   * source/rtl/diskspac.c
   * source/rtl/console.c
   * source/rtl/philes.c
   * source/rtl/oldclear.c
   * source/rtl/oldbox.c
   * source/rtl/cdpapi.c
   * source/rtl/setpos.c
   * source/rtl/errorapi.c
   * source/rtl/setcolor.c
   * source/rtl/philes53.c
   * source/rtl/setkey.c
   * source/rtl/disksphb.c
   * source/rtl/shadow.c
   * source/rtl/hbhex.c
   * source/rtl/setcurs.c
   * source/rtl/dates.c
   * source/rtl/gtwvt/gtwvt.c
   * source/rtl/hbinet.c
   * source/rtl/hbffind.c
   * source/rtl/filesys.c
   * contrib/hbct/screen2.c
   * contrib/hbct/screen1.c
   * contrib/hbnf/fttext.c
     ! Fixed more MSVS 2008 -W4 warnings (about 100 of them).

   * contrib/hbnf/fttext.c
     ! Fixed C++ compile error after recently 
       switching to Harbour API from Clipper one.
This commit is contained in:
Viktor Szakats
2008-09-06 09:11:45 +00:00
parent 13691c9395
commit 3f1adf0012
28 changed files with 152 additions and 117 deletions

View File

@@ -8,6 +8,42 @@
2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2008-09-06 11:07 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* make_vc.bat
* contrib/mtpl_vc.bat
+ Added -nologo to nmake.exe command line.
* source/vm/memvars.c
* source/rtl/scroll.c
* source/rtl/diskspac.c
* source/rtl/console.c
* source/rtl/philes.c
* source/rtl/oldclear.c
* source/rtl/oldbox.c
* source/rtl/cdpapi.c
* source/rtl/setpos.c
* source/rtl/errorapi.c
* source/rtl/setcolor.c
* source/rtl/philes53.c
* source/rtl/setkey.c
* source/rtl/disksphb.c
* source/rtl/shadow.c
* source/rtl/hbhex.c
* source/rtl/setcurs.c
* source/rtl/dates.c
* source/rtl/gtwvt/gtwvt.c
* source/rtl/hbinet.c
* source/rtl/hbffind.c
* source/rtl/filesys.c
* contrib/hbct/screen2.c
* contrib/hbct/screen1.c
* contrib/hbnf/fttext.c
! Fixed more MSVS 2008 -W4 warnings (about 100 of them).
* contrib/hbnf/fttext.c
! Fixed C++ compile error after recently
switching to Harbour API from Clipper one.
2008-09-05 20:45 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/rddads/adsfunc.c
! Fixed some more MSVS 2008 -W4 warnings.

View File

@@ -102,13 +102,13 @@
HB_FUNC( SCREENATTR )
{
SHORT sRow, sCol;
int iRow, iCol;
SHORT iRow, iCol;
BYTE bColor, bAttr;
USHORT usChar;
hb_gtGetPos( &sRow, &sCol );
iRow = ISNUM( 1 ) ? hb_parni( 1 ) : sRow;
iCol = ISNUM( 2 ) ? hb_parni( 2 ) : sCol;
iRow = ISNUM( 1 ) ? ( SHORT ) hb_parni( 1 ) : sRow;
iCol = ISNUM( 2 ) ? ( SHORT ) hb_parni( 2 ) : sCol;
if( hb_gtGetChar( iRow, iCol, &bColor, &bAttr, &usChar ) != SUCCESS )
bColor = 0;
@@ -151,7 +151,7 @@ HB_FUNC( SCREENMIX )
char * szText = hb_parc( 1 ), * szAttr;
ULONG ulAttr = hb_parclen( 2 ), ul = 0;
SHORT sRow, sCol;
int iRow, iCol, i;
SHORT iRow, iCol, i;
if( ulAttr == 0 )
{
@@ -162,8 +162,8 @@ HB_FUNC( SCREENMIX )
szAttr = hb_parc( 2 );
hb_gtGetPos( &sRow, &sCol );
iRow = ISNUM( 3 ) ? hb_parni( 3 ) : sRow;
iCol = ISNUM( 4 ) ? hb_parni( 4 ) : sCol;
iRow = ISNUM( 3 ) ? ( SHORT ) hb_parni( 3 ) : sRow;
iCol = ISNUM( 4 ) ? ( SHORT ) hb_parni( 4 ) : sCol;
if( iRow >= 0 && iCol >= 0 &&
iRow <= hb_gtMaxRow() && iCol <= hb_gtMaxCol() )
@@ -231,11 +231,11 @@ HB_FUNC( SAYSCREEN )
{
char * szText = hb_parc( 1 );
SHORT sRow, sCol;
int iRow, iCol, i;
SHORT iRow, iCol, i;
hb_gtGetPos( &sRow, &sCol );
iRow = ISNUM( 2 ) ? hb_parni( 2 ) : sRow;
iCol = ISNUM( 3 ) ? hb_parni( 3 ) : sCol;
iRow = ISNUM( 2 ) ? ( SHORT ) hb_parni( 2 ) : sRow;
iCol = ISNUM( 3 ) ? ( SHORT ) hb_parni( 3 ) : sCol;
if( iRow >= 0 && iCol >= 0 &&
iRow <= hb_gtMaxRow() && iCol <= hb_gtMaxCol() )

View File

@@ -77,7 +77,7 @@ HB_FUNC( SAYDOWN )
if( iRow >= 0 && iCol >= 0 && iRow <= iMaxRow && iCol <= iMaxCol )
{
BYTE bColor = hb_gtGetCurrColor();
BYTE bColor = ( BYTE ) hb_gtGetCurrColor();
if( ulLen > ( ULONG ) ( iMaxRow - iRow + 1 ) )
ulLen = ( ULONG ) ( iMaxRow - iRow + 1 );

View File

@@ -1253,7 +1253,7 @@ HB_FUNC( FT_FAPPEND )
if( !error[area] )
{
/* move DOS eof marker */
hb_fsWrite( handles[area], (void *) buff, 0 );
hb_fsWrite( handles[area], (BYTE *) buff, 0 );
error[area] = hb_fsError();
}

View File

@@ -37,14 +37,14 @@ if "%1" == "INSTALL" goto INSTALL
:BUILD
%_HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %_HB_MAKEFILE% %1 %2 %3 > %_HB_MAKELOG%
%_HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -nologo -f %_HB_MAKEFILE% %1 %2 %3 > %_HB_MAKELOG%
if errorlevel 1 set HB_EXIT_LEVEL=1
if errorlevel 1 if not "%HB_SHOW_ERRORS%" == "no" notepad %_HB_MAKELOG%
goto EXIT
:CLEAN
%_HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %_HB_MAKEFILE% CLEAN > %_HB_MAKELOG%
%_HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -nologo -f %_HB_MAKEFILE% CLEAN > %_HB_MAKELOG%
if errorlevel 1 set HB_EXIT_LEVEL=1
if errorlevel 1 goto EXIT
@@ -53,7 +53,7 @@ if "%1" == "INSTALL" goto INSTALL
:INSTALL
%_HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %_HB_MAKEFILE% INSTALL > nul
%_HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -nologo -f %_HB_MAKEFILE% INSTALL > nul
if errorlevel 1 set HB_EXIT_LEVEL=1
goto EXIT

View File

@@ -84,14 +84,14 @@ rem ---------------------------------------------------------------
:BUILD
%_HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %_HB_MAKEFILE% %1 %2 %3 > make_%_HB_CC_NAME%.log
%_HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -nologo -f %_HB_MAKEFILE% %1 %2 %3 > make_%_HB_CC_NAME%.log
if errorlevel 1 set HB_EXIT_LEVEL=1
if errorlevel 1 if not "%HB_SHOW_ERRORS%" == "no" notepad make_%_HB_CC_NAME%.log
goto EXIT
:CLEAN
%_HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %_HB_MAKEFILE% CLEAN > make_%_HB_CC_NAME%.log
%_HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -nologo -f %_HB_MAKEFILE% CLEAN > make_%_HB_CC_NAME%.log
if errorlevel 1 set HB_EXIT_LEVEL=1
if errorlevel 1 goto EXIT
if exist make_%_HB_CC_NAME%.log del make_%_HB_CC_NAME%.log > nul
@@ -100,7 +100,7 @@ rem ---------------------------------------------------------------
:INSTALL
%_HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %_HB_MAKEFILE% INSTALL > nul
%_HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -nologo -f %_HB_MAKEFILE% INSTALL > nul
if errorlevel 1 set HB_EXIT_LEVEL=1
goto EXIT

View File

@@ -334,8 +334,8 @@ HB_EXPORT BOOL hb_cdpRegister( PHB_CODEPAGE cdpage )
for( i = 0; i < 256; i++ )
{
cdpage->s_upper[i] = toupper( ( UCHAR ) i );
cdpage->s_lower[i] = tolower( ( UCHAR ) i );
cdpage->s_upper[i] = ( char ) toupper( ( UCHAR ) i );
cdpage->s_lower[i] = ( char ) tolower( ( UCHAR ) i );
}
if( strpbrk( cdpage->CharsUpper, "~." ) != NULL )
{
@@ -387,12 +387,12 @@ HB_EXPORT BOOL hb_cdpRegister( PHB_CODEPAGE cdpage )
iumax = iu;
ilmax = il;
cdpage->s_chars[iu] = i;
cdpage->s_chars[il] = i + nAddLower;
cdpage->s_chars[iu] = ( char ) i;
cdpage->s_chars[il] = ( char ) ( i + nAddLower );
if( cdpage->lAccInterleave )
{
cdpage->s_accent[iu] = ia;
cdpage->s_accent[il] = ia + nAddLower;
cdpage->s_accent[iu] = ( char ) ia;
cdpage->s_accent[il] = ( char ) ( ia + nAddLower );
}
cdpage->s_upper[il] = *ptrUpper;
cdpage->s_lower[iu] = *ptrLower;
@@ -402,12 +402,12 @@ HB_EXPORT BOOL hb_cdpRegister( PHB_CODEPAGE cdpage )
for( i = 91; i <= 96; i++ )
{
if( !cdpage->s_chars[i] )
cdpage->s_chars[i] = cdpage->nChars + ( i - 90 );
cdpage->s_chars[i] = ( char ) ( cdpage->nChars + ( i - 90 ) );
}
for( i = 123; i < 256; i++ )
{
if( !cdpage->s_chars[i] )
cdpage->s_chars[i] = cdpage->nChars + nAddLower + ( i - 122 );
cdpage->s_chars[i] = ( char ) ( cdpage->nChars + nAddLower + ( i - 122 ) );
}
}
/*
@@ -799,7 +799,7 @@ HB_EXPORT ULONG hb_cdpStrnToUTF8( PHB_CODEPAGE cdp, BOOL fCtrl,
else
{
uniCodes = cdp->uniTable->uniCodes;
nChars = cdp->uniTable->nChars;
nChars = ( USHORT ) cdp->uniTable->nChars;
}
}
else
@@ -843,7 +843,7 @@ HB_EXPORT ULONG hb_cdpStrnToU16( PHB_CODEPAGE cdp, BOOL fCtrl,
else
{
uniCodes = cdp->uniTable->uniCodes;
nChars = cdp->uniTable->nChars;
nChars = ( USHORT ) cdp->uniTable->nChars;
}
}
else

View File

@@ -296,7 +296,7 @@ static void hb_conOut( USHORT uiParam, hb_out_func_typedef * pOutFunc )
HB_FUNC( OUTSTD ) /* writes a list of values to the standard output device */
{
USHORT uiPCount = hb_pcount();
USHORT uiPCount = ( USHORT ) hb_pcount();
USHORT uiParam;
for( uiParam = 1; uiParam <= uiPCount; uiParam++ )
@@ -309,7 +309,7 @@ HB_FUNC( OUTSTD ) /* writes a list of values to the standard output device */
HB_FUNC( OUTERR ) /* writes a list of values to the standard error device */
{
USHORT uiPCount = hb_pcount();
USHORT uiPCount = ( USHORT ) hb_pcount();
USHORT uiParam;
for( uiParam = 1; uiParam <= uiPCount; uiParam++ )
@@ -322,7 +322,7 @@ HB_FUNC( OUTERR ) /* writes a list of values to the standard error device */
HB_FUNC( QQOUT ) /* writes a list of values to the current device (screen or printer) and is affected by SET ALTERNATE */
{
USHORT uiPCount = hb_pcount();
USHORT uiPCount = ( USHORT ) hb_pcount();
USHORT uiParam;
for( uiParam = 1; uiParam <= uiPCount; uiParam++ )
@@ -342,7 +342,7 @@ HB_FUNC( QOUT )
BYTE buf[ 80 ];
s_uiPRow++;
s_uiPCol = hb_set.HB_SET_MARGIN;
s_uiPCol = ( USHORT ) hb_set.HB_SET_MARGIN;
if( s_uiPCol )
{
if( s_uiPCol > sizeof( buf ) )
@@ -395,7 +395,7 @@ static void hb_conDevPos( SHORT iRow, SHORT iCol )
hb_stricmp( hb_set.HB_SET_DEVICE, "PRINTER" ) == 0 )
{
USHORT uiPRow = ( USHORT ) iRow;
USHORT uiPCol = ( USHORT ) iCol + hb_set.HB_SET_MARGIN;
USHORT uiPCol = ( USHORT ) iCol + ( USHORT ) hb_set.HB_SET_MARGIN;
if( s_uiPRow != uiPRow || s_uiPCol != uiPCol )
{

View File

@@ -126,7 +126,7 @@ HB_EXPORT char * hb_dateFormat( const char * szDate, char * szFormattedDate, con
digit_count--;
}
while( digit_count-- > 0 && format_count < size )
szFormattedDate[ format_count++ ] = digit;
szFormattedDate[ format_count++ ] = ( char ) digit;
}
used_d = TRUE;
break;
@@ -161,7 +161,7 @@ HB_EXPORT char * hb_dateFormat( const char * szDate, char * szFormattedDate, con
digit_count--;
}
while( digit_count-- > 0 && format_count < size )
szFormattedDate[ format_count++ ] = digit;
szFormattedDate[ format_count++ ] = ( char ) digit;
}
used_m = TRUE;
break;
@@ -197,14 +197,14 @@ HB_EXPORT char * hb_dateFormat( const char * szDate, char * szFormattedDate, con
digit_count--;
}
while( digit_count-- > 0 && format_count < size )
szFormattedDate[ format_count++ ] = digit;
szFormattedDate[ format_count++ ] = ( char ) digit;
}
used_y = TRUE;
break;
default:
while( digit_count-- > 0 && format_count < size )
szFormattedDate[ format_count++ ] = digit;
szFormattedDate[ format_count++ ] = ( char ) digit;
}
}
}

View File

@@ -115,17 +115,17 @@ HB_FUNC( DISKSPACE )
typedef BOOL ( WINAPI * P_GDFSE )( LPCSTR, PULARGE_INTEGER,
PULARGE_INTEGER, PULARGE_INTEGER );
ULARGE_INTEGER i64FreeBytesToCaller, i64TotalBytes, i64FreeBytes;
USHORT uiParam = hb_parni( 1 );
USHORT uiParam = ( USHORT ) hb_parni( 1 );
USHORT uiDrive = uiParam == 0 ? hb_fsCurDrv() + 1 : uiParam;
UINT uiErrMode = SetErrorMode( SEM_FAILCRITICALERRORS );
#if defined(HB_WINCE)
TCHAR lpPath[4];
TCHAR lpPath[ 4 ];
lpPath[0] = uiDrive + 'A' - 1;
lpPath[1] = ':';
lpPath[2] = '\\';
lpPath[3] = '\0';
lpPath[ 0 ] = ( TCHAR ) uiDrive + 'A' - 1;
lpPath[ 1 ] = ':';
lpPath[ 2 ] = '\\';
lpPath[ 3 ] = '\0';
bError = !GetDiskFreeSpaceEx( lpPath,
( PULARGE_INTEGER ) &i64FreeBytesToCaller,
@@ -134,14 +134,14 @@ HB_FUNC( DISKSPACE )
if( !bError )
dSpace = HB_GET_LARGE_UINT( i64FreeBytesToCaller );
#else
char szPath[4];
char szPath[ 4 ];
P_GDFSE pGetDiskFreeSpaceEx = ( P_GDFSE )
GetProcAddress( GetModuleHandleA( "kernel32.dll" ),
"GetDiskFreeSpaceExA" );
szPath[0] = uiDrive + 'A' - 1;
szPath[1] = ':';
szPath[2] = '\\';
szPath[3] = '\0';
szPath[ 0 ] = ( char ) uiDrive + 'A' - 1;
szPath[ 1 ] = ':';
szPath[ 2 ] = '\\';
szPath[ 3 ] = '\0';
if( pGetDiskFreeSpaceEx )
{
@@ -186,7 +186,7 @@ HB_FUNC( DISKSPACE )
}
#elif defined(HB_OS_UNIX)
{
char *szName = hb_parc( 1 );
char * szName = hb_parc( 1 );
BOOL fFree = FALSE;
if( !szName )

View File

@@ -70,7 +70,7 @@ HB_FUNC( HB_DISKSPACE )
{
char szPathBuf[ 4 ];
char * szPath = hb_parc( 1 );
USHORT uiType = ISNUM( 2 ) ? hb_parni( 2 ) : HB_DISK_AVAIL;
USHORT uiType = ISNUM( 2 ) ? ( USHORT ) hb_parni( 2 ) : HB_DISK_AVAIL;
double dSpace = 0.0;
if( uiType > HB_DISK_TOTAL )

View File

@@ -758,7 +758,7 @@ USHORT hb_errGetGenCode( PHB_ITEM pError )
{
HB_TRACE(HB_TR_DEBUG, ("hb_errGetGenCode(%p)", pError));
return hb_arrayGetNI( pError, HB_TERROR_GENCODE );
return ( USHORT ) hb_arrayGetNI( pError, HB_TERROR_GENCODE );
}
PHB_ITEM hb_errPutGenCode( PHB_ITEM pError, USHORT uiGenCode )
@@ -797,7 +797,7 @@ USHORT hb_errGetOsCode( PHB_ITEM pError )
{
HB_TRACE(HB_TR_DEBUG, ("hb_errGetOsCode(%p)", pError));
return hb_arrayGetNI( pError, HB_TERROR_OSCODE );
return ( USHORT ) hb_arrayGetNI( pError, HB_TERROR_OSCODE );
}
PHB_ITEM hb_errPutOsCode( PHB_ITEM pError, USHORT uiOsCode )
@@ -813,7 +813,7 @@ USHORT hb_errGetSeverity( PHB_ITEM pError )
{
HB_TRACE(HB_TR_DEBUG, ("hb_errGetSeverity(%p)", pError));
return hb_arrayGetNI( pError, HB_TERROR_SEVERITY );
return ( USHORT ) hb_arrayGetNI( pError, HB_TERROR_SEVERITY );
}
PHB_ITEM hb_errPutSeverity( PHB_ITEM pError, USHORT uiSeverity )
@@ -829,7 +829,7 @@ USHORT hb_errGetSubCode( PHB_ITEM pError )
{
HB_TRACE(HB_TR_DEBUG, ("hb_errGetSubCode(%p)", pError));
return hb_arrayGetNI( pError, HB_TERROR_SUBCODE );
return ( USHORT ) hb_arrayGetNI( pError, HB_TERROR_SUBCODE );
}
PHB_ITEM hb_errPutSubCode( PHB_ITEM pError, USHORT uiSubCode )
@@ -861,7 +861,7 @@ USHORT hb_errGetTries( PHB_ITEM pError )
{
HB_TRACE(HB_TR_DEBUG, ("hb_errGetTries(%p)", pError));
return hb_arrayGetNI( pError, HB_TERROR_TRIES );
return ( USHORT ) hb_arrayGetNI( pError, HB_TERROR_TRIES );
}
PHB_ITEM hb_errPutTries( PHB_ITEM pError, USHORT uiTries )
@@ -877,7 +877,7 @@ USHORT hb_errGetFlags( PHB_ITEM pError )
{
HB_TRACE(HB_TR_DEBUG, ("hb_errGetFlags(%p)", pError));
return hb_arrayGetNI( pError, HB_TERROR_FLAGS );
return ( USHORT ) hb_arrayGetNI( pError, HB_TERROR_FLAGS );
}
PHB_ITEM hb_errPutFlags( PHB_ITEM pError, USHORT uiFlags )

View File

@@ -499,10 +499,10 @@ static void convert_open_flags( BOOL fCreate, ULONG ulAttr, USHORT uiFlags,
}
#endif
static int convert_seek_flags( USHORT uiFlags )
static USHORT convert_seek_flags( USHORT uiFlags )
{
/* by default FS_SET is set */
int result_flags = SEEK_SET;
USHORT result_flags = SEEK_SET;
HB_TRACE(HB_TR_DEBUG, ("convert_seek_flags(%hu)", uiFlags));
@@ -1067,16 +1067,16 @@ HB_EXPORT BOOL hb_fsSetFileTime( BYTE * pszFileName, LONG lJulian, LONG lMillise
if( lJulian > 0 )
{
st.wYear = iYear;
st.wMonth = iMonth;
st.wDay = iDay;
st.wYear = ( WORD ) iYear;
st.wMonth = ( WORD ) iMonth;
st.wDay = ( WORD ) iDay;
}
if( lMillisec >= 0 )
{
st.wHour = iHour;
st.wMinute = iMinute;
st.wSecond = iSecond;
st.wMilliseconds = iMSec;
st.wHour = ( WORD ) iHour;
st.wMinute = ( WORD ) iMinute;
st.wSecond = ( WORD ) iSecond;
st.wMilliseconds = ( WORD ) iMSec;
}
SystemTimeToFileTime( &st, &local_ft );
LocalFileTimeToFileTime( &local_ft, &ft );
@@ -1949,7 +1949,7 @@ HB_EXPORT ULONG hb_fsSeek( HB_FHANDLE hFileHandle, LONG lOffset, USHORT uiFlags
{
ret = DosSetFilePtr( hFileHandle, lOffset, Flags, &ulPos );
/* TODO: what we should do with this error code? Is it DOS compatible? */
hb_fsSetError(( USHORT ) ret );
hb_fsSetError( ( USHORT ) ret );
}
if( ret != 0 )
{

View File

@@ -294,10 +294,10 @@ static HFONT hb_gt_wvt_GetFont( char * pszFace, int iHeight, int iWidth, int iWe
logfont.lfItalic = 0;
logfont.lfUnderline = 0;
logfont.lfStrikeOut = 0;
logfont.lfCharSet = iCodePage; /* OEM_CHARSET; */
logfont.lfCharSet = ( BYTE ) iCodePage; /* OEM_CHARSET; */
logfont.lfOutPrecision = 0;
logfont.lfClipPrecision = 0;
logfont.lfQuality = iQuality; /* DEFAULT_QUALITY, DRAFT_QUALITY or PROOF_QUALITY */
logfont.lfQuality = ( BYTE ) iQuality; /* DEFAULT_QUALITY, DRAFT_QUALITY or PROOF_QUALITY */
logfont.lfPitchAndFamily = FIXED_PITCH+FF_MODERN; /* all mapping depends on fixed width fonts! */
logfont.lfHeight = iHeight;
logfont.lfWidth = iWidth < 0 ? -iWidth : iWidth;

View File

@@ -343,7 +343,7 @@ ULONG hb_fsAttrEncode( const char * szAttr )
HB_TRACE(HB_TR_DEBUG, ("hb_fsAttrEncode(%p)", szAttr));
while( ( ch = toupper( *pos ) ) != '\0' )
while( ( ch = ( char ) toupper( *pos ) ) != '\0' )
{
switch( ch )
{

View File

@@ -119,7 +119,7 @@ HB_FUNC( HB_NUMTOHEX )
do
{
int iDigit = ( int ) ( ulNum & 0x0F );
ret[ --iLen ] = iDigit + ( iDigit < 10 ? '0' : 'A' - 10 );
ret[ --iLen ] = ( char ) ( iDigit + ( iDigit < 10 ? '0' : 'A' - 10 ) );
ulNum >>= 4;
}
while( fDefaultLen ? ulNum != 0 : iLen != 0 );

View File

@@ -66,7 +66,7 @@
/* Compile in Unix mode under Cygwin */
#ifdef HB_OS_UNIX_COMPATIBLE
#undef HB_OS_WIN_32
#undef HB_OS_WIN_32
#endif
/* HB_INET_H_ */
@@ -180,11 +180,11 @@
#include <errno.h>
#endif
#if defined( HB_OS_UNIX ) || defined( HB_OS_UNIX_COMPATIBLE ) || defined( HB_OS_BSD ) || defined(HB_OS_OS2)
#if defined( HB_OS_UNIX ) || defined( HB_OS_UNIX_COMPATIBLE ) || defined( HB_OS_BSD ) || defined( HB_OS_OS2 )
#include <sys/time.h>
#endif
#if defined(HB_OS_OS2)
#if defined( HB_OS_OS2 )
#include <sys/socket.h>
#include <sys/select.h>
#include <sys/ioctl.h>
@@ -213,7 +213,7 @@
#define socklen_t int
#endif
#if (__POCC__ >= 500) && defined( HB_OS_WIN_64 )
#if defined( __POCC__ ) && ( __POCC__ >= 500 ) && defined( HB_OS_WIN_64 )
/* TOFIX: Bad workaround for the '__WSAFDIsSet unresolved' problem
in Pelles C 5.00.13 AMD64 mode, to make final executables
link at all. Some hbinet.c features (or the whole module)

View File

@@ -65,10 +65,10 @@ HB_FUNC( __BOX )
char * pszBox = hb_parc( 5 );
if( pTop && pLeft && pBottom && pRight && pszBox )
hb_gtBox( hb_itemGetNI( pTop ),
hb_itemGetNI( pLeft),
hb_itemGetNI( pBottom ),
hb_itemGetNI( pRight ),
hb_gtBox( ( SHORT ) hb_itemGetNI( pTop ),
( SHORT ) hb_itemGetNI( pLeft),
( SHORT ) hb_itemGetNI( pBottom ),
( SHORT ) hb_itemGetNI( pRight ),
( BYTE * ) ( *pszBox ? pszBox : " " ) );
}
@@ -80,10 +80,10 @@ HB_FUNC( __BOXD )
PHB_ITEM pRight = hb_param( 4, HB_IT_NUMERIC );
if( pTop && pLeft && pBottom && pRight )
hb_gtBoxD( hb_itemGetNI( pTop ),
hb_itemGetNI( pLeft),
hb_itemGetNI( pBottom ),
hb_itemGetNI( pRight ) );
hb_gtBoxD( ( SHORT ) hb_itemGetNI( pTop ),
( SHORT ) hb_itemGetNI( pLeft),
( SHORT ) hb_itemGetNI( pBottom ),
( SHORT ) hb_itemGetNI( pRight ) );
}
HB_FUNC( __BOXS )
@@ -94,11 +94,10 @@ HB_FUNC( __BOXS )
PHB_ITEM pRight = hb_param( 4, HB_IT_NUMERIC );
if( pTop && pLeft && pBottom && pRight )
hb_gtBoxS( hb_itemGetNI( pTop ),
hb_itemGetNI( pLeft),
hb_itemGetNI( pBottom ),
hb_itemGetNI( pRight ) );
hb_gtBoxS( ( SHORT ) hb_itemGetNI( pTop ),
( SHORT ) hb_itemGetNI( pLeft),
( SHORT ) hb_itemGetNI( pBottom ),
( SHORT ) hb_itemGetNI( pRight ) );
}
#endif

View File

@@ -58,8 +58,11 @@ HB_FUNC( __ATCLEAR )
{
if( hb_pcount() == 4 )
{
hb_gtSetPos( hb_parni( 1 ), hb_parni( 2 ) );
hb_gtScroll( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), 0, 0 );
hb_gtSetPos( ( SHORT ) hb_parni( 1 ), ( SHORT ) hb_parni( 2 ) );
hb_gtScroll( ( USHORT ) hb_parni( 1 ),
( USHORT ) hb_parni( 2 ),
( USHORT ) hb_parni( 3 ),
( USHORT ) hb_parni( 4 ), 0, 0 );
}
}
@@ -70,4 +73,3 @@ HB_FUNC( __CLEAR )
}
#endif

View File

@@ -59,7 +59,7 @@ HB_FUNC( FOPEN )
if( ISCHAR( 1 ) )
{
hb_retnint( ( HB_NHANDLE ) hb_fsOpen( ( BYTE * ) hb_parc( 1 ),
ISNUM( 2 ) ? hb_parni( 2 ) : FO_READ | FO_COMPAT ) );
ISNUM( 2 ) ? ( USHORT ) hb_parni( 2 ) : FO_READ | FO_COMPAT ) );
hb_fsSetFError( hb_fsError() );
}
else
@@ -91,7 +91,7 @@ HB_FUNC( HB_FCREATE )
{
hb_retnint( ( HB_NHANDLE ) hb_fsCreateEx( ( BYTE * ) hb_parc( 1 ),
ISNUM( 2 ) ? hb_parni( 2 ) : FC_NORMAL,
ISNUM( 3 ) ? hb_parni( 3 ) : FO_COMPAT ) );
ISNUM( 3 ) ? ( USHORT ) hb_parni( 3 ) : FO_COMPAT ) );
hb_fsSetFError( hb_fsError() );
}
else
@@ -210,7 +210,7 @@ HB_FUNC( FSEEK )
{
hb_retnint( hb_fsSeekLarge( hb_numToHandle( hb_parnint( 1 ) ),
hb_parnint( 2 ),
ISNUM( 3 ) ? hb_parni( 3 ) : FS_SET ) );
ISNUM( 3 ) ? ( USHORT ) hb_parni( 3 ) : FS_SET ) );
uiError = hb_fsError();
}
else

View File

@@ -62,7 +62,7 @@ HB_FUNC( FSETDEVMOD )
/* C53 checks only number of parameters: hb_pcount() == 2 */
if( ISNUM( 1 ) && ISNUM( 2 ) )
{
hb_fsSetDevMode( hb_numToHandle( hb_parnint( 1 ) ), hb_parni( 2 ) );
hb_fsSetDevMode( hb_numToHandle( hb_parnint( 1 ) ), ( USHORT ) hb_parni( 2 ) );
hb_fsSetFError( hb_fsError() );
}
/* NOTE: INCOMPATIBILITY! C53 will return the device flags
@@ -72,4 +72,3 @@ HB_FUNC( FSETDEVMOD )
}
#endif

View File

@@ -105,6 +105,6 @@ HB_FUNC( SCROLL )
( USHORT ) iLeft,
( USHORT ) iBottom,
( USHORT ) iRight,
hb_parni( 5 ), /* Defaults to zero on bad type */
hb_parni( 6 ) ); /* Defaults to zero on bad type */
( SHORT ) hb_parni( 5 ), /* Defaults to zero on bad type */
( SHORT ) hb_parni( 6 ) ); /* Defaults to zero on bad type */
}

View File

@@ -74,7 +74,7 @@ HB_FUNC( SETCOLOR )
HB_FUNC( COLORSELECT )
{
if( ISNUM( 1 ) )
hb_gtColorSelect( hb_parni( 1 ) );
hb_gtColorSelect( ( USHORT ) hb_parni( 1 ) );
}
HB_FUNC( SETBLINK )

View File

@@ -76,5 +76,5 @@ HB_FUNC( SETCURSOR )
hb_retni( uiCursor );
if( ISNUM( 1 ) )
hb_gtSetCursor( hb_parni( 1 ) );
hb_gtSetCursor( ( USHORT ) hb_parni( 1 ) );
}

View File

@@ -189,7 +189,7 @@ HB_FUNC( SETKEY )
PHB_SETKEY sk_list_tmp, sk_list_end;
/* sk_list_end is not used in this context */
sk_list_tmp = sk_findkey( hb_itemGetNI( pKeyCode ), &sk_list_end );
sk_list_tmp = sk_findkey( ( SHORT ) hb_itemGetNI( pKeyCode ), &sk_list_end );
if( sk_list_tmp )
{
@@ -205,7 +205,7 @@ HB_FUNC( SETKEY )
{
/* Set a SETKEY value */
sk_add( TRUE, hb_itemGetNI( pKeyCode ),
sk_add( TRUE, ( SHORT ) hb_itemGetNI( pKeyCode ),
hb_param( 2, HB_IT_BLOCK ),
#if defined( HB_EXTENSION )
hb_param( 3, HB_IT_BLOCK ) );
@@ -230,7 +230,7 @@ HB_FUNC( HB_SETKEYARRAY )
ULONG nPos;
for( nPos = 1; nPos <= nLen; nPos++ )
sk_add( FALSE, hb_arrayGetNI( pKeyCodeArray, nPos ), pAction, pIsActive );
sk_add( FALSE, ( SHORT ) hb_arrayGetNI( pKeyCodeArray, nPos ), pAction, pIsActive );
}
}
@@ -243,7 +243,7 @@ HB_FUNC( HB_SETKEYGET )
PHB_SETKEY sk_list_tmp, sk_list_end;
/* sk_list_end is not used in this context */
sk_list_tmp = sk_findkey( hb_itemGetNI( pKeyCode ), &sk_list_end );
sk_list_tmp = sk_findkey( ( SHORT ) hb_itemGetNI( pKeyCode ), &sk_list_end );
if( sk_list_tmp )
{
@@ -319,7 +319,7 @@ HB_FUNC( HB_SETKEYCHECK )
PHB_SETKEY sk_list_tmp, sk_list_end;
/* sk_list_end is not used in this context */
sk_list_tmp = sk_findkey( hb_itemGetNI( pKeyCode ), &sk_list_end );
sk_list_tmp = sk_findkey( ( SHORT ) hb_itemGetNI( pKeyCode ), &sk_list_end );
if( sk_list_tmp )
{

View File

@@ -67,7 +67,7 @@
HB_FUNC( SETPOS ) /* Sets the screen position */
{
if( ISNUM( 1 ) && ISNUM( 2 ) )
hb_gtSetPos( hb_parni( 1 ), hb_parni( 2 ) );
hb_gtSetPos( ( SHORT ) hb_parni( 1 ), ( SHORT ) hb_parni( 2 ) );
}
HB_FUNC( ROW ) /* Return the current screen row position (zero origin) */
@@ -89,4 +89,3 @@ HB_FUNC( COL ) /* Return the current screen column position (zero origin) */
hb_retni( iCol );
}

View File

@@ -56,19 +56,19 @@
HB_FUNC( HB_SHADOW )
{
if( hb_pcount() >= 4 )
hb_gtDrawShadow( hb_parni( 1 ),
hb_parni( 2 ),
hb_parni( 3 ),
hb_parni( 4 ),
ISNUM( 5 ) ? hb_parni( 5 ) : 7 );
hb_gtDrawShadow( ( USHORT ) hb_parni( 1 ),
( USHORT ) hb_parni( 2 ),
( USHORT ) hb_parni( 3 ),
( USHORT ) hb_parni( 4 ),
ISNUM( 5 ) ? ( BYTE ) hb_parni( 5 ) : 7 );
}
HB_FUNC( HB_CLRAREA )
{
if( hb_pcount() > 4 )
hb_gtSetAttribute( hb_parni( 1 ),
hb_parni( 2 ),
hb_parni( 3 ),
hb_parni( 4 ),
hb_parni( 5 ) );
hb_gtSetAttribute( ( USHORT ) hb_parni( 1 ),
( USHORT ) hb_parni( 2 ),
( USHORT ) hb_parni( 3 ),
( USHORT ) hb_parni( 4 ),
( BYTE ) hb_parni( 5 ) );
}

View File

@@ -1324,10 +1324,10 @@ static HB_DYNS_FUNC( hb_memvarSave )
buffer[ 11 ] = 'N' + 128;
#ifdef HB_C52_STRICT
/* NOTE: This is the buggy, but fully CA-Cl*pper compatible method. [vszakats] */
buffer[ 16 ] = ( BYTE ) iWidth + ( HB_IS_DOUBLE( pItem ) ? iDec + 1 : 0 );
buffer[ 16 ] = ( BYTE ) iWidth + ( HB_IS_DOUBLE( pItem ) ? ( BYTE ) iDec + 1 : 0 );
#else
/* NOTE: This would be the correct method, but Clipper is buggy here. [vszakats] */
buffer[ 16 ] = ( BYTE ) iWidth + ( iDec == 0 ? 0 : iDec + 1 );
buffer[ 16 ] = ( BYTE ) iWidth + ( iDec == 0 ? 0 : ( BYTE ) iDec + 1 );
#endif
buffer[ 17 ] = ( BYTE ) iDec;