diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8f0b448539..92a1b9cfbb 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,50 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-09-05 18:12 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * contrib/hbapollo/apollo.c + * contrib/hbclipsm/gauge.c + * contrib/hbct/atadjust.c + * contrib/hbct/atnum.c + * contrib/hbct/atrepl.c + * contrib/hbct/ctstr.c + * contrib/hbct/ctwfunc.c + * contrib/hbct/dattime2.c + * contrib/hbct/dattime3.c + * contrib/hbct/files.c + * contrib/hbct/pack.c + * contrib/hbct/print.c + * contrib/hbct/setrc.c + * contrib/hbfbird/firebird.c + * contrib/hbhpdf/harupdf.c + * contrib/hbmisc/hb_f.c + * contrib/hbmzip/hbmzip.c + * contrib/hbnf/descendn.c + * contrib/hbnf/dispc.c + * contrib/hbnf/ftattr.c + * contrib/hbnf/ftshadow.c + * contrib/hbnf/fttext.c + * contrib/hbodbc/odbc.c + * contrib/hbole/ole2.c + * contrib/hbw32/dllcall.c + * contrib/hbw32/tprinter.c + * contrib/rddads/ads1.c + * contrib/xhb/cstructc.c + * contrib/xhb/hbxml.c + * contrib/xhb/xhbmsgs.c + * utils/hbmake/hbmgauge.c + ! Fixed some MSVS 2008 -W4 warnings. + ; There are quite some more. + + * contrib/hbhpdf/harupdf.c + ! HPDF_ADDPAGELABEL() accepting first parameter wrongly. + + * contrib/hbfbird/firebird.c + ! FBQUERY() potential GPF when using value from freed memory. + + * doc/whatsnew.txt + * Updated for latest fixes. + 2008-09-05 17:41 UTC+0100 Miguel Angel Marchuet * contrib/hbbmcdx/bmdbfcdx.c ! fixed dirty index reading. diff --git a/harbour/contrib/hbapollo/apollo.c b/harbour/contrib/hbapollo/apollo.c index d62e8eb57a..d287393831 100644 --- a/harbour/contrib/hbapollo/apollo.c +++ b/harbour/contrib/hbapollo/apollo.c @@ -110,10 +110,10 @@ HB_FUNC( SX_CREATEEXEC ) * --------------------------------------------------*/ HB_FUNC( SX_CREATEFIELD ) { - sx_CreateField( ( PBYTE ) hb_parc( 1 ), /* Field name */ - ( PBYTE ) hb_parc( 2 ), /* Field type */ - hb_parni( 3 ), /* Field lenght */ - hb_parni( 4 ) ); /* Field decimals */ + sx_CreateField( ( PBYTE ) hb_parc( 1 ), /* Field name */ + ( PBYTE ) hb_parc( 2 ), /* Field type */ + ( SHORT ) hb_parni( 3 ), /* Field lenght */ + ( SHORT ) hb_parni( 4 ) ); /* Field decimals */ } @@ -124,10 +124,10 @@ HB_FUNC( SX_CREATEFIELD ) HB_FUNC( SX_CREATENEW ) { hb_retni( - sx_CreateNew( ( PBYTE ) hb_parc( 1 ), /* Field name */ - ( PBYTE ) hb_parc( 2 ), /* Alias */ - hb_parni( 3 ), /* RDE Type */ - hb_parni( 4 ) ) ); /* The maximum number of fields to be added to the file structure */ + sx_CreateNew( ( PBYTE ) hb_parc( 1 ), /* Field name */ + ( PBYTE ) hb_parc( 2 ), /* Alias */ + ( SHORT ) hb_parni( 3 ), /* RDE Type */ + ( SHORT ) hb_parni( 4 ) ) ); /* The maximum number of fields to be added to the file structure */ } @@ -216,7 +216,7 @@ HB_FUNC( SX_INDEXTAG ) sx_IndexTag( ( PBYTE ) hb_parc( 1 ), /* Field name */ ( PBYTE ) hb_parc( 2 ), /* Tag name */ ( PBYTE ) hb_parc( 3 ), /* Index expression as a string */ - hb_parni( 4 ), /* Option (0=Standard) (1=Unique) (2=Roll-Your-Own) */ + ( SHORT ) hb_parni( 4 ), /* Option (0=Standard) (1=Unique) (2=Roll-Your-Own) */ hb_parl( 5 ), /* True for a descend index */ ( PBYTE ) hb_parc( 6) ) ); /* Condition */ } @@ -257,13 +257,13 @@ HB_FUNC( SX_REPLACE ) switch( hb_parni( 2 ) ) { case R_INTEGER : - case R_JULIAN : sx_Replace( ( PBYTE ) hb_parc( 1 ), hb_parni( 2 ), ( void * ) hb_parni( 3) ); break; - case R_LOGICAL : sx_Replace( ( PBYTE ) hb_parc( 1 ), hb_parni( 2 ), ( void * ) hb_parni( 3) ); break; /* TODO: somthing is wrong here... */ - case R_LONG : sx_Replace( ( PBYTE ) hb_parc( 1 ), hb_parni( 2 ), ( void * ) hb_parnl( 3) ); break; + case R_JULIAN : sx_Replace( ( PBYTE ) hb_parc( 1 ), ( SHORT ) hb_parni( 2 ), ( void * ) hb_parni( 3 ) ); break; + case R_LOGICAL : sx_Replace( ( PBYTE ) hb_parc( 1 ), ( SHORT ) hb_parni( 2 ), ( void * ) hb_parni( 3 ) ); break; /* TODO: somthing is wrong here... */ + case R_LONG : sx_Replace( ( PBYTE ) hb_parc( 1 ), ( SHORT ) hb_parni( 2 ), ( void * ) hb_parnl( 3 ) ); break; case R_DOUBLE : { double d = hb_parnd( 3 ); - sx_Replace( ( PBYTE ) hb_parc( 1 ), hb_parni( 2 ), ( void * ) &d ); + sx_Replace( ( PBYTE ) hb_parc( 1 ), ( SHORT ) hb_parni( 2 ), ( void * ) &d ); break; } case R_CHAR : @@ -271,8 +271,8 @@ HB_FUNC( SX_REPLACE ) case R_MEMO : case R_BITMAP : case R_BLOBFILE: - case R_BLOBPTR : sx_Replace( ( PBYTE ) hb_parc( 1 ), hb_parni( 2 ), ( void * ) hb_parc( 3) ); break; - default: sx_Replace( ( PBYTE ) hb_parc( 1 ), hb_parni( 2 ), ( void * ) hb_parc( 3) ); + case R_BLOBPTR : sx_Replace( ( PBYTE ) hb_parc( 1 ), ( SHORT ) hb_parni( 2 ), ( void * ) hb_parc( 3 ) ); break; + default: sx_Replace( ( PBYTE ) hb_parc( 1 ), ( SHORT ) hb_parni( 2 ), ( void * ) hb_parc( 3 ) ); } } @@ -313,7 +313,7 @@ HB_FUNC( SX_SELECT ) * --------------------------------------------------*/ HB_FUNC( SX_SETCENTURY ) { - sx_SetCentury( hb_parl( 1 ) ); /* If True, the century digits will be returned. + sx_SetCentury( hb_parl( 1 ) ? 1 : 0 ); /* If True, the century digits will be returned. * If False, they will not. */ } @@ -324,8 +324,8 @@ HB_FUNC( SX_SETCENTURY ) * --------------------------------------------------*/ HB_FUNC( SX_SETDATEFORMAT ) { - sx_SetDateFormat( hb_parni( 1 ) ); /* If True, the century digits will be returned. - * If False, they will not. */ + sx_SetDateFormat( hb_parl( 1 ) ? 1 : 0 ); /* If True, the century digits will be returned. + * If False, they will not. */ } @@ -334,8 +334,8 @@ HB_FUNC( SX_SETDATEFORMAT ) * --------------------------------------------------*/ HB_FUNC( SX_SETMEMOBLOCKSIZE ) { - sx_SetMemoBlockSize( hb_parni( 1 ) ); /* The new default block size. - * The size must be a value from 1 through 1024. */ + sx_SetMemoBlockSize( ( WORD ) hb_parni( 1 ) ); /* The new default block size. + * The size must be a value from 1 through 1024. */ } /* -----------------20/01/2002 13:33----------------- @@ -344,7 +344,7 @@ HB_FUNC( SX_SETMEMOBLOCKSIZE ) * --------------------------------------------------*/ HB_FUNC( SX_SETORDER ) { - hb_retni( sx_SetOrder( hb_parni( 1 ) ) ); /* Selects an existing order as the controlling index order. */ + hb_retni( sx_SetOrder( ( SHORT ) hb_parni( 1 ) ) ); /* Selects an existing order as the controlling index order. */ } @@ -353,7 +353,7 @@ HB_FUNC( SX_SETORDER ) * --------------------------------------------------*/ HB_FUNC( SX_SETSOFTSEEK ) { - sx_SetSoftSeek( hb_parl( 1 ) ); /* True to set softseek ON */ + sx_SetSoftSeek( hb_parl( 1 ) ? 1 : 0 ); /* True to set softseek ON */ } @@ -362,7 +362,7 @@ HB_FUNC( SX_SETSOFTSEEK ) * --------------------------------------------------*/ HB_FUNC( SX_SKIP ) { - sx_Skip( hb_parni( 1 ) ); /* Number of records to skip */ + sx_Skip( hb_parnl( 1 ) ); /* Number of records to skip */ } @@ -374,8 +374,8 @@ HB_FUNC( SX_SYSPROP ) { int i = hb_parni( 2 ); hb_retni( - sx_SysProp( hb_parni( 1 ), /* One of the predefined constant values. See Apollo.ch */ - ( void * ) &i )); + sx_SysProp( ( WORD ) hb_parni( 1 ), /* One of the predefined constant values. See Apollo.ch */ + ( void * ) &i ) ); } /* HB_FUNC( SX_DISABLEAUTOOPEN ) @@ -395,8 +395,8 @@ HB_FUNC( SX_USE ) hb_retni( sx_Use( ( PBYTE ) hb_parc( 1 ), /* Filename */ ( PBYTE ) hb_parc( 2 ), /* Alias */ - hb_parni( 3 ), /* OpenMode */ - hb_parni( 4) )); /* RDE Type */ + ( SHORT ) hb_parni( 3 ), /* OpenMode */ + ( SHORT ) hb_parni( 4 ) ) ); /* RDE Type */ } diff --git a/harbour/contrib/hbclipsm/gauge.c b/harbour/contrib/hbclipsm/gauge.c index 956869f913..037a497cfe 100644 --- a/harbour/contrib/hbclipsm/gauge.c +++ b/harbour/contrib/hbclipsm/gauge.c @@ -70,11 +70,11 @@ static void hb_gaugeUpdate( PHB_ITEM pArray, float fPercent ) { - int iCenter = ( ( hb_arrayGetNL( pArray, B_RIGHT ) - hb_arrayGetNL( pArray, B_LEFT ) ) / 2 ) + 1; - int iRatio = hb_arrayGetNL( pArray, B_RIGHT ) - hb_arrayGetNL( pArray, B_LEFT ) - 1; - int iRow; - int iCols; - int iMax; + SHORT iCenter = ( SHORT ) ( ( ( hb_arrayGetNI( pArray, B_RIGHT ) - hb_arrayGetNI( pArray, B_LEFT ) ) / 2 ) + 1 ); + SHORT iRatio = ( SHORT ) ( hb_arrayGetNI( pArray, B_RIGHT ) - hb_arrayGetNI( pArray, B_LEFT ) - 1 ); + SHORT iRow; + SHORT iCols; + SHORT iMax; char szOldColor[ HB_CLRSTR_LEN ]; char * szStr = " "; char szPct[ 5 ]; @@ -83,25 +83,29 @@ static void hb_gaugeUpdate( PHB_ITEM pArray, float fPercent ) hb_gtSetColorStr( hb_arrayGetCPtr( pArray, B_BARCOLOR ) ); fPercent = ( fPercent < 0 ? 0 : ( fPercent > 1 ? 1 : fPercent ) ); - iCols = (int) (fPercent * iRatio); + iCols = ( SHORT ) ( fPercent * iRatio ); if( hb_arrayGetL( pArray, B_DISPLAYNUM ) ) { snprintf( szPct, sizeof( szPct ), "%3.0f%%", fPercent * 100 ); - hb_gtWriteAt( (USHORT) hb_arrayGetNL( pArray, B_TOP ), - (USHORT) iCenter + 2, (BYTE *) szPct, 4 ); + hb_gtWriteAt( ( SHORT ) hb_arrayGetNI( pArray, B_TOP ), + iCenter + 2, + ( BYTE * ) szPct, 4 ); } - hb_gtBox( hb_arrayGetNI( pArray, B_TOP ) + 1, hb_arrayGetNI( pArray, B_LEFT ) + 1, - hb_arrayGetNI( pArray, B_BOTTOM ) - 1, hb_arrayGetNI( pArray, B_RIGHT ) - 1, + hb_gtBox( ( SHORT ) hb_arrayGetNI( pArray, B_TOP ) + 1, + ( SHORT ) hb_arrayGetNI( pArray, B_LEFT ) + 1, + ( SHORT ) hb_arrayGetNI( pArray, B_BOTTOM ) - 1, + ( SHORT ) hb_arrayGetNI( pArray, B_RIGHT ) - 1, ( BYTE * ) szStr ); - iMax = hb_arrayGetNL( pArray, B_BOTTOM ) - hb_arrayGetNL( pArray, B_TOP ) - 1; + iMax = ( SHORT ) ( hb_arrayGetNI( pArray, B_BOTTOM ) - hb_arrayGetNI( pArray, B_TOP ) - 1 ); for( iRow = 1; iRow <= iMax; iRow++ ) { - hb_gtRepChar( (USHORT) (iRow + hb_arrayGetNL( pArray, B_TOP )), - (USHORT) (hb_arrayGetNL( pArray, B_LEFT ) + 1), - ( BYTE ) * hb_arrayGetCPtr( pArray, B_BARCHAR ), iCols ); + hb_gtRepChar( ( SHORT ) ( hb_arrayGetNI( pArray, B_TOP ) + iRow ), + ( SHORT ) ( hb_arrayGetNI( pArray, B_LEFT ) + 1 ), + ( BYTE ) * hb_arrayGetCPtr( pArray, B_BARCHAR ), + iCols ); } hb_gtSetColorStr( szOldColor ); @@ -146,28 +150,29 @@ HB_FUNC( GAUGEDISPLAY ) if( pArray ) { - int iCenter = ( ( hb_arrayGetNL( pArray, B_RIGHT ) - hb_arrayGetNL( pArray, B_LEFT ) ) / 2 ) + 1; + SHORT iCenter = ( SHORT ) ( ( ( hb_arrayGetNI( pArray, B_RIGHT ) - hb_arrayGetNI( pArray, B_LEFT ) ) / 2 ) + 1 ); char szOldColor[ HB_CLRSTR_LEN ]; char * szStr = " "; hb_gtGetColorStr( szOldColor ); hb_gtSetColorStr( hb_arrayGetCPtr( pArray, B_BACKCOLOR ) ); - hb_gtBox( (SHORT) hb_arrayGetNL( pArray, B_TOP ), - (SHORT) hb_arrayGetNL( pArray, B_LEFT ), - (SHORT) hb_arrayGetNL( pArray, B_BOTTOM ), - (SHORT) hb_arrayGetNL( pArray, B_RIGHT ), - (BYTE *) szStr ); + hb_gtBox( ( SHORT) hb_arrayGetNI( pArray, B_TOP ), + ( SHORT) hb_arrayGetNI( pArray, B_LEFT ), + ( SHORT) hb_arrayGetNI( pArray, B_BOTTOM ), + ( SHORT) hb_arrayGetNI( pArray, B_RIGHT ), + ( BYTE * ) szStr ); - hb_gtBox( (SHORT) hb_arrayGetNL( pArray, B_TOP ), - (SHORT) hb_arrayGetNL( pArray, B_LEFT ), - (SHORT) hb_arrayGetNL( pArray, B_BOTTOM ), - (SHORT) hb_arrayGetNL( pArray, B_RIGHT ), - (BYTE *) B_BOXLINES ); + hb_gtBox( ( SHORT ) hb_arrayGetNI( pArray, B_TOP ), + ( SHORT ) hb_arrayGetNI( pArray, B_LEFT ), + ( SHORT ) hb_arrayGetNI( pArray, B_BOTTOM ), + ( SHORT ) hb_arrayGetNI( pArray, B_RIGHT ), + ( BYTE * ) B_BOXLINES ); if( hb_arrayGetL( pArray, B_DISPLAYNUM ) ) - hb_gtWriteAt( (USHORT) hb_arrayGetNL( pArray, B_TOP ), - iCenter, ( BYTE * ) "[ ]", 8 ); + hb_gtWriteAt( ( SHORT ) hb_arrayGetNI( pArray, B_TOP ), + iCenter, + ( BYTE * ) "[ ]", 8 ); hb_gtSetColorStr( szOldColor ); diff --git a/harbour/contrib/hbct/atadjust.c b/harbour/contrib/hbct/atadjust.c index 537759621e..7cf0291b59 100644 --- a/harbour/contrib/hbct/atadjust.c +++ b/harbour/contrib/hbct/atadjust.c @@ -111,7 +111,7 @@ HB_FUNC( ATADJUST ) int iMultiPass = ct_getatmupa(); int iAtLike = ct_getatlike(); char cAtLike = ct_getatlikechar(); - size_t sIgnore, sMatchStrLen; + size_t sIgnore, sMatchStrLen = 0; ULONG ulCounter; char *pc = NULL; diff --git a/harbour/contrib/hbct/atnum.c b/harbour/contrib/hbct/atnum.c index 7a2c5e5ccf..8363c08f6c 100644 --- a/harbour/contrib/hbct/atnum.c +++ b/harbour/contrib/hbct/atnum.c @@ -74,7 +74,7 @@ static void do_atnum( int iSwitch ) int iMultiPass = ct_getatmupa(); int iAtLike = ct_getatlike(); char cAtLike = ct_getatlikechar(); - size_t sIgnore, sMatchStrLen; + size_t sIgnore, sMatchStrLen = 0; ULONG ulCounter; char *pc = NULL; diff --git a/harbour/contrib/hbct/atrepl.c b/harbour/contrib/hbct/atrepl.c index 4d55bc16d8..83ae56d204 100644 --- a/harbour/contrib/hbct/atrepl.c +++ b/harbour/contrib/hbct/atrepl.c @@ -132,7 +132,7 @@ HB_FUNC( ATREPL ) int iMultiPass = ct_getatmupa(); int iAtLike = ct_getatlike(); char cAtLike = ct_getatlikechar(); - size_t sIgnore, sMatchStrLen; + size_t sIgnore, sMatchStrLen = 0; ULONG ulCounter; char *pc; diff --git a/harbour/contrib/hbct/ctstr.c b/harbour/contrib/hbct/ctstr.c index 6f7c51d864..2a247b27da 100644 --- a/harbour/contrib/hbct/ctstr.c +++ b/harbour/contrib/hbct/ctstr.c @@ -471,7 +471,7 @@ HB_FUNC( CSETATMUPA ) */ static int siAtLikeMode = 0; /* TODO: make this tread safe */ -static int scAtLikeChar = '?'; /* TODO: make this tread safe */ +static char scAtLikeChar = '?'; /* TODO: make this tread safe */ void ct_setatlike( int iNewMode ) { diff --git a/harbour/contrib/hbct/ctwfunc.c b/harbour/contrib/hbct/ctwfunc.c index c3c5a9656a..2d8072da96 100644 --- a/harbour/contrib/hbct/ctwfunc.c +++ b/harbour/contrib/hbct/ctwfunc.c @@ -217,7 +217,7 @@ HB_FUNC( WBOX ) memcpy( szBoxBuf, pWBoxFrames[ iFrame ], 9 ); if( ( iFrame & 4 ) == 0 ) { - szBoxBuf[ 8 ] = hb_gtGetClearChar(); + szBoxBuf[ 8 ] = ( char ) hb_gtGetClearChar(); } szBoxBuf[ 9 ] = '0'; szBox = szBoxBuf; diff --git a/harbour/contrib/hbct/dattime2.c b/harbour/contrib/hbct/dattime2.c index 1e611a0d0b..e86f391bc9 100644 --- a/harbour/contrib/hbct/dattime2.c +++ b/harbour/contrib/hbct/dattime2.c @@ -317,7 +317,7 @@ HB_FUNC( DMY ) if( iDay < 10 ) { - szMDY[iLen] = iDay + 0x30; + szMDY[iLen] = ( char ) iDay + 0x30; iLen++; } else @@ -415,7 +415,7 @@ HB_FUNC( MDY ) szMDY[iLen++] = ' '; if( iDay < 10 ) { - szMDY[iLen] = iDay + 0x30; + szMDY[iLen] = ( char ) iDay + 0x30; iLen++; } else diff --git a/harbour/contrib/hbct/dattime3.c b/harbour/contrib/hbct/dattime3.c index d38ef8c42a..8eb258f500 100644 --- a/harbour/contrib/hbct/dattime3.c +++ b/harbour/contrib/hbct/dattime3.c @@ -294,10 +294,10 @@ HB_FUNC( SETTIME ) #if defined(HB_OS_WIN_32) SYSTEMTIME st; GetLocalTime( &st ); - st.wHour = iTime[0]; - st.wMinute = iTime[1]; - st.wSecond = iTime[2]; - st.wMilliseconds = iTime[3] * 10; + st.wHour = ( WORD ) iTime[0]; + st.wMinute = ( WORD ) iTime[1]; + st.wSecond = ( WORD ) iTime[2]; + st.wMilliseconds = ( WORD ) iTime[3] * 10; fResult = SetLocalTime( &st ); #elif defined( HB_OS_LINUX ) && !defined( __WATCOMC__ ) /* stime exists only in SVr4, SVID, X/OPEN and Linux */ @@ -380,10 +380,10 @@ HB_FUNC( SETDATE ) #if defined(HB_OS_WIN_32) SYSTEMTIME st; GetLocalTime( &st ); - st.wYear = iYear; - st.wMonth = iMonth; - st.wDay = iDay; - st.wDayOfWeek = hb_dateJulianDOW( lDate ); + st.wYear = ( WORD ) iYear; + st.wMonth = ( WORD ) iMonth; + st.wDay = ( WORD ) iDay; + st.wDayOfWeek = ( WORD ) hb_dateJulianDOW( lDate ); fResult = SetLocalTime( &st ); #elif defined( HB_OS_LINUX ) && !defined( __WATCOMC__ ) /* stime exists only in SVr4, SVID, X/OPEN and Linux */ diff --git a/harbour/contrib/hbct/files.c b/harbour/contrib/hbct/files.c index 8784643965..252d50a57b 100644 --- a/harbour/contrib/hbct/files.c +++ b/harbour/contrib/hbct/files.c @@ -248,15 +248,15 @@ HB_FUNC( SETFDATI ) GetLocalTime( &st ); if( pDate ) { - st.wYear = year; - st.wMonth = month; - st.wDay = day; + st.wYear = ( WORD ) year; + st.wMonth = ( WORD ) month; + st.wDay = ( WORD ) day; } if( pTime ) { - st.wHour = hour; - st.wMinute = minute; - st.wSecond = second; + st.wHour = ( WORD ) hour; + st.wMinute = ( WORD ) minute; + st.wSecond = ( WORD ) second; } SystemTimeToFileTime( &st, &local_ft ); LocalFileTimeToFileTime( &local_ft, &ft ); diff --git a/harbour/contrib/hbct/pack.c b/harbour/contrib/hbct/pack.c index 7d220cc250..9554dd346d 100644 --- a/harbour/contrib/hbct/pack.c +++ b/harbour/contrib/hbct/pack.c @@ -75,7 +75,7 @@ HB_FUNC( CHARPACK ) while( n_count < n_max && in[n_in + n_count] == c ) n_count++; out[n_out++] = 0; - out[n_out++] = n_count; + out[n_out++] = ( unsigned char ) n_count; out[n_out++] = c; n_in += n_count; } diff --git a/harbour/contrib/hbct/print.c b/harbour/contrib/hbct/print.c index 52c1692f00..a01fbb9152 100644 --- a/harbour/contrib/hbct/print.c +++ b/harbour/contrib/hbct/print.c @@ -91,7 +91,7 @@ HB_FUNC( PRINTSTAT ) { - USHORT uiPort = ISNUM( 1 ) ? hb_parni( 1 ) : 1; + USHORT uiPort = ISNUM( 1 ) ? ( USHORT ) hb_parni( 1 ) : 1; int Status = 0; #if defined(HB_OS_DOS) @@ -142,7 +142,7 @@ HB_FUNC( PRINTSTAT ) HB_FUNC( PRINTREADY ) { - USHORT uiPort = ISNUM( 1 ) ? hb_parni( 1 ) : 1; + USHORT uiPort = ISNUM( 1 ) ? ( USHORT ) hb_parni( 1 ) : 1; int Status = 0; #if defined(HB_OS_DOS) diff --git a/harbour/contrib/hbct/setrc.c b/harbour/contrib/hbct/setrc.c index 68cd601c5d..83ea8610ab 100644 --- a/harbour/contrib/hbct/setrc.c +++ b/harbour/contrib/hbct/setrc.c @@ -57,12 +57,12 @@ HB_FUNC( SETRC ) BOOL fRow = ISNUM( 1 ), fCol = ISNUM( 2 ); if( fRow && fCol ) - hb_gtSetPos( hb_parni( 1 ), hb_parni( 2 ) ); + hb_gtSetPos( ( SHORT ) hb_parni( 1 ), ( SHORT ) hb_parni( 2 ) ); else { SHORT sRow, sCol; hb_gtGetPos( &sRow, &sCol ); - hb_gtSetPos( fRow ? hb_parni( 1 ) : sRow, fCol ? hb_parni( 2 ) : sCol ); + hb_gtSetPos( fRow ? ( SHORT ) hb_parni( 1 ) : sRow, fCol ? ( SHORT ) hb_parni( 2 ) : sCol ); } hb_retc( NULL ); diff --git a/harbour/contrib/hbfbird/firebird.c b/harbour/contrib/hbfbird/firebird.c index fffb0a6a68..23558e8aa7 100644 --- a/harbour/contrib/hbfbird/firebird.c +++ b/harbour/contrib/hbfbird/firebird.c @@ -82,12 +82,12 @@ HB_FUNC( FBCREATEDB ) ISC_STATUS status[ 20 ]; char create_db[ MAX_BUFFER ]; - char * db_name = hb_parcx( 1 ); - char * user = hb_parcx( 2 ); - char * pass = hb_parcx( 3 ); - int page = hb_parni( 4 ); - char * charset = hb_parcx( 5 ); - int dialect = hb_parni( 6 ); + char * db_name = hb_parcx( 1 ); + char * user = hb_parcx( 2 ); + char * pass = hb_parcx( 3 ); + int page = hb_parni( 4 ); + char * charset = hb_parcx( 5 ); + unsigned short dialect = ( unsigned short ) hb_parni( 6 ); snprintf( create_db, sizeof( create_db ), "CREATE DATABASE '%s' USER '%s' PASSWORD '%s' PAGE_SIZE = %i DEFAULT CHARACTER SET %s", @@ -110,7 +110,7 @@ HB_FUNC( FBCONNECT ) char * user = hb_parcx( 2 ); char * passwd = hb_parcx( 3 ); char dpb[ 128 ]; - int i = 0; + short i = 0; int len; /* TOFIX: Possible buffer overflow. Use snprintf(). */ @@ -121,14 +121,14 @@ HB_FUNC( FBCONNECT ) len = ( int ) ( sizeof( dpb ) - i - 4 ); dpb[ i++ ] = ( char ) len; hb_strncpy( &( dpb[ i ] ), user, len ); - i += len; + i += ( short ) len; dpb[ i++ ] = isc_dpb_password; len = strlen( passwd ); if( len > ( int ) ( sizeof( dpb ) - i - 2 ) ) len = ( int ) ( sizeof( dpb ) - i - 2 ); - dpb[ i++ ] = len; + dpb[ i++ ] = ( char ) len; hb_strncpy( &( dpb[ i ] ), passwd, len ); - i += len; + i += ( short ) len; if( isc_attach_database( status, 0, db_connect, &db, i, dpb ) ) hb_retnl( isc_sqlcode( status ) ); @@ -153,7 +153,7 @@ HB_FUNC( FBERROR ) { char msg[ MAX_BUFFER ]; - isc_sql_interprete( hb_parni( 1 ) /* sqlcode */, + isc_sql_interprete( ( short ) hb_parni( 1 ) /* sqlcode */, msg, sizeof( msg ) ); @@ -201,7 +201,7 @@ HB_FUNC( FBEXECUTE ) char * exec_str = hb_parcx( 2 ); ISC_STATUS status[ 20 ]; ISC_STATUS status_rollback[ 20 ]; - int dialect = hb_parni( 3 ); + unsigned short dialect = ( unsigned short ) hb_parni( 3 ); if( ISPOINTER( 4 ) ) { @@ -247,8 +247,7 @@ HB_FUNC( FBQUERY ) XSQLVAR * var; char sel_str[ MAX_LEN ]; - int dialect = ISNUM( 3 ) ? hb_parni( 3 ) : DIALECT; - int n; + unsigned short dialect = ISNUM( 3 ) ? ( unsigned short ) hb_parni( 3 ) : DIALECT; int i; int dtype; int num_cols; @@ -297,8 +296,10 @@ HB_FUNC( FBQUERY ) /* Relocate necessary number of columns */ if( sqlda->sqld > sqlda->sqln ) { - hb_xfree( sqlda ); + ISC_SHORT n; + n = sqlda->sqld; + hb_xfree( sqlda ); sqlda = ( XSQLDA * ) hb_xgrab( XSQLDA_LENGTH( n ) ); sqlda->sqln = n; sqlda->version = 1; @@ -371,7 +372,7 @@ HB_FUNC( FBQUERY ) hb_arraySetPtr( qry_handle, 3, ( void * ) trans ); hb_arraySetNL( qry_handle, 4, ( long ) num_cols ); - hb_arraySetNL( qry_handle, 5, ( long ) dialect ); + hb_arraySetNI( qry_handle, 5, ( int ) dialect ); hb_arraySet( qry_handle, 6, aNew ); hb_itemReturnRelease( qry_handle ); @@ -387,7 +388,7 @@ HB_FUNC( FBFETCH ) isc_stmt_handle stmt = ( isc_stmt_handle ) hb_itemGetPtr( hb_itemArrayGet( aParam, 1 ) ); ISC_STATUS status[ MAX_FIELDS ]; XSQLDA * sqlda = ( XSQLDA * ) hb_itemGetPtr( hb_itemArrayGet( aParam, 2 ) ); - int dialect = hb_itemGetNI( hb_itemArrayGet( aParam, 5 ) ); + unsigned short dialect = ( unsigned short ) hb_itemGetNI( hb_itemArrayGet( aParam, 5 ) ); long fetch_stat; /* TOFIX */ diff --git a/harbour/contrib/hbhpdf/harupdf.c b/harbour/contrib/hbhpdf/harupdf.c index 1f3fbfb7ad..ffb806b51e 100644 --- a/harbour/contrib/hbhpdf/harupdf.c +++ b/harbour/contrib/hbhpdf/harupdf.c @@ -122,7 +122,7 @@ HB_FUNC( HPDF_FREE ) */ HB_FUNC( HPDF_NEWDOC ) { - hb_retnl( (long) HPDF_NewDoc( HPDF_Doc_par( 1 ) ) ); + hb_retnl( ( long ) HPDF_NewDoc( HPDF_Doc_par( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_FreeDoc( hNewDoc ) -> NIL @@ -146,7 +146,7 @@ HB_FUNC( HPDF_SAVETOFILE ) BOOL fFree; BYTE * pszFileName = hb_fsNameConv( ( BYTE * ) hb_parc( 2 ), &fFree ); - hb_retnl( (long) HPDF_SaveToFile( HPDF_Doc_par( 1 ), ( char * ) pszFileName ) ); + hb_retnl( ( long ) HPDF_SaveToFile( HPDF_Doc_par( 1 ), ( char * ) pszFileName ) ); if( fFree ) hb_xfree( ( void * ) pszFileName ); @@ -156,14 +156,14 @@ HB_FUNC( HPDF_SAVETOFILE ) */ HB_FUNC( HPDF_SAVETOSTREAM ) { - hb_retnl( (long) HPDF_SaveToStream( HPDF_Doc_par( 1 ) ) ); + hb_retnl( ( long ) HPDF_SaveToStream( HPDF_Doc_par( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_GetStreamSize( hDoc ) -> nSize */ HB_FUNC( HPDF_GETSTREAMSIZE ) { - hb_retnl( (long) HPDF_GetStreamSize( HPDF_Doc_par( 1 ) ) ); + hb_retnl( ( long ) HPDF_GetStreamSize( HPDF_Doc_par( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_ReadFromStream( hDoc, @cBuffer ) -> nBytesRead @@ -178,7 +178,7 @@ HB_FUNC( HPDF_READFROMSTREAM ) buffer = ( HPDF_BYTE * ) hb_xgrab( size + 1 ); - hb_retnl( (long) HPDF_ReadFromStream( HPDF_Doc_par( 1 ), buffer, &size ) ); + hb_retnl( ( long ) HPDF_ReadFromStream( HPDF_Doc_par( 1 ), buffer, &size ) ); if( ! hb_storclen_buffer( ( char * ) buffer, size, 2 ) ) hb_xfree( buffer ); @@ -188,7 +188,7 @@ HB_FUNC( HPDF_READFROMSTREAM ) */ HB_FUNC( HPDF_RESETSTREAM ) { - hb_retnl( (long) HPDF_ResetStream( HPDF_Doc_par( 1 ) ) ); + hb_retnl( ( long ) HPDF_ResetStream( HPDF_Doc_par( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_HasDoc( hDoc ) -> lHasDoc @@ -205,14 +205,14 @@ HB_FUNC( HPDF_SETERRORHANDLER ) /* TOFIX: This should be extended to pass a wrapper which calls a user defined codeblock. */ - hb_retnl( (long) HPDF_SetErrorHandler( HPDF_Doc_par( 1 ), (HPDF_Error_Handler) hb_parptr( 2 ) ) ); + hb_retnl( ( long ) HPDF_SetErrorHandler( HPDF_Doc_par( 1 ), ( HPDF_Error_Handler ) hb_parptr( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_GetError( hDoc ) -> nErrorCode */ HB_FUNC( HPDF_GETERROR ) { - hb_retnl( (long) HPDF_GetError( HPDF_Doc_par( 1 ) ) ); + hb_retnl( ( long ) HPDF_GetError( HPDF_Doc_par( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_ResetError( hDoc ) -> NIL @@ -226,7 +226,7 @@ HB_FUNC( HPDF_RESETERROR ) */ HB_FUNC( HPDF_SETPAGESCONFIGURATION ) { - hb_retnl( (long) HPDF_SetPagesConfiguration( HPDF_Doc_par( 1 ), hb_parni( 2 ) ) ); + hb_retnl( ( long ) HPDF_SetPagesConfiguration( HPDF_Doc_par( 1 ), hb_parni( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_SetPageLayout( hDoc, nLayout ) -> hStatus @@ -239,14 +239,14 @@ HB_FUNC( HPDF_SETPAGESCONFIGURATION ) */ HB_FUNC( HPDF_SETPAGELAYOUT ) { - hb_retnl( (long) HPDF_SetPageLayout( HPDF_Doc_par( 1 ), (HPDF_PageLayout) hb_parni( 2 ) ) ); + hb_retnl( ( long ) HPDF_SetPageLayout( HPDF_Doc_par( 1 ), ( HPDF_PageLayout ) hb_parni( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_GetPageLayout( hDoc ) -> nLayout */ HB_FUNC( HPDF_GETPAGELAYOUT ) { - hb_retni( (int) HPDF_GetPageLayout( HPDF_Doc_par( 1 ) ) ); + hb_retni( ( int ) HPDF_GetPageLayout( HPDF_Doc_par( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_SetPageMode( hDoc, nPageMode ) -> hStatus @@ -259,21 +259,21 @@ HB_FUNC( HPDF_GETPAGELAYOUT ) */ HB_FUNC( HPDF_SETPAGEMODE ) { - hb_retnl( (long) HPDF_SetPageMode( HPDF_Doc_par( 1 ), (HPDF_PageMode) hb_parni( 2 ) ) ); + hb_retnl( ( long ) HPDF_SetPageMode( HPDF_Doc_par( 1 ), ( HPDF_PageMode ) hb_parni( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_GetPageMode( hDoc ) -> nPageMode */ HB_FUNC( HPDF_GETPAGEMODE ) { - hb_retni( (int) HPDF_GetPageMode( HPDF_Doc_par( 1 ) ) ); + hb_retni( ( int ) HPDF_GetPageMode( HPDF_Doc_par( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_SetOpenAction( hDoc, hDestn ) -> hStatus */ HB_FUNC( HPDF_SETOPENACTION ) { - hb_retnl( (long) HPDF_SetOpenAction( HPDF_Doc_par( 1 ), (HPDF_Destination) hb_parptr( 2 ) ) ); + hb_retnl( ( long ) HPDF_SetOpenAction( HPDF_Doc_par( 1 ), ( HPDF_Destination ) hb_parptr( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_GetCurrentPage( hDoc ) -> hPage @@ -294,7 +294,7 @@ HB_FUNC( HPDF_ADDPAGE ) */ HB_FUNC( HPDF_INSERTPAGE ) { - hb_retptr( ( void * ) HPDF_InsertPage( HPDF_Doc_par( 1 ), (HPDF_Page) hb_parptr( 2 ) ) ); + hb_retptr( ( void * ) HPDF_InsertPage( HPDF_Doc_par( 1 ), ( HPDF_Page ) hb_parptr( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_GetFont( hDoc, cFontName, cEncoding ) -> hFont @@ -358,35 +358,35 @@ HB_FUNC( HPDF_LOADTTFONTFROMFILE2 ) */ HB_FUNC( HPDF_ADDPAGELABEL ) { - hb_retnl( (long) HPDF_AddPageLabel( (HPDF_Doc) hb_parni( 1 ), hb_parni( 2 ), (HPDF_PageNumStyle) hb_parni( 3 ), hb_parni( 4 ), hb_parc( 5 ) ) ); + hb_retnl( ( long ) HPDF_AddPageLabel( HPDF_Doc_par( 1 ), hb_parni( 2 ), ( HPDF_PageNumStyle ) hb_parni( 3 ), hb_parni( 4 ), hb_parc( 5 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_UseJPFonts( hDoc ) -> hStatus */ HB_FUNC( HPDF_USEJPFONTS ) { - hb_retnl( (long) HPDF_UseJPFonts( HPDF_Doc_par( 1 ) ) ); + hb_retnl( ( long ) HPDF_UseJPFonts( HPDF_Doc_par( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_UseKRFonts( hDoc ) -> hStatus */ HB_FUNC( HPDF_USEKRFONTS ) { - hb_retnl( (long) HPDF_UseKRFonts( HPDF_Doc_par( 1 ) ) ); + hb_retnl( ( long ) HPDF_UseKRFonts( HPDF_Doc_par( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_UseCNSFonts( hDoc ) -> hStatus */ HB_FUNC( HPDF_USECNSFONTS ) { - hb_retnl( (long) HPDF_UseCNSFonts( HPDF_Doc_par( 1 ) ) ); + hb_retnl( ( long ) HPDF_UseCNSFonts( HPDF_Doc_par( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_UseCNTFonts( hDoc ) -> hStatus */ HB_FUNC( HPDF_USECNTFONTS ) { - hb_retnl( (long) HPDF_UseCNTFonts( HPDF_Doc_par( 1 ) ) ); + hb_retnl( ( long ) HPDF_UseCNTFonts( HPDF_Doc_par( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_CreateExtGState( hDoc ) -> hExtGState @@ -400,7 +400,7 @@ HB_FUNC( HPDF_CREATEEXTGSTATE ) */ HB_FUNC( HPDF_CREATEOUTLINE ) { - hb_retptr( ( void * ) HPDF_CreateOutline( HPDF_Doc_par( 1 ), (HPDF_Outline) hb_parptr( 2 ), hb_parc( 3 ), (HPDF_Encoder) hb_parptr( 4 ) ) ); + hb_retptr( ( void * ) HPDF_CreateOutline( HPDF_Doc_par( 1 ), ( HPDF_Outline ) hb_parptr( 2 ), hb_parc( 3 ), ( HPDF_Encoder ) hb_parptr( 4 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_GetEncoder( hDoc, cEncoding ) -> hEncoder @@ -421,35 +421,35 @@ HB_FUNC( HPDF_GETCURRENTENCODER ) */ HB_FUNC( HPDF_SETCURRENTENCODER ) { - hb_retnl( (long) HPDF_SetCurrentEncoder( HPDF_Doc_par( 1 ), hb_parc( 2 ) ) ); + hb_retnl( ( long ) HPDF_SetCurrentEncoder( HPDF_Doc_par( 1 ), hb_parc( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_UseJPEncodings( hDoc ) -> hStatus */ HB_FUNC( HPDF_USEJPENCODINGS ) { - hb_retnl( (long) HPDF_UseJPEncodings( HPDF_Doc_par( 1 ) ) ); + hb_retnl( ( long ) HPDF_UseJPEncodings( HPDF_Doc_par( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_UseKREncodings( hDoc ) -> hStatus */ HB_FUNC( HPDF_USEKRENCODINGS ) { - hb_retnl( (long) HPDF_UseKREncodings( HPDF_Doc_par( 1 ) ) ); + hb_retnl( ( long ) HPDF_UseKREncodings( HPDF_Doc_par( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_UseCNSEncodings( hDoc ) -> hStatus */ HB_FUNC( HPDF_USECNSENCODINGS ) { - hb_retnl( (long) HPDF_UseCNSEncodings( HPDF_Doc_par( 1 ) ) ); + hb_retnl( ( long ) HPDF_UseCNSEncodings( HPDF_Doc_par( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_UseCNTEncodings( hDoc ) -> hStatus */ HB_FUNC( HPDF_USECNTENCODINGS ) { - hb_retnl( (long) HPDF_UseCNTEncodings( HPDF_Doc_par( 1 ) ) ); + hb_retnl( ( long ) HPDF_UseCNTEncodings( HPDF_Doc_par( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_LoadPngImageFromFile( hDoc, cPNGFileName ) -> hImage @@ -474,14 +474,14 @@ HB_FUNC( HPDF_LOADPNGIMAGEFROMFILE2 ) */ HB_FUNC( HPDF_LOADRAWIMAGEFROMFILE ) { - hb_retptr( ( void * ) HPDF_LoadRawImageFromFile( HPDF_Doc_par( 1 ), hb_parc( 2 ), hb_parni( 3 ), hb_parni( 4 ), (HPDF_ColorSpace) hb_parni( 5 ) ) ); + hb_retptr( ( void * ) HPDF_LoadRawImageFromFile( HPDF_Doc_par( 1 ), hb_parc( 2 ), hb_parni( 3 ), hb_parni( 4 ), ( HPDF_ColorSpace ) hb_parni( 5 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_LoadRawImageFromMem( hDoc, cBuffer, nWidth, nHeight, nColorSpace, nBitsPerComponents ) -> hImage */ HB_FUNC( HPDF_LOADRAWIMAGEFROMMEM ) { - hb_retptr( ( void * ) HPDF_LoadRawImageFromMem( HPDF_Doc_par( 1 ), (HPDF_BYTE*) hb_parc( 2 ), hb_parni( 3 ), hb_parni( 4 ), (HPDF_ColorSpace) hb_parni( 5 ), hb_parni( 6 ) ) ); + hb_retptr( ( void * ) HPDF_LoadRawImageFromMem( HPDF_Doc_par( 1 ), ( HPDF_BYTE * ) hb_parc( 2 ), hb_parni( 3 ), hb_parni( 4 ), ( HPDF_ColorSpace ) hb_parni( 5 ), hb_parni( 6 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_LoadJPEGImageFromFile( hDoc, cHPEGFileName ) -> hImage @@ -501,14 +501,14 @@ HB_FUNC( HPDF_LOADJPEGIMAGEFROMFILE ) */ HB_FUNC( HPDF_SETINFOATTR ) { - hb_retnl( (long) HPDF_SetInfoAttr( HPDF_Doc_par( 1 ), (HPDF_InfoType) hb_parni( 2 ), hb_parc( 3 ) ) ); + hb_retnl( ( long ) HPDF_SetInfoAttr( HPDF_Doc_par( 1 ), ( HPDF_InfoType ) hb_parni( 2 ), hb_parc( 3 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_GetInfoAttr( hDoc, nInfoType ) -> cInfo */ HB_FUNC( HPDF_GETINFOATTR ) { - hb_retc( HPDF_GetInfoAttr( HPDF_Doc_par( 1 ), (HPDF_InfoType) hb_parni( 2 ) ) ); + hb_retc( HPDF_GetInfoAttr( HPDF_Doc_par( 1 ), ( HPDF_InfoType ) hb_parni( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_SetInfoDateAttr( hDoc, nInfoType, aDateValues ) -> hStatus @@ -527,14 +527,14 @@ HB_FUNC( HPDF_SETINFODATEATTR ) date.minutes = hb_parni( 2,5 ); date.seconds = hb_parni( 2,6 ); - hb_retnl( (long) HPDF_SetInfoDateAttr( HPDF_Doc_par( 1 ), (HPDF_InfoType) hb_parni( 2 ), date ) ); + hb_retnl( ( long ) HPDF_SetInfoDateAttr( HPDF_Doc_par( 1 ), ( HPDF_InfoType ) hb_parni( 2 ), date ) ); } /*----------------------------------------------------------------------*/ /* HPdf_SetPassword( hDoc, cOwnerPassword = NO NIL, cUserPassword = CANBE NIL ) -> hStatus */ HB_FUNC( HPDF_SETPASSWORD ) { - hb_retnl( (long) HPDF_SetPassword( HPDF_Doc_par( 1 ), hb_parc( 2 ), hb_parc( 3 ) ) ); + hb_retnl( ( long ) HPDF_SetPassword( HPDF_Doc_par( 1 ), hb_parc( 2 ), hb_parc( 3 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_SetPermission( hDoc, nPermission ) -> hStatus @@ -547,7 +547,7 @@ HB_FUNC( HPDF_SETPASSWORD ) */ HB_FUNC( HPDF_SETPERMISSION ) { - hb_retnl( (long) HPDF_SetPermission( HPDF_Doc_par( 1 ), hb_parni( 2 ) ) ); + hb_retnl( ( long ) HPDF_SetPermission( HPDF_Doc_par( 1 ), hb_parni( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_SetEncryptionMode( hDoc, nEncMode, nKeyLen ) -> hStatus @@ -559,7 +559,7 @@ HB_FUNC( HPDF_SETPERMISSION ) */ HB_FUNC( HPDF_SETENCRYPTIONMODE ) { - hb_retnl( (long) HPDF_SetEncryptionMode( HPDF_Doc_par( 1 ), (HPDF_EncryptMode) hb_parni( 2 ), hb_parni( 3 ) ) ); + hb_retnl( ( long ) HPDF_SetEncryptionMode( HPDF_Doc_par( 1 ), ( HPDF_EncryptMode ) hb_parni( 2 ), hb_parni( 3 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_SetCompressionMode( hDoc, nCompMode ) -> hStatus @@ -572,7 +572,7 @@ HB_FUNC( HPDF_SETENCRYPTIONMODE ) */ HB_FUNC( HPDF_SETCOMPRESSIONMODE ) { - hb_retnl( (long) HPDF_SetCompressionMode( HPDF_Doc_par( 1 ), hb_parni( 2 ) ) ); + hb_retnl( ( long ) HPDF_SetCompressionMode( HPDF_Doc_par( 1 ), hb_parni( 2 ) ) ); } /*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/ @@ -585,14 +585,14 @@ HB_FUNC( HPDF_SETCOMPRESSIONMODE ) */ HB_FUNC( HPDF_PAGE_SETWIDTH ) { - hb_retnl( (long) HPDF_Page_SetWidth( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetWidth( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_SetHeight( hPage, nHeight ) -> hStatus */ HB_FUNC( HPDF_PAGE_SETHEIGHT ) { - hb_retnl( (long) HPDF_Page_SetHeight( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetHeight( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_SetSize( hPage, nSize, nOrientation = 1 Portrait, 2 Landscape ) -> hStatus @@ -612,35 +612,35 @@ HB_FUNC( HPDF_PAGE_SETHEIGHT ) */ HB_FUNC( HPDF_PAGE_SETSIZE ) { - hb_retnl( (long) HPDF_Page_SetSize( (HPDF_Page) hb_parptr( 1 ), (HPDF_PageSizes) hb_parni( 2 ), (HPDF_PageDirection) hb_parni( 3 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetSize( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_PageSizes ) hb_parni( 2 ), ( HPDF_PageDirection ) hb_parni( 3 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_SetRotate( hPage, nAngle = 0-360 ) -> hStatus */ HB_FUNC( HPDF_PAGE_SETROTATE ) { - hb_retnl( (long) HPDF_Page_SetRotate( (HPDF_Page) hb_parptr( 1 ), hb_parni( 2 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetRotate( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_UINT16 ) hb_parni( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetWidth( hPage ) -> nWidth */ HB_FUNC( HPDF_PAGE_GETWIDTH ) { - hb_retnd( (double) HPDF_Page_GetWidth( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnd( (double) HPDF_Page_GetWidth( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetHeight( hPage ) -> nHeight */ HB_FUNC( HPDF_PAGE_GETHEIGHT ) { - hb_retnd( (double) HPDF_Page_GetHeight( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnd( (double) HPDF_Page_GetHeight( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_CreateDestination( hPage ) -> hDestn */ HB_FUNC( HPDF_PAGE_CREATEDESTINATION ) { - hb_retptr( ( void * ) HPDF_Page_CreateDestination( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retptr( ( void * ) HPDF_Page_CreateDestination( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_CreateAnnot( hPage, aRect[nLeft,nTop,nRight,nBottom], cText, cEncoder ) -> nHandle @@ -649,12 +649,12 @@ HB_FUNC( HPDF_PAGE_CREATETEXTANNOT ) { HPDF_Rect rc; - rc.left = (HPDF_REAL) hb_parnd( 2, 1 ); - rc.top = (HPDF_REAL) hb_parnd( 2, 2 ); - rc.right = (HPDF_REAL) hb_parnd( 2, 3 ); - rc.bottom = (HPDF_REAL) hb_parnd( 2, 4 ); + rc.left = ( HPDF_REAL ) hb_parnd( 2, 1 ); + rc.top = ( HPDF_REAL ) hb_parnd( 2, 2 ); + rc.right = ( HPDF_REAL ) hb_parnd( 2, 3 ); + rc.bottom = ( HPDF_REAL ) hb_parnd( 2, 4 ); - hb_retptr( HPDF_Page_CreateTextAnnot( (HPDF_Page) hb_parptr( 1 ), rc, hb_parc( 3 ), (HPDF_Encoder) hb_parptr( 4 ) ) ); + hb_retptr( HPDF_Page_CreateTextAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, hb_parc( 3 ), ( HPDF_Encoder ) hb_parptr( 4 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_CreateLinkAnnot( hPage, aRect, hDestn ) -> nHandle @@ -663,12 +663,12 @@ HB_FUNC( HPDF_PAGE_CREATELINKANNOT ) { HPDF_Rect rc; - rc.left = (HPDF_REAL) hb_parnd( 2, 1 ); - rc.top = (HPDF_REAL) hb_parnd( 2, 2 ); - rc.right = (HPDF_REAL) hb_parnd( 2, 3 ); - rc.bottom = (HPDF_REAL) hb_parnd( 2, 4 ); + rc.left = ( HPDF_REAL ) hb_parnd( 2, 1 ); + rc.top = ( HPDF_REAL ) hb_parnd( 2, 2 ); + rc.right = ( HPDF_REAL ) hb_parnd( 2, 3 ); + rc.bottom = ( HPDF_REAL ) hb_parnd( 2, 4 ); - hb_retptr( HPDF_Page_CreateLinkAnnot( (HPDF_Page) hb_parptr( 1 ), rc, (HPDF_Destination) hb_parptr( 3 ) ) ); + hb_retptr( HPDF_Page_CreateLinkAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, ( HPDF_Destination ) hb_parptr( 3 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_CreateURILinkAnnot( hPage, aRect, cURI ) -> nHandle @@ -677,33 +677,33 @@ HB_FUNC( HPDF_PAGE_CREATEURILINKANNOT ) { HPDF_Rect rc; - rc.left = (HPDF_REAL) hb_parnd( 2, 1 ); - rc.top = (HPDF_REAL) hb_parnd( 2, 2 ); - rc.right = (HPDF_REAL) hb_parnd( 2, 3 ); - rc.bottom = (HPDF_REAL) hb_parnd( 2, 4 ); + rc.left = ( HPDF_REAL ) hb_parnd( 2, 1 ); + rc.top = ( HPDF_REAL ) hb_parnd( 2, 2 ); + rc.right = ( HPDF_REAL ) hb_parnd( 2, 3 ); + rc.bottom = ( HPDF_REAL ) hb_parnd( 2, 4 ); - hb_retptr( HPDF_Page_CreateURILinkAnnot( (HPDF_Page) hb_parptr( 1 ), rc, hb_parc( 3 ) ) ); + hb_retptr( HPDF_Page_CreateURILinkAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, hb_parc( 3 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_TextWidth( hPage, cText ) -> nTextWidth */ HB_FUNC( HPDF_PAGE_TEXTWIDTH ) { - hb_retnl( (long) HPDF_Page_TextWidth( (HPDF_Page) hb_parptr( 1 ), hb_parc( 2 ) ) ); + hb_retnl( ( long ) HPDF_Page_TextWidth( ( HPDF_Page ) hb_parptr( 1 ), hb_parc( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_MeasureText( hPage, cText, nWidth, lWordWrap ) -> nByteLenOfTextToFitWidth */ HB_FUNC( HPDF_PAGE_MEASURETEXT ) { - hb_retnl( (long) HPDF_Page_MeasureText( (HPDF_Page) hb_parptr( 1 ), hb_parc( 2 ), (HPDF_REAL) hb_parnd( 3 ), hb_parl( 4 ), NULL ) ); + hb_retnl( ( long ) HPDF_Page_MeasureText( ( HPDF_Page ) hb_parptr( 1 ), hb_parc( 2 ), ( HPDF_REAL ) hb_parnd( 3 ), hb_parl( 4 ), NULL ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetMode( hPage ) -> nGraphicMode */ HB_FUNC( HPDF_PAGE_GETGMODE ) { - hb_retnl( (long) HPDF_Page_GetGMode( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_GetGMode( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetCurrentPos( hPage ) -> aCurPos[ nX, nY ] @@ -713,7 +713,7 @@ HB_FUNC( HPDF_PAGE_GETCURRENTPOS ) HPDF_Point pt; PHB_ITEM info = hb_itemArrayNew( 2 ); - HPDF_Page_GetCurrentPos2( (HPDF_Page) hb_parptr( 1 ), &pt ); + HPDF_Page_GetCurrentPos2( ( HPDF_Page ) hb_parptr( 1 ), &pt ); hb_arraySetND( info, 1, pt.x ); hb_arraySetND( info, 2, pt.y ); @@ -728,7 +728,7 @@ HB_FUNC( HPDF_PAGE_GETCURRENTTEXTPOS ) HPDF_Point pt; PHB_ITEM info = hb_itemArrayNew( 2 ); - HPDF_Page_GetCurrentTextPos2( (HPDF_Page) hb_parptr( 1 ), &pt ); + HPDF_Page_GetCurrentTextPos2( ( HPDF_Page ) hb_parptr( 1 ), &pt ); hb_arraySetND( info, 1, pt.x ); hb_arraySetND( info, 2, pt.y ); @@ -740,14 +740,14 @@ HB_FUNC( HPDF_PAGE_GETCURRENTTEXTPOS ) */ HB_FUNC( HPDF_PAGE_GETCURRENTFONT ) { - hb_retptr( ( void * ) HPDF_Page_GetCurrentFont( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retptr( ( void * ) HPDF_Page_GetCurrentFont( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetCurrentFontSize( hPage ) -> nFontSize */ HB_FUNC( HPDF_PAGE_GETCURRENTFONTSIZE ) { - hb_retnd( (double) HPDF_Page_GetCurrentFontSize( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnd( (double) HPDF_Page_GetCurrentFontSize( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetTransMatrix( hPage ) -> aMatrix[ ] @@ -757,7 +757,7 @@ HB_FUNC( HPDF_PAGE_GETTRANSMATRIX ) HPDF_TransMatrix matrix; PHB_ITEM info = hb_itemArrayNew( 6 ); - matrix = HPDF_Page_GetTransMatrix( (HPDF_Page) hb_parptr( 1 ) ); + matrix = HPDF_Page_GetTransMatrix( ( HPDF_Page ) hb_parptr( 1 ) ); hb_arraySetND( info, 1, matrix.a ); hb_arraySetND( info, 2, matrix.b ); @@ -773,28 +773,28 @@ HB_FUNC( HPDF_PAGE_GETTRANSMATRIX ) */ HB_FUNC( HPDF_PAGE_GETLINEWIDTH ) { - hb_retnd( (double) HPDF_Page_GetLineWidth( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnd( (double) HPDF_Page_GetLineWidth( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetLineCap( hPage ) -> nLineCapStyle */ HB_FUNC( HPDF_PAGE_GETLINECAP ) { - hb_retnl( (long) HPDF_Page_GetLineCap( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_GetLineCap( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetLineJoin( hPage ) -> nLineJoinStyle */ HB_FUNC( HPDF_PAGE_GETLINEJOIN ) { - hb_retnl( (long) HPDF_Page_GetLineJoin( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_GetLineJoin( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetMiterLimit( hPage ) -> nMiterLimit */ HB_FUNC( HPDF_PAGE_GETMITERLIMIT ) { - hb_retnl( (long) HPDF_Page_GetMiterLimit( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_GetMiterLimit( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetDash( hPage ) -> aDash @@ -804,7 +804,7 @@ HB_FUNC( HPDF_PAGE_GETDASH ) HPDF_DashMode dash; PHB_ITEM info = hb_itemArrayNew( 10 ); - dash = HPDF_Page_GetDash( (HPDF_Page) hb_parptr( 1 ) ); + dash = HPDF_Page_GetDash( ( HPDF_Page ) hb_parptr( 1 ) ); hb_arraySetNI( info, 1, dash.ptn[0] ); hb_arraySetNI( info, 2, dash.ptn[1] ); @@ -824,49 +824,49 @@ HB_FUNC( HPDF_PAGE_GETDASH ) */ HB_FUNC( HPDF_PAGE_GETFLAT ) { - hb_retnd( (double) HPDF_Page_GetFlat( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnd( (double) HPDF_Page_GetFlat( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetCharSpace( hPage ) -> nCurCharSpace */ HB_FUNC( HPDF_PAGE_GETCHARSPACE ) { - hb_retnd( (double) HPDF_Page_GetCharSpace( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnd( (double) HPDF_Page_GetCharSpace( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetWordSpace( hPage ) -> nCurWordSpace */ HB_FUNC( HPDF_PAGE_GETWORDSPACE ) { - hb_retnd( (double) HPDF_Page_GetWordSpace( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnd( (double) HPDF_Page_GetWordSpace( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetHorizontalScalling( hPage ) -> nHorzScaling */ HB_FUNC( HPDF_PAGE_GETHORIZONTALSCALLING ) { - hb_retnd( (double) HPDF_Page_GetHorizontalScalling( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnd( (double) HPDF_Page_GetHorizontalScalling( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetTextLeading( hPage ) -> nTextLeading */ HB_FUNC( HPDF_PAGE_GETTEXTLEADING ) { - hb_retnd( (double) HPDF_Page_GetTextLeading( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnd( (double) HPDF_Page_GetTextLeading( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetTextRenderingMode( hPage ) -> nTextRenderingMode */ HB_FUNC( HPDF_PAGE_GETTEXTRENDERINGMODE ) { - hb_retnd( (double) HPDF_Page_GetTextRenderingMode( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnd( (double) HPDF_Page_GetTextRenderingMode( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetTextRise( hPage ) -> nTextRise */ HB_FUNC( HPDF_PAGE_GETTEXTRISE ) { - hb_retnd( (double) HPDF_Page_GetTextRise( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnd( (double) HPDF_Page_GetTextRise( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetRGBFill( hPage ) -> aRGBFill[ nRed, nGreen, nBlue ] @@ -876,7 +876,7 @@ HB_FUNC( HPDF_PAGE_GETRGBFILL ) HPDF_RGBColor rgb; PHB_ITEM info = hb_itemArrayNew( 3 ); - rgb = HPDF_Page_GetRGBFill( (HPDF_Page) hb_parptr( 1 ) ); + rgb = HPDF_Page_GetRGBFill( ( HPDF_Page ) hb_parptr( 1 ) ); hb_arraySetND( info, 1, rgb.r ); hb_arraySetND( info, 2, rgb.g ); @@ -892,7 +892,7 @@ HB_FUNC( HPDF_PAGE_GETRGBSTROKE ) HPDF_RGBColor rgb; PHB_ITEM info = hb_itemArrayNew( 3 ); - rgb = HPDF_Page_GetRGBStroke( (HPDF_Page) hb_parptr( 1 ) ); + rgb = HPDF_Page_GetRGBStroke( ( HPDF_Page ) hb_parptr( 1 ) ); hb_arraySetND( info, 1, rgb.r ); hb_arraySetND( info, 2, rgb.g ); @@ -908,7 +908,7 @@ HB_FUNC( HPDF_PAGE_GETCMYKFILL ) HPDF_CMYKColor cmyk; PHB_ITEM info = hb_itemArrayNew( 4 ); - cmyk = HPDF_Page_GetCMYKFill( (HPDF_Page) hb_parptr( 1 ) ); + cmyk = HPDF_Page_GetCMYKFill( ( HPDF_Page ) hb_parptr( 1 ) ); hb_arraySetND( info, 1, cmyk.c ); hb_arraySetND( info, 2, cmyk.m ); @@ -925,7 +925,7 @@ HB_FUNC( HPDF_PAGE_GETCMYKSTROKE ) HPDF_CMYKColor cmyk; PHB_ITEM info = hb_itemArrayNew( 4 ); - cmyk = HPDF_Page_GetCMYKStroke( (HPDF_Page) hb_parptr( 1 ) ); + cmyk = HPDF_Page_GetCMYKStroke( ( HPDF_Page ) hb_parptr( 1 ) ); hb_arraySetND( info, 1, cmyk.c ); hb_arraySetND( info, 2, cmyk.m ); @@ -939,28 +939,28 @@ HB_FUNC( HPDF_PAGE_GETCMYKSTROKE ) */ HB_FUNC( HPDF_PAGE_GETGRAYFILL ) { - hb_retnd( (double) HPDF_Page_GetGrayFill( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnd( (double) HPDF_Page_GetGrayFill( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetGrayStroke( hPage ) -> nGrayStrokeValue */ HB_FUNC( HPDF_PAGE_GETGRAYSTROKE ) { - hb_retnd( (double) HPDF_Page_GetGrayStroke( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnd( (double) HPDF_Page_GetGrayStroke( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetStrokingColorSpace( hPage ) -> nStrokingSpace */ HB_FUNC( HPDF_PAGE_GETSTROKINGCOLORSPACE ) { - hb_retnd( (double) HPDF_Page_GetStrokingColorSpace( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnd( (double) HPDF_Page_GetStrokingColorSpace( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetFillingColorSpace( hPage ) -> nFillingColorSpace */ HB_FUNC( HPDF_PAGE_GETFILLINGCOLORSPACE ) { - hb_retnd( (double) HPDF_Page_GetFillingColorSpace( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnd( (double) HPDF_Page_GetFillingColorSpace( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_GetTextMatrix( hPage ) -> aMatrix[ ] @@ -970,7 +970,7 @@ HB_FUNC( HPDF_PAGE_GETTEXTMATRIX ) HPDF_TransMatrix matrix; PHB_ITEM info = hb_itemArrayNew( 6 ); - matrix = HPDF_Page_GetTextMatrix( (HPDF_Page) hb_parptr( 1 ) ) ; + matrix = HPDF_Page_GetTextMatrix( ( HPDF_Page ) hb_parptr( 1 ) ) ; hb_arraySetND( info, 1, matrix.a ); hb_arraySetND( info, 2, matrix.b ); @@ -986,7 +986,7 @@ HB_FUNC( HPDF_PAGE_GETTEXTMATRIX ) */ HB_FUNC( HPDF_PAGE_GETGSTATEDEPTH ) { - hb_retni( (int) HPDF_Page_GetGStateDepth( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retni( ( int ) HPDF_Page_GetGStateDepth( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPdf_Page_SetSlideShow( hPage, nType, nDurationPerFrame, nTranstnTime = 1 Second ) -> hStatus @@ -1011,7 +1011,7 @@ HB_FUNC( HPDF_PAGE_GETGSTATEDEPTH ) */ HB_FUNC( HPDF_PAGE_SETSLIDESHOW ) { - hb_retnl( (long) HPDF_Page_SetSlideShow( (HPDF_Page) hb_parptr( 1 ), (HPDF_TransitionStyle) hb_parni( 2 ), (HPDF_REAL) hb_parnd( 3 ), (HPDF_REAL) hb_parnd( 4 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetSlideShow( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_TransitionStyle ) hb_parni( 2 ), ( HPDF_REAL ) hb_parnd( 3 ), ( HPDF_REAL ) hb_parnd( 4 ) ) ); } /*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/ @@ -1024,28 +1024,28 @@ HB_FUNC( HPDF_PAGE_SETSLIDESHOW ) */ HB_FUNC( HPDF_PAGE_SETLINEWIDTH ) { - hb_retnl( (long) HPDF_Page_SetLineWidth( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetLineWidth( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_SetLineCap( hPage, nLineCap ) -> hStatus */ HB_FUNC( HPDF_PAGE_SETLINECAP ) { - hb_retnl( (long) HPDF_Page_SetLineCap( (HPDF_Page) hb_parptr( 1 ), (HPDF_LineCap) hb_parni( 2 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetLineCap( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_LineCap ) hb_parni( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_SetLineJoin( hPage, nLineJoin ) -> hStatus */ HB_FUNC( HPDF_PAGE_SETLINEJOIN ) { - hb_retnl( (long) HPDF_Page_SetLineJoin( (HPDF_Page) hb_parptr( 1 ), (HPDF_LineJoin) hb_parni( 2 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetLineJoin( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_LineJoin ) hb_parni( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_SetMiterLimit( hPage, nMiterLimit ) -> hStatus */ HB_FUNC( HPDF_PAGE_SETMITERLIMIT ) { - hb_retnl( (long) HPDF_Page_SetMiterLimit( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetMiterLimit( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_SetDash( hPage, aDash, nNumPoints, nStartFrom ) -> hStatus @@ -1057,45 +1057,43 @@ HB_FUNC( HPDF_PAGE_SETDASH ) int i; for ( i = 0; i < nPtns; i++ ) - { - dash.ptn[ i ] = hb_parni( 2, i+1 ); - } + dash.ptn[ i ] = ( HPDF_UINT16 ) hb_parni( 2, i+1 ); - hb_retnl( (long) HPDF_Page_SetDash( (HPDF_Page) hb_parptr( 1 ), dash.ptn, nPtns, hb_parni( 4 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetDash( ( HPDF_Page ) hb_parptr( 1 ), dash.ptn, nPtns, hb_parni( 4 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_SetExtGState( hPage, hGState ) -> hStatus */ HB_FUNC( HPDF_PAGE_SETEXTGSTATE ) { - hb_retnl( (long) HPDF_Page_SetExtGState( (HPDF_Page) hb_parptr( 1 ), (HPDF_ExtGState) hb_parptr( 2 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetExtGState( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_ExtGState ) hb_parptr( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_GSave( hPage ) -> hStatus */ HB_FUNC( HPDF_PAGE_GSAVE ) { - hb_retnl( (long) HPDF_Page_GSave( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_GSave( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_GRestore( hPage ) -> hStatus */ HB_FUNC( HPDF_PAGE_GRESTORE ) { - hb_retnl( (long) HPDF_Page_GRestore( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_GRestore( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_Concat( hPage, nA, nB, nC, nD, nX, nY ) -> hStatus */ HB_FUNC( HPDF_PAGE_CONCAT ) { - hb_retnl( (long) HPDF_Page_Concat( (HPDF_Page) hb_parptr( 1 ), - (HPDF_REAL) hb_parnd( 2 ), - (HPDF_REAL) hb_parnd( 3 ), - (HPDF_REAL) hb_parnd( 4 ), - (HPDF_REAL) hb_parnd( 5 ), - (HPDF_REAL) hb_parnd( 6 ), - (HPDF_REAL) hb_parnd( 7 ) + hb_retnl( ( long ) HPDF_Page_Concat( ( HPDF_Page ) hb_parptr( 1 ), + ( HPDF_REAL ) hb_parnd( 2 ), + ( HPDF_REAL ) hb_parnd( 3 ), + ( HPDF_REAL ) hb_parnd( 4 ), + ( HPDF_REAL ) hb_parnd( 5 ), + ( HPDF_REAL ) hb_parnd( 6 ), + ( HPDF_REAL ) hb_parnd( 7 ) ) ); } /*----------------------------------------------------------------------*/ @@ -1103,27 +1101,27 @@ HB_FUNC( HPDF_PAGE_CONCAT ) */ HB_FUNC( HPDF_PAGE_MOVETO ) { - hb_retnl( (long) HPDF_Page_MoveTo( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ), (HPDF_REAL) hb_parnd( 3 ) ) ); + hb_retnl( ( long ) HPDF_Page_MoveTo( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ), ( HPDF_REAL ) hb_parnd( 3 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_LineTo( hPage, nX, nY ) -> hStatus */ HB_FUNC( HPDF_PAGE_LINETO ) { - hb_retnl( (long) HPDF_Page_LineTo( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ), (HPDF_REAL) hb_parnd( 3 ) ) ); + hb_retnl( ( long ) HPDF_Page_LineTo( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ), ( HPDF_REAL ) hb_parnd( 3 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_CurveTo( hPage, nX1, nY1, nX2, nY2, nX3, nY3 ) -> hStatus */ HB_FUNC( HPDF_PAGE_CURVETO ) { - hb_retnl( (long) HPDF_Page_CurveTo( (HPDF_Page) hb_parptr( 1 ), - (HPDF_REAL) hb_parnd( 2 ), - (HPDF_REAL) hb_parnd( 3 ), - (HPDF_REAL) hb_parnd( 4 ), - (HPDF_REAL) hb_parnd( 5 ), - (HPDF_REAL) hb_parnd( 6 ), - (HPDF_REAL) hb_parnd( 7 ) + hb_retnl( ( long ) HPDF_Page_CurveTo( ( HPDF_Page ) hb_parptr( 1 ), + ( HPDF_REAL ) hb_parnd( 2 ), + ( HPDF_REAL ) hb_parnd( 3 ), + ( HPDF_REAL ) hb_parnd( 4 ), + ( HPDF_REAL ) hb_parnd( 5 ), + ( HPDF_REAL ) hb_parnd( 6 ), + ( HPDF_REAL ) hb_parnd( 7 ) ) ); } /*----------------------------------------------------------------------*/ @@ -1131,11 +1129,11 @@ HB_FUNC( HPDF_PAGE_CURVETO ) */ HB_FUNC( HPDF_PAGE_CURVETO2 ) { - hb_retnl( (long) HPDF_Page_CurveTo2( (HPDF_Page) hb_parptr( 1 ), - (HPDF_REAL) hb_parnd( 2 ), - (HPDF_REAL) hb_parnd( 3 ), - (HPDF_REAL) hb_parnd( 4 ), - (HPDF_REAL) hb_parnd( 5 ) + hb_retnl( ( long ) HPDF_Page_CurveTo2( ( HPDF_Page ) hb_parptr( 1 ), + ( HPDF_REAL ) hb_parnd( 2 ), + ( HPDF_REAL ) hb_parnd( 3 ), + ( HPDF_REAL ) hb_parnd( 4 ), + ( HPDF_REAL ) hb_parnd( 5 ) ) ); } /*----------------------------------------------------------------------*/ @@ -1143,11 +1141,11 @@ HB_FUNC( HPDF_PAGE_CURVETO2 ) */ HB_FUNC( HPDF_PAGE_CURVETO3 ) { - hb_retnl( (long) HPDF_Page_CurveTo3( (HPDF_Page) hb_parptr( 1 ), - (HPDF_REAL) hb_parnd( 2 ), - (HPDF_REAL) hb_parnd( 3 ), - (HPDF_REAL) hb_parnd( 4 ), - (HPDF_REAL) hb_parnd( 5 ) + hb_retnl( ( long ) HPDF_Page_CurveTo3( ( HPDF_Page ) hb_parptr( 1 ), + ( HPDF_REAL ) hb_parnd( 2 ), + ( HPDF_REAL ) hb_parnd( 3 ), + ( HPDF_REAL ) hb_parnd( 4 ), + ( HPDF_REAL ) hb_parnd( 5 ) ) ); } /*----------------------------------------------------------------------*/ @@ -1155,294 +1153,294 @@ HB_FUNC( HPDF_PAGE_CURVETO3 ) */ HB_FUNC( HPDF_PAGE_CLOSEPATH ) { - hb_retnl( (long) HPDF_Page_ClosePath( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_ClosePath( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_Rectangle( hPage, nX, nY, nWidth, nHeight ) -> hStatus */ HB_FUNC( HPDF_PAGE_RECTANGLE ) { - hb_retnl( (long) HPDF_Page_Rectangle( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ), (HPDF_REAL) hb_parnd( 3 ), (HPDF_REAL) hb_parnd( 4 ), (HPDF_REAL) hb_parnd( 5 ) ) ); + hb_retnl( ( long ) HPDF_Page_Rectangle( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ), ( HPDF_REAL ) hb_parnd( 3 ), ( HPDF_REAL ) hb_parnd( 4 ), ( HPDF_REAL ) hb_parnd( 5 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_Stroke( hPage ) -> hStatus */ HB_FUNC( HPDF_PAGE_STROKE ) { - hb_retnl( (long) HPDF_Page_Stroke( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_Stroke( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_ClosePathStroke( hPage ) -> hStatus */ HB_FUNC( HPDF_PAGE_CLOSEPATHSTROKE ) { - hb_retnl( (long) HPDF_Page_ClosePathStroke( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_ClosePathStroke( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_SetFontAndSize( hPage, hFont, nSize ) -> hStatus */ HB_FUNC( HPDF_PAGE_SETFONTANDSIZE ) { - hb_retnl( (long) HPDF_Page_SetFontAndSize( (HPDF_Page) hb_parptr( 1 ), (HPDF_Font) hb_parptr( 2 ), (HPDF_REAL) hb_parnd( 3 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetFontAndSize( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_Font ) hb_parptr( 2 ), ( HPDF_REAL ) hb_parnd( 3 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_BeginText( hPage ) -> hStatus */ HB_FUNC( HPDF_PAGE_BEGINTEXT ) { - hb_retnl( (long) HPDF_Page_BeginText( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_BeginText( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_EndText( hPage ) -> hStatus */ HB_FUNC( HPDF_PAGE_ENDTEXT ) { - hb_retnl( (long) HPDF_Page_EndText( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_EndText( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_TextOut( hPage, nX, nY, cText ) -> hStatus */ HB_FUNC( HPDF_PAGE_TEXTOUT ) { - hb_retnl( (long) HPDF_Page_TextOut( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ), (HPDF_REAL) hb_parnd( 3 ), hb_parc( 4 ) ) ); + hb_retnl( ( long ) HPDF_Page_TextOut( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ), ( HPDF_REAL ) hb_parnd( 3 ), hb_parc( 4 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_MoveTextPos( hPage, nX, nY ) -> hStatus */ HB_FUNC( HPDF_PAGE_MOVETEXTPOS ) { - hb_retnl( (long) HPDF_Page_MoveTextPos( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ), (HPDF_REAL) hb_parnd( 3 ) ) ); + hb_retnl( ( long ) HPDF_Page_MoveTextPos( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ), ( HPDF_REAL ) hb_parnd( 3 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_ShowText( hPage, cText ) -> hStatus */ HB_FUNC( HPDF_PAGE_SHOWTEXT ) { - hb_retnl( (long) HPDF_Page_ShowText( (HPDF_Page) hb_parptr( 1 ), hb_parc( 2 ) ) ); + hb_retnl( ( long ) HPDF_Page_ShowText( ( HPDF_Page ) hb_parptr( 1 ), hb_parc( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_Fill( hPage ) -> hStatus */ HB_FUNC( HPDF_PAGE_FILL ) { - hb_retnl( (long) HPDF_Page_Fill( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_Fill( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_Eofill( hPage ) -> hStatus */ HB_FUNC( HPDF_PAGE_EOFILL ) { - hb_retnl( (long) HPDF_Page_Eofill( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_Eofill( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_FillStroke( hPage ) -> hStatus */ HB_FUNC( HPDF_PAGE_FILLSTROKE ) { - hb_retnl( (long) HPDF_Page_FillStroke( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_FillStroke( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_EofillStroke( hPage ) -> hStatus */ HB_FUNC( HPDF_PAGE_EOFILLSTROKE ) { - hb_retnl( (long) HPDF_Page_EofillStroke( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_EofillStroke( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_ClosePathFillStroke( hPage ) -> hStatus */ HB_FUNC( HPDF_PAGE_CLOSEPATHFILLSTROKE ) { - hb_retnl( (long) HPDF_Page_ClosePathFillStroke( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_ClosePathFillStroke( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_ClosePathEofillStroke( hPage ) -> hStatus */ HB_FUNC( HPDF_PAGE_CLOSEPATHEOFILLSTROKE ) { - hb_retnl( (long) HPDF_Page_ClosePathEofillStroke( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_ClosePathEofillStroke( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_EndPath( hPage ) -> hStatus */ HB_FUNC( HPDF_PAGE_ENDPATH ) { - hb_retnl( (long) HPDF_Page_EndPath( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_EndPath( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_Clip( hPage ) -> hStatus */ HB_FUNC( HPDF_PAGE_CLIP ) { - hb_retnl( (long) HPDF_Page_Clip( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_Clip( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_Eoclip( hPage ) -> hStatus */ HB_FUNC( HPDF_PAGE_EOCLIP ) { - hb_retnl( (long) HPDF_Page_Eoclip( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_Eoclip( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_SetCharSpace( hPage, nSpaceWidth ) -> hStatus */ HB_FUNC( HPDF_PAGE_SETCHARSPACE ) { - hb_retnl( (long) HPDF_Page_SetCharSpace( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetCharSpace( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_SetWordSpace( hPage, nSpaceWidth ) -> hStatus */ HB_FUNC( HPDF_PAGE_SETWORDSPACE ) { - hb_retnl( (long) HPDF_Page_SetWordSpace( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetWordSpace( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_SetHorizontalScalling( hPage, nHorzScale ) -> hStatus */ HB_FUNC( HPDF_PAGE_SETHORIZONTALSCALLING ) { - hb_retnl( (long) HPDF_Page_SetHorizontalScalling( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetHorizontalScalling( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_SetTextLeading( hPage, nTextLeading ) -> hStatus */ HB_FUNC( HPDF_PAGE_SETTEXTLEADING ) { - hb_retnl( (long) HPDF_Page_SetTextLeading( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetTextLeading( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_SetTextRenderingMode( hPage, nTextRenderingMode ) -> hStatus */ HB_FUNC( HPDF_PAGE_SETTEXTRENDERINGMODE ) { - hb_retnl( (long) HPDF_Page_SetTextRenderingMode( (HPDF_Page) hb_parptr( 1 ), (HPDF_TextRenderingMode) hb_parni( 2 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetTextRenderingMode( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_TextRenderingMode ) hb_parni( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_SetTextRise( hPage, nTextRise ) -> hStatus */ HB_FUNC( HPDF_PAGE_SETTEXTRISE ) { - hb_retnl( (long) HPDF_Page_SetTextRise( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetTextRise( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_MoveTextPos2( hPage, nX, nY ) -> hStatus */ HB_FUNC( HPDF_PAGE_MOVETEXTPOS2 ) { - hb_retnl( (long) HPDF_Page_MoveTextPos2( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ), (HPDF_REAL) hb_parnd( 3 ) ) ); + hb_retnl( ( long ) HPDF_Page_MoveTextPos2( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ), ( HPDF_REAL ) hb_parnd( 3 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_SetTextMatrix( hPage ) -> hStatus --------tobedone--------- */ HB_FUNC( HPDF_PAGE_SETTEXTMATRIX ) { - hb_retnl( (long) HPDF_Page_SetTextMatrix( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ), (HPDF_REAL) hb_parnd( 3 ), (HPDF_REAL) hb_parnd( 4 ), (HPDF_REAL) hb_parnd( 5 ), (HPDF_REAL) hb_parnd( 6 ), (HPDF_REAL) hb_parnd( 7 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetTextMatrix( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ), ( HPDF_REAL ) hb_parnd( 3 ), ( HPDF_REAL ) hb_parnd( 4 ), ( HPDF_REAL ) hb_parnd( 5 ), ( HPDF_REAL ) hb_parnd( 6 ), ( HPDF_REAL ) hb_parnd( 7 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_MoveToNextLine( hPage ) -> hStatus */ HB_FUNC( HPDF_PAGE_MOVETONEXTLINE ) { - hb_retnl( (long) HPDF_Page_MoveToNextLine( (HPDF_Page) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Page_MoveToNextLine( ( HPDF_Page ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_ShowTextNextLine( hPage, cText ) -> hStatus */ HB_FUNC( HPDF_PAGE_SHOWTEXTNEXTLINE ) { - hb_retnl( (long) HPDF_Page_ShowTextNextLine( (HPDF_Page) hb_parptr( 1 ), hb_parc( 2 ) ) ); + hb_retnl( ( long ) HPDF_Page_ShowTextNextLine( ( HPDF_Page ) hb_parptr( 1 ), hb_parc( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_ShowTextNextLineEx( hPage, nWordSpace, nCharSpace, cText ) -> hStatus */ HB_FUNC( HPDF_PAGE_SHOWTEXTNEXTLINEEX ) { - hb_retnl( (long) HPDF_Page_ShowTextNextLineEx( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ), (HPDF_REAL) hb_parnd( 3 ), hb_parc( 4 ) ) ); + hb_retnl( ( long ) HPDF_Page_ShowTextNextLineEx( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ), ( HPDF_REAL ) hb_parnd( 3 ), hb_parc( 4 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_SetGrayFill( hPage, nGrayFill ) -> hStatus */ HB_FUNC( HPDF_PAGE_SETGRAYFILL ) { - hb_retnl( (long) HPDF_Page_SetGrayFill( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetGrayFill( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_SetGrayStroke( hPage, nGrayStroke ) -> hStatus */ HB_FUNC( HPDF_PAGE_SETGRAYSTROKE ) { - hb_retnl( (long) HPDF_Page_SetGrayStroke( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetGrayStroke( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_SetRGBFill( hPage, nRGBRed, nRGBGreen, nRGBBlue ) -> hStatus */ HB_FUNC( HPDF_PAGE_SETRGBFILL ) { - hb_retnl( (long) HPDF_Page_SetRGBFill( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ), (HPDF_REAL) hb_parnd( 3 ), (HPDF_REAL) hb_parnd( 4 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetRGBFill( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ), ( HPDF_REAL ) hb_parnd( 3 ), ( HPDF_REAL ) hb_parnd( 4 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_SetRGBStroke( hPage, nRGBRed, nRGBGreen, nRGBBlue ) -> hStatus */ HB_FUNC( HPDF_PAGE_SETRGBSTROKE ) { - hb_retnl( (long) HPDF_Page_SetRGBStroke( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ), (HPDF_REAL) hb_parnd( 3 ), (HPDF_REAL) hb_parnd( 4 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetRGBStroke( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ), ( HPDF_REAL ) hb_parnd( 3 ), ( HPDF_REAL ) hb_parnd( 4 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_SetCMYKFill( hPage, nC, nM, nY, nK ) -> hStatus */ HB_FUNC( HPDF_PAGE_SETCMYKFILL ) { - hb_retnl( (long) HPDF_Page_SetCMYKFill( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ), (HPDF_REAL) hb_parnd( 3 ), (HPDF_REAL) hb_parnd( 4 ), (HPDF_REAL) hb_parnd( 5 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetCMYKFill( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ), ( HPDF_REAL ) hb_parnd( 3 ), ( HPDF_REAL ) hb_parnd( 4 ), ( HPDF_REAL ) hb_parnd( 5 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_SetCMYKStroke( hPage, nC, nM, nY, nK ) -> hStatus */ HB_FUNC( HPDF_PAGE_SETCMYKSTROKE ) { - hb_retnl( (long) HPDF_Page_SetCMYKStroke( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ), (HPDF_REAL) hb_parnd( 3 ), (HPDF_REAL) hb_parnd( 4 ), (HPDF_REAL) hb_parnd( 5 ) ) ); + hb_retnl( ( long ) HPDF_Page_SetCMYKStroke( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ), ( HPDF_REAL ) hb_parnd( 3 ), ( HPDF_REAL ) hb_parnd( 4 ), ( HPDF_REAL ) hb_parnd( 5 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_ExecuteXObject( hPage, hImage ) -> hStatus */ HB_FUNC( HPDF_PAGE_EXECUTEXOBJECT ) { - hb_retnl( (long) HPDF_Page_ExecuteXObject( (HPDF_Page) hb_parptr( 1 ), (HPDF_Image) hb_parptr( 2 ) ) ); + hb_retnl( ( long ) HPDF_Page_ExecuteXObject( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_Image ) hb_parptr( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_DrawImage( hPage, hImage, nX, nY, nWidth, nHeight ) -> hStatus */ HB_FUNC( HPDF_PAGE_DRAWIMAGE ) { - hb_retnl( (long) HPDF_Page_DrawImage( (HPDF_Page) hb_parptr( 1 ), (HPDF_Image) hb_parptr( 2 ), (HPDF_REAL) hb_parnd( 3 ), (HPDF_REAL) hb_parnd( 4 ), (HPDF_REAL) hb_parnd( 5 ), (HPDF_REAL) hb_parnd( 6 ) ) ); + hb_retnl( ( long ) HPDF_Page_DrawImage( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_Image ) hb_parptr( 2 ), ( HPDF_REAL ) hb_parnd( 3 ), ( HPDF_REAL ) hb_parnd( 4 ), ( HPDF_REAL ) hb_parnd( 5 ), ( HPDF_REAL ) hb_parnd( 6 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_Circle( hPage, nX, nY, nRay ) -> hStatus */ HB_FUNC( HPDF_PAGE_CIRCLE ) { - hb_retnl( (long) HPDF_Page_Circle( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ), (HPDF_REAL) hb_parnd( 3 ), (HPDF_REAL) hb_parnd( 4 ) ) ); + hb_retnl( ( long ) HPDF_Page_Circle( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ), ( HPDF_REAL ) hb_parnd( 3 ), ( HPDF_REAL ) hb_parnd( 4 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_Arc( hPage, nX, nY, nRay, nAngle1, nAngle2 ) -> hStatus */ HB_FUNC( HPDF_PAGE_ARC ) { - hb_retnl( (long) HPDF_Page_Arc( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ), (HPDF_REAL) hb_parnd( 3 ), (HPDF_REAL) hb_parnd( 4 ), (HPDF_REAL) hb_parnd( 5 ), (HPDF_REAL) hb_parnd( 6 ) ) ); + hb_retnl( ( long ) HPDF_Page_Arc( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ), ( HPDF_REAL ) hb_parnd( 3 ), ( HPDF_REAL ) hb_parnd( 4 ), ( HPDF_REAL ) hb_parnd( 5 ), ( HPDF_REAL ) hb_parnd( 6 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_Ellipse( hPage, nX, nY, nxRay, nyRay ) -> hStatus */ HB_FUNC( HPDF_PAGE_ELLIPSE ) { - hb_retnl( (long) HPDF_Page_Ellipse( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ), (HPDF_REAL) hb_parnd( 3 ), (HPDF_REAL) hb_parnd( 4 ), (HPDF_REAL) hb_parnd( 5 ) ) ); + hb_retnl( ( long ) HPDF_Page_Ellipse( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ), ( HPDF_REAL ) hb_parnd( 3 ), ( HPDF_REAL ) hb_parnd( 4 ), ( HPDF_REAL ) hb_parnd( 5 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Page_TextRect( hPage, nLeft, nTop, nRight, nBottom, cText, nAlign ) -> hStatus */ HB_FUNC( HPDF_PAGE_TEXTRECT ) { - hb_retnl( (long) HPDF_Page_TextRect( (HPDF_Page) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ), (HPDF_REAL) hb_parnd( 3 ), (HPDF_REAL) hb_parnd( 4 ), (HPDF_REAL) hb_parnd( 5 ), hb_parc( 6 ), (HPDF_TextAlignment) hb_parni( 7 ), NULL ) ); + hb_retnl( ( long ) HPDF_Page_TextRect( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ), ( HPDF_REAL ) hb_parnd( 3 ), ( HPDF_REAL ) hb_parnd( 4 ), ( HPDF_REAL ) hb_parnd( 5 ), hb_parc( 6 ), ( HPDF_TextAlignment ) hb_parni( 7 ), NULL ) ); } /*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/ @@ -1455,21 +1453,21 @@ HB_FUNC( HPDF_PAGE_TEXTRECT ) */ HB_FUNC( HPDF_FONT_GETFONTNAME ) { - hb_retc( HPDF_Font_GetFontName( (HPDF_Font) hb_parptr( 1 ) ) ); + hb_retc( HPDF_Font_GetFontName( ( HPDF_Font ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Font_GetEncodingName( hFont ) -> cEncoding */ HB_FUNC( HPDF_FONT_GETENCODINGNAME ) { - hb_retc( HPDF_Font_GetEncodingName( (HPDF_Font) hb_parptr( 1 ) ) ); + hb_retc( HPDF_Font_GetEncodingName( ( HPDF_Font ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Font_GetUnicodeWidth( hFont, hUnicode ) -> nCharWidth */ HB_FUNC( HPDF_FONT_GETUNICODEWIDTH ) { - hb_retnl( (long) HPDF_Font_GetUnicodeWidth( (HPDF_Font) hb_parptr( 1 ), (HPDF_UNICODE) hb_parni( 2 ) ) ); + hb_retnl( ( long ) HPDF_Font_GetUnicodeWidth( ( HPDF_Font ) hb_parptr( 1 ), ( HPDF_UNICODE ) hb_parni( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Font_GetBBox( hFont ) -> aRect @@ -1479,7 +1477,7 @@ HB_FUNC( HPDF_FONT_GETBBOX ) HPDF_Box rc; PHB_ITEM info = hb_itemArrayNew( 4 ); - rc = HPDF_Font_GetBBox( (HPDF_Font) hb_parptr( 1 ) ); + rc = HPDF_Font_GetBBox( ( HPDF_Font ) hb_parptr( 1 ) ); hb_arraySetND( info, 1, rc.left ); hb_arraySetND( info, 2, rc.top ); @@ -1493,28 +1491,28 @@ HB_FUNC( HPDF_FONT_GETBBOX ) */ HB_FUNC( HPDF_FONT_GETASCENT ) { - hb_retni( (int) HPDF_Font_GetAscent( (HPDF_Font) hb_parptr( 1 ) ) ); + hb_retni( ( int ) HPDF_Font_GetAscent( ( HPDF_Font ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Font_GetDescent( hFont ) -> nDescent */ HB_FUNC( HPDF_FONT_GETDESCENT ) { - hb_retni( (int) HPDF_Font_GetDescent( (HPDF_Font) hb_parptr( 1 ) ) ); + hb_retni( ( int ) HPDF_Font_GetDescent( ( HPDF_Font ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Font_GetXHeight( hFont ) -> nXHeight */ HB_FUNC( HPDF_FONT_GETXHEIGHT ) { - hb_retnl( (long) HPDF_Font_GetXHeight( (HPDF_Font) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Font_GetXHeight( ( HPDF_Font ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Font_GetCapHeight( hFont ) -> nCapsHeight */ HB_FUNC( HPDF_FONT_GETCAPHEIGHT ) { - hb_retnl( (long) HPDF_Font_GetCapHeight( (HPDF_Font) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Font_GetCapHeight( ( HPDF_Font ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Font_TextWidth( hFont, cText, nWidth ) -> aTextWidth[ nNumChars, nNumWords, nWidth, nNumSpace ] @@ -1524,7 +1522,7 @@ HB_FUNC( HPDF_FONT_TEXTWIDTH ) HPDF_TextWidth tw; PHB_ITEM info = hb_itemArrayNew( 4 ); - tw = HPDF_Font_TextWidth( (HPDF_Font) hb_parptr( 1 ), (HPDF_BYTE*) hb_parc( 2 ), hb_parni( 3 ) ); + tw = HPDF_Font_TextWidth( ( HPDF_Font ) hb_parptr( 1 ), ( HPDF_BYTE * ) hb_parc( 2 ), hb_parni( 3 ) ); hb_arraySetNI( info, 1, tw.numchars ); hb_arraySetNI( info, 2, tw.numwords ); @@ -1538,13 +1536,13 @@ HB_FUNC( HPDF_FONT_TEXTWIDTH ) */ HB_FUNC( HPDF_FONT_MEASURETEXT ) { - hb_retni( HPDF_Font_MeasureText( (HPDF_Font) hb_parptr( 1 ), - (HPDF_BYTE*) hb_parc( 2 ), + hb_retni( HPDF_Font_MeasureText( ( HPDF_Font ) hb_parptr( 1 ), + ( HPDF_BYTE * ) hb_parc( 2 ), hb_parni( 3 ), - (HPDF_REAL) hb_parnd( 4 ), - (HPDF_REAL) hb_parnd( 5 ), - (HPDF_REAL) hb_parnd( 6 ), - (HPDF_REAL) hb_parnd( 7 ), + ( HPDF_REAL ) hb_parnd( 4 ), + ( HPDF_REAL ) hb_parnd( 5 ), + ( HPDF_REAL ) hb_parnd( 6 ), + ( HPDF_REAL ) hb_parnd( 7 ), hb_parl( 8 ), NULL ) ); } @@ -1564,7 +1562,7 @@ HB_FUNC( HPDF_FONT_MEASURETEXT ) */ HB_FUNC( HPDF_ENCODER_GETTYPE ) { - hb_retni( (int) HPDF_Encoder_GetType( (HPDF_Encoder) hb_parptr( 1 ) ) ); + hb_retni( ( int ) HPDF_Encoder_GetType( ( HPDF_Encoder ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Encoder_GetByteType( hEncoder, cText, nIndex ) -> nByteType @@ -1576,14 +1574,14 @@ HB_FUNC( HPDF_ENCODER_GETTYPE ) */ HB_FUNC( HPDF_ENCODER_GETBYTETYPE ) { - hb_retni( (int) HPDF_Encoder_GetByteType( (HPDF_Encoder) hb_parptr( 1 ), hb_parc( 2 ), hb_parni( 3 ) ) ); + hb_retni( ( int ) HPDF_Encoder_GetByteType( ( HPDF_Encoder ) hb_parptr( 1 ), hb_parc( 2 ), hb_parni( 3 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Encoder_GetUnicode( hEncoder, nCode ) -> nUnicode */ HB_FUNC( HPDF_ENCODER_GETUNICODE ) { - hb_retni( (int) HPDF_Encoder_GetUnicode( (HPDF_Encoder) hb_parptr( 1 ), hb_parni( 2 ) ) ); + hb_retni( ( int ) HPDF_Encoder_GetUnicode( ( HPDF_Encoder ) hb_parptr( 1 ), ( HPDF_UINT16 ) hb_parni( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Encoder_GetWritingMode( hEncoder ) -> nWriteMode @@ -1593,7 +1591,7 @@ HB_FUNC( HPDF_ENCODER_GETUNICODE ) */ HB_FUNC( HPDF_ENCODER_GETWRITINGMODE ) { - hb_retni( (int) HPDF_Encoder_GetWritingMode( (HPDF_Encoder) hb_parptr( 1 ) ) ); + hb_retni( ( int ) HPDF_Encoder_GetWritingMode( ( HPDF_Encoder ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/ @@ -1611,14 +1609,14 @@ HB_FUNC( HPDF_ENCODER_GETWRITINGMODE ) */ HB_FUNC( HPDF_LINKANNOT_SETHIGHLIGHTMODE ) { - hb_retnl( (long) HPDF_LinkAnnot_SetHighlightMode( (HPDF_Annotation) hb_parptr( 1 ), (HPDF_AnnotHighlightMode) hb_parni( 2 ) ) ); + hb_retnl( ( long ) HPDF_LinkAnnot_SetHighlightMode( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_AnnotHighlightMode ) hb_parni( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_LinkAnnot_SetBorderStyle( hAnnot, nWidth, nDashOn, nDashOff ) -> hStatus */ HB_FUNC( HPDF_LINKANNOT_SETBORDERSTYLE ) { - hb_retnl( (long) HPDF_LinkAnnot_SetBorderStyle( (HPDF_Annotation) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ), hb_parni( 3 ), hb_parni( 4 ) ) ); + hb_retnl( ( long ) HPDF_LinkAnnot_SetBorderStyle( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ), ( HPDF_UINT16 ) hb_parni( 3 ), ( HPDF_UINT16 ) hb_parni( 4 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_TextAnnot_SetIcon( hAnnot, nIconID ) -> hStatus @@ -1633,14 +1631,14 @@ HB_FUNC( HPDF_LINKANNOT_SETBORDERSTYLE ) */ HB_FUNC( HPDF_TEXTANNOT_SETICON ) { - hb_retnl( (long) HPDF_TextAnnot_SetIcon( (HPDF_Annotation) hb_parptr( 1 ), (HPDF_AnnotIcon) hb_parni( 2 ) ) ); + hb_retnl( ( long ) HPDF_TextAnnot_SetIcon( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_AnnotIcon ) hb_parni( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_TextAnnot_SetOpened( hAnnot, lOpened ) -> hStatus */ HB_FUNC( HPDF_TEXTANNOT_SETOPENED ) { - hb_retnl( (long) HPDF_TextAnnot_SetOpened( (HPDF_Annotation) hb_parptr( 1 ), hb_parl( 2 ) ) ); + hb_retnl( ( long ) HPDF_TextAnnot_SetOpened( ( HPDF_Annotation ) hb_parptr( 1 ), hb_parl( 2 ) ) ); } /*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/ @@ -1653,14 +1651,14 @@ HB_FUNC( HPDF_TEXTANNOT_SETOPENED ) */ HB_FUNC( HPDF_OUTLINE_SETOPENED ) { - hb_retnl( (long) HPDF_Outline_SetOpened( (HPDF_Outline) hb_parptr( 1 ), hb_parl( 2 ) ) ); + hb_retnl( ( long ) HPDF_Outline_SetOpened( ( HPDF_Outline ) hb_parptr( 1 ), hb_parl( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Outline_SetDestination( hOutline, hDestn ) -> hStatus */ HB_FUNC( HPDF_OUTLINE_SETDESTINATION ) { - hb_retnl( (long) HPDF_Outline_SetDestination( (HPDF_Outline) hb_parptr( 1 ), (HPDF_Destination) hb_parptr( 2 ) ) ); + hb_retnl( ( long ) HPDF_Outline_SetDestination( ( HPDF_Outline ) hb_parptr( 1 ), ( HPDF_Destination ) hb_parptr( 2 ) ) ); } /*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/ @@ -1673,56 +1671,56 @@ HB_FUNC( HPDF_OUTLINE_SETDESTINATION ) */ HB_FUNC( HPDF_DESTINATION_SETXYZ ) { - hb_retnl( (long) HPDF_Destination_SetXYZ( (HPDF_Destination) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ), (HPDF_REAL) hb_parnd( 3 ), (HPDF_REAL) hb_parnd( 4 ) ) ); + hb_retnl( ( long ) HPDF_Destination_SetXYZ( ( HPDF_Destination ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ), ( HPDF_REAL ) hb_parnd( 3 ), ( HPDF_REAL ) hb_parnd( 4 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Destination_SetFit( hDestn ) -> hStatus */ HB_FUNC( HPDF_DESTINATION_SETFIT ) { - hb_retnl( (long) HPDF_Destination_SetFit( (HPDF_Destination) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Destination_SetFit( ( HPDF_Destination ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Destination_SetFitH( hDestn, nTop ) -> hStatus */ HB_FUNC( HPDF_DESTINATION_SETFITH ) { - hb_retnl( (long) HPDF_Destination_SetFitH( (HPDF_Destination) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ) ) ); + hb_retnl( ( long ) HPDF_Destination_SetFitH( ( HPDF_Destination ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Destination_SetFitV( hDestn, nLeft ) -> hStatus */ HB_FUNC( HPDF_DESTINATION_SETFITV ) { - hb_retnl( (long) HPDF_Destination_SetFitV( (HPDF_Destination) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ) ) ); + hb_retnl( ( long ) HPDF_Destination_SetFitV( ( HPDF_Destination ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Destination_SetFitR( hDestn, nLeft, nBottom, nRight, nTop ) -> hStatus */ HB_FUNC( HPDF_DESTINATION_SETFITR ) { - hb_retnl( (long) HPDF_Destination_SetFitR( (HPDF_Destination) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ), (HPDF_REAL) hb_parnd( 3 ), (HPDF_REAL) hb_parnd( 4 ), (HPDF_REAL) hb_parnd( 5 ) ) ); + hb_retnl( ( long ) HPDF_Destination_SetFitR( ( HPDF_Destination ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ), ( HPDF_REAL ) hb_parnd( 3 ), ( HPDF_REAL ) hb_parnd( 4 ), ( HPDF_REAL ) hb_parnd( 5 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Destination_SetFitB( hDestn ) -> hStatus */ HB_FUNC( HPDF_DESTINATION_SETFITB ) { - hb_retnl( (long) HPDF_Destination_SetFitB( (HPDF_Destination) hb_parptr( 1 ) ) ); + hb_retnl( ( long ) HPDF_Destination_SetFitB( ( HPDF_Destination ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Destination_SetFitBH( hDestn, nTop ) -> hStatus */ HB_FUNC( HPDF_DESTINATION_SETFITBH ) { - hb_retnl( (long) HPDF_Destination_SetFitBH( (HPDF_Destination) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ) ) ); + hb_retnl( ( long ) HPDF_Destination_SetFitBH( ( HPDF_Destination ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Destination_SetFitBV( hDestn, nTop ) -> hStatus */ HB_FUNC( HPDF_DESTINATION_SETFITBV ) { - hb_retnl( (long) HPDF_Destination_SetFitBV( (HPDF_Destination) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ) ) ); + hb_retnl( ( long ) HPDF_Destination_SetFitBV( ( HPDF_Destination ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) ); } /*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/ @@ -1738,7 +1736,7 @@ HB_FUNC( HPDF_IMAGE_GETSIZE ) HPDF_Point pt; PHB_ITEM info = hb_itemArrayNew( 2 ); - pt = HPDF_Image_GetSize( (HPDF_Image) hb_parptr( 1 ) ); + pt = HPDF_Image_GetSize( ( HPDF_Image ) hb_parptr( 1 ) ); hb_arraySetND( info, 1, pt.x ); hb_arraySetND( info, 2, pt.y ); @@ -1750,35 +1748,35 @@ HB_FUNC( HPDF_IMAGE_GETSIZE ) */ HB_FUNC( HPDF_IMAGE_GETWIDTH ) { - hb_retni( HPDF_Image_GetWidth( (HPDF_Image) hb_parptr( 1 ) ) ); + hb_retni( HPDF_Image_GetWidth( ( HPDF_Image ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Image_GetHeight( hImage ) -> nHeight */ HB_FUNC( HPDF_IMAGE_GETHEIGHT ) { - hb_retni( HPDF_Image_GetHeight( (HPDF_Image) hb_parptr( 1 ) ) ); + hb_retni( HPDF_Image_GetHeight( ( HPDF_Image ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Image_GetBitsPerComponent( hImage ) -> nBitsPerComponent */ HB_FUNC( HPDF_IMAGE_GETBITSPERCOMPONENT ) { - hb_retni( HPDF_Image_GetBitsPerComponent( (HPDF_Image) hb_parptr( 1 ) ) ); + hb_retni( HPDF_Image_GetBitsPerComponent( ( HPDF_Image ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Image_GetColorSpace( hImage ) -> nColorSpace */ HB_FUNC( HPDF_IMAGE_GETCOLORSPACE ) { - hb_retc( HPDF_Image_GetColorSpace( (HPDF_Image) hb_parptr( 1 ) ) ); + hb_retc( HPDF_Image_GetColorSpace( ( HPDF_Image ) hb_parptr( 1 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_Image_SetColorMask( hImage, nRGB_R_Min, nRGB_R_Max, nRGB_G_Min, nRGB_G_Max, nRGB_B_Min, nRGB_B_Max ) */ HB_FUNC( HPDF_IMAGE_SETCOLORMASK ) { - hb_retnl( (long) HPDF_Image_SetColorMask( (HPDF_Image) hb_parptr( 1 ), + hb_retnl( ( long ) HPDF_Image_SetColorMask( ( HPDF_Image ) hb_parptr( 1 ), hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), @@ -1792,7 +1790,7 @@ HB_FUNC( HPDF_IMAGE_SETCOLORMASK ) */ HB_FUNC( HPDF_IMAGE_SETMASKIMAGE ) { - hb_retnl( (long) HPDF_Image_SetMaskImage( (HPDF_Image) hb_parptr( 1 ), (HPDF_Image) hb_parptr( 2 ) ) ); + hb_retnl( ( long ) HPDF_Image_SetMaskImage( ( HPDF_Image ) hb_parptr( 1 ), ( HPDF_Image ) hb_parptr( 2 ) ) ); } /*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/ @@ -1805,14 +1803,14 @@ HB_FUNC( HPDF_IMAGE_SETMASKIMAGE ) */ HB_FUNC( HPDF_EXTGSTATE_SETALPHASTROKE ) { - hb_retnl( (long) HPDF_ExtGState_SetAlphaStroke( (HPDF_ExtGState) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ) ) ); + hb_retnl( ( long ) HPDF_ExtGState_SetAlphaStroke( ( HPDF_ExtGState ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_ExtGState_SetAlphaFill( hGState, nValue ) -> hStatus */ HB_FUNC( HPDF_EXTGSTATE_SETALPHAFILL ) { - hb_retnl( (long) HPDF_ExtGState_SetAlphaFill( (HPDF_ExtGState) hb_parptr( 1 ), (HPDF_REAL) hb_parnd( 2 ) ) ); + hb_retnl( ( long ) HPDF_ExtGState_SetAlphaFill( ( HPDF_ExtGState ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* HPDF_ExtGState_SetBlendMode( hGState, nBlendMode ) -> hStatus @@ -1832,6 +1830,6 @@ HB_FUNC( HPDF_EXTGSTATE_SETALPHAFILL ) */ HB_FUNC( HPDF_EXTGSTATE_SETBLENDMODE ) { - hb_retnl( (long) HPDF_ExtGState_SetBlendMode( (HPDF_ExtGState) hb_parptr( 1 ), (HPDF_BlendMode) hb_parni( 2 ) ) ); + hb_retnl( ( long ) HPDF_ExtGState_SetBlendMode( ( HPDF_ExtGState ) hb_parptr( 1 ), ( HPDF_BlendMode ) hb_parni( 2 ) ) ); } /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbmisc/hb_f.c b/harbour/contrib/hbmisc/hb_f.c index 000b92adc6..4aae837512 100644 --- a/harbour/contrib/hbmisc/hb_f.c +++ b/harbour/contrib/hbmisc/hb_f.c @@ -57,40 +57,38 @@ #define b_size 4096 #define c_size 4096 -static long hb_hbfskip( int recs ); - -static long last_rec[10]; -static long recno[10]; -static long offset[10]; -static int handles[10]; -static int area = 0; -static char *b; -static char *c; -static long last_off[10]; -static long lastbyte[10]; -static int isEof[10]; +static long last_rec[ 10 ]; +static long recno[ 10 ]; +static long offset[ 10 ]; +static HB_FHANDLE handles[ 10 ]; +static int area = 0; +static char * b; +static char * c; +static long last_off[ 10 ]; +static long lastbyte[ 10 ]; +static int isEof[ 10 ]; HB_FUNC( HB_FUSE ) { - PHB_ITEM arg1_it = hb_param(1,HB_IT_STRING); - PHB_ITEM arg2_it = hb_param(2,HB_IT_NUMERIC); + PHB_ITEM arg1_it = hb_param( 1, HB_IT_STRING ); + PHB_ITEM arg2_it = hb_param( 2, HB_IT_NUMERIC ); int open_flags; if ( arg1_it ) { if( arg2_it ) - open_flags = hb_parni(2); + open_flags = hb_parni( 2 ); else open_flags = 0; - handles[area] = hb_fsOpen( ( BYTE * ) hb_parc(1), open_flags ); + handles[area] = hb_fsOpen( ( BYTE * ) hb_parc( 1 ), ( SHORT ) open_flags ); offset[area] = 0; recno[area] = 1; - b = ( char * )hb_xgrab( b_size ); - c = ( char * )hb_xgrab( c_size ); - lastbyte[area] = hb_fsSeek( handles[area], 0L, FS_END ); - isEof[area] = (lastbyte[area] == 0); - hb_retni( handles[area] ); + b = ( char * ) hb_xgrab( b_size ); + c = ( char * ) hb_xgrab( c_size ); + lastbyte[area] = hb_fsSeek( handles[ area ], 0L, FS_END ); + isEof[area] = ( lastbyte[ area ] == 0 ); + hb_retni( handles[ area ] ); } else { hb_fsClose( handles[area] ); @@ -110,15 +108,10 @@ HB_FUNC( HB_FUSE ) HB_FUNC( HB_FRECNO ) { - hb_retnl( recno[area] ); + hb_retnl( recno[ area ] ); } -HB_FUNC( HB_FSKIP ) -{ - hb_hbfskip( ISNUM( 1 ) ? hb_parni(1) : 1 ); -} - static long hb_hbfskip( int recs ) { long read_pos; @@ -186,6 +179,11 @@ static long hb_hbfskip( int recs ) return ( recno[area] ); } +HB_FUNC( HB_FSKIP ) +{ + hb_hbfskip( ISNUM( 1 ) ? hb_parni(1) : 1 ); +} + HB_FUNC( HB_FREADLN ) { int x; diff --git a/harbour/contrib/hbmzip/hbmzip.c b/harbour/contrib/hbmzip/hbmzip.c index 95931e99af..d5d1094580 100644 --- a/harbour/contrib/hbmzip/hbmzip.c +++ b/harbour/contrib/hbmzip/hbmzip.c @@ -949,12 +949,12 @@ static int hb_unzipExtractCurrentFile( unzFile hUnzip, const char* szFileName, c FILETIME ftutc, ft; SYSTEMTIME st; - st.wSecond = ufi.tmu_date.tm_sec; - st.wMinute = ufi.tmu_date.tm_min; - st.wHour = ufi.tmu_date.tm_hour; - st.wDay = ufi.tmu_date.tm_mday; - st.wMonth = ufi.tmu_date.tm_mon + 1; - st.wYear = ufi.tmu_date.tm_year; + st.wSecond = ( WORD ) ufi.tmu_date.tm_sec; + st.wMinute = ( WORD ) ufi.tmu_date.tm_min; + st.wHour = ( WORD ) ufi.tmu_date.tm_hour; + st.wDay = ( WORD ) ufi.tmu_date.tm_mday; + st.wMonth = ( WORD ) ufi.tmu_date.tm_mon + 1; + st.wYear = ( WORD ) ufi.tmu_date.tm_year; st.wMilliseconds = 0; if( SystemTimeToFileTime( &st, &ft ) && diff --git a/harbour/contrib/hbnf/descendn.c b/harbour/contrib/hbnf/descendn.c index 315aa089e8..e259c7b138 100644 --- a/harbour/contrib/hbnf/descendn.c +++ b/harbour/contrib/hbnf/descendn.c @@ -53,10 +53,10 @@ HB_FUNC( FT_DESCEND ) #if defined(HB_OS_DOS) || defined(HB_OS_WIN_32) { - auto PHB_ITEM iP = hb_itemParam( 1 ); - auto USHORT uiType = hb_itemType( iP ); + auto PHB_ITEM iP = hb_itemParam( 1 ); + auto HB_TYPE uiType = hb_itemType( iP ); - auto PHB_ITEM iR = NULL; + auto PHB_ITEM iR = NULL; auto USHORT uiLen, n; auto char * pDescend; diff --git a/harbour/contrib/hbnf/dispc.c b/harbour/contrib/hbnf/dispc.c index 3f9fb151fd..ce88584975 100644 --- a/harbour/contrib/hbnf/dispc.c +++ b/harbour/contrib/hbnf/dispc.c @@ -357,7 +357,7 @@ static void disp_update(int offset) line += 1; offset += 2; } - hb_gtRest( sline, scol, eline, ecol, vseg ); + hb_gtRest( ( SHORT ) sline, ( SHORT ) scol, ( SHORT ) eline, ( SHORT ) ecol, vseg ); } @@ -557,7 +557,7 @@ HB_FUNC( _FT_DFINIT ) hb_gtRectSize( sline, scol, eline, ecol, &ulSize ); vseg = (char * ) hb_xalloc( ulSize ); if (vseg != NULL) - hb_gtSave( sline, scol, eline, ecol, vseg ); + hb_gtSave( ( SHORT ) sline, ( SHORT ) scol, ( SHORT ) eline, ( SHORT ) ecol, vseg ); maxlin = hb_parni(12); buffsize = hb_parni(13); /* yes - load value */ @@ -643,7 +643,7 @@ HB_FUNC( _FT_DFINIT ) for (i = 1; i < j; i++) linedown(); - hb_gtRest( sline, scol, eline, ecol, vseg ); + hb_gtRest( ( SHORT ) sline, ( SHORT ) scol, ( SHORT ) eline, ( SHORT ) ecol, vseg ); } @@ -740,7 +740,7 @@ HB_FUNC( FT_DISPFILE ) for (i = 0; i < height; i++) chattr(0, i, width, norm); - hb_gtRest( sline, scol, eline, ecol, vseg ); + hb_gtRest( ( SHORT ) sline, ( SHORT ) scol, ( SHORT ) eline, ( SHORT ) ecol, vseg ); /* main processing loop -- terminated by user key press */ @@ -749,16 +749,16 @@ HB_FUNC( FT_DISPFILE ) if ( refresh == YES ) /* redraw window contents? */ disp_update(wintop); - hb_gtRest( sline, scol, eline, ecol, vseg ); + hb_gtRest( ( SHORT ) sline, ( SHORT ) scol, ( SHORT ) eline, ( SHORT ) ecol, vseg ); /* if not browse, highlight the current line */ if ( brows == NO ) chattr(0, winrow - sline, width, hlight); - hb_gtRest( sline, scol, eline, ecol, vseg ); + hb_gtRest( ( SHORT ) sline, ( SHORT ) scol, ( SHORT ) eline, ( SHORT ) ecol, vseg ); - hb_gtSetPos( winrow, scol ); + hb_gtSetPos( ( SHORT ) winrow, ( SHORT ) scol ); ch = keyin(); /* get user key press */ @@ -767,7 +767,7 @@ HB_FUNC( FT_DISPFILE ) if ( brows == NO ) chattr(0, winrow - sline, width, norm); - hb_gtRest( sline, scol, eline, ecol, vseg ); + hb_gtRest( ( SHORT ) sline, ( SHORT ) scol, ( SHORT ) eline, ( SHORT ) ecol, vseg ); /* figure out what the user wants to do */ diff --git a/harbour/contrib/hbnf/ftattr.c b/harbour/contrib/hbnf/ftattr.c index 372fe6ee3e..8069c1af07 100644 --- a/harbour/contrib/hbnf/ftattr.c +++ b/harbour/contrib/hbnf/ftattr.c @@ -173,12 +173,12 @@ End HB_FUNC( FT_SAVEATT ) { - USHORT uiTop = hb_parni( 1 ); /* Defaults to zero on bad type */ - USHORT uiLeft = hb_parni( 2 ); /* Defaults to zero on bad type */ + USHORT uiTop = ( USHORT ) hb_parni( 1 ); /* Defaults to zero on bad type */ + USHORT uiLeft = ( USHORT ) hb_parni( 2 ); /* Defaults to zero on bad type */ USHORT uiMaxRow = hb_gtMaxRow(); USHORT uiMaxCol = hb_gtMaxCol(); - USHORT uiBottom = ISNUM( 3 ) ? hb_parni( 3 ) : uiMaxRow; - USHORT uiRight = ISNUM( 4 ) ? hb_parni( 4 ) : uiMaxRow; + USHORT uiBottom = ISNUM( 3 ) ? ( USHORT ) hb_parni( 3 ) : uiMaxRow; + USHORT uiRight = ISNUM( 4 ) ? ( USHORT ) hb_parni( 4 ) : uiMaxRow; ULONG ulSize; char * pBuffer; @@ -386,12 +386,12 @@ HB_FUNC( FT_RESTATT ) ULONG ulLen = hb_parclen( 5 ); if( ulLen ) { - USHORT uiTop = hb_parni( 1 ); /* Defaults to zero on bad type */ - USHORT uiLeft = hb_parni( 2 ); /* Defaults to zero on bad type */ + USHORT uiTop = ( USHORT ) hb_parni( 1 ); /* Defaults to zero on bad type */ + USHORT uiLeft = ( USHORT ) hb_parni( 2 ); /* Defaults to zero on bad type */ USHORT uiMaxRow = hb_gtMaxRow(); USHORT uiMaxCol = hb_gtMaxCol(); - USHORT uiBottom = ISNUM( 3 ) ? hb_parni( 3 ) : hb_gtMaxRow(); - USHORT uiRight = ISNUM( 4 ) ? hb_parni( 4 ) : hb_gtMaxCol(); + USHORT uiBottom = ISNUM( 3 ) ? ( USHORT ) hb_parni( 3 ) : hb_gtMaxRow(); + USHORT uiRight = ISNUM( 4 ) ? ( USHORT ) hb_parni( 4 ) : hb_gtMaxCol(); char * pAttrib = hb_parc( 5 ); if( uiBottom > uiMaxRow ) diff --git a/harbour/contrib/hbnf/ftshadow.c b/harbour/contrib/hbnf/ftshadow.c index 0ca8592fad..94384e244f 100644 --- a/harbour/contrib/hbnf/ftshadow.c +++ b/harbour/contrib/hbnf/ftshadow.c @@ -63,6 +63,9 @@ HB_FUNC( FT_SHADOW ) HB_FUNC( FT_SETATTR ) { - hb_gtSetAttribute( hb_parni( 1 ), hb_parni( 2 ), - hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ) ); + hb_gtSetAttribute( ( SHORT ) hb_parni( 1 ), + ( SHORT ) hb_parni( 2 ), + ( SHORT ) hb_parni( 3 ), + ( SHORT ) hb_parni( 4 ), + ( BYTE ) hb_parni( 5 ) ); } diff --git a/harbour/contrib/hbnf/fttext.c b/harbour/contrib/hbnf/fttext.c index e7f34c406a..28e08dd18d 100644 --- a/harbour/contrib/hbnf/fttext.c +++ b/harbour/contrib/hbnf/fttext.c @@ -195,16 +195,16 @@ static int _writeLine( BYTE * theData, int iDataLen ); static BOOL _writeeol( HB_FHANDLE fhnd ); /* arrays used by the text workareas */ -static int area = 0; -static long recno[ TEXT_WORKAREAS]; -static long offset[ TEXT_WORKAREAS]; -static int handles[ TEXT_WORKAREAS]; -static long last_rec[TEXT_WORKAREAS]; -static long last_off[TEXT_WORKAREAS]; -static long lastbyte[TEXT_WORKAREAS]; -static int isBof[ TEXT_WORKAREAS]; -static int isEof[ TEXT_WORKAREAS]; -static int error[ TEXT_WORKAREAS]; +static int area = 0; +static long recno[ TEXT_WORKAREAS]; +static long offset[ TEXT_WORKAREAS]; +static HB_FHANDLE handles[ TEXT_WORKAREAS]; +static long last_rec[TEXT_WORKAREAS]; +static long last_off[TEXT_WORKAREAS]; +static long lastbyte[TEXT_WORKAREAS]; +static int isBof[ TEXT_WORKAREAS]; +static int isEof[ TEXT_WORKAREAS]; +static int error[ TEXT_WORKAREAS]; /* for debugging purposes */ static int doInt = 0; @@ -304,7 +304,7 @@ HB_FUNC( FT_FUSE ) if ( ISCHAR(1) ) { - handles[area] = hb_fsOpen( ( BYTE * ) hb_parc(1), attr ) ; + handles[area] = hb_fsOpen( ( BYTE * ) hb_parc(1), ( USHORT ) attr ) ; if( handles[area] <= 0 ) error[area] = hb_fsError(); offset[area] = 0 ; @@ -954,12 +954,12 @@ static long _ft_skip( long iRecs ) HB_FUNC( FT_FREADLN ) { - USHORT iByteCount; - USHORT iBytesRead; + int iByteCount; + int iBytesRead; BYTE * cPtr = ( BYTE * ) hb_xgrab( BUFFSIZE ); hb_fsSeek( handles[area], offset[area], FS_SET ); - iBytesRead = (int) hb_fsRead( handles[area], cPtr, BUFFSIZE ); + iBytesRead = (int) hb_fsReadLarge( handles[area], cPtr, BUFFSIZE ); error[area] = 0; @@ -1044,7 +1044,7 @@ HB_FUNC( FT_FDELETE ) iBytesRead = hb_fsRead( handles[area], Buff , BUFFSIZE ); /* now read in a big glob */ srcPtr += iBytesRead; hb_fsSeek( handles[area], destPtr, FS_SET ); - destPtr += hb_fsWrite( handles[area], Buff, iBytesRead ); + destPtr += hb_fsWriteLarge( handles[area], Buff, iBytesRead ); } while( iBytesRead > 0 ); @@ -1383,7 +1383,7 @@ HB_FUNC( FT_FWRITEL ) _del_buff( iLineLen - iDataLen - 2 ); /* write the new record's contents */ - hb_fsWrite( handles[area], theData, iDataLen ); + hb_fsWriteLarge( handles[area], theData, iDataLen ); } else { @@ -1391,7 +1391,7 @@ HB_FUNC( FT_FWRITEL ) _ins_buff( iDataLen - iLineLen + 2 ); /* write the new record's contents */ - hb_fsWrite( handles[area], theData, iDataLen ); + hb_fsWriteLarge( handles[area], theData, iDataLen ); } error[area] = hb_fsError(); err = (error[area]) ? 0 : 1; @@ -1799,7 +1799,7 @@ _fbolerr: */ } /* end _findbol() */ -/*ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ*/ +/*--------------------------------------------------------------------------*/ /* inserts xxx bytes into the current file, beginning at the current record */ /* the contents of the inserted bytes are indeterminate, i.e. you'll have to write to them before they mean anything */ @@ -1844,7 +1844,7 @@ static int _ins_buff( int iLen ) break; } - SaveLen = hb_fsWrite( handles[area], WriteBuff, WriteLen ); + SaveLen = hb_fsWriteLarge( handles[area], WriteBuff, WriteLen ); if( !SaveLen ) { @@ -1896,7 +1896,7 @@ static int _ins_buff( int iLen ) -/*ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ*/ +/*--------------------------------------------------------------------------*/ /* deletes xxx bytes from the current file, beginning at the current record */ static int _del_buff( int iLen ) { @@ -1920,7 +1920,7 @@ static int _del_buff( int iLen ) { /* position to beginning of write area */ hb_fsSeek( handles[area], fpWrite, FS_SET ); - SaveLen = hb_fsWrite( handles[area], WriteBuff, WriteLen ); + SaveLen = hb_fsWriteLarge( handles[area], WriteBuff, WriteLen ); /* move write pointer */ fpWrite += SaveLen; @@ -1954,13 +1954,13 @@ static int _del_buff( int iLen ) /* _del_buff */ -/*ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ*/ +/*--------------------------------------------------------------------------*/ /* writes a line of data to the file, including the terminating CRLF */ static int _writeLine( BYTE * theData, int iDataLen ) { int err = 0; - if( !( hb_fsWrite( handles[area], theData, iDataLen ) == iDataLen ) ) + if( !( hb_fsWriteLarge( handles[area], theData, iDataLen ) == iDataLen ) ) { err = 1; error[area] = hb_fsError(); @@ -1979,7 +1979,7 @@ static BOOL _writeeol( HB_FHANDLE fhnd ) char * crlf = hb_conNewLine(); int len = strlen( crlf ); - return hb_fsWrite( fhnd, ( BYTE * ) crlf, len ) == len; + return hb_fsWriteLarge( fhnd, ( BYTE * ) crlf, len ) == len; } /* fttext.c eof */ diff --git a/harbour/contrib/hbodbc/odbc.c b/harbour/contrib/hbodbc/odbc.c index f06a04ab0c..5839411bde 100644 --- a/harbour/contrib/hbodbc/odbc.c +++ b/harbour/contrib/hbodbc/odbc.c @@ -198,11 +198,11 @@ HB_FUNC( SQLCONNECT ) /* HB_SQLCONNECT( hDbc, cDSN, cUseName, cPassword ) --> nR HB_TCHAR_FREE( lpPassword ); #else ret = SQLConnect( ( HDBC ) hb_parptr( 1 ), - (unsigned char*) hb_parcx( 2 ), + ( unsigned char * ) hb_parcx( 2 ), ( SQLSMALLINT ) hb_parclen( 2 ), - (unsigned char*) hb_parcx( 3 ), + ( unsigned char * ) hb_parcx( 3 ), ( SQLSMALLINT ) hb_parclen( 3 ), - (unsigned char*) hb_parcx( 4 ), + ( unsigned char * ) hb_parcx( 4 ), ( SQLSMALLINT ) hb_parclen( 4 ) ); #endif hb_retni( ret ); @@ -233,7 +233,7 @@ HB_FUNC( SQLALLOCST ) /* HB_SQLALLOCSTMT( hDbc, @hStmt ) --> nRetCode */ HB_FUNC( SQLFREESTM ) /* HB_SQLFREESTMT( hStmt, nType ) --> nRetCode */ { - hb_retni( SQLFreeStmt( ( HSTMT ) hb_parptr( 1 ), hb_parni( 2 ) ) ); + hb_retni( SQLFreeStmt( ( HSTMT ) hb_parptr( 1 ), ( SQLUSMALLINT ) hb_parni( 2 ) ) ); } HB_FUNC( SQLEXECDIR ) /* HB_SQLEXECDIRECT( hStmt, cStatement ) --> nRetCode */ @@ -243,7 +243,7 @@ HB_FUNC( SQLEXECDIR ) /* HB_SQLEXECDIRECT( hStmt, cStatement ) --> nRetCode */ hb_retni( SQLExecDirect( ( HSTMT ) hb_parptr( 1 ), lpStr, hb_parclen( 2 ) ) ); HB_TCHAR_FREE( lpStr ); #else - hb_retni( SQLExecDirect( ( HSTMT ) hb_parptr( 1 ), (unsigned char*) hb_parcx( 2 ), hb_parclen( 2 ) ) ); + hb_retni( SQLExecDirect( ( HSTMT ) hb_parptr( 1 ), ( unsigned char * ) hb_parcx( 2 ), hb_parclen( 2 ) ) ); #endif } @@ -259,7 +259,7 @@ HB_FUNC( SQLGETDATA ) /* HB_SQLGETDATA( hStmt, nField, nType, nLen, @cBuffer ) - WORD wType, wResult; int iReallocs = 0; - wType = hb_parni( 3 ); + wType = ( WORD ) hb_parni( 3 ); if( !wType ) wType = ( WORD ) SQL_BINARY; lLen = ( SQLLEN ) hb_parnl( 4 ); @@ -273,7 +273,7 @@ HB_FUNC( SQLGETDATA ) /* HB_SQLGETDATA( hStmt, nField, nType, nLen, @cBuffer ) - wResult = ! SQL_NO_DATA; while( wResult != SQL_NO_DATA ) { - wResult = SQLGetData( ( HSTMT ) hb_parptr( 1 ), hb_parni( 2 ), wType, ( PTR ) bBuffer, lLen, &lLen ); + wResult = SQLGetData( ( HSTMT ) hb_parptr( 1 ), ( SQLUSMALLINT ) hb_parni( 2 ), wType, ( PTR ) bBuffer, lLen, &lLen ); if( wResult == SQL_SUCCESS && iReallocs == 0 ) { hb_storclen( ( LPSTR ) bBuffer, ( ULONG ) ( lLen < 0 ? 0 : ( lLen < hb_parnl( 4 ) ? lLen : hb_parnl( 4 ) ) ), 5 ); @@ -334,11 +334,11 @@ HB_FUNC( SQLNUMRES ) HB_FUNC( SQLDESCRIB ) { SDWORD lLen = ( SDWORD ) hb_parnl( 4 ); - SQLSMALLINT wBufLen = hb_parni( 5 ); - SQLSMALLINT wDataType = hb_parni( 6 ); + SQLSMALLINT wBufLen = ( SQLUSMALLINT ) hb_parni( 5 ); + SQLSMALLINT wDataType = ( SQLUSMALLINT ) hb_parni( 6 ); SQLULEN wColSize = hb_parni( 7 ); - SQLSMALLINT wDecimals = hb_parni( 8 ); - SQLSMALLINT wNullable = hb_parni( 9 ); + SQLSMALLINT wDecimals = ( SQLUSMALLINT ) hb_parni( 8 ); + SQLSMALLINT wNullable = ( SQLUSMALLINT ) hb_parni( 9 ); #if defined( HB_OS_WIN_32 ) && defined( UNICODE ) LPTSTR buffer = ( LPTSTR ) hb_xgrab( lLen * sizeof( TCHAR ) ); #else @@ -347,7 +347,7 @@ HB_FUNC( SQLDESCRIB ) WORD wResult; wResult = SQLDescribeCol( ( HSTMT ) hb_parptr( 1 ), - hb_parni( 2 ), + ( SQLUSMALLINT ) hb_parni( 2 ), buffer, ( SQLSMALLINT ) lLen, &wBufLen, @@ -384,17 +384,17 @@ HB_FUNC( SQLCOLATTRIBUTE ) { SDWORD lLen = ( SDWORD ) hb_parnl( 5 ); PTR bBuffer = hb_xgrab( lLen ); - SQLSMALLINT wBufLen = hb_parni( 6 ); + SQLSMALLINT wBufLen = ( SQLUSMALLINT ) hb_parni( 6 ); #if defined(__DMC__) SQLINTEGER wNumPtr = hb_parni( 7 ); #else SQLLEN wNumPtr = hb_parni( 7 ); #endif WORD wResult = SQLColAttribute( ( HSTMT ) hb_parptr( 1 ), - hb_parni( 2 ), - hb_parni( 3 ), - (unsigned char*) bBuffer, - hb_parni( 5 ), + ( SQLUSMALLINT ) hb_parni( 2 ), + ( SQLUSMALLINT ) hb_parni( 3 ), + ( unsigned char * ) bBuffer, + ( SQLUSMALLINT ) hb_parni( 5 ), &wBufLen, &wNumPtr ); @@ -418,7 +418,7 @@ HB_FUNC( SQLEXTENDE ) #else SQLULEN uiRowCountPtr = hb_parni( 4 ); #endif - SQLUSMALLINT siRowStatus = hb_parni( 5 ); + SQLUSMALLINT siRowStatus = ( SQLUSMALLINT ) hb_parni( 5 ); WORD wResult = SQLExtendedFetch( ( HSTMT ) hb_parptr( 1 ), ( USHORT ) hb_parnl( 2 ), ( USHORT ) hb_parnl( 3 ), @@ -466,7 +466,7 @@ HB_FUNC( SQLERROR ) /* hEnv, hDbc, hStmt, @ cErrorClass, @ nType, @ cErrorMsg */ hb_storc( szStr, 4 ); HB_TCHAR_FREE( szStr ); #else - hb_storc( (char *) buffer, 4 ); + hb_storc( ( char * ) buffer, 4 ); #endif } hb_stornl( ( LONG ) lError, 5 ); @@ -477,7 +477,7 @@ HB_FUNC( SQLERROR ) /* hEnv, hDbc, hStmt, @ cErrorClass, @ nType, @ cErrorMsg */ hb_storc( szStr, 6 ); HB_TCHAR_FREE( szStr ); #else - hb_storc( (char *) szErrorMsg, 6 ); + hb_storc( ( char * ) szErrorMsg, 6 ); #endif } } @@ -602,7 +602,7 @@ HB_FUNC( SQLPREPARE ) /* HB_SQLPREPARE( hStmt, cStatement ) --> nRetCode */ hb_retni( SQLPrepare( ( HSTMT ) hb_parptr( 1 ), lpStr, SQL_NTS ) ); HB_TCHAR_FREE( lpStr ); #else - hb_retni( SQLPrepare( ( HSTMT ) hb_parptr( 1 ), (unsigned char*) hb_parcx( 2 ), SQL_NTS ) ); + hb_retni( SQLPrepare( ( HSTMT ) hb_parptr( 1 ), ( unsigned char * ) hb_parcx( 2 ), SQL_NTS ) ); #endif } @@ -627,7 +627,7 @@ HB_FUNC( SQLEXECUTESCALAR ) wResult = SQLExecDirect( ( HSTMT ) hStmt, lpStr, SQL_NTS ); HB_TCHAR_FREE( lpStr ); #else - wResult = SQLExecDirect( ( HSTMT ) hStmt, (unsigned char*) hb_parcx( 1 ), SQL_NTS ); + wResult = SQLExecDirect( ( HSTMT ) hStmt, ( unsigned char * ) hb_parcx( 1 ), SQL_NTS ); #endif if( wResult == SQL_SUCCESS || wResult == SQL_SUCCESS_WITH_INFO ) { @@ -635,7 +635,7 @@ HB_FUNC( SQLEXECUTESCALAR ) if( wResult != SQL_NO_DATA ) { wResult = SQLGetData( ( HSTMT ) hStmt, 1, SQL_C_CHAR, bBuffer, sizeof( bBuffer ), &lLen ); - hb_storc( (char *)bBuffer, 3 ); + hb_storc( ( char * ) bBuffer, 3 ); } } } @@ -649,7 +649,7 @@ HB_FUNC( SQLSTOD ) { if( hb_parclen( 1 ) >= 10 ) { - char *szSqlDate = hb_parc( 1 ); /* YYYY-MM-DD */ + char * szSqlDate = hb_parc( 1 ); /* YYYY-MM-DD */ char szHrbDate[9]; /* YYYYMMDD */ szHrbDate[ 0 ] = szSqlDate[ 0 ]; diff --git a/harbour/contrib/hbole/ole2.c b/harbour/contrib/hbole/ole2.c index 6ca8f3a376..533280a729 100644 --- a/harbour/contrib/hbole/ole2.c +++ b/harbour/contrib/hbole/ole2.c @@ -114,7 +114,7 @@ static LPSTR DblToDate( double nDate, char * cDate ) static LPWSTR AnsiToWide( LPCSTR cAnsi ) { - unsigned short wLen; + unsigned int wLen; LPWSTR cString; wLen = MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, cAnsi, -1, 0, 0 ); @@ -126,7 +126,7 @@ static LPWSTR AnsiToWide( LPCSTR cAnsi ) static LPSTR WideToAnsi( LPWSTR cWide ) { - unsigned short wLen; + unsigned int wLen; LPSTR cString; wLen = WideCharToMultiByte( CP_ACP, 0, ( LPWSTR ) cWide, -1, @@ -191,10 +191,10 @@ static void GetParams( DISPPARAMS * dParams ) case HB_IT_LOGICAL: #if !defined(__BORLANDC__) && !defined(__XCC__) && !defined(NONAMELESSUNION) pArgs[ n ].vt = VT_BOOL; - pArgs[ n ].boolVal = hb_parl( nArg ); + pArgs[ n ].boolVal = hb_parl( nArg ) ? VARIANT_TRUE : VARIANT_FALSE; #else pArgs[ n ].n1.n2.vt = VT_BOOL; - pArgs[ n ].n1.n2.n3.boolVal = hb_parl( nArg ); + pArgs[ n ].n1.n2.n3.boolVal = hb_parl( nArg ) ? VARIANT_TRUE : VARIANT_FALSE; #endif break; @@ -289,7 +289,7 @@ static void RetValue( void ) break; case VT_BOOL: - hb_retl( s_RetVal.boolVal ); + hb_retl( s_RetVal.boolVal == VARIANT_TRUE ); break; case VT_DISPATCH: @@ -329,7 +329,7 @@ static void RetValue( void ) break; case VT_BOOL: - hb_retl( s_RetVal.n1.n2.n3.boolVal ); + hb_retl( s_RetVal.n1.n2.n3.boolVal == VARIANT_TRUE ); break; case VT_DISPATCH: diff --git a/harbour/contrib/hbw32/dllcall.c b/harbour/contrib/hbw32/dllcall.c index 9e32a5e8e5..fbf042cf80 100644 --- a/harbour/contrib/hbw32/dllcall.c +++ b/harbour/contrib/hbw32/dllcall.c @@ -231,7 +231,7 @@ typedef struct DYNAPARM SHORT usArg; /* 2-byte argument */ DWORD dwArg; /* 4-byte argument */ double dArg; /* double argument */ - }; + } numargs; void * pArg; /* Pointer to argument */ } DYNAPARM; @@ -299,7 +299,7 @@ RESULT DynaCall( int iFlags, LPVOID lpFunction, int nArgs, else { /* Arg has the real arg */ - dwVal = *( (DWORD *)( (BYTE *) ( &( Parm[nInd].dwArg ) ) + ( nLoops * 4 ) ) ); + dwVal = *( (DWORD *)( (BYTE *) ( &( Parm[nInd].numargs.dwArg ) ) + ( nLoops * 4 ) ) ); } /* Do push dwVal */ @@ -502,17 +502,17 @@ static void DllExec( int iFlags, int iRtype, LPVOID lpFunction, PXPP_DLLEXEC xec case HB_IT_NIL: Parm[ iCnt ].nWidth = sizeof( void * ); /* TOFIX: Store NULL pointer in pointer variable. */ - Parm[ iCnt ].dwArg = 0; + Parm[ iCnt ].numargs.dwArg = 0; break; case HB_IT_POINTER: Parm[ iCnt ].nWidth = sizeof( void * ); /* TOFIX: Store pointer in pointer variable. */ - Parm[ iCnt ].dwArg = ( DWORD ) hb_itemGetPtr( pParam ); + Parm[ iCnt ].numargs.dwArg = ( DWORD ) hb_itemGetPtr( pParam ); if( hb_parinfo( i ) & HB_IT_BYREF ) { - Parm[ iCnt ].pArg = &( Parm[ iCnt ].dwArg ); + Parm[ iCnt ].pArg = &( Parm[ iCnt ].numargs.dwArg ); Parm[ iCnt ].dwFlags = DC_FLAG_ARGPTR; /* use the pointer */ } break; @@ -522,23 +522,23 @@ static void DllExec( int iFlags, int iRtype, LPVOID lpFunction, PXPP_DLLEXEC xec case HB_IT_DATE: case HB_IT_LOGICAL: Parm[ iCnt ].nWidth = sizeof( DWORD ); - Parm[ iCnt ].dwArg = ( DWORD ) hb_itemGetNL( pParam ); + Parm[ iCnt ].numargs.dwArg = ( DWORD ) hb_itemGetNL( pParam ); if( hb_parinfo( i ) & HB_IT_BYREF ) { - Parm[ iCnt ].pArg = &( Parm[ iCnt ].dwArg ); + Parm[ iCnt ].pArg = &( Parm[ iCnt ].numargs.dwArg ); Parm[ iCnt ].dwFlags = DC_FLAG_ARGPTR; /* use the pointer */ } break; case HB_IT_DOUBLE: Parm[ iCnt ].nWidth = sizeof( double ); - Parm[ iCnt ].dArg = hb_itemGetND( pParam ); + Parm[ iCnt ].numargs.dArg = hb_itemGetND( pParam ); if( hb_parinfo( i ) & HB_IT_BYREF ) { Parm[ iCnt ].nWidth = sizeof( void * ); - Parm[ iCnt ].pArg = &( Parm[ iCnt ].dArg ); + Parm[ iCnt ].pArg = &( Parm[ iCnt ].numargs.dArg ); Parm[ iCnt ].dwFlags = DC_FLAG_ARGPTR; /* use the pointer */ } @@ -569,7 +569,7 @@ static void DllExec( int iFlags, int iRtype, LPVOID lpFunction, PXPP_DLLEXEC xec if( strncmp( hb_objGetClsName( hb_param( i, HB_IT_ANY ) ), "C Structure", 11 ) == 0 ) { Parm[ iCnt ].nWidth = sizeof( void * ); - Parm[ iCnt ].dwArg = ( DWORD ) hb_parcstruct( i ); + Parm[ iCnt ].numargs.dwArg = ( DWORD ) hb_parcstruct( i ); break; } #endif @@ -598,22 +598,22 @@ static void DllExec( int iFlags, int iRtype, LPVOID lpFunction, PXPP_DLLEXEC xec switch( HB_ITEM_TYPE( hb_param( i, HB_IT_ANY ) ) ) { case HB_IT_NIL: - hb_stornl( Parm[ iCnt ].dwArg, i ); + hb_stornl( Parm[ iCnt ].numargs.dwArg, i ); break; case HB_IT_POINTER: - hb_storptr( ( void * ) Parm[ iCnt ].dwArg, i ); + hb_storptr( ( void * ) Parm[ iCnt ].numargs.dwArg, i ); break; case HB_IT_INTEGER: case HB_IT_LONG: case HB_IT_DATE: case HB_IT_LOGICAL: - hb_stornl( Parm[ iCnt ].dwArg, i ); + hb_stornl( Parm[ iCnt ].numargs.dwArg, i ); break; case HB_IT_DOUBLE: - hb_stornd( Parm[ iCnt ].dArg, i ); + hb_stornd( Parm[ iCnt ].numargs.dArg, i ); break; case HB_IT_STRING: diff --git a/harbour/contrib/hbw32/tprinter.c b/harbour/contrib/hbw32/tprinter.c index 02ba92c02e..9a51b17df2 100644 --- a/harbour/contrib/hbw32/tprinter.c +++ b/harbour/contrib/hbw32/tprinter.c @@ -326,7 +326,8 @@ LONG hb_PrintFileRaw( UCHAR * cPrinterName, UCHAR * cFileName, UCHAR * cDocName UCHAR printBuffer[BIG_PRINT_BUFFER]; HANDLE hPrinter, hFile; DOC_INFO_1 DocInfo; - DWORD nRead, nWritten, Result; + DWORD nRead, nWritten; + LONG Result; LPTSTR lpPrinterName = HB_TCHAR_CONVTO( ( char * ) cPrinterName ); if( OpenPrinter( lpPrinterName, &hPrinter, NULL ) != 0 ) @@ -388,7 +389,7 @@ LONG hb_PrintFileRaw( UCHAR * cPrinterName, UCHAR * cFileName, UCHAR * cDocName HB_FUNC( PRINTFILERAW ) { UCHAR *cPrinterName, *cFileName, *cDocName; - DWORD Result = -1; + LONG Result = -1; if( ISCHAR( 1 ) && ISCHAR( 2 ) ) { diff --git a/harbour/contrib/rddads/ads1.c b/harbour/contrib/rddads/ads1.c index f4ef9193f9..0e598fa320 100644 --- a/harbour/contrib/rddads/ads1.c +++ b/harbour/contrib/rddads/ads1.c @@ -3645,7 +3645,7 @@ static ERRCODE adsOrderDestroy( ADSAREAP pArea, LPDBORDERINFO pOrderInfo ) static ERRCODE adsOrderInfo( ADSAREAP pArea, USHORT uiIndex, LPDBORDERINFO pOrderInfo ) { - ADSHANDLE hIndex; + ADSHANDLE hIndex = 0; UNSIGNED8 aucBuffer[ MAX_STR_LEN + 1 ]; UNSIGNED16 u16len = MAX_STR_LEN; UNSIGNED16 u16 = 0; diff --git a/harbour/contrib/xhb/cstructc.c b/harbour/contrib/xhb/cstructc.c index 682f5d7883..8b5f3588ac 100644 --- a/harbour/contrib/xhb/cstructc.c +++ b/harbour/contrib/xhb/cstructc.c @@ -243,7 +243,7 @@ static unsigned int SizeOfCStructure( PHB_ITEM aDef, unsigned int uiAlign ) { uiPad = ( ( uiMemberSize < uiAlign ) ? uiMemberSize : uiAlign ); - if( ( cShift = ( uiSize % uiPad ) ) > 0 ) + if( ( cShift = ( BYTE ) ( uiSize % uiPad ) ) > 0 ) { uiSize += ( uiPad - cShift ); } @@ -255,7 +255,7 @@ static unsigned int SizeOfCStructure( PHB_ITEM aDef, unsigned int uiAlign ) } - if( ( cShift = ( uiSize % uiAlign ) ) > 0 ) + if( ( cShift = ( BYTE ) ( uiSize % uiAlign ) ) > 0 ) { uiSize += ( uiAlign - cShift ); } @@ -484,7 +484,7 @@ static BYTE * ArrayToStructure( PHB_ITEM aVar, PHB_ITEM aDef, unsigned int uiAli { unsigned int uiPad = ( ( uiMemberSize < uiAlign ) ? uiMemberSize : uiAlign ); - if( ( cShift = ( uiOffset % uiPad ) ) > 0 ) + if( ( cShift = ( BYTE ) ( uiOffset % uiPad ) ) > 0 ) { uiOffset += ( uiPad - cShift ); } @@ -1168,7 +1168,7 @@ static PHB_ITEM StructureToArray( BYTE* Buffer, unsigned long ulBufferLen, PHB_I { unsigned int uiPad = ( ( uiMemberSize < uiAlign ) ? uiMemberSize : uiAlign ); - if( ( cShift = ( uiOffset % uiPad ) ) > 0 ) + if( ( cShift = ( BYTE ) ( uiOffset % uiPad ) ) > 0 ) { uiOffset += ( uiPad - cShift ); } diff --git a/harbour/contrib/xhb/hbxml.c b/harbour/contrib/xhb/hbxml.c index 3435223535..9847ea35c6 100644 --- a/harbour/contrib/xhb/hbxml.c +++ b/harbour/contrib/xhb/hbxml.c @@ -239,7 +239,7 @@ static MXML_STATUS mxml_attribute_read( MXML_REFIL *ref, PHB_ITEM pDoc, PHB_ITEM default: if ( isalpha( chr ) ) { - if ( mxml_sgs_append_char( buf_name, chr ) != MXML_STATUS_OK ) + if ( mxml_sgs_append_char( buf_name, ( char ) chr ) != MXML_STATUS_OK ) { hbxml_set_doc_status( ref, pDoc, pNode, MXML_STATUS_MALFORMED, MXML_ERROR_NAMETOOLONG ); @@ -258,7 +258,7 @@ static MXML_STATUS mxml_attribute_read( MXML_REFIL *ref, PHB_ITEM pDoc, PHB_ITEM case 1: if ( isalnum( chr ) || chr == '_' || chr == '-' || chr == ':' ) { - if ( mxml_sgs_append_char( buf_name, chr ) != MXML_STATUS_OK ) + if ( mxml_sgs_append_char( buf_name, ( char ) chr ) != MXML_STATUS_OK ) { hbxml_set_doc_status( ref, pDoc, pNode, MXML_STATUS_MALFORMED, MXML_ERROR_NAMETOOLONG ); @@ -335,12 +335,12 @@ static MXML_STATUS mxml_attribute_read( MXML_REFIL *ref, PHB_ITEM pDoc, PHB_ITEM { iStatus = 5; iPosAmper = buf_attrib->length; - mxml_sgs_append_char( buf_attrib, chr ); /* we'll need it */ + mxml_sgs_append_char( buf_attrib, ( char ) chr ); /* we'll need it */ } else if( chr == MXML_LINE_TERMINATOR ) { hbxml_doc_new_line( pDoc ); - if ( mxml_sgs_append_char( buf_attrib, chr ) != MXML_STATUS_OK ) + if ( mxml_sgs_append_char( buf_attrib, ( char ) chr ) != MXML_STATUS_OK ) { hbxml_set_doc_status( ref, pDoc, pNode, MXML_STATUS_MALFORMED, MXML_ERROR_ATTRIBTOOLONG ); @@ -350,7 +350,7 @@ static MXML_STATUS mxml_attribute_read( MXML_REFIL *ref, PHB_ITEM pDoc, PHB_ITEM /* We repeat line terminator here for portability */ else { - if ( mxml_sgs_append_char( buf_attrib, chr) != MXML_STATUS_OK ) + if ( mxml_sgs_append_char( buf_attrib, ( char ) chr ) != MXML_STATUS_OK ) { hbxml_set_doc_status( ref, pDoc, pNode, MXML_STATUS_MALFORMED, MXML_ERROR_ATTRIBTOOLONG ); return MXML_STATUS_MALFORMED; @@ -382,7 +382,7 @@ static MXML_STATUS mxml_attribute_read( MXML_REFIL *ref, PHB_ITEM pDoc, PHB_ITEM else if ( strncmp( bp, "apos", iAmpLen ) == 0 ) chr = '\''; /** Reducing an SGS length is legal */ buf_attrib->length = iPosAmper; - mxml_sgs_append_char( buf_attrib, chr ); + mxml_sgs_append_char( buf_attrib, ( char ) chr ); } else if ( ! isalpha( chr ) ) { @@ -392,7 +392,7 @@ static MXML_STATUS mxml_attribute_read( MXML_REFIL *ref, PHB_ITEM pDoc, PHB_ITEM } else { - if ( mxml_sgs_append_char( buf_attrib, chr ) != MXML_STATUS_OK ) + if ( mxml_sgs_append_char( buf_attrib, ( char ) chr ) != MXML_STATUS_OK ) { hbxml_set_doc_status( ref, pDoc, pNode, MXML_STATUS_MALFORMED, MXML_ERROR_ATTRIBTOOLONG ); return MXML_STATUS_MALFORMED; @@ -818,7 +818,7 @@ static void mxml_node_read_data( MXML_REFIL *ref, PHB_ITEM pNode, PHB_ITEM doc, hbxml_doc_new_line( doc ); } - buf[ iPos++ ] = chr; + buf[ iPos++ ] = ( char ) chr; if ( iPos >= iAllocated ) { iAllocated += MXML_ALLOC_BLOCK; @@ -894,7 +894,7 @@ static MXML_STATUS mxml_node_read_name( MXML_REFIL *ref, PHB_ITEM pNode, PHB_ITE case 0: if ( isalpha( chr ) ) { /* can't cause reallocations */ - buf[ iPos++ ] = chr; + buf[ iPos++ ] = ( char ) chr; iStatus = 1; } else @@ -909,7 +909,7 @@ static MXML_STATUS mxml_node_read_name( MXML_REFIL *ref, PHB_ITEM pNode, PHB_ITE if ( isalnum( chr ) || chr == '_' || chr == '-' || chr == ':' ) { /* can't cause reallocations */ - buf[ iPos++ ] = chr; + buf[ iPos++ ] = ( char ) chr; } else if ( chr == '>' || chr == ' ' || chr == '/' || chr == '\r' || chr == '\t' || chr == '\n' ) @@ -1003,7 +1003,7 @@ static void mxml_node_read_directive( MXML_REFIL *ref, PHB_ITEM pNode, PHB_ITEM chr = mxml_refil_getc( ref ); while ( chr != MXML_EOF && chr != '>') { if ( iPos > 0 || ( chr != ' ' && chr != '\t' && chr != '\r' && chr != '\n' ) ) - buf[ iPos++ ] = chr; + buf[ iPos++ ] = ( char ) chr; if ( iPos >= iAllocated ) { iAllocated += MXML_ALLOC_BLOCK; @@ -1070,13 +1070,13 @@ static void mxml_node_read_pi( MXML_REFIL *ref, PHB_ITEM pNode, PHB_ITEM doc ) if ( chr == MXML_LINE_TERMINATOR ) { hbxml_doc_new_line( doc ); - buf[ iPos ++ ] = chr; + buf[ iPos ++ ] = ( char ) chr; } else if ( chr == '?' ) iStatus = 1; else { if ( iPos > 0 || ( chr != ' ' && chr != '\n' ) ) - buf[ iPos++ ] = chr; + buf[ iPos++ ] = ( char ) chr; } break; @@ -1136,7 +1136,7 @@ static void mxml_node_read_tag( MXML_REFIL *ref, PHB_ITEM pNode, PHB_ITEM doc, /* if the list of attributes terminates with a '/', the last '>' is left unread. This means the current node is complete. */ - chr = mxml_refil_getc( ref ); + chr = ( char ) mxml_refil_getc( ref ); if ( ref->status == MXML_STATUS_OK && chr != '>' ) { mxml_refil_ungetc( ref, chr ); @@ -1180,12 +1180,12 @@ static void mxml_node_read_comment( MXML_REFIL *ref, PHB_ITEM pNode, PHB_ITEM do if ( chr == MXML_LINE_TERMINATOR ) { hbxml_doc_new_line( doc ); - buf[ iPos ++ ] = chr; + buf[ iPos ++ ] = ( char ) chr; } else if ( chr == '-' ) iStatus = 1; else - buf[ iPos++ ] = chr; + buf[ iPos++ ] = ( char ) chr; break; case 1: @@ -1353,12 +1353,12 @@ static void mxml_node_read_cdata( MXML_REFIL *ref, PHB_ITEM pNode, PHB_ITEM pDoc if ( chr == MXML_LINE_TERMINATOR ) { hbxml_doc_new_line( pDoc ); - buf[ iPos ++ ] = chr; + buf[ iPos ++ ] = ( char ) chr; } else if ( chr == ']' ) iStatus = 1; else - buf[ iPos++ ] = chr; + buf[ iPos++ ] = ( char ) chr; break; case 1: @@ -1421,7 +1421,7 @@ static int mxml_node_read_closing( MXML_REFIL *ref, PHB_ITEM pNode, PHB_ITEM doc chr = mxml_refil_getc( ref ); while ( chr != MXML_EOF && chr != '>' && iPos < iLen) { - buf[ iPos++ ] = chr; + buf[ iPos++ ] = ( char ) chr; chr = mxml_refil_getc( ref ); } @@ -1966,7 +1966,7 @@ static void mxml_output_func_to_handle( MXML_OUTPUT *out, char *s, int len ) HB_FHANDLE fh = out->u.hFile; int olen; - olen = hb_fsWrite( fh, (BYTE *) s, len ); + olen = hb_fsWriteLarge( fh, (BYTE *) s, len ); if ( olen < len ) { @@ -2121,7 +2121,7 @@ static void mxml_refill_from_handle_func( MXML_REFIL *ref ) HB_FHANDLE fh = ( HB_FHANDLE ) ref->u.hFile; int len; - len = hb_fsRead( fh, (BYTE *) ref->buffer, ref->bufsize ); + len = hb_fsReadLarge( fh, (BYTE *) ref->buffer, ref->bufsize ); if ( len == -1 ) { diff --git a/harbour/contrib/xhb/xhbmsgs.c b/harbour/contrib/xhb/xhbmsgs.c index 56e0ba097a..0fffca89d1 100644 --- a/harbour/contrib/xhb/xhbmsgs.c +++ b/harbour/contrib/xhb/xhbmsgs.c @@ -151,7 +151,7 @@ HB_FUNC( XHB_INDEX ) if( HB_IS_VALID_INDEX( ulIndex, ulLen ) ) { char cValue = HB_IS_STRING( pValue ) ? hb_itemGetCPtr( pValue )[0] : - hb_itemGetNI( pValue ); + ( char ) hb_itemGetNI( pValue ); if( ulLen == 1 ) hb_itemPutCL( pSelf, &cValue, 1 ); else @@ -221,7 +221,7 @@ HB_FUNC( XHB_PLUS ) pValue && HB_IS_NUMERIC( pValue ) ) { UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pSelf )[0]; - uc += hb_itemGetNI( pValue ); + uc += ( UCHAR ) hb_itemGetNI( pValue ); hb_retclen( ( char * ) &uc, 1 ); } else if( HB_IS_HASH( pSelf ) && HB_IS_HASH( pValue ) ) @@ -254,7 +254,7 @@ HB_FUNC( XHB_MINUS ) pValue && HB_IS_NUMERIC( pValue ) ) { UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pSelf )[0]; - uc -= hb_itemGetNI( pValue ); + uc -= ( UCHAR ) hb_itemGetNI( pValue ); hb_retclen( ( char * ) &uc, 1 ); } else if( HB_IS_HASH( pSelf ) && HB_IS_HASH( pValue ) ) diff --git a/harbour/doc/whatsnew.txt b/harbour/doc/whatsnew.txt index 0efa84ee29..c04a9e6205 100644 --- a/harbour/doc/whatsnew.txt +++ b/harbour/doc/whatsnew.txt @@ -145,7 +145,8 @@ Core work, but it lets build the rest of Harbour (like hbrun.exe). - PCRE lib upgraded to 7.8 RC1 (from 7.7) - Fixed dbInfo( DBI_POSITIONED ) returned value. -- Fixed potential internal error in dirty index reading. +- Fixed internal error in dirty index reading. +- Fixed return value of HB_INETGETSNDBUFSIZE(). Contrib ============================= @@ -193,6 +194,7 @@ Contrib implementation, this new one is completely portable and fixes some potential leaks and GPFs. This code could use some more testing, be aware. +- hbbmcdx fixed internal error in dirty index reading. Known build issues ============================= diff --git a/harbour/utils/hbmake/hbmgauge.c b/harbour/utils/hbmake/hbmgauge.c index 956869f913..037a497cfe 100644 --- a/harbour/utils/hbmake/hbmgauge.c +++ b/harbour/utils/hbmake/hbmgauge.c @@ -70,11 +70,11 @@ static void hb_gaugeUpdate( PHB_ITEM pArray, float fPercent ) { - int iCenter = ( ( hb_arrayGetNL( pArray, B_RIGHT ) - hb_arrayGetNL( pArray, B_LEFT ) ) / 2 ) + 1; - int iRatio = hb_arrayGetNL( pArray, B_RIGHT ) - hb_arrayGetNL( pArray, B_LEFT ) - 1; - int iRow; - int iCols; - int iMax; + SHORT iCenter = ( SHORT ) ( ( ( hb_arrayGetNI( pArray, B_RIGHT ) - hb_arrayGetNI( pArray, B_LEFT ) ) / 2 ) + 1 ); + SHORT iRatio = ( SHORT ) ( hb_arrayGetNI( pArray, B_RIGHT ) - hb_arrayGetNI( pArray, B_LEFT ) - 1 ); + SHORT iRow; + SHORT iCols; + SHORT iMax; char szOldColor[ HB_CLRSTR_LEN ]; char * szStr = " "; char szPct[ 5 ]; @@ -83,25 +83,29 @@ static void hb_gaugeUpdate( PHB_ITEM pArray, float fPercent ) hb_gtSetColorStr( hb_arrayGetCPtr( pArray, B_BARCOLOR ) ); fPercent = ( fPercent < 0 ? 0 : ( fPercent > 1 ? 1 : fPercent ) ); - iCols = (int) (fPercent * iRatio); + iCols = ( SHORT ) ( fPercent * iRatio ); if( hb_arrayGetL( pArray, B_DISPLAYNUM ) ) { snprintf( szPct, sizeof( szPct ), "%3.0f%%", fPercent * 100 ); - hb_gtWriteAt( (USHORT) hb_arrayGetNL( pArray, B_TOP ), - (USHORT) iCenter + 2, (BYTE *) szPct, 4 ); + hb_gtWriteAt( ( SHORT ) hb_arrayGetNI( pArray, B_TOP ), + iCenter + 2, + ( BYTE * ) szPct, 4 ); } - hb_gtBox( hb_arrayGetNI( pArray, B_TOP ) + 1, hb_arrayGetNI( pArray, B_LEFT ) + 1, - hb_arrayGetNI( pArray, B_BOTTOM ) - 1, hb_arrayGetNI( pArray, B_RIGHT ) - 1, + hb_gtBox( ( SHORT ) hb_arrayGetNI( pArray, B_TOP ) + 1, + ( SHORT ) hb_arrayGetNI( pArray, B_LEFT ) + 1, + ( SHORT ) hb_arrayGetNI( pArray, B_BOTTOM ) - 1, + ( SHORT ) hb_arrayGetNI( pArray, B_RIGHT ) - 1, ( BYTE * ) szStr ); - iMax = hb_arrayGetNL( pArray, B_BOTTOM ) - hb_arrayGetNL( pArray, B_TOP ) - 1; + iMax = ( SHORT ) ( hb_arrayGetNI( pArray, B_BOTTOM ) - hb_arrayGetNI( pArray, B_TOP ) - 1 ); for( iRow = 1; iRow <= iMax; iRow++ ) { - hb_gtRepChar( (USHORT) (iRow + hb_arrayGetNL( pArray, B_TOP )), - (USHORT) (hb_arrayGetNL( pArray, B_LEFT ) + 1), - ( BYTE ) * hb_arrayGetCPtr( pArray, B_BARCHAR ), iCols ); + hb_gtRepChar( ( SHORT ) ( hb_arrayGetNI( pArray, B_TOP ) + iRow ), + ( SHORT ) ( hb_arrayGetNI( pArray, B_LEFT ) + 1 ), + ( BYTE ) * hb_arrayGetCPtr( pArray, B_BARCHAR ), + iCols ); } hb_gtSetColorStr( szOldColor ); @@ -146,28 +150,29 @@ HB_FUNC( GAUGEDISPLAY ) if( pArray ) { - int iCenter = ( ( hb_arrayGetNL( pArray, B_RIGHT ) - hb_arrayGetNL( pArray, B_LEFT ) ) / 2 ) + 1; + SHORT iCenter = ( SHORT ) ( ( ( hb_arrayGetNI( pArray, B_RIGHT ) - hb_arrayGetNI( pArray, B_LEFT ) ) / 2 ) + 1 ); char szOldColor[ HB_CLRSTR_LEN ]; char * szStr = " "; hb_gtGetColorStr( szOldColor ); hb_gtSetColorStr( hb_arrayGetCPtr( pArray, B_BACKCOLOR ) ); - hb_gtBox( (SHORT) hb_arrayGetNL( pArray, B_TOP ), - (SHORT) hb_arrayGetNL( pArray, B_LEFT ), - (SHORT) hb_arrayGetNL( pArray, B_BOTTOM ), - (SHORT) hb_arrayGetNL( pArray, B_RIGHT ), - (BYTE *) szStr ); + hb_gtBox( ( SHORT) hb_arrayGetNI( pArray, B_TOP ), + ( SHORT) hb_arrayGetNI( pArray, B_LEFT ), + ( SHORT) hb_arrayGetNI( pArray, B_BOTTOM ), + ( SHORT) hb_arrayGetNI( pArray, B_RIGHT ), + ( BYTE * ) szStr ); - hb_gtBox( (SHORT) hb_arrayGetNL( pArray, B_TOP ), - (SHORT) hb_arrayGetNL( pArray, B_LEFT ), - (SHORT) hb_arrayGetNL( pArray, B_BOTTOM ), - (SHORT) hb_arrayGetNL( pArray, B_RIGHT ), - (BYTE *) B_BOXLINES ); + hb_gtBox( ( SHORT ) hb_arrayGetNI( pArray, B_TOP ), + ( SHORT ) hb_arrayGetNI( pArray, B_LEFT ), + ( SHORT ) hb_arrayGetNI( pArray, B_BOTTOM ), + ( SHORT ) hb_arrayGetNI( pArray, B_RIGHT ), + ( BYTE * ) B_BOXLINES ); if( hb_arrayGetL( pArray, B_DISPLAYNUM ) ) - hb_gtWriteAt( (USHORT) hb_arrayGetNL( pArray, B_TOP ), - iCenter, ( BYTE * ) "[ ]", 8 ); + hb_gtWriteAt( ( SHORT ) hb_arrayGetNI( pArray, B_TOP ), + iCenter, + ( BYTE * ) "[ ]", 8 ); hb_gtSetColorStr( szOldColor );