mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
removed some extern before function code reported by Kjartan Maraas on IRC
* parser.c: removed some extern before function code reported by Kjartan Maraas on IRC * legacy.c: fixed compiling when configuring out the HTML parser * Makefile.am: added a declaration for CVS_EXTRA_DIST * HTMLparser.c: beginning of an attempt at cleaning up the construction of the HTML parser data structures, current data generate a huge amount of ELF relocations at loading time. Daniel
This commit is contained in:
10
ChangeLog
10
ChangeLog
@@ -1,3 +1,13 @@
|
|||||||
|
Fri Sep 17 10:40:23 CEST 2004 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* parser.c: removed some extern before function code reported by
|
||||||
|
Kjartan Maraas on IRC
|
||||||
|
* legacy.c: fixed compiling when configuring out the HTML parser
|
||||||
|
* Makefile.am: added a declaration for CVS_EXTRA_DIST
|
||||||
|
* HTMLparser.c: beginning of an attempt at cleaning up the construction
|
||||||
|
of the HTML parser data structures, current data generate a huge
|
||||||
|
amount of ELF relocations at loading time.
|
||||||
|
|
||||||
Fri Sep 17 10:36:23 CEST 2004 Daniel Veillard <daniel@veillard.com>
|
Fri Sep 17 10:36:23 CEST 2004 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* ChangeLog: applied fix from Stepan Kasal to fix duplication
|
* ChangeLog: applied fix from Stepan Kasal to fix duplication
|
||||||
|
19
HTMLparser.c
19
HTMLparser.c
@@ -463,16 +463,27 @@ htmlSkipBlankChars(xmlParserCtxtPtr ctxt) {
|
|||||||
/* Definitions and a couple of vars for HTML Elements */
|
/* Definitions and a couple of vars for HTML Elements */
|
||||||
|
|
||||||
#define FONTSTYLE "tt", "i", "b", "u", "s", "strike", "big", "small"
|
#define FONTSTYLE "tt", "i", "b", "u", "s", "strike", "big", "small"
|
||||||
|
#define NB_FONTSTYLE 8
|
||||||
#define PHRASE "em", "strong", "dfn", "code", "samp", "kbd", "var", "cite", "abbr", "acronym"
|
#define PHRASE "em", "strong", "dfn", "code", "samp", "kbd", "var", "cite", "abbr", "acronym"
|
||||||
|
#define NB_PHRASE 10
|
||||||
#define SPECIAL "a", "img", "applet", "object", "font", "basefont", "br", "script", "map", "q", "sub", "sup", "span", "bdo", "iframe"
|
#define SPECIAL "a", "img", "applet", "object", "font", "basefont", "br", "script", "map", "q", "sub", "sup", "span", "bdo", "iframe"
|
||||||
|
#define NB_SPECIAL 15
|
||||||
#define INLINE PCDATA FONTSTYLE PHRASE SPECIAL FORMCTRL
|
#define INLINE PCDATA FONTSTYLE PHRASE SPECIAL FORMCTRL
|
||||||
#define BLOCK HEADING LIST "pre", "p", "dl", "div", "center", "noscript", "noframes", "blockquote", "form", "isindex", "hr", "table", "fieldset", "address"
|
#define NB_INLINE NB_PCDATA + NB_FONTSTYLE + NB_PHRASE + NB_SPECIAL + NB_FORMCTRL
|
||||||
|
#define BLOCK HEADING, LIST "pre", "p", "dl", "div", "center", "noscript", "noframes", "blockquote", "form", "isindex", "hr", "table", "fieldset", "address"
|
||||||
|
#define NB_BLOCK NB_HEADING + NB_LIST + 14
|
||||||
#define FORMCTRL "input", "select", "textarea", "label", "button"
|
#define FORMCTRL "input", "select", "textarea", "label", "button"
|
||||||
|
#define NB_FORMCTRL 5
|
||||||
#define PCDATA
|
#define PCDATA
|
||||||
|
#define NB_PCDATA 0
|
||||||
#define HEADING "h1", "h2", "h3", "h4", "h5", "h6"
|
#define HEADING "h1", "h2", "h3", "h4", "h5", "h6"
|
||||||
|
#define NB_HEADING 6
|
||||||
#define LIST "ul", "ol", "dir", "menu"
|
#define LIST "ul", "ol", "dir", "menu"
|
||||||
|
#define NB_LIST 4
|
||||||
#define MODIFIER
|
#define MODIFIER
|
||||||
|
#define NB_MODIFIER 0
|
||||||
#define FLOW BLOCK,INLINE
|
#define FLOW BLOCK,INLINE
|
||||||
|
#define NB_FLOW NB_BLOCK + NB_INLINE
|
||||||
#define EMPTY NULL
|
#define EMPTY NULL
|
||||||
|
|
||||||
|
|
||||||
@@ -487,11 +498,17 @@ static const char* html_pcdata[] = { NULL } ;
|
|||||||
/* ... and for HTML Attributes */
|
/* ... and for HTML Attributes */
|
||||||
|
|
||||||
#define COREATTRS "id", "class", "style", "title"
|
#define COREATTRS "id", "class", "style", "title"
|
||||||
|
#define NB_COREATTRS 4
|
||||||
#define I18N "lang", "dir"
|
#define I18N "lang", "dir"
|
||||||
|
#define NB_I18N 2
|
||||||
#define EVENTS "onclick", "ondblclick", "onmousedown", "onmouseup", "onmouseover", "onmouseout", "onkeypress", "onkeydown", "onkeyup"
|
#define EVENTS "onclick", "ondblclick", "onmousedown", "onmouseup", "onmouseover", "onmouseout", "onkeypress", "onkeydown", "onkeyup"
|
||||||
|
#define NB_EVENTS 9
|
||||||
#define ATTRS COREATTRS,I18N,EVENTS
|
#define ATTRS COREATTRS,I18N,EVENTS
|
||||||
|
#define NB_ATTRS NB_NB_COREATTRS + NB_I18N + NB_EVENTS
|
||||||
#define CELLHALIGN "align", "char", "charoff"
|
#define CELLHALIGN "align", "char", "charoff"
|
||||||
|
#define NB_CELLHALIGN 3
|
||||||
#define CELLVALIGN "valign"
|
#define CELLVALIGN "valign"
|
||||||
|
#define NB_CELLVALIGN 1
|
||||||
|
|
||||||
static const char* html_attrs[] = { ATTRS, NULL } ;
|
static const char* html_attrs[] = { ATTRS, NULL } ;
|
||||||
static const char* core_i18n_attrs[] = { COREATTRS, I18N, NULL } ;
|
static const char* core_i18n_attrs[] = { COREATTRS, I18N, NULL } ;
|
||||||
|
@@ -1006,6 +1006,7 @@ CLEANFILES=xml2Conf.sh
|
|||||||
|
|
||||||
confexecdir=$(libdir)
|
confexecdir=$(libdir)
|
||||||
confexec_DATA = xml2Conf.sh
|
confexec_DATA = xml2Conf.sh
|
||||||
|
CVS_EXTRA_DIST=
|
||||||
EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \
|
EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \
|
||||||
libxml.m4 Copyright check-xml-test-suite.py \
|
libxml.m4 Copyright check-xml-test-suite.py \
|
||||||
check-relaxng-test-suite.py check-relaxng-test-suite2.py \
|
check-relaxng-test-suite.py check-relaxng-test-suite2.py \
|
||||||
|
2
legacy.c
2
legacy.c
@@ -27,6 +27,7 @@ void xmlUpgradeOldNs(xmlDocPtr doc);
|
|||||||
* *
|
* *
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
#ifdef LIBXML_HTML_ENABLED
|
||||||
xmlChar *htmlDecodeEntities(htmlParserCtxtPtr ctxt, int len, xmlChar end,
|
xmlChar *htmlDecodeEntities(htmlParserCtxtPtr ctxt, int len, xmlChar end,
|
||||||
xmlChar end2, xmlChar end3);
|
xmlChar end2, xmlChar end3);
|
||||||
|
|
||||||
@@ -60,6 +61,7 @@ htmlDecodeEntities(htmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
|
|||||||
}
|
}
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlInitializePredefinedEntities:
|
* xmlInitializePredefinedEntities:
|
||||||
|
12
parser.c
12
parser.c
@@ -943,7 +943,7 @@ mem_error:
|
|||||||
*
|
*
|
||||||
* Returns 0 in case of error, the index in the stack otherwise
|
* Returns 0 in case of error, the index in the stack otherwise
|
||||||
*/
|
*/
|
||||||
extern int
|
int
|
||||||
inputPush(xmlParserCtxtPtr ctxt, xmlParserInputPtr value)
|
inputPush(xmlParserCtxtPtr ctxt, xmlParserInputPtr value)
|
||||||
{
|
{
|
||||||
if (ctxt->inputNr >= ctxt->inputMax) {
|
if (ctxt->inputNr >= ctxt->inputMax) {
|
||||||
@@ -969,7 +969,7 @@ inputPush(xmlParserCtxtPtr ctxt, xmlParserInputPtr value)
|
|||||||
*
|
*
|
||||||
* Returns the input just removed
|
* Returns the input just removed
|
||||||
*/
|
*/
|
||||||
extern xmlParserInputPtr
|
xmlParserInputPtr
|
||||||
inputPop(xmlParserCtxtPtr ctxt)
|
inputPop(xmlParserCtxtPtr ctxt)
|
||||||
{
|
{
|
||||||
xmlParserInputPtr ret;
|
xmlParserInputPtr ret;
|
||||||
@@ -994,7 +994,7 @@ inputPop(xmlParserCtxtPtr ctxt)
|
|||||||
*
|
*
|
||||||
* Returns 0 in case of error, the index in the stack otherwise
|
* Returns 0 in case of error, the index in the stack otherwise
|
||||||
*/
|
*/
|
||||||
extern int
|
int
|
||||||
nodePush(xmlParserCtxtPtr ctxt, xmlNodePtr value)
|
nodePush(xmlParserCtxtPtr ctxt, xmlNodePtr value)
|
||||||
{
|
{
|
||||||
if (ctxt->nodeNr >= ctxt->nodeMax) {
|
if (ctxt->nodeNr >= ctxt->nodeMax) {
|
||||||
@@ -1027,7 +1027,7 @@ nodePush(xmlParserCtxtPtr ctxt, xmlNodePtr value)
|
|||||||
*
|
*
|
||||||
* Returns the node just removed
|
* Returns the node just removed
|
||||||
*/
|
*/
|
||||||
extern xmlNodePtr
|
xmlNodePtr
|
||||||
nodePop(xmlParserCtxtPtr ctxt)
|
nodePop(xmlParserCtxtPtr ctxt)
|
||||||
{
|
{
|
||||||
xmlNodePtr ret;
|
xmlNodePtr ret;
|
||||||
@@ -1126,7 +1126,7 @@ nameNsPop(xmlParserCtxtPtr ctxt)
|
|||||||
*
|
*
|
||||||
* Returns -1 in case of error, the index in the stack otherwise
|
* Returns -1 in case of error, the index in the stack otherwise
|
||||||
*/
|
*/
|
||||||
extern int
|
int
|
||||||
namePush(xmlParserCtxtPtr ctxt, const xmlChar * value)
|
namePush(xmlParserCtxtPtr ctxt, const xmlChar * value)
|
||||||
{
|
{
|
||||||
if (ctxt->nameNr >= ctxt->nameMax) {
|
if (ctxt->nameNr >= ctxt->nameMax) {
|
||||||
@@ -1156,7 +1156,7 @@ mem_error:
|
|||||||
*
|
*
|
||||||
* Returns the name just removed
|
* Returns the name just removed
|
||||||
*/
|
*/
|
||||||
extern const xmlChar *
|
const xmlChar *
|
||||||
namePop(xmlParserCtxtPtr ctxt)
|
namePop(xmlParserCtxtPtr ctxt)
|
||||||
{
|
{
|
||||||
const xmlChar *ret;
|
const xmlChar *ret;
|
||||||
|
Reference in New Issue
Block a user