Commit 7a5e0dd1 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

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
parent 3fc249ef
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>
* ChangeLog: applied fix from Stepan Kasal to fix duplication
......
......@@ -463,16 +463,27 @@ htmlSkipBlankChars(xmlParserCtxtPtr ctxt) {
/* Definitions and a couple of vars for HTML Elements */
#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 NB_PHRASE 10
#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 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 NB_FORMCTRL 5
#define PCDATA
#define NB_PCDATA 0
#define HEADING "h1", "h2", "h3", "h4", "h5", "h6"
#define NB_HEADING 6
#define LIST "ul", "ol", "dir", "menu"
#define NB_LIST 4
#define MODIFIER
#define NB_MODIFIER 0
#define FLOW BLOCK,INLINE
#define NB_FLOW NB_BLOCK + NB_INLINE
#define EMPTY NULL
......@@ -487,11 +498,17 @@ static const char* html_pcdata[] = { NULL } ;
/* ... and for HTML Attributes */
#define COREATTRS "id", "class", "style", "title"
#define NB_COREATTRS 4
#define I18N "lang", "dir"
#define NB_I18N 2
#define EVENTS "onclick", "ondblclick", "onmousedown", "onmouseup", "onmouseover", "onmouseout", "onkeypress", "onkeydown", "onkeyup"
#define NB_EVENTS 9
#define ATTRS COREATTRS,I18N,EVENTS
#define NB_ATTRS NB_NB_COREATTRS + NB_I18N + NB_EVENTS
#define CELLHALIGN "align", "char", "charoff"
#define NB_CELLHALIGN 3
#define CELLVALIGN "valign"
#define NB_CELLVALIGN 1
static const char* html_attrs[] = { ATTRS, NULL } ;
static const char* core_i18n_attrs[] = { COREATTRS, I18N, NULL } ;
......
......@@ -1006,6 +1006,7 @@ CLEANFILES=xml2Conf.sh
confexecdir=$(libdir)
confexec_DATA = xml2Conf.sh
CVS_EXTRA_DIST=
EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \
libxml.m4 Copyright check-xml-test-suite.py \
check-relaxng-test-suite.py check-relaxng-test-suite2.py \
......
......@@ -27,6 +27,7 @@ void xmlUpgradeOldNs(xmlDocPtr doc);
* *
************************************************************************/
#ifdef LIBXML_HTML_ENABLED
xmlChar *htmlDecodeEntities(htmlParserCtxtPtr ctxt, int len, xmlChar end,
xmlChar end2, xmlChar end3);
......@@ -60,6 +61,7 @@ htmlDecodeEntities(htmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
}
return (NULL);
}
#endif
/**
* xmlInitializePredefinedEntities:
......
......@@ -943,7 +943,7 @@ mem_error:
*
* Returns 0 in case of error, the index in the stack otherwise
*/
extern int
int
inputPush(xmlParserCtxtPtr ctxt, xmlParserInputPtr value)
{
if (ctxt->inputNr >= ctxt->inputMax) {
......@@ -969,7 +969,7 @@ inputPush(xmlParserCtxtPtr ctxt, xmlParserInputPtr value)
*
* Returns the input just removed
*/
extern xmlParserInputPtr
xmlParserInputPtr
inputPop(xmlParserCtxtPtr ctxt)
{
xmlParserInputPtr ret;
......@@ -994,7 +994,7 @@ inputPop(xmlParserCtxtPtr ctxt)
*
* Returns 0 in case of error, the index in the stack otherwise
*/
extern int
int
nodePush(xmlParserCtxtPtr ctxt, xmlNodePtr value)
{
if (ctxt->nodeNr >= ctxt->nodeMax) {
......@@ -1027,7 +1027,7 @@ nodePush(xmlParserCtxtPtr ctxt, xmlNodePtr value)
*
* Returns the node just removed
*/
extern xmlNodePtr
xmlNodePtr
nodePop(xmlParserCtxtPtr ctxt)
{
xmlNodePtr ret;
......@@ -1126,7 +1126,7 @@ nameNsPop(xmlParserCtxtPtr ctxt)
*
* Returns -1 in case of error, the index in the stack otherwise
*/
extern int
int
namePush(xmlParserCtxtPtr ctxt, const xmlChar * value)
{
if (ctxt->nameNr >= ctxt->nameMax) {
......@@ -1156,7 +1156,7 @@ mem_error:
*
* Returns the name just removed
*/
extern const xmlChar *
const xmlChar *
namePop(xmlParserCtxtPtr ctxt)
{
const xmlChar *ret;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment