scanner: support "since" attribute for enum entries
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 23 Jan 2017 23:56:38 +0000 (09:56 +1000)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 24 Jan 2017 09:59:00 +0000 (11:59 +0200)
commitf8ab47690c03245da4938cbab7a4ba6bcb1bebe0
treead9a015b329552129e0965a06678bbced9bb0f8c
parent6c481003a2e971c59d3e2fc758d50bb4d623f2bd
scanner: support "since" attribute for enum entries

This was already in the DTD but not supported by the scanner.

The check for ever-increasing "since" tags is not strictly required for enum
entries as we control the binary value. But it keeps the xml file in
good order, preventing things like:

      <entry name="first" value="…" />
      <entry name="second" value="…" since="3"/>
      <entry name="third" value="…" since="2"/>
      <entry name="fourth" value="…" since="3"/>

If this is undesirable in the future the check can be removed without
side-effects.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
src/scanner.c
tests/data/small-client-core.h
tests/data/small-client.h
tests/data/small-code-core.c
tests/data/small-code.c
tests/data/small-server-core.h
tests/data/small-server.h
tests/data/small.xml