diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 4d33d311ad..cf10f981ca 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,17 @@ The license applies to all entries newer than 2009-04-28. */ +2012-11-11 16:55 UTC+0100 Viktor Szakats (harbour syenar.net) + * extras/gfspell/spellc.c + ! fixed memory corruption in SP_RATE() + + * extras/gfspell/words.dbf + ! deleted two wrong records that cause DBF2DIC() to + not work. + + * extras/gfspell/spell.prg + * minor + 2012-11-11 16:20 UTC+0100 Viktor Szakats (harbour syenar.net) * extras/gfspell/spellc.c + legacy Clipper API constructs upgraded to Harbour ones diff --git a/harbour/extras/gfspell/spell.prg b/harbour/extras/gfspell/spell.prg index 4f6a6dedc3..b01d7b0e8d 100644 --- a/harbour/extras/gfspell/spell.prg +++ b/harbour/extras/gfspell/spell.prg @@ -1069,7 +1069,7 @@ FUNCTION Sp_Init() #else - cBuf := Space( NSIZE + 6 ) + cBuf := Space( NSIZE + 6 ) FRead( t_nHandle, @cBuf, NSIZE + 6 ) #endif @@ -1195,7 +1195,7 @@ FUNCTION DBF2Dic( cDbf, cDictionary, lTalk ) ENDIF - INDEX ON SubStr( DICT->word, 1, 2 ) + PadR( c_metafone( AllTrim( DICT->word ), 5 ), 6 ) TO ( "$$temp" ) + INDEX ON SubStr( DICT->word, 1, 2 ) + PadR( C_MetaFone( AllTrim( DICT->word ), 5 ), 6 ) TO ( "$$temp" ) dbGoTop() diff --git a/harbour/extras/gfspell/spellc.c b/harbour/extras/gfspell/spellc.c index e5f726821b..c23dd16122 100644 --- a/harbour/extras/gfspell/spellc.c +++ b/harbour/extras/gfspell/spellc.c @@ -158,7 +158,7 @@ HB_FUNC( SP_RATE ) HB_ISIZ nMinLen = HB_MIN( nFound, nWord ); HB_ISIZ x = abs( nFound - nWord ); HB_ISIZ lim = HB_MIN( nMinLen, 5 ); - char * cRating = "nZZ"; + char * cRating = hb_strdup( "nZZ" ); *cRating = ( char ) ( HB_MIN( x, 9 ) + '0' ); @@ -181,7 +181,7 @@ HB_FUNC( SP_RATE ) cWord--; } - hb_retclen( cRating, 3 ); + hb_retclen_buffer( cRating, 3 ); } /** Start of C_MetaFone() **/ diff --git a/harbour/extras/gfspell/words.dbf b/harbour/extras/gfspell/words.dbf index e269a2b689..a55be5d928 100644 Binary files a/harbour/extras/gfspell/words.dbf and b/harbour/extras/gfspell/words.dbf differ