diff options
| author | Simon Ser <contact@emersion.fr> | 2020-12-15 20:35:25 +0100 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2021-05-10 22:08:45 +0000 |
| commit | f452e41264387dee4fd737cbf1af58b34b53941b (patch) | |
| tree | 9d5e425408d00363fc6b650fe5d82799da43989b /src/scanner.c | |
| parent | src: Add missing new lines to log messages (diff) | |
| download | wayland-f452e41264387dee4fd737cbf1af58b34b53941b.tar wayland-f452e41264387dee4fd737cbf1af58b34b53941b.tar.gz wayland-f452e41264387dee4fd737cbf1af58b34b53941b.tar.bz2 wayland-f452e41264387dee4fd737cbf1af58b34b53941b.tar.lz wayland-f452e41264387dee4fd737cbf1af58b34b53941b.tar.xz wayland-f452e41264387dee4fd737cbf1af58b34b53941b.tar.zst wayland-f452e41264387dee4fd737cbf1af58b34b53941b.zip | |
build: replace assembly embedding with Python script
This allows Meson to properly track dependencies and re-build the scanner when
editing the dtd. We also stop depending on GNU as' .incbin and make the
embedding less obscure.
Signed-off-by: Simon Ser <contact@emersion.fr>
Diffstat (limited to 'src/scanner.c')
| -rw-r--r-- | src/scanner.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/scanner.c b/src/scanner.c index 36ac905..46bdfc2 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -41,9 +41,9 @@ #if HAVE_LIBXML #include <libxml/parser.h> -/* Embedded wayland.dtd file, see dtddata.S */ -extern char DTD_DATA_begin; -extern int DTD_DATA_len; +/* Embedded wayland.dtd file */ +/* static const char wayland_dtd[]; wayland.dtd */ +#include "wayland.dtd.h" #endif /* Expat must be included after libxml as both want to declare XMLCALL; see @@ -112,8 +112,8 @@ is_dtd_valid(FILE *input, const char *filename) if (!ctx || !dtdctx) abort(); - buffer = xmlParserInputBufferCreateMem(&DTD_DATA_begin, - DTD_DATA_len, + buffer = xmlParserInputBufferCreateMem(wayland_dtd, + sizeof(wayland_dtd), XML_CHAR_ENCODING_UTF8); if (!buffer) { fprintf(stderr, "Failed to init buffer for DTD.\n"); |
