#include "htmllex.h"
#include <ctype.h>
-#ifdef HAVE_LIBEXPAT
+#ifdef HAVE_EXPAT
#include <expat.h>
#endif
#endif
typedef struct {
-#ifdef HAVE_LIBEXPAT
+#ifdef HAVE_EXPAT
XML_Parser parser;
#endif
char* ptr; /* input source */
error_context();
}
-#ifdef HAVE_LIBEXPAT
+#ifdef HAVE_EXPAT
/* lexerror:
* called by lexer when unknown <..> is found.
*/
int initHTMLlexer(char *src, agxbuf * xb, int charset)
{
-#ifdef HAVE_LIBEXPAT
+#ifdef HAVE_EXPAT
state.xb = xb;
agxbinit (&state.lb, SMALLBUF, NULL);
state.ptr = src;
int clearHTMLlexer()
{
-#ifdef HAVE_LIBEXPAT
+#ifdef HAVE_EXPAT
int rv = state.warn | state.error;
XML_ParserFree(state.parser);
agxbfree (&state.lb);
#endif
}
-#ifdef HAVE_LIBEXPAT
+#ifdef HAVE_EXPAT
/* eatComment:
* Given first character after open comment, eat characters
* upto comment close, returning pointer to closing > if it exists,
int htmllineno()
{
-#ifdef HAVE_LIBEXPAT
+#ifdef HAVE_EXPAT
return XML_GetCurrentLineNumber(state.parser);
#else
return 0;
int htmllex()
{
-#ifdef HAVE_LIBEXPAT
+#ifdef HAVE_EXPAT
static char *begin_html = "<HTML>";
static char *end_html = "</HTML>";