Re: [fpc-devel]dbase compile and install on linux

2004-08-01 Thread Michael . VanCanneyt


On Sat, 31 Jul 2004, Vincent Snijders wrote:

 Hi,
 
 Attached patch fixes the installation problems some people had with the dbase units. 
 The install program refused to install the units twice.
 
 Attached patch contains a patch for the Makefile.fpc, a patch for fpcmake to 
 correctly interprete units_i386 as part of the target section and a patch for the 
 resulting Makefile, which you can make yourself too with the patched fpcmake.

Applied, thanks.

Michael.

___
fpc-devel maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel]Some questions about tdataset and a small patch

2004-08-01 Thread Joost van der Sluis
Hi,

I want to discuss something before i make all sort of changes...

Now TDataset uses a buffer of default 10 records. If you go to the 11th
record, the first record is removed from memory. If you go to the first
record, all buffers are cleared, and then they are read again from the
first record. All this is done by tdataset.

This works good for tdbf but it gives some problems with SQL-based
descendants, especially those for DB-servers that don't support
bidirectional cursors. (like Firebird)

If you fetch records from a table using a sql-query, you'll get all the
records, beginning with the first one, then the second one etcetera. But
you can't go back. If you've just fetched the 1000 record, and you need
record 999, you have to start all over again, beginning with record number
one.

This gives some problems if you're buffer is holding the records
1000-1010. If you scroll back from record 999 to 1 the use of bandwith
will be huge.

The solution is to hold all records into memory once they are
fetched. At first sight you will say that that cost an huge amount of
memory, but i doesn't. Because if you used the SQL server right, you only
ask for the records you need by using a 'where' statement.

I see three solutions:

1: Make the tdataset descendents so that they do the fetch from the first
record if you want the prior record. Which is the worst solution, I hope
you all agree with that. (It's the current solution, though. Only it don't
work)
2: Leave the creation and maintenance of the buffer to the tdataset
descendants, in stead of tdataset itself. So that every tdataset
descendent can use it's own buffer-system. (This solution is the one i was
trying, and it can be done. Some small changes to tdbf are needed,
though. And all other descendents have to been looked at too.)
3: Add a property to TDataset, which changes the behaviour of the buffers,
so that they are 'infinitive'. All fetched records are kept in memory. The
descendents that need this can set this property in their
create-functions. Delphi has something like this, if you set the
buffercount to -1.

I think i'm going to try to implement option three. But what do you all
think about this issue?

Further i've fixed a bug that made it impossible to show an integer field
in a tdbedit.

fields.inc: tlongintfield.gettext now uses getvalue
so that the typecasting is used correctly.

diff is attached.


  Joost van der Sluis.

Index: fields.inc
===
RCS file: /FPC/CVS/fpc/fcl/db/fields.inc,v
retrieving revision 1.13
diff -u -r1.13 fields.inc
--- fields.inc  19 Jul 2004 20:27:29 -  1.13
+++ fields.inc  1 Aug 2004 09:06:44 -
@@ -855,7 +855,7 @@
 
 begin
   Atext:='';
-  If Not GetData(@l) then exit;
+  If Not GetValue(l) then exit;
   If ADisplayText or (FEditFormat='') then
 fmt:=FDisplayFormat
   else


[fpc-devel]Upper/lowercae in fcl/db/dbase

2004-08-01 Thread Joost van der Sluis
Hi all,

could someone rename all units in fcl/db/dbase to lowercase and make the
changes to the makefile and such?

Now the tdbf lazarus-components won't compile, because it uses 'DBF' in
stead of 'Dbf'. I can change that, but if someone else wants to use the
dbf-unit he has to known that he has to use 'Dbf'

Further the debugger doesn't work with the filenames which are used now in
the CVS.

I know that tdbf is not only a fpc-package, but the filenames as they are
now are highly irritative/buggy. 

Joost van der Sluis.



___
fpc-devel maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel]Upper/lowercae in fcl/db/dbase

2004-08-01 Thread Joost van der Sluis
 I have already fixed the lazarus registration units here at home. I just
 need to send them to someone of the lazarus group. Lazarus will insert the
 filename correctly when you add a component.

I did that here also. But what is someone put is 'uses dbf' by himself? He
will never know why this isn't working, unless he knows how fpc handles
lowercase/uppercase unit file names.

  Further the debugger doesn't work with the filenames which are used now in
  the CVS.
 Why not ?

That's a good question. But try it, place a breakpoint in dbf.pas and see
how the breakpoint is ignored. But it works when you trace into a method
which is implemented in dbf.

Lazarus can't place the breakpoint: (The file does exist)
TDebugManager.BreakpointAdded A /home/test/fpc/fpc/fcl/db/dbase/Dbf.pas
809
[Debugger] Log output: No source file named Dbf.pas.\n

  I know that tdbf is not only a fpc-package, but the filenames as they are
  now are highly irritative/buggy. 
 
 Maybe Micha Nelissen can give some opinions/ideas ? If he gives the go-go,
 I'll change it in FCL CVS...

On IRC he said i should talk to you. ;)

Joost van der Sluis.


___
fpc-devel maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel]Patch: Trivial cleanup in gdp.pas

2004-08-01 Thread Christian Iversen

Please find attached a trivial cleanup patch that removes a non-effective 
statement. 

-- 
Regards,
Christian Iversen
Index: gdb.pas
===
RCS file: /FPC/CVS/fpc/compiler/gdb.pas,v
retrieving revision 1.19
diff -u -3 -p -r1.19 gdb.pas
--- gdb.pas	20 Jun 2004 08:55:29 -	1.19
+++ gdb.pas	30 Jul 2004 20:06:18 -
@@ -182,9 +182,6 @@ N_BINCL to N_EINCL
  inherited create;
  typ:=ait_stabs;
 
-if current_module.modulename^='NCNV' then
-  current_module:=current_module;
-
  str:=_str;
  if do_count_dbx then
begin