From: <Uwe...@t-...> - 2003-04-16 01:07:56
|
Emmanuel Seyman wrote: >>Also it is not yet possible to change the AppInfo. >>(I.e.: Defaults, Database structure, etc.) >> >> >Isn't possible to use PackAppInfoBlock() to create/modify >an AppInfo block? > Yes! As soon as I've added code who does so! ;-) Just started hacking today. But don't hold your breath! I've got an appointment at the movies tonight. ;-) >>I would like some input on other versions of Pilot-Db >>and general comments as well ofcourse. >>Someone like to volunteer? >> >> >Oh yes, oh yes, oh yes :-) > I was hoping for such an answer! ;-) As an attachment please find: 1. the module DB.pm and (put it in the directory Palm where PDB.pm is) 2. test-pdb.pl (example how to use it) and 3. Betriebskosten.PDB (example database needed by 2.) You also need Perl5 and the P5-Palm package. Try the latest release 1.3.0! I had some problems with earlier versions. >>When writing back the data to a palm file, some of the Header >>bytes (PDB header, not AppInfo) get zeroed out. >>(Offsets into the file are 16-32 and 183-184) >> >> >Bytes 16-32 are the second half of the field "Name" . For a >pilot-db file, this should contain the name of the database, the >extra bytes being zeroed out. > So no need to worry! :-) Thanks! But if it's specified they should be zeroed, then probably pilot-db should do some cleanup there also. The database I retrieved via hotsync from my Palm contained garbage in this place. >All the pilot-db databases I've ever handled have an AppInfo offset >of 88 which means that the pdb header is 136 bytes long. I have no idea >what bytes 182 and 183 contain. > Taking your hint on the offsets I looked at PDB.pm one more time and did a printout of file offsets. I have 2 (Pilot-Db) databases one has 58 and the other B8 (both hex) as AppInfo offset. They have different record numbers. So this might be due to something called record index. The second one is my test DB. (0xB8=184) I think that these two bytes might be the mysterious 2 NUL bytes just before the AppInfo block. The author of PDB.pm seems to have had some trouble when expecting/reading them. He made explicitely sure that they are ignored. So no need to worry either! :-) This is a happy day! :-) See you, Uwe |