2010-02-07 10:32 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbdefs.h
! Fixed typo when restructuring types causing no HB_MAXINT
type in some cases.
* contrib/gtalleg/gtalleg.c
* USHORT -> HB_USHORT
* contrib/hbct/print.c
* contrib/hbnf/descendn.c
* contrib/hbclipsm/gauge.c
* USHORT -> HB_SIZE
* contrib/xhb/txtline.c
* USHORT, int -> HB_SIZE
This commit is contained in:
@@ -17,6 +17,22 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-02-07 10:32 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* include/hbdefs.h
|
||||
! Fixed typo when restructuring types causing no HB_MAXINT
|
||||
type in some cases.
|
||||
|
||||
* contrib/gtalleg/gtalleg.c
|
||||
* USHORT -> HB_USHORT
|
||||
|
||||
* contrib/hbct/print.c
|
||||
* contrib/hbnf/descendn.c
|
||||
* contrib/hbclipsm/gauge.c
|
||||
* USHORT -> HB_SIZE
|
||||
|
||||
* contrib/xhb/txtline.c
|
||||
* USHORT, int -> HB_SIZE
|
||||
|
||||
2010-02-07 02:02 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/pp/ppcore.c
|
||||
* src/vm/macro.c
|
||||
|
||||
@@ -1061,7 +1061,7 @@ static void hb_gt_alleg_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize )
|
||||
{
|
||||
int iColor;
|
||||
HB_BYTE bAttr;
|
||||
USHORT usChar;
|
||||
HB_USHORT usChar;
|
||||
|
||||
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_alleg_Redraw(%p,%d,%d,%d)", pGT, iRow, iCol, iSize ) );
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ static void hb_gaugeUpdate( PHB_ITEM pArray, float fPercent )
|
||||
hb_gtRepChar( hb_arrayGetNI( pArray, B_TOP ) + iRow,
|
||||
hb_arrayGetNI( pArray, B_LEFT ) + 1,
|
||||
* hb_arrayGetCPtr( pArray, B_BARCHAR ),
|
||||
( USHORT ) iCols );
|
||||
( HB_SIZE ) iCols );
|
||||
}
|
||||
|
||||
hb_gtSetColorStr( szOldColor );
|
||||
|
||||
@@ -184,7 +184,7 @@ HB_FUNC( PRINTSEND )
|
||||
}
|
||||
else if( HB_ISCHAR( 1 ) )
|
||||
{
|
||||
const char *string = hb_parcx( 1 );
|
||||
const char * string = hb_parcx( 1 );
|
||||
int i, len = hb_parclen( 1 );
|
||||
|
||||
r.h.ah = 0;
|
||||
@@ -204,7 +204,7 @@ HB_FUNC( PRINTSEND )
|
||||
char szChr[ 2 ] = { ' ', '\0' };
|
||||
char szPort[ 5 ] = { 'l', 'p', 't', '1', '\0' };
|
||||
const char * szStr = NULL;
|
||||
USHORT usLen = 0, usRet = 0;
|
||||
HB_SIZE usLen = 0, usRet = 0;
|
||||
|
||||
if( HB_ISNUM( 1 ) )
|
||||
{
|
||||
@@ -215,7 +215,7 @@ HB_FUNC( PRINTSEND )
|
||||
else if( HB_ISCHAR( 1 ) )
|
||||
{
|
||||
szStr = hb_parc( 1 );
|
||||
usLen = ( USHORT ) hb_parclen( 1 );
|
||||
usLen = hb_parclen( 1 );
|
||||
}
|
||||
|
||||
if( HB_ISNUM( 2 ) )
|
||||
@@ -226,15 +226,15 @@ HB_FUNC( PRINTSEND )
|
||||
HB_FHANDLE hFile = hb_fsOpen( szPort, FO_WRITE );
|
||||
if( hFile != FS_ERROR )
|
||||
{
|
||||
usRet = hb_fsWrite( hFile, szStr, usLen );
|
||||
usRet = hb_fsWriteLarge( hFile, szStr, usLen );
|
||||
hb_fsClose( hFile );
|
||||
}
|
||||
}
|
||||
hb_retni( usRet );
|
||||
hb_retnl( usRet );
|
||||
|
||||
#else
|
||||
|
||||
hb_retni( 0 );
|
||||
hb_retnl( 0 );
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ HB_FUNC( FT_DESCEND )
|
||||
HB_TYPE uiType = hb_itemType( iP );
|
||||
|
||||
PHB_ITEM iR = NULL;
|
||||
USHORT uiLen, n;
|
||||
HB_SIZE uiLen, n;
|
||||
char * pDescend;
|
||||
|
||||
if ( ( uiType & HB_IT_NUMERIC ) && ( uiType & HB_IT_DOUBLE ) )
|
||||
@@ -76,9 +76,9 @@ HB_FUNC( FT_DESCEND )
|
||||
|
||||
else if ( uiType & HB_IT_STRING )
|
||||
{
|
||||
uiLen = ( USHORT ) hb_itemSize( iP );
|
||||
uiLen = hb_itemSize( iP );
|
||||
|
||||
pDescend = ( char *) hb_xgrab( uiLen );
|
||||
pDescend = ( char * ) hb_xgrab( uiLen );
|
||||
|
||||
hb_itemCopyC( iP, pDescend, uiLen );
|
||||
|
||||
|
||||
@@ -56,13 +56,13 @@
|
||||
#include "hbapiitm.h"
|
||||
#include "hbapierr.h"
|
||||
|
||||
void hb_readLine( const char * szText, HB_SIZE ulTextLen, HB_SIZE uiLineLen, USHORT uiTabLen, HB_BOOL bWrap, char ** Term, int * iTermSizes, USHORT uiTerms, HB_BOOL * bFound, HB_BOOL * bEOF, HB_ISIZ * lEnd, HB_SIZE * ulEndOffset )
|
||||
void hb_readLine( const char * szText, HB_SIZE ulTextLen, HB_SIZE uiLineLen, HB_SIZE uiTabLen, HB_BOOL bWrap, char ** Term, HB_SIZE * iTermSizes, HB_SIZE uiTerms, HB_BOOL * bFound, HB_BOOL * bEOF, HB_ISIZ * lEnd, HB_SIZE * ulEndOffset )
|
||||
{
|
||||
USHORT uiPosTerm, uiPosition;
|
||||
HB_SIZE uiPosTerm, uiPosition;
|
||||
HB_SIZE ulPos, ulCurrCol, ulLastBlk;
|
||||
HB_BOOL bBreak = HB_FALSE;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_readLine(%p, %lu, %lu, %hu, %d, %p, %p, %hu, %p, %p, %p, %p)", szText, ulTextLen, uiLineLen, uiTabLen, bWrap, Term, iTermSizes, uiTerms, bFound, bEOF, lEnd, ulEndOffset ));
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_readLine(%p, %lu, %lu, %lu, %d, %p, %p, %lu, %p, %p, %p, %p)", szText, ulTextLen, uiLineLen, uiTabLen, bWrap, Term, iTermSizes, uiTerms, bFound, bEOF, lEnd, ulEndOffset ));
|
||||
|
||||
*bFound = 0;
|
||||
*bEOF = 0;
|
||||
@@ -79,9 +79,7 @@ void hb_readLine( const char * szText, HB_SIZE ulTextLen, HB_SIZE uiLineLen, USH
|
||||
}
|
||||
|
||||
if( uiTabLen == 0 )
|
||||
{
|
||||
uiTabLen = 4;
|
||||
}
|
||||
|
||||
for( ulPos = 0; ulPos < ulTextLen; ulPos++ )
|
||||
{
|
||||
@@ -133,14 +131,10 @@ void hb_readLine( const char * szText, HB_SIZE ulTextLen, HB_SIZE uiLineLen, USH
|
||||
ulPos++;
|
||||
}
|
||||
else
|
||||
{
|
||||
ulCurrCol++;
|
||||
}
|
||||
|
||||
if( *bFound )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if( szText[ulPos] == ' ' || szText[ulPos] == HB_CHAR_HT )
|
||||
{
|
||||
@@ -174,7 +168,7 @@ void hb_readLine( const char * szText, HB_SIZE ulTextLen, HB_SIZE uiLineLen, USH
|
||||
}
|
||||
}
|
||||
|
||||
HB_ISIZ hb_tabexpand( const char * szString, char * szRet, HB_ISIZ lEnd, USHORT uiTabLen )
|
||||
HB_ISIZ hb_tabexpand( const char * szString, char * szRet, HB_ISIZ lEnd, HB_SIZE uiTabLen )
|
||||
{
|
||||
HB_ISIZ lPos, lSpAdded = 0;
|
||||
|
||||
@@ -201,8 +195,8 @@ HB_FUNC( HB_TABEXPAND )
|
||||
{
|
||||
const char * szText = hb_parcx( 1 );
|
||||
HB_ISIZ lStrLen = hb_parclen( 1 );
|
||||
USHORT uiTabLen = ( USHORT ) hb_parni( 2 );
|
||||
USHORT uiTabCount = 0;
|
||||
HB_SIZE uiTabLen = hb_parnl( 2 );
|
||||
HB_SIZE uiTabCount = 0;
|
||||
HB_ISIZ lPos, lSize;
|
||||
char * szRet;
|
||||
|
||||
@@ -232,10 +226,10 @@ HB_FUNC( HB_READLINE )
|
||||
PHB_ITEM pTerm1;
|
||||
const char * szText = hb_parcx( 1 );
|
||||
char ** Term;
|
||||
int * iTermSizes;
|
||||
USHORT uiTabLen, uiTerms;
|
||||
HB_SIZE * iTermSizes;
|
||||
HB_SIZE uiTabLen, uiTerms;
|
||||
HB_SIZE ulLineSize = hb_parni(3);
|
||||
USHORT i;
|
||||
HB_SIZE i;
|
||||
HB_BOOL bWrap = hb_parl(5);
|
||||
HB_BOOL bFound, bEOF;
|
||||
HB_SIZE ulStartOffset;
|
||||
@@ -251,16 +245,9 @@ HB_FUNC( HB_READLINE )
|
||||
}
|
||||
|
||||
ulTextLen = hb_parclen(1);
|
||||
uiTabLen = ( USHORT ) hb_parclen(4);
|
||||
uiTabLen = hb_parclen(4);
|
||||
|
||||
if( HB_ISNUM( 6 ) )
|
||||
{
|
||||
ulStartOffset = hb_parnl( 6 );
|
||||
}
|
||||
else
|
||||
{
|
||||
ulStartOffset = 0;
|
||||
}
|
||||
ulStartOffset = hb_parnl( 6 );
|
||||
|
||||
if( ! ( HB_ISARRAY( 2 ) || HB_ISCHAR( 2 ) ) )
|
||||
{
|
||||
@@ -276,17 +263,15 @@ HB_FUNC( HB_READLINE )
|
||||
bAlloc_Term1 = HB_TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
pTerm1 = hb_param( 2, HB_IT_ANY );
|
||||
}
|
||||
|
||||
pOpt = hb_itemNew( NULL );
|
||||
|
||||
if( HB_IS_ARRAY( pTerm1 ) )
|
||||
{
|
||||
uiTerms = ( USHORT ) hb_arrayLen( pTerm1 );
|
||||
Term = ( char** ) hb_xgrab( sizeof(char*) * uiTerms );
|
||||
iTermSizes = ( int * ) hb_xgrab( sizeof(int) * uiTerms );
|
||||
uiTerms = hb_arrayLen( pTerm1 );
|
||||
Term = ( char ** ) hb_xgrab( sizeof( char * ) * uiTerms );
|
||||
iTermSizes = ( HB_SIZE * ) hb_xgrab( sizeof( HB_SIZE ) * uiTerms );
|
||||
|
||||
for( i = 0; i < uiTerms; i++ )
|
||||
{
|
||||
@@ -297,8 +282,8 @@ HB_FUNC( HB_READLINE )
|
||||
}
|
||||
else
|
||||
{
|
||||
Term = ( char** ) hb_xgrab( sizeof( char * ) );
|
||||
iTermSizes = ( int * ) hb_xgrab( sizeof( int ) );
|
||||
Term = ( char ** ) hb_xgrab( sizeof( char * ) );
|
||||
iTermSizes = ( HB_SIZE * ) hb_xgrab( sizeof( HB_SIZE ) * 1 );
|
||||
Term[ 0 ] = ( char * ) hb_itemGetCPtr( pTerm1 );
|
||||
iTermSizes[ 0 ] = hb_itemGetCLen( pTerm1 );
|
||||
uiTerms = 1;
|
||||
@@ -316,9 +301,7 @@ HB_FUNC( HB_READLINE )
|
||||
hb_stornl( ulEndOffset + ulStartOffset + 1, 10 );
|
||||
|
||||
if( bAlloc_Term1 )
|
||||
{
|
||||
hb_itemRelease( pTerm1 );
|
||||
}
|
||||
|
||||
hb_xfree( Term );
|
||||
hb_xfree( iTermSizes );
|
||||
|
||||
@@ -512,6 +512,8 @@ typedef void * HB_PTRVAL; /* TOFIX */
|
||||
# define HB_LONG_MAX LONG_MAX
|
||||
# define HB_LONG_MIN LONG_MIN
|
||||
# define HB_ULONG_MAX ULONG_MAX
|
||||
typedef long HB_MAXINT;
|
||||
typedef unsigned long HB_MAXUINT;
|
||||
# define PFHL "l"
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user