2010-01-15 17:33 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/cmdarg.c
* contrib/hbct/disk.c
% Using HB_SIZEOFARRAY() instead of repeating declaration size.
* src/vm/maindllp.c
* src/vm/extend.c
* include/hbtypes.h
* include/hbapi.h
+ 'parinfa' retval ULONG -> HB_SIZE
* src/vm/arrayshb.c
* src/rtl/substr.c
* src/rtl/replic.c
* src/rtl/padr.c
* src/rtl/padc.c
* src/rtl/strtran.c
* src/rtl/padl.c
* src/rtl/lang.c
* src/rtl/right.c
* src/rtl/left.c
* src/rtl/space.c
* src/rtl/hbstrsh.c
* src/rtl/rat.c
* contrib/hbct/charsprd.c
* contrib/xhb/xhbarr.c
* contrib/hbpgsql/postgres.c
* contrib/hbclipsm/stack.c
* contrib/hbmisc/stringsx.c
+ 'long' -> HB_ISIZ
* src/common/hbwince.c
* include/hbwince.h
* contrib/xhb/xhbat.c
* contrib/xhb/cstructc.c
+ 'unsigned long' -> HB_SIZE
* src/rtl/fstemp.c
* src/rtl/net.c
! L'x' -> TEXT( 'x' ).
'L' was used also in non-UNICODE mode, which doesn't seem right.
* src/rtl/diskspac.c
* contrib/hbct/disk.c
* contrib/hbwin/win_com.c
* contrib/hbwin/win_prn3.c
* TCHAR literals enclosed inside TEXT() macro.
* contrib/hbwin/win_prn1.c
! WIN_GETPRINTERFONTNAME(): Fixed buffer overrun in UNICODE
mode for font names longer than 64 bytes.
[TOMERGE 2.0]
* ChangeLog
+ Added two missed changed to this entry:
2010-01-15 12:01 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbdefs.h
+ Added HB_ISIZ temporary type to mark string/array/hash
index/length variable already using signed 'long' type.
This will have to converted to HB_SIZE, one HB_SIZE
gets also mapped to 'long'.
* HB_FATTR mapped to HB_U32 (was: unsigned long)
This commit is contained in:
@@ -17,6 +17,69 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-01-15 17:33 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/vm/cmdarg.c
|
||||
* contrib/hbct/disk.c
|
||||
% Using HB_SIZEOFARRAY() instead of repeating declaration size.
|
||||
|
||||
* src/vm/maindllp.c
|
||||
* src/vm/extend.c
|
||||
* include/hbtypes.h
|
||||
* include/hbapi.h
|
||||
+ 'parinfa' retval ULONG -> HB_SIZE
|
||||
|
||||
* src/vm/arrayshb.c
|
||||
* src/rtl/substr.c
|
||||
* src/rtl/replic.c
|
||||
* src/rtl/padr.c
|
||||
* src/rtl/padc.c
|
||||
* src/rtl/strtran.c
|
||||
* src/rtl/padl.c
|
||||
* src/rtl/lang.c
|
||||
* src/rtl/right.c
|
||||
* src/rtl/left.c
|
||||
* src/rtl/space.c
|
||||
* src/rtl/hbstrsh.c
|
||||
* src/rtl/rat.c
|
||||
* contrib/hbct/charsprd.c
|
||||
* contrib/xhb/xhbarr.c
|
||||
* contrib/hbpgsql/postgres.c
|
||||
* contrib/hbclipsm/stack.c
|
||||
* contrib/hbmisc/stringsx.c
|
||||
+ 'long' -> HB_ISIZ
|
||||
|
||||
* src/common/hbwince.c
|
||||
* include/hbwince.h
|
||||
* contrib/xhb/xhbat.c
|
||||
* contrib/xhb/cstructc.c
|
||||
+ 'unsigned long' -> HB_SIZE
|
||||
|
||||
* src/rtl/fstemp.c
|
||||
* src/rtl/net.c
|
||||
! L'x' -> TEXT( 'x' ).
|
||||
'L' was used also in non-UNICODE mode, which doesn't seem right.
|
||||
|
||||
* src/rtl/diskspac.c
|
||||
* contrib/hbct/disk.c
|
||||
* contrib/hbwin/win_com.c
|
||||
* contrib/hbwin/win_prn3.c
|
||||
* TCHAR literals enclosed inside TEXT() macro.
|
||||
|
||||
* contrib/hbwin/win_prn1.c
|
||||
! WIN_GETPRINTERFONTNAME(): Fixed buffer overrun in UNICODE
|
||||
mode for font names longer than 64 bytes.
|
||||
[TOMERGE 2.0]
|
||||
|
||||
* ChangeLog
|
||||
+ Added two missed changed to this entry:
|
||||
2010-01-15 12:01 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* include/hbdefs.h
|
||||
+ Added HB_ISIZ temporary type to mark string/array/hash
|
||||
index/length variable already using signed 'long' type.
|
||||
This will have to converted to HB_SIZE, one HB_SIZE
|
||||
gets also mapped to 'long'.
|
||||
* HB_FATTR mapped to HB_U32 (was: unsigned long)
|
||||
|
||||
2010-01-15 15:10 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* include/hbexprb.c
|
||||
! s&r error bug in recent change.
|
||||
@@ -59,6 +122,13 @@
|
||||
* FALSE -> HB_FALSE
|
||||
|
||||
2010-01-15 12:01 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* include/hbdefs.h
|
||||
+ Added HB_ISIZ temporary type to mark string/array/hash
|
||||
index/length variable already using signed 'long' type.
|
||||
This will have to converted to HB_SIZE, one HB_SIZE
|
||||
gets also mapped to 'long'.
|
||||
* HB_FATTR mapped to HB_U32 (was: unsigned long)
|
||||
|
||||
* src/macro/macro.yyc
|
||||
* src/macro/macro.y
|
||||
* src/macro/macrolex.c
|
||||
@@ -73,7 +143,6 @@
|
||||
* doc/codestyl.txt
|
||||
* include/hbthread.h
|
||||
* include/hbxvm.h
|
||||
* include/hbdefs.h
|
||||
* include/hbvm.h
|
||||
* include/hbcomp.h
|
||||
* include/hbcompdf.h
|
||||
|
||||
@@ -74,7 +74,7 @@ HB_FUNC( STACKPUSH )
|
||||
HB_FUNC( STACKPOP )
|
||||
{
|
||||
PHB_ITEM pArray = hb_param( 1, HB_IT_ARRAY );
|
||||
long ulLen = hb_arrayLen( pArray );
|
||||
HB_ISIZ ulLen = hb_arrayLen( pArray );
|
||||
PHB_ITEM pLast = hb_itemNew( NULL );
|
||||
|
||||
if( ulLen )
|
||||
|
||||
@@ -62,7 +62,7 @@ HB_FUNC( CHARSPREAD )
|
||||
hb_retc_null();
|
||||
else
|
||||
{
|
||||
long lSize = hb_parnl( 2 );
|
||||
HB_ISIZ lSize = hb_parnl( 2 );
|
||||
|
||||
if( lSize < 0 || ( HB_SIZE ) lSize <= ulLen )
|
||||
hb_itemReturn( hb_param( 1, HB_IT_ANY ) );
|
||||
|
||||
@@ -272,12 +272,12 @@ HB_FUNC( GETVOLINFO )
|
||||
{
|
||||
#if defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE )
|
||||
int iretval;
|
||||
const char *sDrive = hb_parcx( 1 );
|
||||
TCHAR lpVolName[256];
|
||||
const char * sDrive = hb_parcx( 1 );
|
||||
TCHAR lpVolName[ 256 ];
|
||||
LPTSTR lpDrive;
|
||||
|
||||
lpDrive = sDrive[0] ? HB_TCHAR_CONVTO( sDrive ) : NULL;
|
||||
iretval = GetVolumeInformation( lpDrive, lpVolName, 256, NULL, NULL, NULL, NULL, 0 );
|
||||
lpDrive = sDrive[ 0 ] ? HB_TCHAR_CONVTO( sDrive ) : NULL;
|
||||
iretval = GetVolumeInformation( lpDrive, lpVolName, HB_SIZEOFARRAY( lpVolName ), NULL, NULL, NULL, NULL, 0 );
|
||||
if( lpDrive )
|
||||
HB_TCHAR_FREE( lpDrive );
|
||||
|
||||
@@ -340,11 +340,11 @@ HB_FUNC( TRUENAME )
|
||||
{
|
||||
#if defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE )
|
||||
char *szBuffRet;
|
||||
TCHAR buffer[MAX_PATH + 1] = { 0 };
|
||||
TCHAR buffer[MAX_PATH + 1] = { TEXT( '\0' ) };
|
||||
LPTSTR lpFile;
|
||||
|
||||
lpFile = HB_TCHAR_CONVTO( szFile );
|
||||
GetFullPathName( lpFile, MAX_PATH, buffer, NULL );
|
||||
GetFullPathName( lpFile, HB_SIZEOFARRAY( buffer ) - 1, buffer, NULL );
|
||||
HB_TCHAR_FREE( lpFile );
|
||||
|
||||
szBuffRet = HB_TCHAR_CONVFROM( buffer );
|
||||
|
||||
@@ -4,17 +4,15 @@
|
||||
|
||||
#include "hbapi.h"
|
||||
|
||||
/* TODO: search this file for TODO and find 'em! */
|
||||
|
||||
static const char *hb_strtoken(const char *szText,
|
||||
long lText,
|
||||
long lIndex,
|
||||
HB_ISIZ lText,
|
||||
HB_ISIZ lIndex,
|
||||
char cDelimiter,
|
||||
long *lLen)
|
||||
HB_ISIZ *lLen)
|
||||
{
|
||||
long wStart;
|
||||
long wEnd = 0;
|
||||
long wCounter = 0;
|
||||
HB_ISIZ wStart;
|
||||
HB_ISIZ wEnd = 0;
|
||||
HB_ISIZ wCounter = 0;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_strtoken(%s, %ld, %ld, %d, %p)", szText, lText, lIndex, (int) cDelimiter, lLen));
|
||||
|
||||
@@ -60,9 +58,9 @@ static const char *hb_strtoken(const char *szText,
|
||||
HB_FUNC( STRTOKEN )
|
||||
{
|
||||
const char *szText;
|
||||
long lIndex = hb_parnl(2);
|
||||
HB_ISIZ lIndex = hb_parnl(2);
|
||||
char cDelimiter = *hb_parc(3);
|
||||
long lLen;
|
||||
HB_ISIZ lLen;
|
||||
|
||||
if( !cDelimiter )
|
||||
cDelimiter = ' ';
|
||||
@@ -77,7 +75,7 @@ HB_FUNC( STRTOKEN )
|
||||
HB_FUNC( STRDUMP )
|
||||
{
|
||||
const char *szText = hb_parc(1);
|
||||
long i, lLength = hb_parclen(1);
|
||||
HB_ISIZ i, lLength = hb_parclen(1);
|
||||
for( i = 0; i < lLength; i++ )
|
||||
printf("%d ", szText[i]);
|
||||
printf("\n");
|
||||
|
||||
@@ -273,8 +273,8 @@ HB_FUNC( PQEXECPARAMS )
|
||||
if( hb_pcount() == 3 )
|
||||
{
|
||||
PHB_ITEM aParam = hb_param( 3, HB_IT_ARRAY );
|
||||
long n = hb_arrayLen( aParam );
|
||||
long i;
|
||||
HB_ISIZ n = hb_arrayLen( aParam );
|
||||
HB_ISIZ i;
|
||||
|
||||
const char ** paramvalues = ( const char ** ) hb_xgrab( sizeof( char * ) * n );
|
||||
|
||||
|
||||
@@ -86,7 +86,17 @@ HB_FUNC( WIN_COMOPEN )
|
||||
HANDLE hCommPort;
|
||||
DCB NewDCB;
|
||||
|
||||
TCHAR szName[ 11 ] = { '\\', '\\', '.', '\\', 'C', 'O', 'M', 0, 0, 0, 0 };
|
||||
TCHAR szName[ 11 ] = { TEXT( '\\' ),
|
||||
TEXT( '\\' ),
|
||||
TEXT( '.' ),
|
||||
TEXT( '\\' ),
|
||||
TEXT( 'C' ),
|
||||
TEXT( 'O' ),
|
||||
TEXT( 'M' ),
|
||||
TEXT( '\0' ),
|
||||
TEXT( '\0' ),
|
||||
TEXT( '\0' ),
|
||||
TEXT( '\0' ) };
|
||||
|
||||
i = iPort + 1;
|
||||
iPos = 6;
|
||||
|
||||
@@ -396,7 +396,7 @@ HB_FUNC( WIN_CREATEFONT )
|
||||
else
|
||||
iWidth = 0; /* Use the default font width */
|
||||
|
||||
hFont = CreateFont( iHeight,
|
||||
hFont = CreateFont( iHeight,
|
||||
iWidth,
|
||||
0,
|
||||
0,
|
||||
@@ -436,7 +436,7 @@ HB_FUNC( WIN_GETPRINTERFONTNAME )
|
||||
{
|
||||
TCHAR tszFontName[ 128 ];
|
||||
|
||||
GetTextFace( hDC, sizeof( tszFontName ) - 1, tszFontName );
|
||||
GetTextFace( hDC, HB_SIZEOFARRAY( tszFontName ) - 1, tszFontName );
|
||||
|
||||
HB_RETSTR( tszFontName );
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ static TCHAR * hb_tstrncat( TCHAR * pDest, const TCHAR * pSource, HB_SIZE nLen )
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_tstrncat(%p, %p, %lu)", pDest, pSource, nLen));
|
||||
|
||||
pDest[ nLen ] = '\0';
|
||||
pDest[ nLen ] = TEXT( '\0' );
|
||||
|
||||
while( nLen && *pDest )
|
||||
{
|
||||
@@ -81,7 +81,7 @@ static TCHAR * hb_tstrncat( TCHAR * pDest, const TCHAR * pSource, HB_SIZE nLen )
|
||||
nLen--;
|
||||
}
|
||||
|
||||
while( nLen && ( *pDest++ = *pSource++ ) != '\0' )
|
||||
while( nLen && ( *pDest++ = *pSource++ ) != TEXT( '\0' ) )
|
||||
nLen--;
|
||||
|
||||
return pBuf;
|
||||
@@ -93,7 +93,7 @@ static HB_SIZE hb_tstrlen( const TCHAR * pText )
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_tstrlen(%p)", pText));
|
||||
|
||||
while( pText[ nLen ] )
|
||||
while( pText[ nLen ] != TEXT( '\0' ) )
|
||||
++nLen;
|
||||
|
||||
return nLen;
|
||||
@@ -237,7 +237,7 @@ static HB_BOOL hb_SetDefaultPrinter( LPCTSTR lpPrinterName )
|
||||
String will be in form "printername,drivername,portname". */
|
||||
pBuffer = ( LPTSTR ) hb_xgrab( ( nStrLen + 1 ) * sizeof( TCHAR ) );
|
||||
|
||||
pBuffer[ 0 ] = '\0';
|
||||
pBuffer[ 0 ] = TEXT( '\0' );
|
||||
|
||||
/* Build string in form "printername,drivername,portname". */
|
||||
hb_tstrncat( pBuffer, lpPrinterName, nStrLen );
|
||||
|
||||
@@ -129,8 +129,8 @@ void hb_retclenStatic( const char * szText, HB_SIZE ulLen )
|
||||
static unsigned int SizeOfCStructure( PHB_ITEM aDef, unsigned int uiAlign )
|
||||
{
|
||||
PHB_BASEARRAY pBaseDef = aDef->item.asArray.value;
|
||||
unsigned long ulLen = pBaseDef->ulLen;
|
||||
unsigned long ulIndex;
|
||||
HB_SIZE ulLen = pBaseDef->ulLen;
|
||||
HB_SIZE ulIndex;
|
||||
unsigned int uiSize = 0, uiMemberSize;
|
||||
BYTE cShift;
|
||||
unsigned int uiPad;
|
||||
@@ -294,8 +294,8 @@ static BYTE * ArrayToStructure( PHB_ITEM aVar, PHB_ITEM aDef, unsigned int uiAli
|
||||
{
|
||||
PHB_BASEARRAY pBaseVar = aVar->item.asArray.value;
|
||||
PHB_BASEARRAY pBaseDef = aDef->item.asArray.value;
|
||||
unsigned long ulLen = pBaseDef->ulLen;
|
||||
unsigned long ulIndex;
|
||||
HB_SIZE ulLen = pBaseDef->ulLen;
|
||||
HB_SIZE ulIndex;
|
||||
BYTE *Buffer;
|
||||
unsigned int uiOffset = 0, uiMemberSize;
|
||||
BYTE cShift;
|
||||
@@ -1050,11 +1050,11 @@ HB_FUNC( HB_ARRAYTOSTRUCTURE )
|
||||
}
|
||||
}
|
||||
|
||||
static PHB_ITEM StructureToArray( BYTE* Buffer, unsigned long ulBufferLen, PHB_ITEM aDef, unsigned int uiAlign, HB_BOOL bAdoptNested, PHB_ITEM pRet )
|
||||
static PHB_ITEM StructureToArray( BYTE* Buffer, HB_SIZE ulBufferLen, PHB_ITEM aDef, unsigned int uiAlign, HB_BOOL bAdoptNested, PHB_ITEM pRet )
|
||||
{
|
||||
PHB_BASEARRAY pBaseDef = aDef->item.asArray.value;
|
||||
unsigned long ulLen = pBaseDef->ulLen;
|
||||
unsigned long ulIndex;
|
||||
HB_SIZE ulLen = pBaseDef->ulLen;
|
||||
HB_SIZE ulIndex;
|
||||
unsigned int uiOffset, uiMemberSize;
|
||||
BYTE cShift;
|
||||
/* PHB_ITEM pRet = hb_itemNew( NULL ); */
|
||||
|
||||
@@ -238,7 +238,7 @@ HB_FUNC( XHB_ADEL )
|
||||
|
||||
if( pArray )
|
||||
{
|
||||
long lPos = hb_parnl( 2 );
|
||||
HB_ISIZ lPos = hb_parnl( 2 );
|
||||
|
||||
if( lPos == 0 )
|
||||
lPos = 1;
|
||||
@@ -261,8 +261,7 @@ HB_FUNC( XHB_AINS )
|
||||
|
||||
if( pArray )
|
||||
{
|
||||
long lPos = hb_parnl( 2 );
|
||||
|
||||
HB_ISIZ lPos = hb_parnl( 2 );
|
||||
|
||||
if( hb_parl( 4 ) )
|
||||
{
|
||||
|
||||
@@ -142,16 +142,14 @@ HB_FUNC( ATSKIPSTRINGS ) /* cFind, cWhere, nStart */
|
||||
|
||||
if( pFind && pWhere )
|
||||
{
|
||||
unsigned long ulStart = (unsigned long) hb_parnl(3);
|
||||
HB_SIZE ulStart = ( HB_SIZE ) hb_parnl(3);
|
||||
|
||||
if( ulStart > 0 )
|
||||
{
|
||||
ulStart--;
|
||||
}
|
||||
|
||||
if( ulStart < hb_itemGetCLen( pWhere ) )
|
||||
{
|
||||
unsigned long ulRet;
|
||||
HB_SIZE ulRet;
|
||||
|
||||
ulRet = hb_AtSkipStrings( hb_itemGetCPtr( pFind ), hb_itemGetCLen( pFind ),
|
||||
hb_itemGetCPtr( pWhere ) + ulStart, hb_itemGetCLen( pWhere ) - ulStart );
|
||||
|
||||
@@ -621,7 +621,7 @@ extern void hb_gcCollectAll( HB_BOOL fForce ); /* checks if all memory blo
|
||||
|
||||
/* Extend API */
|
||||
extern HB_EXPORT ULONG hb_parinfo( int iParam ); /* Determine the param count or data type */
|
||||
extern HB_EXPORT ULONG hb_parinfa( int iParamNum, HB_SIZE uiArrayIndex ); /* retrieve length or element type of an array parameter */
|
||||
extern HB_EXPORT HB_SIZE hb_parinfa( int iParamNum, HB_SIZE uiArrayIndex ); /* retrieve length or element type of an array parameter */
|
||||
extern HB_EXPORT PHB_ITEM hb_param( int iParam, long lMask ); /* retrieve a generic parameter */
|
||||
extern HB_EXPORT PHB_ITEM hb_paramError( int iParam ); /* Returns either the generic parameter or a NIL item if param not provided */
|
||||
extern HB_EXPORT HB_BOOL hb_extIsArray( int iParam );
|
||||
|
||||
@@ -87,7 +87,7 @@ typedef void ( * HB_RETNDLEN )( double dNumber, int iWidth, int iDec );
|
||||
typedef void ( * HB_RETNILEN )( int iNumber, int iWidth );
|
||||
typedef void ( * HB_RETNLLEN )( long lNumber, int iWidth );
|
||||
typedef void ( * HB_RETA )( HB_SIZE ulLen );
|
||||
typedef ULONG ( * HB_PARINFA )( int iParamNum, HB_SIZE uiArrayIndex );
|
||||
typedef HB_SIZE ( * HB_PARINFA )( int iParamNum, HB_SIZE uiArrayIndex );
|
||||
typedef ULONG ( * HB_PARINFO )( int iParam );
|
||||
typedef HB_SIZE ( * HB_PARCLEN )( int iParam );
|
||||
typedef HB_SIZE ( * HB_PARCSIZ )( int iParam );
|
||||
|
||||
@@ -181,11 +181,11 @@ extern char * strerror( int errnum );
|
||||
|
||||
extern HB_EXPORT wchar_t * hb_mbtowc( const char *srcA );
|
||||
extern HB_EXPORT char * hb_wctomb( const wchar_t *srcW );
|
||||
extern HB_EXPORT wchar_t * hb_mbntowc( const char *srcA, unsigned long ulLen );
|
||||
extern HB_EXPORT char * hb_wcntomb( const wchar_t *srcW, unsigned long ulLen );
|
||||
extern HB_EXPORT void hb_mbtowccpy( wchar_t *dstW, const char *srcA, unsigned long ulLen );
|
||||
extern HB_EXPORT void hb_mbtowcset( wchar_t *dstW, const char *srcA, unsigned long ulLen );
|
||||
extern HB_EXPORT void hb_wctombget( char *dstA, const wchar_t *srcW, unsigned long ulLen );
|
||||
extern HB_EXPORT wchar_t * hb_mbntowc( const char *srcA, HB_SIZE ulLen );
|
||||
extern HB_EXPORT char * hb_wcntomb( const wchar_t *srcW, HB_SIZE ulLen );
|
||||
extern HB_EXPORT void hb_mbtowccpy( wchar_t *dstW, const char *srcA, HB_SIZE ulLen );
|
||||
extern HB_EXPORT void hb_mbtowcset( wchar_t *dstW, const char *srcA, HB_SIZE ulLen );
|
||||
extern HB_EXPORT void hb_wctombget( char *dstA, const wchar_t *srcW, HB_SIZE ulLen );
|
||||
|
||||
#if defined( HB_OS_WIN_CE )
|
||||
#define HBTEXT( x ) TEXT( x )
|
||||
|
||||
@@ -70,7 +70,7 @@ void hb_mbtowccpy( wchar_t *dstW, const char *srcA, HB_SIZE ulLen )
|
||||
MultiByteToWideChar( CP_ACP, 0, srcA, -1, dstW, ulLen / sizeof( wchar_t ) );
|
||||
}
|
||||
|
||||
void hb_mbtowcset( wchar_t *dstW, const char *srcA, unsigned long ulLen )
|
||||
void hb_mbtowcset( wchar_t *dstW, const char *srcA, HB_SIZE ulLen )
|
||||
{
|
||||
MultiByteToWideChar( CP_ACP, 0, srcA, ulLen, dstW, ulLen );
|
||||
}
|
||||
@@ -99,7 +99,7 @@ char *hb_wctomb( const wchar_t *srcW )
|
||||
return dstA;
|
||||
}
|
||||
|
||||
wchar_t *hb_mbntowc( const char *srcA, unsigned long ulLen )
|
||||
wchar_t *hb_mbntowc( const char *srcA, HB_SIZE ulLen )
|
||||
{
|
||||
DWORD length;
|
||||
wchar_t *dstW;
|
||||
@@ -111,7 +111,7 @@ wchar_t *hb_mbntowc( const char *srcA, unsigned long ulLen )
|
||||
return dstW;
|
||||
}
|
||||
|
||||
char *hb_wcntomb( const wchar_t *srcW, unsigned long ulLen )
|
||||
char *hb_wcntomb( const wchar_t *srcW, HB_SIZE ulLen )
|
||||
{
|
||||
DWORD length;
|
||||
char *dstA;
|
||||
@@ -123,7 +123,7 @@ char *hb_wcntomb( const wchar_t *srcW, unsigned long ulLen )
|
||||
return dstA;
|
||||
}
|
||||
|
||||
void hb_wctombget( char *dstA, const wchar_t *srcW, unsigned long ulLen )
|
||||
void hb_wctombget( char *dstA, const wchar_t *srcW, HB_SIZE ulLen )
|
||||
{
|
||||
WideCharToMultiByte( CP_ACP, 0, srcW, ulLen, dstA, ulLen, NULL, NULL );
|
||||
}
|
||||
|
||||
@@ -123,9 +123,9 @@ HB_FUNC( DISKSPACE )
|
||||
TCHAR lpPath[ 4 ];
|
||||
|
||||
lpPath[ 0 ] = ( TCHAR ) ( uiDrive + 'A' - 1 );
|
||||
lpPath[ 1 ] = ':';
|
||||
lpPath[ 2 ] = '\\';
|
||||
lpPath[ 3 ] = '\0';
|
||||
lpPath[ 1 ] = TEXT( ':' );
|
||||
lpPath[ 2 ] = TEXT( '\\' );
|
||||
lpPath[ 3 ] = TEXT( '\0' );
|
||||
|
||||
#if defined( HB_OS_WIN_CE )
|
||||
|
||||
|
||||
@@ -279,7 +279,7 @@ static HB_BOOL hb_fsTempName( char * pszBuffer, const char * pszDir, const char
|
||||
return HB_FALSE;
|
||||
}
|
||||
}
|
||||
lpTempDir[ HB_PATH_MAX - 1 ] = L'\0';
|
||||
lpTempDir[ HB_PATH_MAX - 1 ] = TEXT( '\0' );
|
||||
|
||||
fResult = GetTempFileName( lpTempDir, lpPrefix ? lpPrefix : TEXT( "hb" ), 0, lpBuffer );
|
||||
|
||||
|
||||
@@ -59,8 +59,8 @@ HB_FUNC( HB_STRSHRINK )
|
||||
|
||||
if( pText )
|
||||
{
|
||||
long lLen = hb_itemGetCLen( pText );
|
||||
long lShrinkBy = HB_ISNUM( 2 ) ? hb_parnl( 2 ) : 1;
|
||||
HB_ISIZ lLen = hb_itemGetCLen( pText );
|
||||
HB_ISIZ lShrinkBy = HB_ISNUM( 2 ) ? hb_parnl( 2 ) : 1;
|
||||
|
||||
if( lShrinkBy > 0 )
|
||||
{
|
||||
|
||||
@@ -68,7 +68,7 @@ HB_FUNC( HB_USERLANG )
|
||||
|
||||
if( ietf != NULL )
|
||||
{
|
||||
long tmp;
|
||||
HB_ISIZ tmp;
|
||||
|
||||
for( tmp = 0; ietf[ tmp ] && ietf[ tmp ] != '.' ; tmp++ )
|
||||
{
|
||||
|
||||
@@ -62,7 +62,7 @@ HB_FUNC( LEFT )
|
||||
|
||||
if( pText && HB_ISNUM( 2 ) )
|
||||
{
|
||||
long lLen = hb_parnl( 2 );
|
||||
HB_ISIZ lLen = hb_parnl( 2 );
|
||||
if( lLen <= 0 )
|
||||
hb_retc_null();
|
||||
else
|
||||
|
||||
@@ -154,7 +154,7 @@ char * hb_netname( void )
|
||||
TCHAR lpValue[ MAX_COMPUTERNAME_LENGTH + 1 ];
|
||||
char * pszValue;
|
||||
|
||||
lpValue[ 0 ] = L'\0';
|
||||
lpValue[ 0 ] = TEXT( '\0' );
|
||||
GetComputerName( lpValue, &ulLen );
|
||||
|
||||
#if defined( UNICODE )
|
||||
@@ -191,7 +191,7 @@ char * hb_username( void )
|
||||
TCHAR lpValue[ 256 ];
|
||||
char * pszValue;
|
||||
|
||||
lpValue[ 0 ] = L'\0';
|
||||
lpValue[ 0 ] = TEXT( '\0' );
|
||||
GetUserName( lpValue, &ulLen );
|
||||
|
||||
#if defined( UNICODE )
|
||||
|
||||
@@ -60,7 +60,7 @@ HB_FUNC( PADC )
|
||||
HB_SIZE ulSize;
|
||||
HB_BOOL bFreeReq;
|
||||
char * szText;
|
||||
long lLen = hb_parnl( 2 );
|
||||
HB_ISIZ lLen = hb_parnl( 2 );
|
||||
|
||||
if( lLen > 0 )
|
||||
{
|
||||
@@ -79,7 +79,7 @@ HB_FUNC( PADC )
|
||||
{
|
||||
char * szResult = ( char * ) hb_xgrab( lLen + 1 );
|
||||
char cPad;
|
||||
long ulPad = ( ( HB_SIZE ) lLen - ulSize ) >> 1;
|
||||
HB_ISIZ ulPad = ( ( HB_SIZE ) lLen - ulSize ) >> 1;
|
||||
|
||||
cPad = ( HB_ISCHAR( 3 ) ? *( hb_parc( 3 ) ) : ' ' );
|
||||
hb_xmemset( szResult, cPad, ulPad );
|
||||
|
||||
@@ -60,7 +60,7 @@ HB_FUNC( PADL )
|
||||
HB_SIZE ulSize;
|
||||
HB_BOOL bFreeReq;
|
||||
char * szText;
|
||||
long lLen = hb_parnl( 2 );
|
||||
HB_ISIZ lLen = hb_parnl( 2 );
|
||||
|
||||
if( lLen > 0 )
|
||||
{
|
||||
|
||||
@@ -60,7 +60,7 @@ HB_FUNC( PADR )
|
||||
HB_SIZE ulSize;
|
||||
HB_BOOL bFreeReq;
|
||||
char * szText;
|
||||
long lLen = hb_parnl( 2 );
|
||||
HB_ISIZ lLen = hb_parnl( 2 );
|
||||
|
||||
if( lLen > 0 )
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ HB_FUNC( RAT )
|
||||
|
||||
if( ulSubLen )
|
||||
{
|
||||
long lPos = hb_parclen( 2 ) - ulSubLen;
|
||||
HB_ISIZ lPos = hb_parclen( 2 ) - ulSubLen;
|
||||
|
||||
if( lPos >= 0 )
|
||||
{
|
||||
@@ -89,14 +89,14 @@ HB_FUNC( HB_RAT )
|
||||
|
||||
if( ulSubLen )
|
||||
{
|
||||
long lPos = hb_parclen( 2 ) - ulSubLen;
|
||||
HB_ISIZ lPos = hb_parclen( 2 ) - ulSubLen;
|
||||
|
||||
if( lPos >= 0 )
|
||||
{
|
||||
const char * pszSub = hb_parc( 1 );
|
||||
const char * pszText = hb_parc( 2 );
|
||||
HB_BOOL bFound = HB_FALSE;
|
||||
long lStart;
|
||||
HB_ISIZ lStart;
|
||||
|
||||
if( HB_ISNUM( 3 ) )
|
||||
{
|
||||
@@ -111,7 +111,7 @@ HB_FUNC( HB_RAT )
|
||||
|
||||
if( HB_ISNUM( 4 ) )
|
||||
{
|
||||
long lEnd = hb_parnl( 4 ) - 1;
|
||||
HB_ISIZ lEnd = hb_parnl( 4 ) - 1;
|
||||
|
||||
if( lEnd < lPos )
|
||||
lPos = lEnd;
|
||||
|
||||
@@ -60,7 +60,7 @@ HB_FUNC( REPLICATE )
|
||||
{
|
||||
if( HB_ISCHAR( 1 ) && HB_ISNUM( 2 ) )
|
||||
{
|
||||
long lTimes = hb_parnl( 2 );
|
||||
HB_ISIZ lTimes = hb_parnl( 2 );
|
||||
|
||||
if( lTimes > 0 )
|
||||
{
|
||||
@@ -71,7 +71,7 @@ HB_FUNC( REPLICATE )
|
||||
const char * szText = hb_parc( 1 );
|
||||
char * szResult = ( char * ) hb_xgrab( ( ulLen * lTimes ) + 1 );
|
||||
char * szPtr = szResult;
|
||||
long i;
|
||||
HB_ISIZ i;
|
||||
|
||||
for( i = 0; i < lTimes; i++ )
|
||||
{
|
||||
|
||||
@@ -62,7 +62,7 @@ HB_FUNC( RIGHT )
|
||||
|
||||
if( pText && HB_ISNUM( 2 ) )
|
||||
{
|
||||
long lLen = hb_parnl( 2 );
|
||||
HB_ISIZ lLen = hb_parnl( 2 );
|
||||
if( lLen <= 0 )
|
||||
hb_retc_null();
|
||||
else
|
||||
|
||||
@@ -62,7 +62,7 @@ HB_FUNC( SPACE )
|
||||
|
||||
if( pItem )
|
||||
{
|
||||
long lLen = hb_itemGetNL( pItem );
|
||||
HB_ISIZ lLen = hb_itemGetNL( pItem );
|
||||
|
||||
if( lLen > 0 )
|
||||
{
|
||||
|
||||
@@ -116,14 +116,14 @@ HB_FUNC( STRTRAN )
|
||||
if( bAll || ulCount > 0 )
|
||||
{
|
||||
HB_SIZE ulFound = 0;
|
||||
long lReplaced = 0;
|
||||
HB_ISIZ lReplaced = 0;
|
||||
HB_SIZE i = 0;
|
||||
HB_SIZE ulLength = ulText;
|
||||
HB_SIZE ulStop = ulText - ulSeek + 1;
|
||||
|
||||
while( i < ulStop )
|
||||
{
|
||||
if( ( bAll || lReplaced < ( long ) ulCount ) &&
|
||||
if( ( bAll || lReplaced < ( HB_ISIZ ) ulCount ) &&
|
||||
! memcmp( szText + i, szSeek, ulSeek ) )
|
||||
{
|
||||
ulFound++;
|
||||
|
||||
@@ -62,8 +62,8 @@ HB_FUNC( SUBSTR )
|
||||
|
||||
if( pText && HB_ISNUM( 2 ) )
|
||||
{
|
||||
long lPos = hb_parnl( 2 );
|
||||
long lSize = ( long ) hb_itemGetCLen( pText );
|
||||
HB_ISIZ lPos = hb_parnl( 2 );
|
||||
HB_ISIZ lSize = ( HB_ISIZ ) hb_itemGetCLen( pText );
|
||||
|
||||
if( lPos < 0 )
|
||||
{
|
||||
@@ -78,7 +78,7 @@ HB_FUNC( SUBSTR )
|
||||
|
||||
if( lPos < lSize )
|
||||
{
|
||||
long lLen;
|
||||
HB_ISIZ lLen;
|
||||
|
||||
if( hb_pcount() >= 3 )
|
||||
{
|
||||
|
||||
@@ -139,7 +139,7 @@ HB_FUNC( ASIZE )
|
||||
|
||||
if( pArray && HB_ISNUM( 2 ) )
|
||||
{
|
||||
long lSize = hb_parnl( 2 );
|
||||
HB_ISIZ lSize = hb_parnl( 2 );
|
||||
|
||||
hb_arraySize( pArray, HB_MAX( lSize, 0 ) );
|
||||
|
||||
@@ -169,7 +169,7 @@ HB_FUNC( AINS )
|
||||
|
||||
if( pArray )
|
||||
{
|
||||
long lPos = hb_parnl( 2 );
|
||||
HB_ISIZ lPos = hb_parnl( 2 );
|
||||
|
||||
if( lPos == 0 )
|
||||
lPos = 1;
|
||||
@@ -186,7 +186,7 @@ HB_FUNC( ADEL )
|
||||
|
||||
if( pArray )
|
||||
{
|
||||
long lPos = hb_parnl( 2 );
|
||||
HB_ISIZ lPos = hb_parnl( 2 );
|
||||
|
||||
if( lPos == 0 )
|
||||
lPos = 1;
|
||||
@@ -210,7 +210,7 @@ HB_FUNC( AFILL )
|
||||
if( pValue )
|
||||
{
|
||||
HB_SIZE ulStart, ulCount;
|
||||
LONG lStart = hb_parnl( 3 ), lCount = hb_parnl( 4 );
|
||||
HB_ISIZ lStart = hb_parnl( 3 ), lCount = hb_parnl( 4 );
|
||||
|
||||
/* Explicy lCount of 0 - Nothing to do! */
|
||||
if( HB_ISNUM( 4 ) && lCount == 0 )
|
||||
@@ -313,7 +313,7 @@ HB_FUNC( HB_AINS )
|
||||
|
||||
if( pArray )
|
||||
{
|
||||
long lPos = hb_parnl( 2 );
|
||||
HB_ISIZ lPos = hb_parnl( 2 );
|
||||
|
||||
if( lPos == 0 )
|
||||
lPos = 1;
|
||||
@@ -341,7 +341,7 @@ HB_FUNC( HB_ADEL )
|
||||
|
||||
if( pArray )
|
||||
{
|
||||
long lPos = hb_parnl( 2 );
|
||||
HB_ISIZ lPos = hb_parnl( 2 );
|
||||
|
||||
if( lPos == 0 )
|
||||
lPos = 1;
|
||||
|
||||
@@ -140,9 +140,9 @@ void hb_cmdargUpdate( void )
|
||||
because in console apps the name may be truncated
|
||||
in some cases, and in GUI apps it's not filled
|
||||
at all. [vszakats] */
|
||||
if( GetModuleFileName( NULL, s_lpAppName, MAX_PATH ) != 0 )
|
||||
if( GetModuleFileName( NULL, s_lpAppName, HB_SIZEOFARRAY( s_lpAppName ) ) != 0 )
|
||||
{
|
||||
HB_TCHAR_GETFROM( s_szAppName, s_lpAppName, MAX_PATH );
|
||||
HB_TCHAR_GETFROM( s_szAppName, s_lpAppName, HB_SIZEOFARRAY( s_lpAppName ) );
|
||||
s_argv[ 0 ] = s_szAppName;
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -145,7 +145,7 @@ ULONG hb_parinfo( int iParam )
|
||||
}
|
||||
}
|
||||
|
||||
ULONG hb_parinfa( int iParamNum, HB_SIZE uiArrayIndex )
|
||||
HB_SIZE hb_parinfa( int iParamNum, HB_SIZE uiArrayIndex )
|
||||
{
|
||||
PHB_ITEM pArray;
|
||||
|
||||
@@ -158,7 +158,7 @@ ULONG hb_parinfa( int iParamNum, HB_SIZE uiArrayIndex )
|
||||
if( uiArrayIndex == 0 )
|
||||
return hb_arrayLen( pArray );
|
||||
else
|
||||
return ( long ) hb_arrayGetType( pArray, uiArrayIndex );
|
||||
return ( HB_ISIZ ) hb_arrayGetType( pArray, uiArrayIndex );
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
|
||||
@@ -334,7 +334,7 @@ void hb_reta( HB_SIZE ulLen ) /* returns an array with a specific length */
|
||||
( ( HB_RETA ) pRet )( ulLen );
|
||||
}
|
||||
|
||||
ULONG hb_parinfa( int iParamNum, HB_SIZE uiArrayIndex ) /* retrieve length or element type of an array parameter */
|
||||
HB_SIZE hb_parinfa( int iParamNum, HB_SIZE uiArrayIndex ) /* retrieve length or element type of an array parameter */
|
||||
{
|
||||
FARPROC pParinfa = hb_getProcAddress( HBTEXT( "_hb_parinfa" ) );
|
||||
return pParinfa ? ( ( HB_PARINFA ) pParinfa )( iParamNum, uiArrayIndex ) : 0;
|
||||
|
||||
Reference in New Issue
Block a user