19990924-07:18 GMT+1

This commit is contained in:
Viktor Szakats
1999-09-24 05:31:36 +00:00
parent 20315d02c2
commit 563c4b090a
3 changed files with 44 additions and 5 deletions

View File

@@ -1,3 +1,11 @@
19990924-07:18 GMT+1 Victor Szel <info@szelvesz.hu>
* source/hbpp/hbpp.c
! Fixed warning about function not returning value (in ParseDefine())
* source/rtl/classes.c
+ hb_clsDictRealloc() implemented.
By Janica Lubos <janica@fornax.elf.stuba.sk>
19990923-20:55 EDT Paul Tucker <ptucker@sympatico.ca>
* source/rtl/gt/gtwin.c
* fix for redirected console output as reported by Victor

View File

@@ -270,10 +270,11 @@ int ParseDefine( char* sLine)
lastdef->npars = npars;
lastdef->pars = ( npars == 0 )? NULL : strodup ( pars );
return 0;
}
else GenError( _szPErrors, 'P', ERR_DEFINE_ABSENT, NULL, NULL );
else
GenError( _szPErrors, 'P', ERR_DEFINE_ABSENT, NULL, NULL );
return 0;
}
DEFINES* AddDefine ( char* defname, char* value )

View File

@@ -53,6 +53,9 @@
* Copyright 1999 Victor Szel <info@szelvesz.hu>
* hb___msgEval()
*
* Copyright 1999 Janica Lubos <janica@fornax.elf.stuba.sk>
* hb_clsDictRealloc()
*
* See doc/license.txt for licensing terms.
*
*/
@@ -127,9 +130,36 @@ static HARBOUR hb___msgSetData( void );
*/
static void hb_clsDictRealloc( PCLASS pClass )
{
/* TODO: Implement it for very large classes */
if( pClass )
hb_errInternal( 9999, "classes.c hb_clsDictRealloc() not implemented yet", NULL, NULL );
{
PMETHOD pNewMethods;
USHORT uiNewHashKey = pClass->uiHashKey + 20;
USHORT uiMask = uiNewHashKey * BUCKET;
USHORT ui;
pNewMethods = ( PMETHOD ) hb_xgrab( uiNewHashKey * BUCKET * sizeof( METHOD ) );
memset( pNewMethods, 0, uiNewHashKey * BUCKET * sizeof( METHOD ) );
for( ui = 0; ui < ( pClass->uiHashKey * BUCKET ); ui++ )
{
PHB_DYNS pMessage = pClass->pMethods[ ui ].pMessage;
if( pMessage )
{
USHORT uiAt = ( ( ( unsigned ) pMessage ) % uiNewHashKey ) * BUCKET;
while( pNewMethods[ uiAt ].pMessage &&
( pNewMethods[ uiAt ].pMessage != pMessage ) )
uiAt = ( uiAt == uiMask ) ? 0 : uiAt + 1;
pNewMethods[ uiAt ] = pClass->pMethods[ ui ];
}
}
pClass->uiHashKey = uiNewHashKey;
hb_xfree( pClass->pMethods );
pClass->pMethods = pNewMethods;
}
}