empserver/src
Markus Armbruster b4b65f0c35 nsc filetable: Get rid of untidy use of PACKAGE_STRING
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>
2017-08-06 20:09:17 +02:00
..
client Update copyright notice 2017-07-02 17:45:44 +02:00
lib nsc filetable: Get rid of untidy use of PACKAGE_STRING 2017-08-06 20:09:17 +02:00
scripts indent-emp: Take files to indent from command line 2017-08-06 19:59:56 +02:00
server Include "file.h" where it's needed 2017-08-06 20:08:31 +02:00
util Include "file.h" where it's needed 2017-08-06 20:08:31 +02:00