pdbc - palm database compiler
pdbc [-h -V -W -o file -w[01] -v[0-4]] file
pdbc compiles a text source file into a binary Palm DataBase (PDB) file.
This PDB file can then be loaded into your palm and used by a Palm application.
A PDB file has some attributes (e.g. a filename, creator and type id, ...) and zero or more data records.
Optionally it can have 2 special data chunks
--- the appinfo
and the sortinfo
blocks.
Each data record has some record attributes and the user data.
pdbc converts an ascii text source file into a binary PDB file.
A pdbc source file is an ascii text file.
Keywords are lowercase, value literals are case insensitive.
The //
marks the beginning of a comment until end of line.
file filename = "mydatabase"; creatorid = 'ABCD'; typeid = 'PQRS'; begin
record begin 01 02 03 04 // written as: 01 02 03 04 dec word 1234 5678 0 // written as: 04 D2 16 2E 00 00 end;
record begin "ABC" // written as: 41 42 43 00 'A' 'B' 'C' 'D' // written as: 41 42 43 44 'ABCD' // written as: 41 42 43 44 end;
end;
The newlinespec is one of: unix, windows, mac.
This option is intended to produce reproducable results on several platforms (for my automated regression tests).
Could not open binary include file '%s' for binary include. Could not open source file '%s'. Illegal base %d. Illegal character '%c' (=0x%02x) in '%s' base %d Illegal digit '%c' in '%s' base %d Illegal number size %d Illegal padchar %d. Illegal padstring %d. Illegal size %d. Includes nested too deeply (%d) Multiple appinfo blocks Multiple sortinfo blocks No record allowed in resource file (.prc) No resource allowed in record file (.pdb) Not allowed to set record header settings outside record. Not allowed to set resource id outside resource. Not allowed to set resource type id outside resource. Not allowed to write data outside record. Option -o needs 1 argument\n Unknown option %s\n Unterminated comment starting at line %d User error: %s
Could not compute date %04d/%02d/%02d '%s' base %d too big for %d bytes - extended to %d bytes String '%s' too long for padding to %d bytes User warning: %s
Possible exit status values:
pdbc 1.0
Writing 2 records into file 'out.pdb'. 105 bytes written.
------ Fileheader ------ Fileheader begins at addr 00000000 Fileheader ends at addr 0000004e ------ Recordheaders (2 records) ------ Record [0] header at addr 0000004e Record [1] header at addr 00000056 ------ Record data (2 records) ------ Record [0] data at addr 00000060 Record [1] data at addr 00000064 ====== Data linked ====== Writing 2 records into file 'out.pdb'. 105 bytes written.
If your C compiler stores float/double values in IEEE then you are fine. If not, then you are out of luck.
Arithmetic expressions are always cut to the current size (byte, word, long). There is no automatic expansion if values are outside the range.This is due to the fact that after evaluating the expression the value could either represent a negative number or a big positive one.
Eric Obermuhlner (eric@obermuhlner.com)