Date: Wed, 27 Nov 2024 12:02:06 GMT From: Robert Clausecker <fuz@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 46ee3a64e2c1 - main - textproc/rxp: update to 1.5.2 and unbreak Message-ID: <202411271202.4ARC267q070238@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=46ee3a64e2c174407a9346ef72676fb865b240d7 commit 46ee3a64e2c174407a9346ef72676fb865b240d7 Author: Mikhail Teterin <mi@FreeBSD.org> AuthorDate: 2024-11-26 12:34:32 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2024-11-27 11:57:30 +0000 textproc/rxp: update to 1.5.2 and unbreak PR: 282865 --- textproc/rxp/Makefile | 43 ++--- textproc/rxp/distinfo | 5 +- textproc/rxp/files/BSDmakefile.lib | 26 --- textproc/rxp/files/BSDmakefile.rxp | 12 -- textproc/rxp/files/patch-char-size-8 | 21 +++ textproc/rxp/files/patch-warnings | 296 ++++++++++++++++------------------- textproc/rxp/pkg-plist | 9 +- 7 files changed, 179 insertions(+), 233 deletions(-) diff --git a/textproc/rxp/Makefile b/textproc/rxp/Makefile index 576594d0c667..0e64868cb2e7 100644 --- a/textproc/rxp/Makefile +++ b/textproc/rxp/Makefile @@ -1,8 +1,7 @@ PORTNAME= rxp -PORTVERSION= 1.4.4 -PORTREVISION= 4 +DISTVERSION= 1.5.2 CATEGORIES= textproc -MASTER_SITES= ftp://ftp.cogsci.ed.ac.uk/pub/richard/ +MASTER_SITES= https://www.inf.ed.ac.uk/research/isddarch/admin/ MAINTAINER= ports@virtual-estates.net COMMENT= Validating XML parser written in C @@ -10,34 +9,24 @@ WWW= https://www.cogsci.ed.ac.uk/~richard/rxp.html LICENSE= GPLv2 -BROKEN= Unfetchable -DEPRECATED= Unfetchable and outdated -EXPIRATION_DATE=2024-12-31 - -USES= uidfix - +USES= libtool USE_LDCONFIG= yes -PATCH_WRKSRC= ${WRKSRC}/${PORTNAME}-${PORTVERSION} -WRKSRC= ${WRKDIR} -MAKE_ARGS+= VPATH=${PATCH_WRKSRC} OPTIONS_SINGLE= CHAR_SIZE OPTIONS_SINGLE_CHAR_SIZE=8 16 OPTIONS_DEFAULT=8 -8_DESC= 8-bit characters (required by speech_tools, festival) -16_DESC= 16-bit characters - -MAKE_ARGS+= CHAR_SIZE=${PORT_OPTIONS:C/[^0-9]//g} - -do-configure: -.for s in lib rxp - ${MKDIR} ${WRKDIR}/$s - ${LN} -s ${FILESDIR}/BSDmakefile.$s ${WRKDIR}/$s/Makefile - ${PRINTF} "SUBDIR+=\t%s\n" $s >> ${WRKDIR}/Makefile -.endfor - ${PRINTF} "\n.include <bsd.subdir.mk>\n" >> ${WRKDIR}/Makefile - -post-build: - ${MKDIR} ${STAGEDIR}${PREFIX}/include/rxp +8_DESC= 8-bit characters (required by speech_tools, festival) +16_DESC= 16-bit characters (upstream's default) + +CFLAGS+= -Wno-empty-body +GNU_CONFIGURE= yes +INSTALL_TARGET= install-strip +EXTRACT_AFTER_ARGS= --exclude win32.h +MAKE_ENV+= AM_LDFLAGS="-version-info 2:0:0" + +post-patch: + @${REINPLACE_CMD} -E -e 's|include/win32.h *||' \ + -e 's,CHAR_SIZE=[0-9]+,CHAR_SIZE=${PORT_OPTIONS:C/[^0-9]//g},g' \ + ${WRKSRC}/Makefile* .include <bsd.port.mk> diff --git a/textproc/rxp/distinfo b/textproc/rxp/distinfo index 68401defa15b..48e33d44990b 100644 --- a/textproc/rxp/distinfo +++ b/textproc/rxp/distinfo @@ -1,2 +1,3 @@ -SHA256 (rxp-1.4.4.tar.gz) = 96564e1ae1dd971415409585b697d62caac80fafaba00af8b8965128b4814208 -SIZE (rxp-1.4.4.tar.gz) = 153946 +TIMESTAMP = 1705901987 +SHA256 (rxp-1.5.2.tar.gz) = fa641b4a5185d0a1d9610c8245b9d5aff5972c1a28a0da94f3e38d69f6c14513 +SIZE (rxp-1.5.2.tar.gz) = 476952 diff --git a/textproc/rxp/files/BSDmakefile.lib b/textproc/rxp/files/BSDmakefile.lib deleted file mode 100644 index f0c2d9e2f113..000000000000 --- a/textproc/rxp/files/BSDmakefile.lib +++ /dev/null @@ -1,26 +0,0 @@ -LIB= rxp -SHLIB_MAJOR= 1 -SHLIB_MINOR= 4 -MK_PROFILE= no - -CFLAGS+= -DCHAR_SIZE=${CHAR_SIZE} -DHAVE_LIBZ -CFLAGS+= -Werror -WARNS= 6 -LDADD= -lz - -SRCS= catalog.c catutil.c resolve.c entityopener.c xmlparser.c \ - url.c charset.c ctype16.c dtd.c input.c stdio16.c string16.c \ - system.c hash.c version.c namespaces.c http.c \ - nf16check.c nf16data.c -INCS= charset.h ctype16.h dtd.h hash.h input.h namespaces.h \ - rxputil.h stdio16.h string16.h system.h url.h version.h \ - xmlparser.h - -LIBDIR= ${PREFIX}/lib -INCSDIR=${PREFIX}/include/rxp - -.include <bsd.lib.mk> - -.if ${CHAR_SIZE} == 8 -CFLAGS+= -Wno-unused-label -.endif diff --git a/textproc/rxp/files/BSDmakefile.rxp b/textproc/rxp/files/BSDmakefile.rxp deleted file mode 100644 index 61ad7740ec71..000000000000 --- a/textproc/rxp/files/BSDmakefile.rxp +++ /dev/null @@ -1,12 +0,0 @@ -PROG= rxp - -SRCS= rxp.c infoset-print.c -CFLAGS+= -DCHAR_SIZE=${CHAR_SIZE} -DHAVE_LIBZ -CFLAGS+= -Werror -WARNS= 6 - -BINDIR= ${PREFIX}/bin -MANDIR= ${PREFIX}/share/man/man -LDADD= -L${.CURDIR:H}/lib -lrxp - -.include <bsd.prog.mk> diff --git a/textproc/rxp/files/patch-char-size-8 b/textproc/rxp/files/patch-char-size-8 new file mode 100644 index 000000000000..095aa014fdbd --- /dev/null +++ b/textproc/rxp/files/patch-char-size-8 @@ -0,0 +1,21 @@ +Restore the option to build with CHAR_SIZE being 8, which upstream +seems to have abandoned. We want it to be used with Festival, among +other things. + + -mi (November 2024) + +--- include/ctype16.h 2021-06-14 13:27:08.000000000 -0400 ++++ include/ctype16.h 2024-11-19 13:24:35.494673000 -0500 +@@ -28,7 +28,10 @@ + #define is_xml_namechar(c,map) (map[(int)(c) & 0xff] & xml_namechar) + #define is_xml_whitespace(c) (xml_char_map[(int)(c) & 0xff] & xml_whitespace) ++#define is_xml_whitespace_16 is_xml_whitespace ++#define is_xml_namestart_16 is_xml_namestart ++#define is_xml_namechar_16 is_xml_namechar + +-#define xml_char_map_11 0 +-#define xml_char_map_105 0 ++#define xml_char_map_11 xml_char_map ++#define xml_char_map_105 xml_char_map + + #else diff --git a/textproc/rxp/files/patch-warnings b/textproc/rxp/files/patch-warnings index c167c9313caf..2e9d48276e02 100644 --- a/textproc/rxp/files/patch-warnings +++ b/textproc/rxp/files/patch-warnings @@ -1,5 +1,5 @@ ---- catalog_dtd.c 2003-06-24 09:15:55.000000000 -0400 -+++ catalog_dtd.c 2021-02-25 15:07:41.462399000 -0500 +--- catalog/catalog_dtd.c 2003-06-24 09:15:55.000000000 -0400 ++++ catalog/catalog_dtd.c 2021-02-25 15:07:41.462399000 -0500 @@ -23,9 +23,9 @@ */ @@ -13,8 +13,8 @@ +static const char xml_catalog_dtd[] = "<!ENTITY % pubIdChars \"CDATA\">\n" "<!ENTITY % publicIdentifier \"%pubIdChars;\">\n" ---- catalog.c 2004-10-11 08:28:31.000000000 -0400 -+++ catalog.c 2021-02-25 15:07:41.463274000 -0500 +--- catalog/catalog.c 2004-10-11 08:28:31.000000000 -0400 ++++ catalog/catalog.c 2021-02-25 15:07:41.463274000 -0500 @@ -20,5 +20,5 @@ static Parser OpenXMLDocument(char *uri) static void CloseXMLDocument(Parser p); static int SkipElement(XBit bit, Parser p); @@ -105,8 +105,8 @@ +CatalogEntryFile GetCatalogEntryFile(Catalog catalog, const char *catalog_uri) { int i; ---- catalog.h 2003-08-28 12:13:19.000000000 -0400 -+++ catalog.h 2021-02-25 15:07:41.463639000 -0500 +--- catalog/catalog.h 2003-08-28 12:13:19.000000000 -0400 ++++ catalog/catalog.h 2021-02-25 15:07:41.463639000 -0500 @@ -48,13 +48,13 @@ extern void FreeCatalogEntry(CatalogEntr extern CatalogEntryFile catalog_resource_error; @@ -124,8 +124,8 @@ +extern const char *ResolveURI(Catalog catalog, const char *uri); extern void CatalogEnable(Parser p); ---- catutil.c 2003-06-24 11:55:27.000000000 -0400 -+++ catutil.c 2021-02-25 15:07:41.464062000 -0500 +--- catalog/catutil.c 2003-06-24 11:55:27.000000000 -0400 ++++ catalog/catutil.c 2021-02-25 15:07:41.464062000 -0500 @@ -35,5 +35,5 @@ char *norm_pub(const char8 *public8, con { int len = public8 ? strlen(public8) : strlen16(public16); @@ -152,27 +152,8 @@ + static const char *p = "urn:publicid:"; int i; ---- ctype16.h 2004-03-17 10:53:21.000000000 -0500 -+++ ctype16.h 2021-02-25 15:07:41.464419000 -0500 -@@ -49,13 +49,13 @@ extern STD_API unsigned char xml_char_ma - - #define is_xml_namestart(c,map) \ -- (c < 0x10000 ? (map[c] & xml_namestart) : (map[c >> 16] & xml_nameblock)) -+ ((sizeof(c) <= 2 || c < 0x10000) ? (map[c] & xml_namestart) : (map[c >> 16] & xml_nameblock)) - - #define is_xml_namechar(c,map) \ -- (c < 0x10000 ? (map[c] & xml_namechar) : (map[c >> 16] & xml_nameblock)) -+ ((sizeof(c) <= 2 || c < 0x10000) ? (map[c] & xml_namechar) : (map[c >> 16] & xml_nameblock)) - - /* NB whitespace map is the same for 1.0 and 1.1 */ - - #define is_xml_whitespace(c) \ -- (c < 0x10000 && (xml_char_map[c] & xml_whitespace)) -+ ((sizeof(c) <= 2 || c < 0x10000) && (xml_char_map[c] & xml_whitespace)) - - #endif ---- dtd.c 2004-11-02 13:20:20.000000000 -0500 -+++ dtd.c 2021-02-25 15:07:41.475773000 -0500 +--- src/dtd.c 2004-11-02 13:20:20.000000000 -0500 ++++ src/dtd.c 2021-02-25 15:07:41.475773000 -0500 @@ -173,12 +173,11 @@ void FreeDtd(Dtd dtd) */ @@ -328,8 +309,8 @@ + char8 *publicid, char8 *systemid, Entity parent) { ---- dtd.h 2004-11-02 12:46:07.000000000 -0500 -+++ dtd.h 2021-02-25 15:07:41.465041000 -0500 +--- include/dtd.h 2004-11-02 12:46:07.000000000 -0500 ++++ include/dtd.h 2021-02-25 15:07:41.465041000 -0500 @@ -48,11 +48,11 @@ struct entity { /* All entities */ @@ -459,8 +440,8 @@ + char8 *publicid, char8 *systemid, Entity parent); XML_API NotationDefinition FindNotationN(Dtd dtd, const Char *name, int namelen); ---- entityopener.c 2003-11-27 09:06:38.000000000 -0500 -+++ entityopener.c 2021-02-25 15:07:41.465352000 -0500 +--- catalog/entityopener.c 2003-11-27 09:06:38.000000000 -0500 ++++ catalog/entityopener.c 2021-02-25 15:07:41.465352000 -0500 @@ -9,5 +9,5 @@ #include "dtd.h" @@ -468,8 +449,8 @@ +static InputSource catalog_entity_open(Entity ent, void *arg) { Catalog catalog = arg; ---- http.c 2001-05-01 10:29:34.000000000 -0400 -+++ http.c 2021-02-25 15:33:16.444375000 -0500 +--- src/http.c 2001-05-01 10:29:34.000000000 -0400 ++++ src/http.c 2021-02-25 15:33:16.444375000 -0500 @@ -139,5 +139,5 @@ FILE16 *http_open(const char *url, int server_port; char buf[100]; @@ -521,16 +502,16 @@ + /* fall through */ default: if(!VectorPush(text, c)) ---- infoset-print.c 2004-11-03 12:17:06.000000000 -0500 -+++ infoset-print.c 2021-02-25 15:33:58.693693000 -0500 -@@ -23,5 +23,5 @@ static void children(FILE16 *f, int leve +--- src/infoset-print.c 2021-06-14 13:42:14.000000000 -0400 ++++ src/infoset-print.c 2024-01-22 00:58:08.195742000 -0500 +@@ -23,5 +23,5 @@ HashTable id_table); static void notations(FILE16 *f, int level, Dtd dtd); -static void unparsed_entities(FILE16 *f, int level, Dtd dtd, Entity docent); +static void unparsed_entities(FILE16 *f, int level, Dtd dtd); static void baseURI(FILE16 *f, int level, const char8 *uri); static void standalone(FILE16 *f, int level, StandaloneDeclaration sd); -@@ -33,11 +33,11 @@ static void element(FILE16 *f, int level +@@ -33,11 +33,11 @@ HashTable id_table); static void pi(FILE16 *f, int level, Dtd dtd, XBit bit); -static void cdsect(FILE16 *f, int level, Dtd dtd, XBit bit); @@ -546,14 +527,14 @@ +static void character(FILE16 *f, int level, const char *ecw, int c); static void attributes(FILE16 *f, int level, Dtd dtd, XBit bit, HashTable id_table); -@@ -46,5 +46,5 @@ static void attribute(FILE16 *f, int lev +@@ -46,5 +46,5 @@ static void namespace_attributes(FILE16 *f, int level, Dtd dtd, XBit bit, HashTable id_table); -static void inscope_namespaces(FILE16 *f, int level, Dtd dtd, XBit bit); +static void inscope_namespaces(FILE16 *f, int level, XBit bit); #if 0 static void internal_entity(FILE16 *f, int level, Entity entity); -@@ -53,7 +53,7 @@ static void external_entity(FILE16 *f, i +@@ -53,7 +53,7 @@ static void unparsed_entity(FILE16 *f, int level, Entity entity); -static void simple(FILE16 *f, int level, char *name, const char *value); @@ -564,49 +545,49 @@ +static void pointer(FILE16 *f, int level, const char *name, Char *id); static Char *make_id(const char *type, const Char *name, int count); static void indent(FILE16 *f, int level); -@@ -67,5 +67,5 @@ static void find_ids(Dtd dtd, XBit *bits +@@ -67,5 +67,5 @@ int *counter); -struct xbit bogus_bit; +static struct xbit bogus_bit; static Char xmlns_ns[] = {'h','t','t','p',':','/','/','w','w','w','.','w', '3', -@@ -93,5 +93,5 @@ void infoset_print(FILE16 *f, Parser p, +@@ -93,5 +93,5 @@ notations(f, 1, dtd); - unparsed_entities(f, 1, dtd, p->document_entity); + unparsed_entities(f, 1, dtd); baseURI(f, 1, EntityBaseURL(p->document_entity)); -@@ -172,5 +172,5 @@ static void notations(FILE16 *f, int lev +@@ -172,5 +172,5 @@ } -static void unparsed_entities(FILE16 *f, int level, Dtd dtd, Entity docent) +static void unparsed_entities(FILE16 *f, int level, Dtd dtd) { Entity e; -@@ -280,5 +280,5 @@ static void version(FILE16 *f, int level +@@ -280,5 +280,5 @@ } -static void simple(FILE16 *f, int level, char *name, const char *value) +static void simple(FILE16 *f, int level, const char *name, const char *value) { indent(f, level); -@@ -294,5 +294,5 @@ static void simple(FILE16 *f, int level, +@@ -294,5 +294,5 @@ } -static void Simple(FILE16 *f, int level, char *name, const Char *value) +static void Simple(FILE16 *f, int level, const char *name, const Char *value) { indent(f, level); -@@ -308,5 +308,5 @@ static void Simple(FILE16 *f, int level, +@@ -308,5 +308,5 @@ } -static void pointer(FILE16 *f, int level, char *name, Char *id) +static void pointer(FILE16 *f, int level, const char *name, Char *id) { indent(f, level); -@@ -342,11 +342,11 @@ static void item(FILE16 *f, int level, D +@@ -342,11 +342,11 @@ break; case XBIT_cdsect: - cdsect(f, level, dtd, bit); @@ -621,28 +602,28 @@ + comment(f, level, bit); break; default: -@@ -396,5 +396,5 @@ static void element(FILE16 *f, int level +@@ -396,5 +396,5 @@ namespace_attributes(f, level+1, dtd, bit, id_table); - inscope_namespaces(f, level+1, dtd, bit); + inscope_namespaces(f, level + 1, bit); baseURI(f, 1, EntityBaseURL(bit->entity)); /* XXX xml:base */ -@@ -433,5 +433,5 @@ static void pi(FILE16 *f, int level, Dtd +@@ -433,5 +433,5 @@ } -static void cdsect(FILE16 *f, int level, Dtd dtd, XBit bit) +static void cdsect(FILE16 *f, int level, XBit bit) { Char *p; -@@ -443,5 +443,5 @@ static void cdsect(FILE16 *f, int level, +@@ -443,5 +443,5 @@ for(p=bit->pcdata_chars; *p; p++) - character(f, level, dtd, "false", *p); + character(f, level, "false", *p); #if 0 -@@ -451,8 +451,8 @@ static void cdsect(FILE16 *f, int level, +@@ -451,8 +451,8 @@ } -static void pcdata(FILE16 *f, int level, Dtd dtd, XBit bit) @@ -653,39 +634,39 @@ + const char *ecw; ecw = !bit->parent->element_definition->declared ? 0 : -@@ -461,8 +461,8 @@ static void pcdata(FILE16 *f, int level, +@@ -461,8 +461,8 @@ for(p=bit->pcdata_chars; *p; p++) -- character(f, level, dtd, is_xml_whitespace(*p) ? ecw : "false", *p); -+ character(f, level, is_xml_whitespace(*p) ? ecw : "false", *p); +- character(f, level, dtd, is_xml_whitespace_16(*p) ? ecw : "false", *p); ++ character(f, level, is_xml_whitespace_16(*p) ? ecw : "false", *p); } -static void character(FILE16 *f, int level, Dtd dtd, char *ecw, int c) +static void character(FILE16 *f, int level, const char *ecw, int c) { indent(f, level); -@@ -478,5 +478,5 @@ static void character(FILE16 *f, int lev +@@ -478,5 +478,5 @@ } -static void comment(FILE16 *f, int level, Dtd dtd, XBit bit) +static void comment(FILE16 *f, int level, XBit bit) { indent(f, level); -@@ -615,4 +615,5 @@ static void attribute(FILE16 *f, int lev +@@ -615,4 +615,5 @@ free(token); free(id); + /* FALLTHROUGH */ default: simple(f, level+1, "references", 0); -@@ -640,5 +641,5 @@ static void attribute(FILE16 *f, int lev +@@ -640,5 +641,5 @@ } -static void inscope_namespaces(FILE16 *f, int level, Dtd dtd, XBit bit) +static void inscope_namespaces(FILE16 *f, int level, XBit bit) { NamespaceBinding nsb, nsb2; ---- input.c 2005-01-14 11:10:00.000000000 -0500 -+++ input.c 2021-02-25 15:07:41.467694000 -0500 +--- src/input.c 2005-01-14 11:10:00.000000000 -0500 ++++ src/input.c 2021-02-25 15:07:41.467694000 -0500 @@ -79,5 +79,5 @@ InputSource EntityOpen(Entity e) else { @@ -720,8 +701,8 @@ - END_OF_LINE; } ---- namespaces.c 2003-06-02 12:56:35.000000000 -0400 -+++ namespaces.c 2021-02-25 15:07:41.468014000 -0500 +--- src/namespaces.c 2003-06-02 12:56:35.000000000 -0400 ++++ src/namespaces.c 2021-02-25 15:07:41.468014000 -0500 @@ -25,5 +25,5 @@ static void FreeNSElementDefinition(NSEl static void FreeNSAttributeDefinition(NSAttributeDefinition attribute); @@ -743,8 +724,8 @@ + Free(attribute->name); Free(attribute); } ---- namespaces.h 2003-06-02 12:56:35.000000000 -0400 -+++ namespaces.h 2021-02-25 15:07:41.468292000 -0500 +--- include/namespaces.h 2003-06-02 12:56:35.000000000 -0400 ++++ include/namespaces.h 2021-02-25 15:07:41.468292000 -0500 @@ -30,5 +30,5 @@ struct RXP_NAMESPACE { struct ns_element_definition { @@ -759,8 +740,8 @@ + Char *name; int attrnum; }; ---- nf16check.c 2003-09-02 10:02:45.000000000 -0400 -+++ nf16check.c 2021-02-25 15:07:41.468701000 -0500 +--- src/nf16check.c 2003-09-02 10:02:45.000000000 -0400 ++++ src/nf16check.c 2021-02-25 15:07:41.468701000 -0500 @@ -7,4 +7,6 @@ #include <stdlib.h> @@ -801,7 +782,7 @@ /* variant of nf16check, s_length gives length of s */ @@ -226,4 +228,5 @@ nf16res nf16checkL (NF16Checker checker, int lastclass = checker->lastclass; - char16 c; + unsigned int c; /* changed from char16 (RMT) */ + uint32_t C; flag f; int class; @@ -838,8 +819,8 @@ + else if (C < 0xE01F0) f = simp; else f = NoNo; goto NEWFLAG; /* start again with switch */ ---- resolve.c 2003-08-28 12:13:12.000000000 -0400 -+++ resolve.c 2021-02-25 15:07:41.469245000 -0500 +--- catalog/resolve.c 2003-08-28 12:13:12.000000000 -0400 ++++ catalog/resolve.c 2021-02-25 15:07:41.469245000 -0500 @@ -8,11 +8,11 @@ #include "string.h" @@ -1010,9 +991,9 @@ + return strlen((*(const CatalogEntry *)b)->match) - + strlen((*(const CatalogEntry *)a)->match); } ---- rxp.c 2005-01-14 11:57:49.000000000 -0500 -+++ rxp.c 2021-02-25 15:07:41.469916000 -0500 -@@ -32,40 +32,39 @@ +--- src/rxp.c 2019-10-24 14:23:25.000000000 -0400 ++++ src/rxp.c 2024-10-20 22:09:28.202835000 -0400 +@@ -33,40 +33,39 @@ #include "catalog.h" -int attr_compare(const void *a, const void *b); @@ -1021,7 +1002,7 @@ -void print_ns_attrs(NamespaceBinding ns, int count); -void print_namespaces(NamespaceBinding ns); -void print_attrs(ElementDefinition e, Attribute a); --void print_text(Char *text); +-void print_text(Char *text, int is_attr); -int printable(int c); -void print_special(int c); -void print_text_bit(Char *text); @@ -1035,7 +1016,7 @@ +static void print_ns_attrs(NamespaceBinding ns, int count); +static void print_namespaces(NamespaceBinding ns); +static void print_attrs(Attribute a); -+static void print_text(const Char *text); ++static void print_text(const Char *text, int is_attr); +static int printable(int c); +static void print_special(int c); +static void print_text_bit(Char *text); @@ -1048,14 +1029,14 @@ +static int verbose = 0, expand = 1, nsgml = 0, attr_defaults = 0, merge = 0, strict_xml = 0, tree = 0, validate = 0, xml_space = 0, namespaces = 0, simple_error = 0, experiment = 0, - read_dtd = 0, unicode_check = 0, xml_id = 0; --enum {o_unspec, o_none, o_bits, o_plain, o_can1, o_can2, o_can3, o_infoset, o_diff} output_format = o_unspec; + read_dtd = 0, unicode_check = 0, xml_id = 0, pre_105 = 0; +-enum {o_unspec, o_none, o_bits, o_plain, o_can1, o_can2, o_can3, o_infoset, o_diff, o_diff2} output_format = o_unspec; -char *enc_name = 0, *base_uri = 0, *my_dtd_name, *my_dtd_sysid = 0; -CharacterEncoding encoding = CE_unknown; -InputSource source = 0; -int need_canonical_dtd = 0; -int xml_version; -+static enum {o_unspec, o_none, o_bits, o_plain, o_can1, o_can2, o_can3, o_infoset, o_diff} output_format = o_unspec; ++static enum {o_unspec, o_none, o_bits, o_plain, o_can1, o_can2, o_can3, o_infoset, o_diff, o_diff2} output_format = o_unspec; +static char *enc_name = NULL, *base_uri = NULL, *my_dtd_name, *my_dtd_sysid = NULL; +static CharacterEncoding encoding = CE_unknown; +static InputSource source = NULL; @@ -1077,35 +1058,35 @@ +StaticVector(XBit, dtd_bits); int main(int argc, char **argv) -@@ -565,5 +564,5 @@ void print_bit(Parser p, XBit bit) +@@ -581,5 +580,5 @@ { const char *sys, *pub; - char *ws[] = {"u", "d", "p"}; + const char *ws[] = {"u", "d", "p"}; if(output_format == o_none && bit->type != XBIT_error) -@@ -601,5 +600,5 @@ void print_bit(Parser p, XBit bit) +@@ -617,5 +616,5 @@ if(xml_space) Printf("(ws=%s) ", ws[bit->wsm]); - print_attrs(0, bit->attributes); + print_attrs(bit->attributes); print_namespaces(bit->ns_dict); Printf("\n"); -@@ -614,5 +613,5 @@ void print_bit(Parser p, XBit bit) +@@ -630,5 +629,5 @@ if(xml_space) Printf("(ws=%s) ", ws[bit->wsm]); - print_attrs(0, bit->attributes); + print_attrs(bit->attributes); print_namespaces(bit->ns_dict); Printf("\n"); -@@ -685,5 +684,5 @@ void print_bit(Parser p, XBit bit) +@@ -701,5 +700,5 @@ print_canonical_dtd(p, bit->element_definition->name); Printf("<%S", bit->element_definition->name); - print_attrs(bit->element_definition, bit->attributes); + print_attrs(bit->attributes); print_ns_attrs(bit->ns_dict, bit->nsc); if(bit->type == XBIT_start) -@@ -732,9 +731,9 @@ void print_bit(Parser p, XBit bit) +@@ -769,9 +768,9 @@ int attr_compare(const void *a, const void *b) { - return Strcmp((*(Attribute *)a)->definition->name, @@ -1118,24 +1099,31 @@ +void print_attrs(Attribute a) { Attribute b; -@@ -789,5 +788,5 @@ void dtd_cb(XBit bit, void *arg) +@@ -826,5 +825,5 @@ } -void dtd_cb2(XBit bit, void *arg) +void dtd_cb2(XBit bit, void *arg __unused) { XBit copy; -@@ -802,7 +801,7 @@ void dtd_cb2(XBit bit, void *arg) +@@ -839,7 +838,7 @@ } --void print_text(Char *text) -+void print_text(const Char *text) +-void print_text(Char *text, int is_attr) ++void print_text(const Char *text, int is_attr) { - Char *pc, *last; + const Char *pc, *last; if(output_format == o_bits || !expand) -@@ -901,25 +900,4 @@ void print_special(int c) +@@ -875,5 +874,5 @@ + (xml_version > XV_1_0 && type == 3)) + { +- Char *end = (c > 0xffff ? pc-1 : pc); /* if it's a surrogate pair, before the first */ ++ const Char *end = (c > 0xffff ? pc-1 : pc); /* if it's a surrogate pair, before the first */ + if(end > last) + Printf("%.*S", end - last, last); +@@ -949,25 +948,4 @@ } -InputSource entity_open(Entity ent, void *arg) @@ -1161,7 +1149,7 @@ - void print_ns_attrs(NamespaceBinding ns, int count) { -@@ -969,13 +947,13 @@ void print_namespaces(NamespaceBinding n +@@ -1017,13 +995,13 @@ } -int notation_compare(const void *a, const void *b) @@ -1180,15 +1168,15 @@ + return Strcmp((*(const Entity *)a)->name, (*(const Entity *)b)->name); } -@@ -1099,5 +1077,5 @@ static const char8 *minimal_uri(const ch +@@ -1147,5 +1125,5 @@ #ifdef TIME_LIMIT -void time_exceeded(int sig) +void time_exceeded(int sig __unused) { fprintf(stderr, "CPU time limit (%d seconds) exceeded, sorry\n", ---- rxputil.h 2003-11-27 09:06:57.000000000 -0500 -+++ rxputil.h 2021-02-25 15:07:41.470232000 -0500 +--- include/rxputil.h 2003-11-27 09:06:57.000000000 -0500 ++++ include/rxputil.h 2021-02-25 15:07:41.470232000 -0500 @@ -6,4 +6,8 @@ type *name @@ -1198,8 +1186,8 @@ + #define VectorInit(v) \ ((v##_count) = (v##_alloc) = 0, (v) = 0) ---- stdio16.c 2005-01-14 11:10:54.000000000 -0500 -+++ stdio16.c 2021-02-25 15:32:25.156652000 -0500 +--- src/stdio16.c 2005-01-14 11:10:54.000000000 -0500 ++++ src/stdio16.c 2021-02-25 15:32:25.156652000 -0500 @@ -15,4 +15,5 @@ #include <string.h> #include <stdarg.h> @@ -1365,8 +1353,8 @@ +static int GzipFlush(FILE16 *file __unused) { return 0; ---- stdio16.h 2002-10-03 10:37:44.000000000 -0400 -+++ stdio16.h 2021-02-25 15:28:59.692044000 -0500 +--- include/stdio16.h 2002-10-03 10:37:44.000000000 -0400 ++++ include/stdio16.h 2021-02-25 15:28:59.692044000 -0500 @@ -5,5 +5,5 @@ #include <stdio.h> #ifdef HAVE_LIBZ @@ -1396,8 +1384,8 @@ +#endif STD_API int Fprintf(FILE16 *file, const char *format, ...); ---- string16.c 2004-10-11 12:18:29.000000000 -0400 -+++ string16.c 2021-02-25 15:07:41.471817000 -0500 +--- src/string16.c 2004-10-11 12:18:29.000000000 -0400 ++++ src/string16.c 2021-02-25 15:07:41.471817000 -0500 @@ -171,9 +171,9 @@ size_t strlen16(const char16 *s) } @@ -1435,8 +1423,8 @@ return 0; } - ---- string16.h 1999-05-28 08:08:38.000000000 -0400 -+++ string16.h 2021-02-25 15:07:41.472166000 -0500 +--- include/string16.h 1999-05-28 08:08:38.000000000 -0400 ++++ include/string16.h 2021-02-25 15:07:41.472166000 -0500 @@ -23,5 +23,5 @@ STD_API int strncasecmp8(const char8 *, STD_API char16 *strdup16(const char16 *s); @@ -1451,13 +1439,12 @@ +STD_API const char16 *strstr16(const char16 *, const char16 *); STD_API void translate_latin1_utf16(const char8 *from, char16 *to); ---- system.h 2003-05-19 20:17:27.000000000 -0400 -+++ system.h 2021-02-25 15:10:55.417342000 -0500 -@@ -1,3 +1,6 @@ +--- include/system.h 2003-05-19 20:17:27.000000000 -0400 ++++ include/system.h 2021-02-25 15:10:55.417342000 -0500 +@@ -1,3 +1,5 @@ +#ifndef _RXP_SYSTEM_H +#define _RXP_SYSTEM_H #define HAVE_LONG_LONG -+#define HAVE_LONG_DOUBLE #define SOCKETS_IMPLEMENTED @@ -11,2 +14,4 @@ void *Malloc(int bytes); @@ -1465,8 +1452,8 @@ void Free(void *mem); + +#endif ---- url.c 2004-06-11 07:39:17.000000000 -0400 -+++ url.c 2021-02-25 15:07:41.472694000 -0500 +--- src/url.c 2004-06-11 07:39:17.000000000 -0400 ++++ src/url.c 2021-02-25 15:07:41.472694000 -0500 @@ -80,10 +80,10 @@ static int hexval(int hex); /* Mapping of scheme names to opening functions */ @@ -1536,33 +1523,33 @@ + *r = '/'; } } ---- version.c 2005-01-14 12:09:25.000000000 -0500 -+++ version.c 2021-02-25 15:07:41.472934000 -0500 -@@ -1,2 +1,4 @@ --char *rxp_version_string = +--- src/version.c 2008-05-29 06:51:54.000000000 -0400 ++++ src/version.c 2024-01-22 01:11:34.603161000 -0500 +@@ -1,4 +1,5 @@ + #include "config.h" +#include "version.h" -+ + +-char *rxp_version_string = +const char *rxp_version_string = - "RXP 1.4.4 Copyright Richard Tobin, LTG, HCRC, University of Edinburgh"; ---- version.h 1999-02-17 09:43:19.000000000 -0500 -+++ version.h 2021-02-25 15:07:41.473163000 -0500 + "RXP " PACKAGE_VERSION " Copyright Richard Tobin, LTG, HCRC, University of Edinburgh"; +--- include/version.h 1999-02-17 09:43:19.000000000 -0500 ++++ include/version.h 2021-02-25 15:07:41.473163000 -0500 @@ -1 +1 @@ -extern char *rxp_version_string; +extern const char *rxp_version_string; ---- xmlparser.c 2004-11-03 08:47:31.000000000 -0500 -+++ xmlparser.c 2021-02-25 15:22:16.748707000 -0500 -@@ -4,7 +4,7 @@ +--- src/xmlparser.c 2021-06-14 14:02:03.000000000 -0400 ++++ src/xmlparser.c 2024-01-22 00:53:35.001099000 -0500 +@@ -4,7 +4,6 @@ #define DEBUG_FSM 0 -#ifndef lint --static char vcid[] = "$Id: xmlparser.c,v 1.131 2004/11/03 13:47:31 richard Exp $"; +-static char vcid[] = "$Id: xmlparser.c,v 1.137 2021/06/14 18:02:03 richard Exp $"; -#endif /* lint */ +#include <sys/cdefs.h> -+ -+__RCSID("$Id: xmlparser.c,v 1.131 2004/11/03 13:47:31 richard Exp $"); ++__RCSID("$Id: xmlparser.c,v 1.137 2021/06/14 18:02:03 richard Exp $"); /* -@@ -140,6 +140,6 @@ enum literal_type { +@@ -142,6 +141,6 @@ }; static int parse_string(Parser p, const char8 *where, enum literal_type type, int *normalised); -static int parse_pi(Parser p, Entity ent); @@ -1571,14 +1558,14 @@ +static int parse_comment(Parser p, int skip); static int parse_pcdata(Parser p); static int parse_starttag(Parser p); -@@ -148,5 +148,5 @@ static int process_namespace(Parser p, +@@ -150,5 +149,5 @@ AttributeDefinition d, const Char *value); static int parse_attribute(Parser p); -static WhiteSpaceMode process_xml_space(Parser p, const Char *value); +static WhiteSpaceMode process_xml_space(const Char *value); static int parse_endtag(Parser p); static int parse_markup(Parser p); -@@ -157,5 +157,7 @@ static int validate_final(Parser p); +@@ -159,5 +158,7 @@ static HashMapRetType check_id(const HashEntryStruct *id_entry, void *p); static int validate_attribute(Parser p, AttributeDefinition a, ElementDefinition e, const Char *value); +#if 0 @@ -1586,14 +1573,14 @@ +#endif static int check_attribute_syntax(Parser p, AttributeDefinition a, ElementDefinition e, const Char *value, const char *message, int real_use); static int check_attribute_token(Parser p, AttributeDefinition a, ElementDefinition e, const Char *value, int length, const char *message, int real_use); -@@ -165,5 +167,5 @@ static int magically_transform_dtd(Parse +@@ -167,5 +168,5 @@ static struct element_definition pcdata_element; -const ElementDefinition Epsilon = 0, PCDataElement = &pcdata_element; +static const ElementDefinition Epsilon = 0, PCDataElement = &pcdata_element; static FSM NewFSM(void); -@@ -1203,8 +1205,8 @@ static int parse_markup(Parser p) +@@ -1207,8 +1208,8 @@ { if(ParserGetFlag(p, ReturnComments)) - return parse_comment(p, 0, 0); @@ -1604,21 +1591,21 @@ + require(parse_comment(p, 1)); /* XXX avoid recursion here */ return parse(p); -@@ -1224,5 +1226,5 @@ static int parse_markup(Parser p) +@@ -1228,5 +1229,5 @@ case '?': - return parse_pi(p, 0); + return parse_pi(p); case BADCHAR: -@@ -1322,5 +1324,5 @@ static int parse_endtag(Parser p) +@@ -1326,5 +1327,5 @@ static int check_qualname_syntax(Parser p, const Char *name, const char *type) { - Char *t; + const Char *t; t = Strchr(name, ':'); -@@ -1354,5 +1356,8 @@ static int check_qualname_syntax(Parser +@@ -1358,5 +1359,8 @@ static int parse_starttag(Parser p) { - int c, is_top_level = 0; @@ -1628,7 +1615,7 @@ +#endif ElementDefinition e; AttributeDefinition d; -@@ -1370,5 +1375,7 @@ static int parse_starttag(Parser p) +@@ -1374,5 +1378,7 @@ require(validate_dtd(p)); } +#if not_yet @@ -1636,7 +1623,7 @@ +#endif } -@@ -1541,7 +1548,4 @@ static int parse_starttag(Parser p) +@@ -1545,7 +1551,4 @@ /* check for required attributes */ - AttributeDefinition d; @@ -1644,21 +1631,21 @@ - for(d=NextAttributeDefinition(e, 0); d; -@@ -1658,5 +1662,5 @@ static int parse_starttag(Parser p) +@@ -1662,5 +1665,5 @@ if(a->definition == d) { - p->xbit.wsm = process_xml_space(p, a->value); + p->xbit.wsm = process_xml_space(a->value); goto done; } -@@ -1664,5 +1668,5 @@ static int parse_starttag(Parser p) +@@ -1668,5 +1671,5 @@ if(d->default_type == DT_none || d->default_type == DT_fixed) { - p->xbit.wsm = process_xml_space(p, d->default_value); + p->xbit.wsm = process_xml_space(d->default_value); goto done; } -@@ -2086,9 +2090,8 @@ static int parse_attribute(Parser p) +@@ -2090,9 +2093,8 @@ } -static WhiteSpaceMode process_xml_space(Parser p, const Char *value) @@ -1669,71 +1656,64 @@ - Char buf[9]; const Char *v; int i; -@@ -2102,7 +2105,5 @@ static WhiteSpaceMode process_xml_space( - if(!v[i] || is_xml_whitespace(v[i])) +@@ -2106,7 +2108,5 @@ + if(!v[i] || is_xml_whitespace_16(v[i])) break; - buf[i] = v[i]; } - buf[i] = '\0'; for(; v[i]; i++) - if(!is_xml_whitespace(v[i])) -@@ -2204,5 +2205,5 @@ static int parse_pcdata(Parser p) + if(!is_xml_whitespace_16(v[i])) +@@ -2208,5 +2208,5 @@ { s->next = next + 3; - require(parse_comment(p, 1, 0)); + require(parse_comment(p, 1)); NF16StartCheck(p); buflen = s->line_length; -@@ -2348,5 +2349,5 @@ static int parse_pcdata(Parser p) +@@ -2352,5 +2352,5 @@ /* Called after reading '<!--'. Won't go over an entity end. */ -static int parse_comment(Parser p, int skip, Entity ent) +static int parse_comment(Parser p, int skip) { InputSource s = p->source; -@@ -2417,5 +2418,5 @@ static int parse_comment(Parser p, int s +@@ -2421,5 +2421,5 @@ } -static int parse_pi(Parser p, Entity ent) +static int parse_pi(Parser p) { InputSource s = p->source; -@@ -2998,5 +2999,5 @@ static int process_xml_decl(Parser p) +@@ -3002,5 +3002,5 @@ char8 *value; CharacterEncoding enc = CE_unknown; - Char c; + int c; /* -@@ -3322,5 +3323,5 @@ static int parse_markupdecl(Parser p) +@@ -3344,5 +3344,5 @@ else if(looking_at(p, "?")) { - require(parse_pi(p, cur_ent)); + require(parse_pi(p)); if(p->dtd_callback) p->dtd_callback(&p->xbit, p->dtd_callback_arg); -@@ -3333,5 +3334,5 @@ static int parse_markupdecl(Parser p) +@@ -3355,5 +3355,5 @@ if(ParserGetFlag(p, ReturnComments)) { - require(parse_comment(p, 0, cur_ent)); + require(parse_comment(p, 0)); if(p->dtd_callback) p->dtd_callback(&p->xbit, p->dtd_callback_arg); -@@ -3341,5 +3342,5 @@ static int parse_markupdecl(Parser p) +@@ -3363,5 +3363,5 @@ } else - return parse_comment(p, 1, cur_ent); + return parse_comment(p, 1); } else if(p->state == PS_error) /* looking_at may have set it */ -@@ -4881,5 +4882,5 @@ static HashMapRetType check_id(const Has - Parser p = (Parser)pp; - -- if(!(int)hash_get_value(id_entry)) -+ if (hash_get_value(id_entry) != NULL) - validity_error(p, - "The ID %.*S was referred to but never defined", -@@ -5351,17 +5352,19 @@ static int validate_attribute(Parser p, +@@ -5387,17 +5387,19 @@ } +#if 0 @@ -1754,7 +1734,7 @@ -#if 0 const Char *t; -@@ -5404,7 +5407,7 @@ static int validate_xml_lang_attribute(P +@@ -5440,7 +5442,7 @@ /* Not a validity error since erratum 73 */ warn(p, "Dubious xml:lang attribute for element %S", e->name); -#endif @@ -1763,17 +1743,3 @@ +#endif /* Check an attribute matches Name[s] or Nmtoken[s]. -@@ -5518,5 +5521,5 @@ static int check_attribute_token(Parser *** 39 LINES SKIPPED ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202411271202.4ARC267q070238>