+ Merged from fixbranch

This commit is contained in:
michael 2001-01-18 22:19:17 +00:00
parent 3aed976417
commit 9a9ee075e5
4 changed files with 4222 additions and 0 deletions

1264
fcl/db/dbase/Makefile Normal file

File diff suppressed because it is too large Load Diff

17
fcl/db/dbase/Makefile.fpc Normal file
View File

@ -0,0 +1,17 @@
#
# Makefile.fpc for interbase.pp units
[targets]
units=dbf
examples=testdbf
[require]
options=-S2 -Sh
[install]
unitsubdir=fcl
packagename=fcl
[dirs]
fpcdir=../../..
targetdir=../../$(OS_TARGET)

2896
fcl/db/dbase/dbf.pas Normal file

File diff suppressed because it is too large Load Diff

45
fcl/db/dbase/testdbf.pp Normal file
View File

@ -0,0 +1,45 @@
program dumpdb;
{$i+}
uses db,dbf,sysutils;
Procedure DumpTable (Const TN,FN : String);
Var
I,Count : longint;
F : Text;
Buf : Array[1..1024*4] of byte;
begin
Assign(F,FN);
Rewrite(F);
SetTextBuf(F,Buf);
With TDBF.Create(Nil) do
begin
TableName:=TN;
Open;
While not EOF do
begin
Inc(Count);
For I:=0 to FieldCount-1 do
With Fields[i] do
Writeln(F,FieldName:20,' : ',AsString);
Writeln(F,StringOfChar('=',72));
Next;
end;
end;
Writeln(F,'Dumped total of ',Count,' records.');
Close(F);
end;
Var i : longint;
begin
If ParamCount<2 then
begin
Writeln('Usage: dumpdb tablename filename');
Halt(1);
end;
DumpTable(Paramstr(1),Paramstr(2));
end.