Table version selector version shows the version string stored in version[]. Its implementation is a bit of a hack: empfile[EF_VERSION].cache is set to version[], so it gets passed as context object to nstr_eval(). This permits reading version[] with an NSC_STRINGY selector at offset 0, which is what nsc_init()'s version_ca0 is. Both empfile[] and version_ca need the size of version[]. Since version.h provides only an incomplete type for version[], they use sizeof(PACKAGE_STRING), which isn't exactly clean. Redo version_ca0 as virtual selector. Takes a bit more code, but it's easier to understand. The context object is now unused. Setting empfile[EF_VERSION].cache to a null pointer would trip assertions, so make it point to a dummy. Signed-off-by: Markus Armbruster <armbru@pond.sub.org> |
||
---|---|---|
.. | ||
client | ||
lib | ||
scripts | ||
server | ||
util |