Lines 1-5
Link Here
|
1 |
--- catalog_dtd.c 2003-06-24 09:15:55.000000000 -0400 |
1 |
--- catalog/catalog_dtd.c 2003-06-24 09:15:55.000000000 -0400 |
2 |
+++ catalog_dtd.c 2021-02-25 15:07:41.462399000 -0500 |
2 |
+++ catalog/catalog_dtd.c 2021-02-25 15:07:41.462399000 -0500 |
3 |
@@ -23,9 +23,9 @@ |
3 |
@@ -23,9 +23,9 @@ |
4 |
*/ |
4 |
*/ |
5 |
|
5 |
|
Lines 13-20
Link Here
|
13 |
+static const char xml_catalog_dtd[] = |
13 |
+static const char xml_catalog_dtd[] = |
14 |
"<!ENTITY % pubIdChars \"CDATA\">\n" |
14 |
"<!ENTITY % pubIdChars \"CDATA\">\n" |
15 |
"<!ENTITY % publicIdentifier \"%pubIdChars;\">\n" |
15 |
"<!ENTITY % publicIdentifier \"%pubIdChars;\">\n" |
16 |
--- catalog.c 2004-10-11 08:28:31.000000000 -0400 |
16 |
--- catalog/catalog.c 2004-10-11 08:28:31.000000000 -0400 |
17 |
+++ catalog.c 2021-02-25 15:07:41.463274000 -0500 |
17 |
+++ catalog/catalog.c 2021-02-25 15:07:41.463274000 -0500 |
18 |
@@ -20,5 +20,5 @@ static Parser OpenXMLDocument(char *uri) |
18 |
@@ -20,5 +20,5 @@ static Parser OpenXMLDocument(char *uri) |
19 |
static void CloseXMLDocument(Parser p); |
19 |
static void CloseXMLDocument(Parser p); |
20 |
static int SkipElement(XBit bit, Parser p); |
20 |
static int SkipElement(XBit bit, Parser p); |
Lines 105-112
Link Here
|
105 |
+CatalogEntryFile GetCatalogEntryFile(Catalog catalog, const char *catalog_uri) |
105 |
+CatalogEntryFile GetCatalogEntryFile(Catalog catalog, const char *catalog_uri) |
106 |
{ |
106 |
{ |
107 |
int i; |
107 |
int i; |
108 |
--- catalog.h 2003-08-28 12:13:19.000000000 -0400 |
108 |
--- catalog/catalog.h 2003-08-28 12:13:19.000000000 -0400 |
109 |
+++ catalog.h 2021-02-25 15:07:41.463639000 -0500 |
109 |
+++ catalog/catalog.h 2021-02-25 15:07:41.463639000 -0500 |
110 |
@@ -48,13 +48,13 @@ extern void FreeCatalogEntry(CatalogEntr |
110 |
@@ -48,13 +48,13 @@ extern void FreeCatalogEntry(CatalogEntr |
111 |
|
111 |
|
112 |
extern CatalogEntryFile catalog_resource_error; |
112 |
extern CatalogEntryFile catalog_resource_error; |
Lines 124-131
Link Here
|
124 |
+extern const char *ResolveURI(Catalog catalog, const char *uri); |
124 |
+extern const char *ResolveURI(Catalog catalog, const char *uri); |
125 |
|
125 |
|
126 |
extern void CatalogEnable(Parser p); |
126 |
extern void CatalogEnable(Parser p); |
127 |
--- catutil.c 2003-06-24 11:55:27.000000000 -0400 |
127 |
--- catalog/catutil.c 2003-06-24 11:55:27.000000000 -0400 |
128 |
+++ catutil.c 2021-02-25 15:07:41.464062000 -0500 |
128 |
+++ catalog/catutil.c 2021-02-25 15:07:41.464062000 -0500 |
129 |
@@ -35,5 +35,5 @@ char *norm_pub(const char8 *public8, con |
129 |
@@ -35,5 +35,5 @@ char *norm_pub(const char8 *public8, con |
130 |
{ |
130 |
{ |
131 |
int len = public8 ? strlen(public8) : strlen16(public16); |
131 |
int len = public8 ? strlen(public8) : strlen16(public16); |
Lines 152-178
Link Here
|
152 |
+ static const char *p = "urn:publicid:"; |
152 |
+ static const char *p = "urn:publicid:"; |
153 |
int i; |
153 |
int i; |
154 |
|
154 |
|
155 |
--- ctype16.h 2004-03-17 10:53:21.000000000 -0500 |
155 |
--- src/dtd.c 2004-11-02 13:20:20.000000000 -0500 |
156 |
+++ ctype16.h 2021-02-25 15:07:41.464419000 -0500 |
156 |
+++ src/dtd.c 2021-02-25 15:07:41.475773000 -0500 |
157 |
@@ -49,13 +49,13 @@ extern STD_API unsigned char xml_char_ma |
|
|
158 |
|
159 |
#define is_xml_namestart(c,map) \ |
160 |
- (c < 0x10000 ? (map[c] & xml_namestart) : (map[c >> 16] & xml_nameblock)) |
161 |
+ ((sizeof(c) <= 2 || c < 0x10000) ? (map[c] & xml_namestart) : (map[c >> 16] & xml_nameblock)) |
162 |
|
163 |
#define is_xml_namechar(c,map) \ |
164 |
- (c < 0x10000 ? (map[c] & xml_namechar) : (map[c >> 16] & xml_nameblock)) |
165 |
+ ((sizeof(c) <= 2 || c < 0x10000) ? (map[c] & xml_namechar) : (map[c >> 16] & xml_nameblock)) |
166 |
|
167 |
/* NB whitespace map is the same for 1.0 and 1.1 */ |
168 |
|
169 |
#define is_xml_whitespace(c) \ |
170 |
- (c < 0x10000 && (xml_char_map[c] & xml_whitespace)) |
171 |
+ ((sizeof(c) <= 2 || c < 0x10000) && (xml_char_map[c] & xml_whitespace)) |
172 |
|
173 |
#endif |
174 |
--- dtd.c 2004-11-02 13:20:20.000000000 -0500 |
175 |
+++ dtd.c 2021-02-25 15:07:41.475773000 -0500 |
176 |
@@ -173,12 +173,11 @@ void FreeDtd(Dtd dtd) |
157 |
@@ -173,12 +173,11 @@ void FreeDtd(Dtd dtd) |
177 |
*/ |
158 |
*/ |
178 |
|
159 |
|
Lines 328-335
Link Here
|
328 |
+ char8 *publicid, char8 *systemid, |
309 |
+ char8 *publicid, char8 *systemid, |
329 |
Entity parent) |
310 |
Entity parent) |
330 |
{ |
311 |
{ |
331 |
--- dtd.h 2004-11-02 12:46:07.000000000 -0500 |
312 |
--- include/dtd.h 2004-11-02 12:46:07.000000000 -0500 |
332 |
+++ dtd.h 2021-02-25 15:07:41.465041000 -0500 |
313 |
+++ include/dtd.h 2021-02-25 15:07:41.465041000 -0500 |
333 |
@@ -48,11 +48,11 @@ struct entity { |
314 |
@@ -48,11 +48,11 @@ struct entity { |
334 |
/* All entities */ |
315 |
/* All entities */ |
335 |
|
316 |
|
Lines 459-466
Link Here
|
459 |
+ char8 *publicid, char8 *systemid, |
440 |
+ char8 *publicid, char8 *systemid, |
460 |
Entity parent); |
441 |
Entity parent); |
461 |
XML_API NotationDefinition FindNotationN(Dtd dtd, const Char *name, int namelen); |
442 |
XML_API NotationDefinition FindNotationN(Dtd dtd, const Char *name, int namelen); |
462 |
--- entityopener.c 2003-11-27 09:06:38.000000000 -0500 |
443 |
--- catalog/entityopener.c 2003-11-27 09:06:38.000000000 -0500 |
463 |
+++ entityopener.c 2021-02-25 15:07:41.465352000 -0500 |
444 |
+++ catalog/entityopener.c 2021-02-25 15:07:41.465352000 -0500 |
464 |
@@ -9,5 +9,5 @@ |
445 |
@@ -9,5 +9,5 @@ |
465 |
#include "dtd.h" |
446 |
#include "dtd.h" |
466 |
|
447 |
|
Lines 468-475
Link Here
|
468 |
+static InputSource catalog_entity_open(Entity ent, void *arg) |
449 |
+static InputSource catalog_entity_open(Entity ent, void *arg) |
469 |
{ |
450 |
{ |
470 |
Catalog catalog = arg; |
451 |
Catalog catalog = arg; |
471 |
--- http.c 2001-05-01 10:29:34.000000000 -0400 |
452 |
--- src/http.c 2001-05-01 10:29:34.000000000 -0400 |
472 |
+++ http.c 2021-02-25 15:33:16.444375000 -0500 |
453 |
+++ src/http.c 2021-02-25 15:33:16.444375000 -0500 |
473 |
@@ -139,5 +139,5 @@ FILE16 *http_open(const char *url, |
454 |
@@ -139,5 +139,5 @@ FILE16 *http_open(const char *url, |
474 |
int server_port; |
455 |
int server_port; |
475 |
char buf[100]; |
456 |
char buf[100]; |
Lines 521-536
Link Here
|
521 |
+ /* fall through */ |
502 |
+ /* fall through */ |
522 |
default: |
503 |
default: |
523 |
if(!VectorPush(text, c)) |
504 |
if(!VectorPush(text, c)) |
524 |
--- infoset-print.c 2004-11-03 12:17:06.000000000 -0500 |
505 |
--- src/infoset-print.c 2021-06-14 13:42:14.000000000 -0400 |
525 |
+++ infoset-print.c 2021-02-25 15:33:58.693693000 -0500 |
506 |
+++ src/infoset-print.c 2024-01-22 00:58:08.195742000 -0500 |
526 |
@@ -23,5 +23,5 @@ static void children(FILE16 *f, int leve |
507 |
@@ -23,5 +23,5 @@ |
527 |
HashTable id_table); |
508 |
HashTable id_table); |
528 |
static void notations(FILE16 *f, int level, Dtd dtd); |
509 |
static void notations(FILE16 *f, int level, Dtd dtd); |
529 |
-static void unparsed_entities(FILE16 *f, int level, Dtd dtd, Entity docent); |
510 |
-static void unparsed_entities(FILE16 *f, int level, Dtd dtd, Entity docent); |
530 |
+static void unparsed_entities(FILE16 *f, int level, Dtd dtd); |
511 |
+static void unparsed_entities(FILE16 *f, int level, Dtd dtd); |
531 |
static void baseURI(FILE16 *f, int level, const char8 *uri); |
512 |
static void baseURI(FILE16 *f, int level, const char8 *uri); |
532 |
static void standalone(FILE16 *f, int level, StandaloneDeclaration sd); |
513 |
static void standalone(FILE16 *f, int level, StandaloneDeclaration sd); |
533 |
@@ -33,11 +33,11 @@ static void element(FILE16 *f, int level |
514 |
@@ -33,11 +33,11 @@ |
534 |
HashTable id_table); |
515 |
HashTable id_table); |
535 |
static void pi(FILE16 *f, int level, Dtd dtd, XBit bit); |
516 |
static void pi(FILE16 *f, int level, Dtd dtd, XBit bit); |
536 |
-static void cdsect(FILE16 *f, int level, Dtd dtd, XBit bit); |
517 |
-static void cdsect(FILE16 *f, int level, Dtd dtd, XBit bit); |
Lines 546-559
Link Here
|
546 |
+static void character(FILE16 *f, int level, const char *ecw, int c); |
527 |
+static void character(FILE16 *f, int level, const char *ecw, int c); |
547 |
static void attributes(FILE16 *f, int level, Dtd dtd, XBit bit, |
528 |
static void attributes(FILE16 *f, int level, Dtd dtd, XBit bit, |
548 |
HashTable id_table); |
529 |
HashTable id_table); |
549 |
@@ -46,5 +46,5 @@ static void attribute(FILE16 *f, int lev |
530 |
@@ -46,5 +46,5 @@ |
550 |
static void namespace_attributes(FILE16 *f, int level, Dtd dtd, XBit bit, |
531 |
static void namespace_attributes(FILE16 *f, int level, Dtd dtd, XBit bit, |
551 |
HashTable id_table); |
532 |
HashTable id_table); |
552 |
-static void inscope_namespaces(FILE16 *f, int level, Dtd dtd, XBit bit); |
533 |
-static void inscope_namespaces(FILE16 *f, int level, Dtd dtd, XBit bit); |
553 |
+static void inscope_namespaces(FILE16 *f, int level, XBit bit); |
534 |
+static void inscope_namespaces(FILE16 *f, int level, XBit bit); |
554 |
#if 0 |
535 |
#if 0 |
555 |
static void internal_entity(FILE16 *f, int level, Entity entity); |
536 |
static void internal_entity(FILE16 *f, int level, Entity entity); |
556 |
@@ -53,7 +53,7 @@ static void external_entity(FILE16 *f, i |
537 |
@@ -53,7 +53,7 @@ |
557 |
static void unparsed_entity(FILE16 *f, int level, Entity entity); |
538 |
static void unparsed_entity(FILE16 *f, int level, Entity entity); |
558 |
|
539 |
|
559 |
-static void simple(FILE16 *f, int level, char *name, const char *value); |
540 |
-static void simple(FILE16 *f, int level, char *name, const char *value); |
Lines 564-612
Link Here
|
564 |
+static void pointer(FILE16 *f, int level, const char *name, Char *id); |
545 |
+static void pointer(FILE16 *f, int level, const char *name, Char *id); |
565 |
static Char *make_id(const char *type, const Char *name, int count); |
546 |
static Char *make_id(const char *type, const Char *name, int count); |
566 |
static void indent(FILE16 *f, int level); |
547 |
static void indent(FILE16 *f, int level); |
567 |
@@ -67,5 +67,5 @@ static void find_ids(Dtd dtd, XBit *bits |
548 |
@@ -67,5 +67,5 @@ |
568 |
int *counter); |
549 |
int *counter); |
569 |
|
550 |
|
570 |
-struct xbit bogus_bit; |
551 |
-struct xbit bogus_bit; |
571 |
+static struct xbit bogus_bit; |
552 |
+static struct xbit bogus_bit; |
572 |
|
553 |
|
573 |
static Char xmlns_ns[] = {'h','t','t','p',':','/','/','w','w','w','.','w', '3', |
554 |
static Char xmlns_ns[] = {'h','t','t','p',':','/','/','w','w','w','.','w', '3', |
574 |
@@ -93,5 +93,5 @@ void infoset_print(FILE16 *f, Parser p, |
555 |
@@ -93,5 +93,5 @@ |
575 |
notations(f, 1, dtd); |
556 |
notations(f, 1, dtd); |
576 |
|
557 |
|
577 |
- unparsed_entities(f, 1, dtd, p->document_entity); |
558 |
- unparsed_entities(f, 1, dtd, p->document_entity); |
578 |
+ unparsed_entities(f, 1, dtd); |
559 |
+ unparsed_entities(f, 1, dtd); |
579 |
|
560 |
|
580 |
baseURI(f, 1, EntityBaseURL(p->document_entity)); |
561 |
baseURI(f, 1, EntityBaseURL(p->document_entity)); |
581 |
@@ -172,5 +172,5 @@ static void notations(FILE16 *f, int lev |
562 |
@@ -172,5 +172,5 @@ |
582 |
} |
563 |
} |
583 |
|
564 |
|
584 |
-static void unparsed_entities(FILE16 *f, int level, Dtd dtd, Entity docent) |
565 |
-static void unparsed_entities(FILE16 *f, int level, Dtd dtd, Entity docent) |
585 |
+static void unparsed_entities(FILE16 *f, int level, Dtd dtd) |
566 |
+static void unparsed_entities(FILE16 *f, int level, Dtd dtd) |
586 |
{ |
567 |
{ |
587 |
Entity e; |
568 |
Entity e; |
588 |
@@ -280,5 +280,5 @@ static void version(FILE16 *f, int level |
569 |
@@ -280,5 +280,5 @@ |
589 |
} |
570 |
} |
590 |
|
571 |
|
591 |
-static void simple(FILE16 *f, int level, char *name, const char *value) |
572 |
-static void simple(FILE16 *f, int level, char *name, const char *value) |
592 |
+static void simple(FILE16 *f, int level, const char *name, const char *value) |
573 |
+static void simple(FILE16 *f, int level, const char *name, const char *value) |
593 |
{ |
574 |
{ |
594 |
indent(f, level); |
575 |
indent(f, level); |
595 |
@@ -294,5 +294,5 @@ static void simple(FILE16 *f, int level, |
576 |
@@ -294,5 +294,5 @@ |
596 |
} |
577 |
} |
597 |
|
578 |
|
598 |
-static void Simple(FILE16 *f, int level, char *name, const Char *value) |
579 |
-static void Simple(FILE16 *f, int level, char *name, const Char *value) |
599 |
+static void Simple(FILE16 *f, int level, const char *name, const Char *value) |
580 |
+static void Simple(FILE16 *f, int level, const char *name, const Char *value) |
600 |
{ |
581 |
{ |
601 |
indent(f, level); |
582 |
indent(f, level); |
602 |
@@ -308,5 +308,5 @@ static void Simple(FILE16 *f, int level, |
583 |
@@ -308,5 +308,5 @@ |
603 |
} |
584 |
} |
604 |
|
585 |
|
605 |
-static void pointer(FILE16 *f, int level, char *name, Char *id) |
586 |
-static void pointer(FILE16 *f, int level, char *name, Char *id) |
606 |
+static void pointer(FILE16 *f, int level, const char *name, Char *id) |
587 |
+static void pointer(FILE16 *f, int level, const char *name, Char *id) |
607 |
{ |
588 |
{ |
608 |
indent(f, level); |
589 |
indent(f, level); |
609 |
@@ -342,11 +342,11 @@ static void item(FILE16 *f, int level, D |
590 |
@@ -342,11 +342,11 @@ |
610 |
break; |
591 |
break; |
611 |
case XBIT_cdsect: |
592 |
case XBIT_cdsect: |
612 |
- cdsect(f, level, dtd, bit); |
593 |
- cdsect(f, level, dtd, bit); |
Lines 621-648
Link Here
|
621 |
+ comment(f, level, bit); |
602 |
+ comment(f, level, bit); |
622 |
break; |
603 |
break; |
623 |
default: |
604 |
default: |
624 |
@@ -396,5 +396,5 @@ static void element(FILE16 *f, int level |
605 |
@@ -396,5 +396,5 @@ |
625 |
namespace_attributes(f, level+1, dtd, bit, id_table); |
606 |
namespace_attributes(f, level+1, dtd, bit, id_table); |
626 |
|
607 |
|
627 |
- inscope_namespaces(f, level+1, dtd, bit); |
608 |
- inscope_namespaces(f, level+1, dtd, bit); |
628 |
+ inscope_namespaces(f, level + 1, bit); |
609 |
+ inscope_namespaces(f, level + 1, bit); |
629 |
|
610 |
|
630 |
baseURI(f, 1, EntityBaseURL(bit->entity)); /* XXX xml:base */ |
611 |
baseURI(f, 1, EntityBaseURL(bit->entity)); /* XXX xml:base */ |
631 |
@@ -433,5 +433,5 @@ static void pi(FILE16 *f, int level, Dtd |
612 |
@@ -433,5 +433,5 @@ |
632 |
} |
613 |
} |
633 |
|
614 |
|
634 |
-static void cdsect(FILE16 *f, int level, Dtd dtd, XBit bit) |
615 |
-static void cdsect(FILE16 *f, int level, Dtd dtd, XBit bit) |
635 |
+static void cdsect(FILE16 *f, int level, XBit bit) |
616 |
+static void cdsect(FILE16 *f, int level, XBit bit) |
636 |
{ |
617 |
{ |
637 |
Char *p; |
618 |
Char *p; |
638 |
@@ -443,5 +443,5 @@ static void cdsect(FILE16 *f, int level, |
619 |
@@ -443,5 +443,5 @@ |
639 |
|
620 |
|
640 |
for(p=bit->pcdata_chars; *p; p++) |
621 |
for(p=bit->pcdata_chars; *p; p++) |
641 |
- character(f, level, dtd, "false", *p); |
622 |
- character(f, level, dtd, "false", *p); |
642 |
+ character(f, level, "false", *p); |
623 |
+ character(f, level, "false", *p); |
643 |
|
624 |
|
644 |
#if 0 |
625 |
#if 0 |
645 |
@@ -451,8 +451,8 @@ static void cdsect(FILE16 *f, int level, |
626 |
@@ -451,8 +451,8 @@ |
646 |
} |
627 |
} |
647 |
|
628 |
|
648 |
-static void pcdata(FILE16 *f, int level, Dtd dtd, XBit bit) |
629 |
-static void pcdata(FILE16 *f, int level, Dtd dtd, XBit bit) |
Lines 653-691
Link Here
|
653 |
+ const char *ecw; |
634 |
+ const char *ecw; |
654 |
|
635 |
|
655 |
ecw = !bit->parent->element_definition->declared ? 0 : |
636 |
ecw = !bit->parent->element_definition->declared ? 0 : |
656 |
@@ -461,8 +461,8 @@ static void pcdata(FILE16 *f, int level, |
637 |
@@ -461,8 +461,8 @@ |
657 |
|
638 |
|
658 |
for(p=bit->pcdata_chars; *p; p++) |
639 |
for(p=bit->pcdata_chars; *p; p++) |
659 |
- character(f, level, dtd, is_xml_whitespace(*p) ? ecw : "false", *p); |
640 |
- character(f, level, dtd, is_xml_whitespace_16(*p) ? ecw : "false", *p); |
660 |
+ character(f, level, is_xml_whitespace(*p) ? ecw : "false", *p); |
641 |
+ character(f, level, is_xml_whitespace_16(*p) ? ecw : "false", *p); |
661 |
} |
642 |
} |
662 |
|
643 |
|
663 |
-static void character(FILE16 *f, int level, Dtd dtd, char *ecw, int c) |
644 |
-static void character(FILE16 *f, int level, Dtd dtd, char *ecw, int c) |
664 |
+static void character(FILE16 *f, int level, const char *ecw, int c) |
645 |
+static void character(FILE16 *f, int level, const char *ecw, int c) |
665 |
{ |
646 |
{ |
666 |
indent(f, level); |
647 |
indent(f, level); |
667 |
@@ -478,5 +478,5 @@ static void character(FILE16 *f, int lev |
648 |
@@ -478,5 +478,5 @@ |
668 |
} |
649 |
} |
669 |
|
650 |
|
670 |
-static void comment(FILE16 *f, int level, Dtd dtd, XBit bit) |
651 |
-static void comment(FILE16 *f, int level, Dtd dtd, XBit bit) |
671 |
+static void comment(FILE16 *f, int level, XBit bit) |
652 |
+static void comment(FILE16 *f, int level, XBit bit) |
672 |
{ |
653 |
{ |
673 |
indent(f, level); |
654 |
indent(f, level); |
674 |
@@ -615,4 +615,5 @@ static void attribute(FILE16 *f, int lev |
655 |
@@ -615,4 +615,5 @@ |
675 |
free(token); |
656 |
free(token); |
676 |
free(id); |
657 |
free(id); |
677 |
+ /* FALLTHROUGH */ |
658 |
+ /* FALLTHROUGH */ |
678 |
default: |
659 |
default: |
679 |
simple(f, level+1, "references", 0); |
660 |
simple(f, level+1, "references", 0); |
680 |
@@ -640,5 +641,5 @@ static void attribute(FILE16 *f, int lev |
661 |
@@ -640,5 +641,5 @@ |
681 |
} |
662 |
} |
682 |
|
663 |
|
683 |
-static void inscope_namespaces(FILE16 *f, int level, Dtd dtd, XBit bit) |
664 |
-static void inscope_namespaces(FILE16 *f, int level, Dtd dtd, XBit bit) |
684 |
+static void inscope_namespaces(FILE16 *f, int level, XBit bit) |
665 |
+static void inscope_namespaces(FILE16 *f, int level, XBit bit) |
685 |
{ |
666 |
{ |
686 |
NamespaceBinding nsb, nsb2; |
667 |
NamespaceBinding nsb, nsb2; |
687 |
--- input.c 2005-01-14 11:10:00.000000000 -0500 |
668 |
--- src/input.c 2005-01-14 11:10:00.000000000 -0500 |
688 |
+++ input.c 2021-02-25 15:07:41.467694000 -0500 |
669 |
+++ src/input.c 2021-02-25 15:07:41.467694000 -0500 |
689 |
@@ -79,5 +79,5 @@ InputSource EntityOpen(Entity e) |
670 |
@@ -79,5 +79,5 @@ InputSource EntityOpen(Entity e) |
690 |
else |
671 |
else |
691 |
{ |
672 |
{ |
Lines 720-727
Link Here
|
720 |
- |
701 |
- |
721 |
END_OF_LINE; |
702 |
END_OF_LINE; |
722 |
} |
703 |
} |
723 |
--- namespaces.c 2003-06-02 12:56:35.000000000 -0400 |
704 |
--- src/namespaces.c 2003-06-02 12:56:35.000000000 -0400 |
724 |
+++ namespaces.c 2021-02-25 15:07:41.468014000 -0500 |
705 |
+++ src/namespaces.c 2021-02-25 15:07:41.468014000 -0500 |
725 |
@@ -25,5 +25,5 @@ static void FreeNSElementDefinition(NSEl |
706 |
@@ -25,5 +25,5 @@ static void FreeNSElementDefinition(NSEl |
726 |
static void FreeNSAttributeDefinition(NSAttributeDefinition attribute); |
707 |
static void FreeNSAttributeDefinition(NSAttributeDefinition attribute); |
727 |
|
708 |
|
Lines 743-750
Link Here
|
743 |
+ Free(attribute->name); |
724 |
+ Free(attribute->name); |
744 |
Free(attribute); |
725 |
Free(attribute); |
745 |
} |
726 |
} |
746 |
--- namespaces.h 2003-06-02 12:56:35.000000000 -0400 |
727 |
--- include/namespaces.h 2003-06-02 12:56:35.000000000 -0400 |
747 |
+++ namespaces.h 2021-02-25 15:07:41.468292000 -0500 |
728 |
+++ include/namespaces.h 2021-02-25 15:07:41.468292000 -0500 |
748 |
@@ -30,5 +30,5 @@ struct RXP_NAMESPACE { |
729 |
@@ -30,5 +30,5 @@ struct RXP_NAMESPACE { |
749 |
|
730 |
|
750 |
struct ns_element_definition { |
731 |
struct ns_element_definition { |
Lines 759-766
Link Here
|
759 |
+ Char *name; |
740 |
+ Char *name; |
760 |
int attrnum; |
741 |
int attrnum; |
761 |
}; |
742 |
}; |
762 |
--- nf16check.c 2003-09-02 10:02:45.000000000 -0400 |
743 |
--- src/nf16check.c 2003-09-02 10:02:45.000000000 -0400 |
763 |
+++ nf16check.c 2021-02-25 15:07:41.468701000 -0500 |
744 |
+++ src/nf16check.c 2021-02-25 15:07:41.468701000 -0500 |
764 |
@@ -7,4 +7,6 @@ |
745 |
@@ -7,4 +7,6 @@ |
765 |
|
746 |
|
766 |
#include <stdlib.h> |
747 |
#include <stdlib.h> |
Lines 801-807
Link Here
|
801 |
/* variant of nf16check, s_length gives length of s */ |
782 |
/* variant of nf16check, s_length gives length of s */ |
802 |
@@ -226,4 +228,5 @@ nf16res nf16checkL (NF16Checker checker, |
783 |
@@ -226,4 +228,5 @@ nf16res nf16checkL (NF16Checker checker, |
803 |
int lastclass = checker->lastclass; |
784 |
int lastclass = checker->lastclass; |
804 |
char16 c; |
785 |
unsigned int c; /* changed from char16 (RMT) */ |
805 |
+ uint32_t C; |
786 |
+ uint32_t C; |
806 |
flag f; |
787 |
flag f; |
807 |
int class; |
788 |
int class; |
Lines 838-845
Link Here
|
838 |
+ else if (C < 0xE01F0) f = simp; |
819 |
+ else if (C < 0xE01F0) f = simp; |
839 |
else f = NoNo; |
820 |
else f = NoNo; |
840 |
goto NEWFLAG; /* start again with switch */ |
821 |
goto NEWFLAG; /* start again with switch */ |
841 |
--- resolve.c 2003-08-28 12:13:12.000000000 -0400 |
822 |
--- catalog/resolve.c 2003-08-28 12:13:12.000000000 -0400 |
842 |
+++ resolve.c 2021-02-25 15:07:41.469245000 -0500 |
823 |
+++ catalog/resolve.c 2021-02-25 15:07:41.469245000 -0500 |
843 |
@@ -8,11 +8,11 @@ |
824 |
@@ -8,11 +8,11 @@ |
844 |
#include "string.h" |
825 |
#include "string.h" |
845 |
|
826 |
|
Lines 1010-1018
Link Here
|
1010 |
+ return strlen((*(const CatalogEntry *)b)->match) - |
991 |
+ return strlen((*(const CatalogEntry *)b)->match) - |
1011 |
+ strlen((*(const CatalogEntry *)a)->match); |
992 |
+ strlen((*(const CatalogEntry *)a)->match); |
1012 |
} |
993 |
} |
1013 |
--- rxp.c 2005-01-14 11:57:49.000000000 -0500 |
994 |
--- src/rxp.c 2019-10-24 14:23:25.000000000 -0400 |
1014 |
+++ rxp.c 2021-02-25 15:07:41.469916000 -0500 |
995 |
+++ src/rxp.c 2024-10-20 22:09:28.202835000 -0400 |
1015 |
@@ -32,40 +32,39 @@ |
996 |
@@ -33,40 +33,39 @@ |
1016 |
#include "catalog.h" |
997 |
#include "catalog.h" |
1017 |
|
998 |
|
1018 |
-int attr_compare(const void *a, const void *b); |
999 |
-int attr_compare(const void *a, const void *b); |
Lines 1021-1027
Link Here
|
1021 |
-void print_ns_attrs(NamespaceBinding ns, int count); |
1002 |
-void print_ns_attrs(NamespaceBinding ns, int count); |
1022 |
-void print_namespaces(NamespaceBinding ns); |
1003 |
-void print_namespaces(NamespaceBinding ns); |
1023 |
-void print_attrs(ElementDefinition e, Attribute a); |
1004 |
-void print_attrs(ElementDefinition e, Attribute a); |
1024 |
-void print_text(Char *text); |
1005 |
-void print_text(Char *text, int is_attr); |
1025 |
-int printable(int c); |
1006 |
-int printable(int c); |
1026 |
-void print_special(int c); |
1007 |
-void print_special(int c); |
1027 |
-void print_text_bit(Char *text); |
1008 |
-void print_text_bit(Char *text); |
Lines 1035-1041
Link Here
|
1035 |
+static void print_ns_attrs(NamespaceBinding ns, int count); |
1016 |
+static void print_ns_attrs(NamespaceBinding ns, int count); |
1036 |
+static void print_namespaces(NamespaceBinding ns); |
1017 |
+static void print_namespaces(NamespaceBinding ns); |
1037 |
+static void print_attrs(Attribute a); |
1018 |
+static void print_attrs(Attribute a); |
1038 |
+static void print_text(const Char *text); |
1019 |
+static void print_text(const Char *text, int is_attr); |
1039 |
+static int printable(int c); |
1020 |
+static int printable(int c); |
1040 |
+static void print_special(int c); |
1021 |
+static void print_special(int c); |
1041 |
+static void print_text_bit(Char *text); |
1022 |
+static void print_text_bit(Char *text); |
Lines 1048-1061
Link Here
|
1048 |
+static int verbose = 0, expand = 1, nsgml = 0, |
1029 |
+static int verbose = 0, expand = 1, nsgml = 0, |
1049 |
attr_defaults = 0, merge = 0, strict_xml = 0, tree = 0, validate = 0, |
1030 |
attr_defaults = 0, merge = 0, strict_xml = 0, tree = 0, validate = 0, |
1050 |
xml_space = 0, namespaces = 0, simple_error = 0, experiment = 0, |
1031 |
xml_space = 0, namespaces = 0, simple_error = 0, experiment = 0, |
1051 |
read_dtd = 0, unicode_check = 0, xml_id = 0; |
1032 |
read_dtd = 0, unicode_check = 0, xml_id = 0, pre_105 = 0; |
1052 |
-enum {o_unspec, o_none, o_bits, o_plain, o_can1, o_can2, o_can3, o_infoset, o_diff} output_format = o_unspec; |
1033 |
-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; |
1053 |
-char *enc_name = 0, *base_uri = 0, *my_dtd_name, *my_dtd_sysid = 0; |
1034 |
-char *enc_name = 0, *base_uri = 0, *my_dtd_name, *my_dtd_sysid = 0; |
1054 |
-CharacterEncoding encoding = CE_unknown; |
1035 |
-CharacterEncoding encoding = CE_unknown; |
1055 |
-InputSource source = 0; |
1036 |
-InputSource source = 0; |
1056 |
-int need_canonical_dtd = 0; |
1037 |
-int need_canonical_dtd = 0; |
1057 |
-int xml_version; |
1038 |
-int xml_version; |
1058 |
+static enum {o_unspec, o_none, o_bits, o_plain, o_can1, o_can2, o_can3, o_infoset, o_diff} output_format = o_unspec; |
1039 |
+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; |
1059 |
+static char *enc_name = NULL, *base_uri = NULL, *my_dtd_name, *my_dtd_sysid = NULL; |
1040 |
+static char *enc_name = NULL, *base_uri = NULL, *my_dtd_name, *my_dtd_sysid = NULL; |
1060 |
+static CharacterEncoding encoding = CE_unknown; |
1041 |
+static CharacterEncoding encoding = CE_unknown; |
1061 |
+static InputSource source = NULL; |
1042 |
+static InputSource source = NULL; |
Lines 1077-1111
Link Here
|
1077 |
+StaticVector(XBit, dtd_bits); |
1058 |
+StaticVector(XBit, dtd_bits); |
1078 |
|
1059 |
|
1079 |
int main(int argc, char **argv) |
1060 |
int main(int argc, char **argv) |
1080 |
@@ -565,5 +564,5 @@ void print_bit(Parser p, XBit bit) |
1061 |
@@ -581,5 +580,5 @@ |
1081 |
{ |
1062 |
{ |
1082 |
const char *sys, *pub; |
1063 |
const char *sys, *pub; |
1083 |
- char *ws[] = {"u", "d", "p"}; |
1064 |
- char *ws[] = {"u", "d", "p"}; |
1084 |
+ const char *ws[] = {"u", "d", "p"}; |
1065 |
+ const char *ws[] = {"u", "d", "p"}; |
1085 |
|
1066 |
|
1086 |
if(output_format == o_none && bit->type != XBIT_error) |
1067 |
if(output_format == o_none && bit->type != XBIT_error) |
1087 |
@@ -601,5 +600,5 @@ void print_bit(Parser p, XBit bit) |
1068 |
@@ -617,5 +616,5 @@ |
1088 |
if(xml_space) |
1069 |
if(xml_space) |
1089 |
Printf("(ws=%s) ", ws[bit->wsm]); |
1070 |
Printf("(ws=%s) ", ws[bit->wsm]); |
1090 |
- print_attrs(0, bit->attributes); |
1071 |
- print_attrs(0, bit->attributes); |
1091 |
+ print_attrs(bit->attributes); |
1072 |
+ print_attrs(bit->attributes); |
1092 |
print_namespaces(bit->ns_dict); |
1073 |
print_namespaces(bit->ns_dict); |
1093 |
Printf("\n"); |
1074 |
Printf("\n"); |
1094 |
@@ -614,5 +613,5 @@ void print_bit(Parser p, XBit bit) |
1075 |
@@ -630,5 +629,5 @@ |
1095 |
if(xml_space) |
1076 |
if(xml_space) |
1096 |
Printf("(ws=%s) ", ws[bit->wsm]); |
1077 |
Printf("(ws=%s) ", ws[bit->wsm]); |
1097 |
- print_attrs(0, bit->attributes); |
1078 |
- print_attrs(0, bit->attributes); |
1098 |
+ print_attrs(bit->attributes); |
1079 |
+ print_attrs(bit->attributes); |
1099 |
print_namespaces(bit->ns_dict); |
1080 |
print_namespaces(bit->ns_dict); |
1100 |
Printf("\n"); |
1081 |
Printf("\n"); |
1101 |
@@ -685,5 +684,5 @@ void print_bit(Parser p, XBit bit) |
1082 |
@@ -701,5 +700,5 @@ |
1102 |
print_canonical_dtd(p, bit->element_definition->name); |
1083 |
print_canonical_dtd(p, bit->element_definition->name); |
1103 |
Printf("<%S", bit->element_definition->name); |
1084 |
Printf("<%S", bit->element_definition->name); |
1104 |
- print_attrs(bit->element_definition, bit->attributes); |
1085 |
- print_attrs(bit->element_definition, bit->attributes); |
1105 |
+ print_attrs(bit->attributes); |
1086 |
+ print_attrs(bit->attributes); |
1106 |
print_ns_attrs(bit->ns_dict, bit->nsc); |
1087 |
print_ns_attrs(bit->ns_dict, bit->nsc); |
1107 |
if(bit->type == XBIT_start) |
1088 |
if(bit->type == XBIT_start) |
1108 |
@@ -732,9 +731,9 @@ void print_bit(Parser p, XBit bit) |
1089 |
@@ -769,9 +768,9 @@ |
1109 |
int attr_compare(const void *a, const void *b) |
1090 |
int attr_compare(const void *a, const void *b) |
1110 |
{ |
1091 |
{ |
1111 |
- return Strcmp((*(Attribute *)a)->definition->name, |
1092 |
- return Strcmp((*(Attribute *)a)->definition->name, |
Lines 1118-1141
Link Here
|
1118 |
+void print_attrs(Attribute a) |
1099 |
+void print_attrs(Attribute a) |
1119 |
{ |
1100 |
{ |
1120 |
Attribute b; |
1101 |
Attribute b; |
1121 |
@@ -789,5 +788,5 @@ void dtd_cb(XBit bit, void *arg) |
1102 |
@@ -826,5 +825,5 @@ |
1122 |
} |
1103 |
} |
1123 |
|
1104 |
|
1124 |
-void dtd_cb2(XBit bit, void *arg) |
1105 |
-void dtd_cb2(XBit bit, void *arg) |
1125 |
+void dtd_cb2(XBit bit, void *arg __unused) |
1106 |
+void dtd_cb2(XBit bit, void *arg __unused) |
1126 |
{ |
1107 |
{ |
1127 |
XBit copy; |
1108 |
XBit copy; |
1128 |
@@ -802,7 +801,7 @@ void dtd_cb2(XBit bit, void *arg) |
1109 |
@@ -839,7 +838,7 @@ |
1129 |
} |
1110 |
} |
1130 |
|
1111 |
|
1131 |
-void print_text(Char *text) |
1112 |
-void print_text(Char *text, int is_attr) |
1132 |
+void print_text(const Char *text) |
1113 |
+void print_text(const Char *text, int is_attr) |
1133 |
{ |
1114 |
{ |
1134 |
- Char *pc, *last; |
1115 |
- Char *pc, *last; |
1135 |
+ const Char *pc, *last; |
1116 |
+ const Char *pc, *last; |
1136 |
|
1117 |
|
1137 |
if(output_format == o_bits || !expand) |
1118 |
if(output_format == o_bits || !expand) |
1138 |
@@ -901,25 +900,4 @@ void print_special(int c) |
1119 |
@@ -875,5 +874,5 @@ |
|
|
1120 |
(xml_version > XV_1_0 && type == 3)) |
1121 |
{ |
1122 |
- Char *end = (c > 0xffff ? pc-1 : pc); /* if it's a surrogate pair, before the first */ |
1123 |
+ const Char *end = (c > 0xffff ? pc-1 : pc); /* if it's a surrogate pair, before the first */ |
1124 |
if(end > last) |
1125 |
Printf("%.*S", end - last, last); |
1126 |
@@ -949,25 +948,4 @@ |
1139 |
} |
1127 |
} |
1140 |
|
1128 |
|
1141 |
-InputSource entity_open(Entity ent, void *arg) |
1129 |
-InputSource entity_open(Entity ent, void *arg) |
Lines 1161-1167
Link Here
|
1161 |
- |
1149 |
- |
1162 |
void print_ns_attrs(NamespaceBinding ns, int count) |
1150 |
void print_ns_attrs(NamespaceBinding ns, int count) |
1163 |
{ |
1151 |
{ |
1164 |
@@ -969,13 +947,13 @@ void print_namespaces(NamespaceBinding n |
1152 |
@@ -1017,13 +995,13 @@ |
1165 |
} |
1153 |
} |
1166 |
|
1154 |
|
1167 |
-int notation_compare(const void *a, const void *b) |
1155 |
-int notation_compare(const void *a, const void *b) |
Lines 1180-1194
Link Here
|
1180 |
+ return Strcmp((*(const Entity *)a)->name, (*(const Entity *)b)->name); |
1168 |
+ return Strcmp((*(const Entity *)a)->name, (*(const Entity *)b)->name); |
1181 |
} |
1169 |
} |
1182 |
|
1170 |
|
1183 |
@@ -1099,5 +1077,5 @@ static const char8 *minimal_uri(const ch |
1171 |
@@ -1147,5 +1125,5 @@ |
1184 |
|
1172 |
|
1185 |
#ifdef TIME_LIMIT |
1173 |
#ifdef TIME_LIMIT |
1186 |
-void time_exceeded(int sig) |
1174 |
-void time_exceeded(int sig) |
1187 |
+void time_exceeded(int sig __unused) |
1175 |
+void time_exceeded(int sig __unused) |
1188 |
{ |
1176 |
{ |
1189 |
fprintf(stderr, "CPU time limit (%d seconds) exceeded, sorry\n", |
1177 |
fprintf(stderr, "CPU time limit (%d seconds) exceeded, sorry\n", |
1190 |
--- rxputil.h 2003-11-27 09:06:57.000000000 -0500 |
1178 |
--- include/rxputil.h 2003-11-27 09:06:57.000000000 -0500 |
1191 |
+++ rxputil.h 2021-02-25 15:07:41.470232000 -0500 |
1179 |
+++ include/rxputil.h 2021-02-25 15:07:41.470232000 -0500 |
1192 |
@@ -6,4 +6,8 @@ |
1180 |
@@ -6,4 +6,8 @@ |
1193 |
type *name |
1181 |
type *name |
1194 |
|
1182 |
|
Lines 1198-1205
Link Here
|
1198 |
+ |
1186 |
+ |
1199 |
#define VectorInit(v) \ |
1187 |
#define VectorInit(v) \ |
1200 |
((v##_count) = (v##_alloc) = 0, (v) = 0) |
1188 |
((v##_count) = (v##_alloc) = 0, (v) = 0) |
1201 |
--- stdio16.c 2005-01-14 11:10:54.000000000 -0500 |
1189 |
--- src/stdio16.c 2005-01-14 11:10:54.000000000 -0500 |
1202 |
+++ stdio16.c 2021-02-25 15:32:25.156652000 -0500 |
1190 |
+++ src/stdio16.c 2021-02-25 15:32:25.156652000 -0500 |
1203 |
@@ -15,4 +15,5 @@ |
1191 |
@@ -15,4 +15,5 @@ |
1204 |
#include <string.h> |
1192 |
#include <string.h> |
1205 |
#include <stdarg.h> |
1193 |
#include <stdarg.h> |
Lines 1365-1372
Link Here
|
1365 |
+static int GzipFlush(FILE16 *file __unused) |
1353 |
+static int GzipFlush(FILE16 *file __unused) |
1366 |
{ |
1354 |
{ |
1367 |
return 0; |
1355 |
return 0; |
1368 |
--- stdio16.h 2002-10-03 10:37:44.000000000 -0400 |
1356 |
--- include/stdio16.h 2002-10-03 10:37:44.000000000 -0400 |
1369 |
+++ stdio16.h 2021-02-25 15:28:59.692044000 -0500 |
1357 |
+++ include/stdio16.h 2021-02-25 15:28:59.692044000 -0500 |
1370 |
@@ -5,5 +5,5 @@ |
1358 |
@@ -5,5 +5,5 @@ |
1371 |
#include <stdio.h> |
1359 |
#include <stdio.h> |
1372 |
#ifdef HAVE_LIBZ |
1360 |
#ifdef HAVE_LIBZ |
Lines 1396-1403
Link Here
|
1396 |
+#endif |
1384 |
+#endif |
1397 |
|
1385 |
|
1398 |
STD_API int Fprintf(FILE16 *file, const char *format, ...); |
1386 |
STD_API int Fprintf(FILE16 *file, const char *format, ...); |
1399 |
--- string16.c 2004-10-11 12:18:29.000000000 -0400 |
1387 |
--- src/string16.c 2004-10-11 12:18:29.000000000 -0400 |
1400 |
+++ string16.c 2021-02-25 15:07:41.471817000 -0500 |
1388 |
+++ src/string16.c 2021-02-25 15:07:41.471817000 -0500 |
1401 |
@@ -171,9 +171,9 @@ size_t strlen16(const char16 *s) |
1389 |
@@ -171,9 +171,9 @@ size_t strlen16(const char16 *s) |
1402 |
} |
1390 |
} |
1403 |
|
1391 |
|
Lines 1435-1442
Link Here
|
1435 |
return 0; |
1423 |
return 0; |
1436 |
} |
1424 |
} |
1437 |
- |
1425 |
- |
1438 |
--- string16.h 1999-05-28 08:08:38.000000000 -0400 |
1426 |
--- include/string16.h 1999-05-28 08:08:38.000000000 -0400 |
1439 |
+++ string16.h 2021-02-25 15:07:41.472166000 -0500 |
1427 |
+++ include/string16.h 2021-02-25 15:07:41.472166000 -0500 |
1440 |
@@ -23,5 +23,5 @@ STD_API int strncasecmp8(const char8 *, |
1428 |
@@ -23,5 +23,5 @@ STD_API int strncasecmp8(const char8 *, |
1441 |
|
1429 |
|
1442 |
STD_API char16 *strdup16(const char16 *s); |
1430 |
STD_API char16 *strdup16(const char16 *s); |
Lines 1451-1463
Link Here
|
1451 |
+STD_API const char16 *strstr16(const char16 *, const char16 *); |
1439 |
+STD_API const char16 *strstr16(const char16 *, const char16 *); |
1452 |
|
1440 |
|
1453 |
STD_API void translate_latin1_utf16(const char8 *from, char16 *to); |
1441 |
STD_API void translate_latin1_utf16(const char8 *from, char16 *to); |
1454 |
--- system.h 2003-05-19 20:17:27.000000000 -0400 |
1442 |
--- include/system.h 2003-05-19 20:17:27.000000000 -0400 |
1455 |
+++ system.h 2021-02-25 15:10:55.417342000 -0500 |
1443 |
+++ include/system.h 2021-02-25 15:10:55.417342000 -0500 |
1456 |
@@ -1,3 +1,6 @@ |
1444 |
@@ -1,3 +1,5 @@ |
1457 |
+#ifndef _RXP_SYSTEM_H |
1445 |
+#ifndef _RXP_SYSTEM_H |
1458 |
+#define _RXP_SYSTEM_H |
1446 |
+#define _RXP_SYSTEM_H |
1459 |
#define HAVE_LONG_LONG |
1447 |
#define HAVE_LONG_LONG |
1460 |
+#define HAVE_LONG_DOUBLE |
|
|
1461 |
|
1448 |
|
1462 |
#define SOCKETS_IMPLEMENTED |
1449 |
#define SOCKETS_IMPLEMENTED |
1463 |
@@ -11,2 +14,4 @@ void *Malloc(int bytes); |
1450 |
@@ -11,2 +14,4 @@ void *Malloc(int bytes); |
Lines 1465-1472
Link Here
|
1465 |
void Free(void *mem); |
1452 |
void Free(void *mem); |
1466 |
+ |
1453 |
+ |
1467 |
+#endif |
1454 |
+#endif |
1468 |
--- url.c 2004-06-11 07:39:17.000000000 -0400 |
1455 |
--- src/url.c 2004-06-11 07:39:17.000000000 -0400 |
1469 |
+++ url.c 2021-02-25 15:07:41.472694000 -0500 |
1456 |
+++ src/url.c 2021-02-25 15:07:41.472694000 -0500 |
1470 |
@@ -80,10 +80,10 @@ static int hexval(int hex); |
1457 |
@@ -80,10 +80,10 @@ static int hexval(int hex); |
1471 |
/* Mapping of scheme names to opening functions */ |
1458 |
/* Mapping of scheme names to opening functions */ |
1472 |
|
1459 |
|
Lines 1536-1568
Link Here
|
1536 |
+ *r = '/'; |
1523 |
+ *r = '/'; |
1537 |
} |
1524 |
} |
1538 |
} |
1525 |
} |
1539 |
--- version.c 2005-01-14 12:09:25.000000000 -0500 |
1526 |
--- src/version.c 2008-05-29 06:51:54.000000000 -0400 |
1540 |
+++ version.c 2021-02-25 15:07:41.472934000 -0500 |
1527 |
+++ src/version.c 2024-01-22 01:11:34.603161000 -0500 |
1541 |
@@ -1,2 +1,4 @@ |
1528 |
@@ -1,4 +1,5 @@ |
1542 |
-char *rxp_version_string = |
1529 |
#include "config.h" |
1543 |
+#include "version.h" |
1530 |
+#include "version.h" |
1544 |
+ |
1531 |
|
|
|
1532 |
-char *rxp_version_string = |
1545 |
+const char *rxp_version_string = |
1533 |
+const char *rxp_version_string = |
1546 |
"RXP 1.4.4 Copyright Richard Tobin, LTG, HCRC, University of Edinburgh"; |
1534 |
"RXP " PACKAGE_VERSION " Copyright Richard Tobin, LTG, HCRC, University of Edinburgh"; |
1547 |
--- version.h 1999-02-17 09:43:19.000000000 -0500 |
1535 |
--- include/version.h 1999-02-17 09:43:19.000000000 -0500 |
1548 |
+++ version.h 2021-02-25 15:07:41.473163000 -0500 |
1536 |
+++ include/version.h 2021-02-25 15:07:41.473163000 -0500 |
1549 |
@@ -1 +1 @@ |
1537 |
@@ -1 +1 @@ |
1550 |
-extern char *rxp_version_string; |
1538 |
-extern char *rxp_version_string; |
1551 |
+extern const char *rxp_version_string; |
1539 |
+extern const char *rxp_version_string; |
1552 |
--- xmlparser.c 2004-11-03 08:47:31.000000000 -0500 |
1540 |
--- src/xmlparser.c 2021-06-14 14:02:03.000000000 -0400 |
1553 |
+++ xmlparser.c 2021-02-25 15:22:16.748707000 -0500 |
1541 |
+++ src/xmlparser.c 2024-01-22 00:53:35.001099000 -0500 |
1554 |
@@ -4,7 +4,7 @@ |
1542 |
@@ -4,7 +4,6 @@ |
1555 |
#define DEBUG_FSM 0 |
1543 |
#define DEBUG_FSM 0 |
1556 |
|
1544 |
|
1557 |
-#ifndef lint |
1545 |
-#ifndef lint |
1558 |
-static char vcid[] = "$Id: xmlparser.c,v 1.131 2004/11/03 13:47:31 richard Exp $"; |
1546 |
-static char vcid[] = "$Id: xmlparser.c,v 1.137 2021/06/14 18:02:03 richard Exp $"; |
1559 |
-#endif /* lint */ |
1547 |
-#endif /* lint */ |
1560 |
+#include <sys/cdefs.h> |
1548 |
+#include <sys/cdefs.h> |
1561 |
+ |
1549 |
+__RCSID("$Id: xmlparser.c,v 1.137 2021/06/14 18:02:03 richard Exp $"); |
1562 |
+__RCSID("$Id: xmlparser.c,v 1.131 2004/11/03 13:47:31 richard Exp $"); |
|
|
1563 |
|
1550 |
|
1564 |
/* |
1551 |
/* |
1565 |
@@ -140,6 +140,6 @@ enum literal_type { |
1552 |
@@ -142,6 +141,6 @@ |
1566 |
}; |
1553 |
}; |
1567 |
static int parse_string(Parser p, const char8 *where, enum literal_type type, int *normalised); |
1554 |
static int parse_string(Parser p, const char8 *where, enum literal_type type, int *normalised); |
1568 |
-static int parse_pi(Parser p, Entity ent); |
1555 |
-static int parse_pi(Parser p, Entity ent); |
Lines 1571-1584
Link Here
|
1571 |
+static int parse_comment(Parser p, int skip); |
1558 |
+static int parse_comment(Parser p, int skip); |
1572 |
static int parse_pcdata(Parser p); |
1559 |
static int parse_pcdata(Parser p); |
1573 |
static int parse_starttag(Parser p); |
1560 |
static int parse_starttag(Parser p); |
1574 |
@@ -148,5 +148,5 @@ static int process_namespace(Parser p, |
1561 |
@@ -150,5 +149,5 @@ |
1575 |
AttributeDefinition d, const Char *value); |
1562 |
AttributeDefinition d, const Char *value); |
1576 |
static int parse_attribute(Parser p); |
1563 |
static int parse_attribute(Parser p); |
1577 |
-static WhiteSpaceMode process_xml_space(Parser p, const Char *value); |
1564 |
-static WhiteSpaceMode process_xml_space(Parser p, const Char *value); |
1578 |
+static WhiteSpaceMode process_xml_space(const Char *value); |
1565 |
+static WhiteSpaceMode process_xml_space(const Char *value); |
1579 |
static int parse_endtag(Parser p); |
1566 |
static int parse_endtag(Parser p); |
1580 |
static int parse_markup(Parser p); |
1567 |
static int parse_markup(Parser p); |
1581 |
@@ -157,5 +157,7 @@ static int validate_final(Parser p); |
1568 |
@@ -159,5 +158,7 @@ |
1582 |
static HashMapRetType check_id(const HashEntryStruct *id_entry, void *p); |
1569 |
static HashMapRetType check_id(const HashEntryStruct *id_entry, void *p); |
1583 |
static int validate_attribute(Parser p, AttributeDefinition a, ElementDefinition e, const Char *value); |
1570 |
static int validate_attribute(Parser p, AttributeDefinition a, ElementDefinition e, const Char *value); |
1584 |
+#if 0 |
1571 |
+#if 0 |
Lines 1586-1599
Link Here
|
1586 |
+#endif |
1573 |
+#endif |
1587 |
static int check_attribute_syntax(Parser p, AttributeDefinition a, ElementDefinition e, const Char *value, const char *message, int real_use); |
1574 |
static int check_attribute_syntax(Parser p, AttributeDefinition a, ElementDefinition e, const Char *value, const char *message, int real_use); |
1588 |
static int check_attribute_token(Parser p, AttributeDefinition a, ElementDefinition e, const Char *value, int length, const char *message, int real_use); |
1575 |
static int check_attribute_token(Parser p, AttributeDefinition a, ElementDefinition e, const Char *value, int length, const char *message, int real_use); |
1589 |
@@ -165,5 +167,5 @@ static int magically_transform_dtd(Parse |
1576 |
@@ -167,5 +168,5 @@ |
1590 |
|
1577 |
|
1591 |
static struct element_definition pcdata_element; |
1578 |
static struct element_definition pcdata_element; |
1592 |
-const ElementDefinition Epsilon = 0, PCDataElement = &pcdata_element; |
1579 |
-const ElementDefinition Epsilon = 0, PCDataElement = &pcdata_element; |
1593 |
+static const ElementDefinition Epsilon = 0, PCDataElement = &pcdata_element; |
1580 |
+static const ElementDefinition Epsilon = 0, PCDataElement = &pcdata_element; |
1594 |
|
1581 |
|
1595 |
static FSM NewFSM(void); |
1582 |
static FSM NewFSM(void); |
1596 |
@@ -1203,8 +1205,8 @@ static int parse_markup(Parser p) |
1583 |
@@ -1207,8 +1208,8 @@ |
1597 |
{ |
1584 |
{ |
1598 |
if(ParserGetFlag(p, ReturnComments)) |
1585 |
if(ParserGetFlag(p, ReturnComments)) |
1599 |
- return parse_comment(p, 0, 0); |
1586 |
- return parse_comment(p, 0, 0); |
Lines 1604-1624
Link Here
|
1604 |
+ require(parse_comment(p, 1)); |
1591 |
+ require(parse_comment(p, 1)); |
1605 |
/* XXX avoid recursion here */ |
1592 |
/* XXX avoid recursion here */ |
1606 |
return parse(p); |
1593 |
return parse(p); |
1607 |
@@ -1224,5 +1226,5 @@ static int parse_markup(Parser p) |
1594 |
@@ -1228,5 +1229,5 @@ |
1608 |
|
1595 |
|
1609 |
case '?': |
1596 |
case '?': |
1610 |
- return parse_pi(p, 0); |
1597 |
- return parse_pi(p, 0); |
1611 |
+ return parse_pi(p); |
1598 |
+ return parse_pi(p); |
1612 |
|
1599 |
|
1613 |
case BADCHAR: |
1600 |
case BADCHAR: |
1614 |
@@ -1322,5 +1324,5 @@ static int parse_endtag(Parser p) |
1601 |
@@ -1326,5 +1327,5 @@ |
1615 |
static int check_qualname_syntax(Parser p, const Char *name, const char *type) |
1602 |
static int check_qualname_syntax(Parser p, const Char *name, const char *type) |
1616 |
{ |
1603 |
{ |
1617 |
- Char *t; |
1604 |
- Char *t; |
1618 |
+ const Char *t; |
1605 |
+ const Char *t; |
1619 |
|
1606 |
|
1620 |
t = Strchr(name, ':'); |
1607 |
t = Strchr(name, ':'); |
1621 |
@@ -1354,5 +1356,8 @@ static int check_qualname_syntax(Parser |
1608 |
@@ -1358,5 +1359,8 @@ |
1622 |
static int parse_starttag(Parser p) |
1609 |
static int parse_starttag(Parser p) |
1623 |
{ |
1610 |
{ |
1624 |
- int c, is_top_level = 0; |
1611 |
- int c, is_top_level = 0; |
Lines 1628-1634
Link Here
|
1628 |
+#endif |
1615 |
+#endif |
1629 |
ElementDefinition e; |
1616 |
ElementDefinition e; |
1630 |
AttributeDefinition d; |
1617 |
AttributeDefinition d; |
1631 |
@@ -1370,5 +1375,7 @@ static int parse_starttag(Parser p) |
1618 |
@@ -1374,5 +1378,7 @@ |
1632 |
require(validate_dtd(p)); |
1619 |
require(validate_dtd(p)); |
1633 |
} |
1620 |
} |
1634 |
+#if not_yet |
1621 |
+#if not_yet |
Lines 1636-1642
Link Here
|
1636 |
+#endif |
1623 |
+#endif |
1637 |
} |
1624 |
} |
1638 |
|
1625 |
|
1639 |
@@ -1541,7 +1548,4 @@ static int parse_starttag(Parser p) |
1626 |
@@ -1545,7 +1551,4 @@ |
1640 |
/* check for required attributes */ |
1627 |
/* check for required attributes */ |
1641 |
|
1628 |
|
1642 |
- AttributeDefinition d; |
1629 |
- AttributeDefinition d; |
Lines 1644-1664
Link Here
|
1644 |
- |
1631 |
- |
1645 |
for(d=NextAttributeDefinition(e, 0); |
1632 |
for(d=NextAttributeDefinition(e, 0); |
1646 |
d; |
1633 |
d; |
1647 |
@@ -1658,5 +1662,5 @@ static int parse_starttag(Parser p) |
1634 |
@@ -1662,5 +1665,5 @@ |
1648 |
if(a->definition == d) |
1635 |
if(a->definition == d) |
1649 |
{ |
1636 |
{ |
1650 |
- p->xbit.wsm = process_xml_space(p, a->value); |
1637 |
- p->xbit.wsm = process_xml_space(p, a->value); |
1651 |
+ p->xbit.wsm = process_xml_space(a->value); |
1638 |
+ p->xbit.wsm = process_xml_space(a->value); |
1652 |
goto done; |
1639 |
goto done; |
1653 |
} |
1640 |
} |
1654 |
@@ -1664,5 +1668,5 @@ static int parse_starttag(Parser p) |
1641 |
@@ -1668,5 +1671,5 @@ |
1655 |
if(d->default_type == DT_none || d->default_type == DT_fixed) |
1642 |
if(d->default_type == DT_none || d->default_type == DT_fixed) |
1656 |
{ |
1643 |
{ |
1657 |
- p->xbit.wsm = process_xml_space(p, d->default_value); |
1644 |
- p->xbit.wsm = process_xml_space(p, d->default_value); |
1658 |
+ p->xbit.wsm = process_xml_space(d->default_value); |
1645 |
+ p->xbit.wsm = process_xml_space(d->default_value); |
1659 |
goto done; |
1646 |
goto done; |
1660 |
} |
1647 |
} |
1661 |
@@ -2086,9 +2090,8 @@ static int parse_attribute(Parser p) |
1648 |
@@ -2090,9 +2093,8 @@ |
1662 |
} |
1649 |
} |
1663 |
|
1650 |
|
1664 |
-static WhiteSpaceMode process_xml_space(Parser p, const Char *value) |
1651 |
-static WhiteSpaceMode process_xml_space(Parser p, const Char *value) |
Lines 1669-1739
Link Here
|
1669 |
- Char buf[9]; |
1656 |
- Char buf[9]; |
1670 |
const Char *v; |
1657 |
const Char *v; |
1671 |
int i; |
1658 |
int i; |
1672 |
@@ -2102,7 +2105,5 @@ static WhiteSpaceMode process_xml_space( |
1659 |
@@ -2106,7 +2108,5 @@ |
1673 |
if(!v[i] || is_xml_whitespace(v[i])) |
1660 |
if(!v[i] || is_xml_whitespace_16(v[i])) |
1674 |
break; |
1661 |
break; |
1675 |
- buf[i] = v[i]; |
1662 |
- buf[i] = v[i]; |
1676 |
} |
1663 |
} |
1677 |
- buf[i] = '\0'; |
1664 |
- buf[i] = '\0'; |
1678 |
for(; v[i]; i++) |
1665 |
for(; v[i]; i++) |
1679 |
if(!is_xml_whitespace(v[i])) |
1666 |
if(!is_xml_whitespace_16(v[i])) |
1680 |
@@ -2204,5 +2205,5 @@ static int parse_pcdata(Parser p) |
1667 |
@@ -2208,5 +2208,5 @@ |
1681 |
{ |
1668 |
{ |
1682 |
s->next = next + 3; |
1669 |
s->next = next + 3; |
1683 |
- require(parse_comment(p, 1, 0)); |
1670 |
- require(parse_comment(p, 1, 0)); |
1684 |
+ require(parse_comment(p, 1)); |
1671 |
+ require(parse_comment(p, 1)); |
1685 |
NF16StartCheck(p); |
1672 |
NF16StartCheck(p); |
1686 |
buflen = s->line_length; |
1673 |
buflen = s->line_length; |
1687 |
@@ -2348,5 +2349,5 @@ static int parse_pcdata(Parser p) |
1674 |
@@ -2352,5 +2352,5 @@ |
1688 |
/* Called after reading '<!--'. Won't go over an entity end. */ |
1675 |
/* Called after reading '<!--'. Won't go over an entity end. */ |
1689 |
|
1676 |
|
1690 |
-static int parse_comment(Parser p, int skip, Entity ent) |
1677 |
-static int parse_comment(Parser p, int skip, Entity ent) |
1691 |
+static int parse_comment(Parser p, int skip) |
1678 |
+static int parse_comment(Parser p, int skip) |
1692 |
{ |
1679 |
{ |
1693 |
InputSource s = p->source; |
1680 |
InputSource s = p->source; |
1694 |
@@ -2417,5 +2418,5 @@ static int parse_comment(Parser p, int s |
1681 |
@@ -2421,5 +2421,5 @@ |
1695 |
} |
1682 |
} |
1696 |
|
1683 |
|
1697 |
-static int parse_pi(Parser p, Entity ent) |
1684 |
-static int parse_pi(Parser p, Entity ent) |
1698 |
+static int parse_pi(Parser p) |
1685 |
+static int parse_pi(Parser p) |
1699 |
{ |
1686 |
{ |
1700 |
InputSource s = p->source; |
1687 |
InputSource s = p->source; |
1701 |
@@ -2998,5 +2999,5 @@ static int process_xml_decl(Parser p) |
1688 |
@@ -3002,5 +3002,5 @@ |
1702 |
char8 *value; |
1689 |
char8 *value; |
1703 |
CharacterEncoding enc = CE_unknown; |
1690 |
CharacterEncoding enc = CE_unknown; |
1704 |
- Char c; |
1691 |
- Char c; |
1705 |
+ int c; |
1692 |
+ int c; |
1706 |
|
1693 |
|
1707 |
/* |
1694 |
/* |
1708 |
@@ -3322,5 +3323,5 @@ static int parse_markupdecl(Parser p) |
1695 |
@@ -3344,5 +3344,5 @@ |
1709 |
else if(looking_at(p, "?")) |
1696 |
else if(looking_at(p, "?")) |
1710 |
{ |
1697 |
{ |
1711 |
- require(parse_pi(p, cur_ent)); |
1698 |
- require(parse_pi(p, cur_ent)); |
1712 |
+ require(parse_pi(p)); |
1699 |
+ require(parse_pi(p)); |
1713 |
if(p->dtd_callback) |
1700 |
if(p->dtd_callback) |
1714 |
p->dtd_callback(&p->xbit, p->dtd_callback_arg); |
1701 |
p->dtd_callback(&p->xbit, p->dtd_callback_arg); |
1715 |
@@ -3333,5 +3334,5 @@ static int parse_markupdecl(Parser p) |
1702 |
@@ -3355,5 +3355,5 @@ |
1716 |
if(ParserGetFlag(p, ReturnComments)) |
1703 |
if(ParserGetFlag(p, ReturnComments)) |
1717 |
{ |
1704 |
{ |
1718 |
- require(parse_comment(p, 0, cur_ent)); |
1705 |
- require(parse_comment(p, 0, cur_ent)); |
1719 |
+ require(parse_comment(p, 0)); |
1706 |
+ require(parse_comment(p, 0)); |
1720 |
if(p->dtd_callback) |
1707 |
if(p->dtd_callback) |
1721 |
p->dtd_callback(&p->xbit, p->dtd_callback_arg); |
1708 |
p->dtd_callback(&p->xbit, p->dtd_callback_arg); |
1722 |
@@ -3341,5 +3342,5 @@ static int parse_markupdecl(Parser p) |
1709 |
@@ -3363,5 +3363,5 @@ |
1723 |
} |
1710 |
} |
1724 |
else |
1711 |
else |
1725 |
- return parse_comment(p, 1, cur_ent); |
1712 |
- return parse_comment(p, 1, cur_ent); |
1726 |
+ return parse_comment(p, 1); |
1713 |
+ return parse_comment(p, 1); |
1727 |
} |
1714 |
} |
1728 |
else if(p->state == PS_error) /* looking_at may have set it */ |
1715 |
else if(p->state == PS_error) /* looking_at may have set it */ |
1729 |
@@ -4881,5 +4882,5 @@ static HashMapRetType check_id(const Has |
1716 |
@@ -5387,17 +5387,19 @@ |
1730 |
Parser p = (Parser)pp; |
|
|
1731 |
|
1732 |
- if(!(int)hash_get_value(id_entry)) |
1733 |
+ if (hash_get_value(id_entry) != NULL) |
1734 |
validity_error(p, |
1735 |
"The ID %.*S was referred to but never defined", |
1736 |
@@ -5351,17 +5352,19 @@ static int validate_attribute(Parser p, |
1737 |
} |
1717 |
} |
1738 |
|
1718 |
|
1739 |
+#if 0 |
1719 |
+#if 0 |
Lines 1754-1760
Link Here
|
1754 |
-#if 0 |
1734 |
-#if 0 |
1755 |
const Char *t; |
1735 |
const Char *t; |
1756 |
|
1736 |
|
1757 |
@@ -5404,7 +5407,7 @@ static int validate_xml_lang_attribute(P |
1737 |
@@ -5440,7 +5442,7 @@ |
1758 |
/* Not a validity error since erratum 73 */ |
1738 |
/* Not a validity error since erratum 73 */ |
1759 |
warn(p, "Dubious xml:lang attribute for element %S", e->name); |
1739 |
warn(p, "Dubious xml:lang attribute for element %S", e->name); |
1760 |
-#endif |
1740 |
-#endif |
Lines 1763-1779
Link Here
|
1763 |
+#endif |
1743 |
+#endif |
1764 |
|
1744 |
|
1765 |
/* Check an attribute matches Name[s] or Nmtoken[s]. |
1745 |
/* Check an attribute matches Name[s] or Nmtoken[s]. |
1766 |
@@ -5518,5 +5521,5 @@ static int check_attribute_token(Parser |
|
|
1767 |
if(!found) |
1768 |
{ |
1769 |
- hash_set_value(id_entry, (void *)(a->type == AT_id)); |
1770 |
+ hash_set_value(id_entry, (void *)(intptr_t)(a->type == AT_id)); |
1771 |
if(ParserGetFlag(p, XMLNamespaces)) |
1772 |
for(i=0; i<length; i++) |
1773 |
@@ -5528,5 +5531,5 @@ static int check_attribute_token(Parser |
1774 |
else if(a->type == AT_id) |
1775 |
{ |
1776 |
- int idinfo = (int)hash_get_value(id_entry); |
1777 |
+ intptr_t idinfo = (intptr_t)hash_get_value(id_entry); |
1778 |
if(idinfo & 1) |
1779 |
{ |