1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

Finally commiting work done on the plane, major cleanup,

spread some serious anti bitrot all over the place:
- parserInternals.c parserInternals.h parser.c Makefile.am:
  created a new module parserInternals.c, moved most of the
  code shared by the various parsers there, as well as
  deprecated  code from parser.c. More cleanup of parser.c
- uri.c: fixed a problem when URI is NULL
- valid.c: speedup when looking for an attribute declaration
Daniel
This commit is contained in:
Daniel Veillard
2000-09-16 14:02:43 +00:00
parent 39c7d71a3b
commit b1059e2f88
12 changed files with 3627 additions and 3175 deletions

View File

@@ -15,8 +15,18 @@
extern "C" {
#endif
/*
* Identifiers can be longer, but this will be more costly
* at runtime.
*/
#define XML_MAX_NAMELEN 100
/*
* The parser tries to always have that amount of input ready
* one of the point is providing context when reporting errors
*/
#define INPUT_CHUNK 250
/************************************************************************
* *
* UNICODE version of the macros. *
@@ -87,6 +97,18 @@ extern "C" {
#define MOVETO_STARTTAG(p) \
while ((*p) && (*(p) != '<')) (p)++
/**
* Global vaiables affecting the default parser behaviour.
*/
extern int xmlParserDebugEntities;
extern int xmlGetWarningsDefaultValue;
extern int xmlParserDebugEntities;
extern int xmlSubstituteEntitiesDefaultValue;
extern int xmlDoValidityCheckingDefaultValue;
extern int xmlPedanticParserDefaultValue;
extern int xmlKeepBlanksDefaultValue;
/*
* Function to finish teh work of the macros where needed
*/
@@ -101,12 +123,6 @@ int xmlIsExtender (int c);
int xmlIsCombining (int c);
int xmlIsChar (int c);
/**
* Not for the faint of heart
*/
extern int xmlParserDebugEntities;
/**
* Parser context
*/
@@ -141,6 +157,7 @@ xmlChar xmlPopInput (xmlParserCtxtPtr ctxt);
void xmlFreeInputStream (xmlParserInputPtr input);
xmlParserInputPtr xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
const char *filename);
xmlParserInputPtr xmlNewInputStream (xmlParserCtxtPtr ctxt);
/**
* Namespaces.
@@ -248,6 +265,18 @@ int inputPush (xmlParserCtxtPtr ctxt,
xmlParserInputPtr value);
xmlParserInputPtr inputPop (xmlParserCtxtPtr ctxt);
/*
* other comodities shared between parser.c and parserInternals
*/
int xmlSkipBlankChars (xmlParserCtxtPtr ctxt);
int xmlStringCurrentChar (xmlParserCtxtPtr ctxt,
const xmlChar *cur,
int *len);
void xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
void xmlParserHandleReference(xmlParserCtxtPtr ctxt);
xmlChar *namePop (xmlParserCtxtPtr ctxt);
int xmlCheckLanguageID (const xmlChar *lang);
/*
* Really core function shared with HTML parser
*/