Skip to content
Commit f66e2d53 authored by Peter Hutterer's avatar Peter Hutterer Committed by Pekka Paalanen
Browse files

Validate the protocol xml during scanning



Embed the wayland.dtd protocol data into the scanner binary so we can validate
external protocol files without requiring makefile changes. Hat-tip to Pekka
Paalanen for the embedding trick.
The embedding trick doesn't work well if the to-be-embedded file is in a
different location than the source file, so copy/link it during configure and
then build it in from the local directory.

The current expat parser is not a validating parser, moving scanner.c to
another parser has the risk of breaking compatibility. This patch adds libxml2
as extra (optional) dependency, but that also requires parsing the input
twice.

If the protocol fails validation a warning is printed but no error is returned
otherwise.

Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: default avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
parent e65aed46
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment