2008-11-01 22:58 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* source/rtl/hbi18n.c
* Modified __I18N_GETTEXT() to not RTE when trs table
is non-array (like NIL).
* USHORT -> ULONG in a few places.
* source/rtl/gtwvt/gtwvt.c
* Minor formatting.
This commit is contained in:
@@ -8,6 +8,24 @@
|
||||
2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
|
||||
*/
|
||||
|
||||
2008-11-01 22:58 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* source/rtl/hbi18n.c
|
||||
* Modified __I18N_GETTEXT() to not RTE when trs table
|
||||
is non-array (like NIL).
|
||||
* USHORT -> ULONG in a few places.
|
||||
|
||||
* source/rtl/gtwvt/gtwvt.c
|
||||
* Minor formatting.
|
||||
|
||||
2008-11-01 22:58 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* source/rtl/hbi18n.c
|
||||
* Modified __i18n_gettext() to not RTE when trs table
|
||||
is non-array (like NIL).
|
||||
* USHORT -> ULONG in a few places.
|
||||
|
||||
* source/rtl/gtwvt/gtwvt.c
|
||||
* Minor formatting.
|
||||
|
||||
2008-11-01 21:13 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/source/rtl/itemseri.c
|
||||
! fixed 8-bytes integer numbers deserialization
|
||||
|
||||
@@ -563,7 +563,7 @@ static void hb_gt_wvt_FitRows( PHB_GTWVT pWVT )
|
||||
maxHeight = ci.bottom - ci.top;
|
||||
}
|
||||
|
||||
if ( maxHeight > 0 )
|
||||
if( maxHeight > 0 )
|
||||
{
|
||||
BOOL bOldCentre = pWVT->CentreWindow;
|
||||
pWVT->CentreWindow = pWVT->bMaximized ? TRUE : FALSE;
|
||||
@@ -1577,7 +1577,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
|
||||
return 0;
|
||||
|
||||
case WM_SIZE:
|
||||
if ( pWVT->ResizeMode == HB_GTI_RESIZEMODE_FONT )
|
||||
if( pWVT->ResizeMode == HB_GTI_RESIZEMODE_FONT )
|
||||
hb_gt_wvt_FitSize( pWVT );
|
||||
else
|
||||
{
|
||||
@@ -1593,10 +1593,8 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
|
||||
{
|
||||
pWVT->bMaximized = TRUE;
|
||||
|
||||
if ( pWVT->ResizeMode == HB_GTI_RESIZEMODE_FONT )
|
||||
{
|
||||
if( pWVT->ResizeMode == HB_GTI_RESIZEMODE_FONT )
|
||||
hb_gt_wvt_FitSize( pWVT );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_gt_wvt_FitRows( pWVT );
|
||||
|
||||
@@ -145,7 +145,7 @@ static PHB_ITEM hb_i18n_load_from_memory( BYTE * memory, ULONG memsize )
|
||||
{
|
||||
if( hb_i18n_memread( memory, memsize, &buffer, 2, &offset ) )
|
||||
{
|
||||
USHORT nStrLen = ( USHORT ) HB_GET_LE_UINT16( buffer );
|
||||
ULONG nStrLen = ( ULONG ) HB_GET_LE_UINT16( buffer );
|
||||
|
||||
if( nStrLen > 0 && hb_i18n_memread( memory, memsize, &buffer, nStrLen, &offset ) && buffer[ nStrLen - 1 ] == '\0' )
|
||||
{
|
||||
@@ -203,7 +203,7 @@ static PHB_ITEM hb_i18n_load( PHB_FILE file )
|
||||
{
|
||||
if( hb_fileReadAt( file, buffer, 2, offset ) == 2 )
|
||||
{
|
||||
ULONG nStrLen = ( USHORT ) HB_GET_LE_UINT16( buffer );
|
||||
ULONG nStrLen = ( ULONG ) HB_GET_LE_UINT16( buffer );
|
||||
|
||||
offset += 2;
|
||||
|
||||
@@ -260,29 +260,33 @@ HB_FUNC( __I18N_LOAD )
|
||||
HB_FUNC( __I18N_GETTEXT )
|
||||
{
|
||||
PHB_ITEM pFind = hb_param( 1, HB_IT_STRING );
|
||||
PHB_ITEM pTable = hb_param( 2, HB_IT_ARRAY );
|
||||
|
||||
if( pFind && pTable )
|
||||
if( pFind )
|
||||
{
|
||||
char * pszFind = hb_itemGetCPtr( pFind );
|
||||
PHB_ITEM pTable = hb_param( 2, HB_IT_ARRAY );
|
||||
|
||||
ULONG nLow = 1;
|
||||
ULONG nHigh = ( hb_arrayLen( pTable ) >> 1 );
|
||||
ULONG nMiddle;
|
||||
|
||||
while( nLow <= nHigh )
|
||||
if( pTable )
|
||||
{
|
||||
int result = strcmp( hb_arrayGetCPtr( pTable, ( ( nMiddle = ( nLow + nHigh ) / 2 ) << 1 ) - 1 ), pszFind );
|
||||
|
||||
if( result == 0 )
|
||||
char * pszFind = hb_itemGetCPtr( pFind );
|
||||
|
||||
ULONG nLow = 1;
|
||||
ULONG nHigh = ( hb_arrayLen( pTable ) >> 1 );
|
||||
ULONG nMiddle;
|
||||
|
||||
while( nLow <= nHigh )
|
||||
{
|
||||
hb_itemParamStore( 1, hb_arrayGetItemPtr( pTable, nMiddle << 1 ) );
|
||||
break;
|
||||
int result = strcmp( hb_arrayGetCPtr( pTable, ( ( nMiddle = ( nLow + nHigh ) / 2 ) << 1 ) - 1 ), pszFind );
|
||||
|
||||
if( result == 0 )
|
||||
{
|
||||
hb_itemParamStore( 1, hb_arrayGetItemPtr( pTable, nMiddle << 1 ) );
|
||||
break;
|
||||
}
|
||||
else if( result > 0 )
|
||||
nHigh = nMiddle - 1;
|
||||
else
|
||||
nLow = nMiddle + 1;
|
||||
}
|
||||
else if( result > 0 )
|
||||
nHigh = nMiddle - 1;
|
||||
else
|
||||
nLow = nMiddle + 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user