|
From: Micha N. <md...@us...> - 2004-08-09 16:48:25
|
Update of /cvsroot/tdbf/tdbf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4715 Modified Files: Dbf.pas history.txt Log Message: added: TDbf.PrepareKey for conversion of key to numeric index key format revert always building Dbf_Wtil: solved using Makefile Index: history.txt =================================================================== RCS file: /cvsroot/tdbf/tdbf/history.txt,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** history.txt 3 Aug 2004 16:17:24 -0000 1.54 --- history.txt 9 Aug 2004 16:48:16 -0000 1.55 *************** *** 44,47 **** --- 44,48 ---- - fixed: underflow buffer in GetStrFromInt when Width=0 - fixed: IndexFile.PrepareKey numeric index: encode value zero to have no digits + - added: TDbf.PrepareKey for conversion of key to numeric index key format Index: Dbf.pas =================================================================== RCS file: /cvsroot/tdbf/tdbf/Dbf.pas,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** Dbf.pas 6 Aug 2004 14:47:49 -0000 1.77 --- Dbf.pas 9 Aug 2004 16:48:16 -0000 1.78 *************** *** 13,16 **** --- 13,17 ---- Dbf_DbfFile, Dbf_Parser, + Dbf_PrsDef, Dbf_Cursor, Dbf_Fields, *************** *** 307,310 **** --- 308,312 ---- procedure SetRange(LowRange: Variant; HighRange: Variant); {$endif} + function PrepareKey(Buffer: Pointer; BufferType: TExpressionType): PChar; function SearchKeyPChar(Key: PChar; SearchType: TSearchKeyType): Boolean; procedure SetRangePChar(LowRange: PChar; HighRange: PChar); *************** *** 443,448 **** {$endif} Types, - {$endif} Dbf_Wtil, {$ifdef DELPHI_6} Variants, --- 445,450 ---- {$endif} Types, Dbf_Wtil, + {$endif} {$ifdef DELPHI_6} Variants, *************** *** 2572,2575 **** --- 2574,2588 ---- {$endif} + function TDbf.PrepareKey(Buffer: Pointer; BufferType: TExpressionType): PChar; + begin + if FIndexFile = nil then + begin + Result := nil; + exit; + end; + + Result := TIndexCursor(FCursor).IndexFile.PrepareKey(Buffer, BufferType); + end; + function TDbf.SearchKeyPChar(Key: PChar; SearchType: TSearchKeyType): Boolean; var *************** *** 2644,2648 **** SetRangeBuffer(fieldsVal, fieldsVal); end; ! procedure TDbf.MasterChanged(Sender: TObject); begin --- 2657,2661 ---- SetRangeBuffer(fieldsVal, fieldsVal); end; ! procedure TDbf.MasterChanged(Sender: TObject); begin |