[Kexi-devel] [patch] fix for handling decimal (numeric) values

Jarosław Staniek js at iidea.pl
Tue May 16 10:16:37 CEST 2006


Hello

A patch to include in mdbtools.

- fixed importing decimal (numeric) values
   (by fixing setting fractional point's position and adding negative sign when
    needed)

Notes:
1. The "negative" bit is the one most significant from the first byte:

  ( *(mdb->pg_buf+start) & 0x80) )

2. I used int negtive variable to speed up the calculations.

3. There was also a bug in using memmove()

4. The patch is already tested and included within Kexi MDB Import driver, 
which utilizes mdbtools.

-- 
regards / pozdrawiam,
  Jaroslaw Staniek / OpenOffice Polska

Sponsored by OpenOffice Polska to work on
* Kexi & KOffice: http://www.kexi-project.org | http://koffice.org/kexi
* KDE3 & KDE4 Libraries For Developing MS Windows Applications:
                   http://www.kdelibs.com/wiki
See also:
* Kexi For MS Windows: http://kexi.pl/wiki/index.php/Kexi_for_MS_Windows
* Kexi Support:        http://www.kexi-project.org/support.html
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: data.c.patch
Url: http://mail.kde.org/pipermail/kexi-devel/attachments/20060516/478a7c9b/attachment.ksh 


More information about the Kexi-devel mailing list