The xdump field data types are abstract symbols "d", "f", "s" and "c". However, the abstraction leaks: we dump the enum nsc_type ca_type values verbatim in meta table field "type", and have symbol table meta-type map all integer types to "d", and both floating-point types to "f". Not a problem for well-behaved clients, since all they do with the dumped value is referencing table meta-type. It is a problem for version-test: since the integer type compatible with an enumeration type is implementation-defined, the type value of selectors of enumeration type can vary between compilers. It also makes table meta-type a somewhat ugly exception to the rule that a symbol table maps integers to names 1:1. Virtual selectors let us seal the abstraction: dump the promoted ca_type value. The integer types get all promoted to NSC_LONG. This takes care of version-test. The floating-point types get all promoted to NSC_DOUBLE. Makes sense. NSC_STRINGY gets promoted to NSC_STRING. This changes all field data types "c" to "s". Getting rid of "c" is a welcome simplification, because now the meaning of meta type field "len" no longer depends on "type", but always means that the array is dumped as that many fields. We lose string length limit information, though. Signed-off-by: Markus Armbruster <armbru@pond.sub.org> |
||
---|---|---|
.. | ||
backups | ||
bug-reports | ||
CHANGES | ||
CHANGES2.3 | ||
CHANGES3.0 | ||
CHANGES4.X | ||
clients-howto | ||
coding | ||
configuration | ||
contributing | ||
debugging | ||
econfig | ||
files | ||
pthreads | ||
README | ||
schedule | ||
threads | ||
unicode | ||
WACKY_IDEAS | ||
WISH_LIST | ||
xdump |
Documentation is like sex: when it is good, it is very, very good; and when it is bad, it is better than nothing. --- Dick Brandon These files should be better than nothing: files What's where. backups Recommendations for how to do backups when running a game. clients-howto Material useful for client writers. troubleshooting Some common problems and solutions. configuration How to turn options on and off, change game parameters, etc... debugging Hints on debugging. econfig Details about the syntax of data/econfig. bug-reports What to do if you find a bug. threads Dave Pare explains how lwp threads work. pthreads Sasha Mikheev's notes on Empire's threading abstraction, and its LWP and POSIX threads implementation. coding Guidelines for writing Empire code contributing How to contribute to Empire unicode Design and implementation of Empire's Unicode support. CHANGES Revision history for all the changes that were coded in the Empire2 project. A much more readable version of this may be found in "info History" (brief) or "info Empire2" (detailed). CHANGES2.3 All changes since revision 2.3 CHANGES3.0 All changes since revision 3.0 CHANGES4.X All changes since revision 4.0 WISH_LIST things which maybe should be coded sometime. WACKY_IDEAS things which shouldn't be coded except possibly as an option.