home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-06-01 | 1.5 KB | 38 lines | [TEXT/ttxt] |
- xplat.txt
- This document summarises the issues in going cross-platform. By observing these
- simple points you should be able to build a database on one platform and use the
- data file on any of the others. This forms part of our release testing.
-
- MAC REALS
- The default on the Mac is for 10-byte doubles. Both Symantec and CodeWarrior
- have a Project-level option that allows you to build with 8-byte doubles.
-
- If you build a database that has dbReal fields, with the default 10-byte doubles:
- 1) your binary real data won't be cross-platform
- 2) the extra 2 bytes/field will cause errors on other platforms due to the record length
-
-
- FIELD ALIGNMENT
- dbLong, dbUlong, dbDate, dbBLOB and dbWin3RGB fields are aligned on 4-byte
- boundaries. (dbBLOB & subclasses take two longints consecutively).
-
- dbReal fields are aligned on 8-byte boundaries.
-
- This field alignment is automatic and is provided by inserting dummy fields in
- the c-tree record.
-
- You can avoid wasting any space in your records by being aware of these
- alignments and the following two rules:
-
- 1) there is a leading 2-byte field inside the c-tree record
-
- 2) dbChar fields are followed by a trailing null or two (out to a 2-byte
- boundary). Thus a 79 char field takes 80 chars in the record. An 80 char field
- takes 82 chars in the record.
-
- The easy way to minimise padding is keep like types together & declare all your
- dbShort fields up front.
-
- Note: if you wanted to insert an alert to see if dummy padding fields were being
- inserted, have a look at OOF_tableBackend_ctree::BuildBackendtables.
-