bug 46754, remove transformiix copy of expat. Not part of build. build transformiix standalone on windows again.
changes to build system are r=cls, changes to transformiix r=peterv
This commit is contained in:
Родитель
5f94909c4a
Коммит
0881b0cc24
|
@ -88,8 +88,8 @@ BM_CVS_NS_necko = $(BM_CVS_NS_xpcom) intl/locale/idl intl/strres/public modules
|
|||
#
|
||||
# tranformiix
|
||||
#
|
||||
BM_DIRS_transformiix = extensions/transformiix
|
||||
BM_CVS_transformiix = extensions/transformiix
|
||||
BM_DIRS_transformiix = expat extensions/transformiix
|
||||
BM_CVS_transformiix = expat extensions/transformiix
|
||||
|
||||
#
|
||||
# psm2
|
||||
|
|
|
@ -14008,6 +14008,11 @@ COMPILE_CXXFLAGS=`echo \
|
|||
$_DEPEND_CFLAGS \
|
||||
$COMPILE_CXXFLAGS`
|
||||
|
||||
if test "$TX_EXE"; then
|
||||
COMPILE_CFLAGS=`echo $COMPILE_CFLAGS | sed 's/MOZILLA_CLIENT/XML_UNICODE/'`
|
||||
COMPILE_CXXFLAGS=`echo $COMPILE_CXXFLAGS | sed 's/MOZILLA_CLIENT/XML_UNICODE/'`
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -4559,6 +4559,11 @@ COMPILE_CXXFLAGS=`echo \
|
|||
$_DEPEND_CFLAGS \
|
||||
$COMPILE_CXXFLAGS`
|
||||
|
||||
if test "$TX_EXE"; then
|
||||
COMPILE_CFLAGS=`echo $COMPILE_CFLAGS | sed 's/MOZILLA_CLIENT/XML_UNICODE/'`
|
||||
COMPILE_CXXFLAGS=`echo $COMPILE_CXXFLAGS | sed 's/MOZILLA_CLIENT/XML_UNICODE/'`
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl It is perfectly legal to build with both -O and -g even though
|
||||
dnl some compilers/platforms might not support this.
|
||||
|
|
|
@ -26,7 +26,10 @@ VPATH = @srcdir@
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
PROGRAM = ../transformiix
|
||||
PROGRAM = ../transformiix$(BIN_SUFFIX)
|
||||
|
||||
REQUIRES = expat \
|
||||
$(NULL)
|
||||
|
||||
OBJS =../base/ArrayList.$(OBJ_SUFFIX) \
|
||||
../base/CommandLineUtils.$(OBJ_SUFFIX) \
|
||||
|
@ -92,10 +95,6 @@ OBJS =../base/ArrayList.$(OBJ_SUFFIX) \
|
|||
../xml/XMLUtils.$(OBJ_SUFFIX) \
|
||||
../xml/XMLDOMUtils.$(OBJ_SUFFIX) \
|
||||
../xml/parser/XMLParser.$(OBJ_SUFFIX) \
|
||||
../xml/parser/hashtable.$(OBJ_SUFFIX) \
|
||||
../xml/parser/xmlrole.$(OBJ_SUFFIX) \
|
||||
../xml/parser/xmlparse.$(OBJ_SUFFIX) \
|
||||
../xml/parser/xmltok.$(OBJ_SUFFIX) \
|
||||
../xslt/txOutputFormat.$(OBJ_SUFFIX) \
|
||||
../xslt/Names.$(OBJ_SUFFIX) \
|
||||
../xslt/Numbering.$(OBJ_SUFFIX) \
|
||||
|
@ -122,10 +121,16 @@ OBJS =../base/ArrayList.$(OBJ_SUFFIX) \
|
|||
../xslt/util/txXPathResultComparator.$(OBJ_SUFFIX) \
|
||||
transformiix.$(OBJ_SUFFIX)
|
||||
CPP_PROG_LINK = 1
|
||||
|
||||
EXTRA_LIBS = \
|
||||
$(DIST)/lib/$(LIB_PREFIX)expat_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/$(LIB_PREFIX)xmltok_s.$(LIB_SUFFIX) \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
INCLUDES += -I$(srcdir)/../xslt -I$(srcdir)/../base -I$(srcdir)/../net \
|
||||
-I$(srcdir)/../xml -I$(srcdir)/../xml/dom \
|
||||
-I$(srcdir)/../xml/parser -I$(srcdir)/../xml/parser/xmlparse \
|
||||
-I$(srcdir)/../xml/parser \
|
||||
-I$(srcdir)/../xpath -I$(srcdir)/../xslt/util \
|
||||
-I$(srcdir)/../xslt/functions
|
|
@ -22,7 +22,7 @@
|
|||
DEPTH = ../../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@ @srcdir@/xmltok @srcdir@/xmlparse
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
@ -40,21 +40,18 @@ REQUIRES = string \
|
|||
caps \
|
||||
unicharutil \
|
||||
$(NULL)
|
||||
else
|
||||
REQUIRES = expat \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
CPPSRCS = XMLParser.cpp
|
||||
ifndef TX_EXE
|
||||
CPPSRCS += nsSyncLoader.cpp
|
||||
else
|
||||
CSRCS = xmltok.c xmlrole.c xmlparse.c hashtable.c
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
INCLUDES += -I$(srcdir)/../../base -I$(srcdir)/../dom
|
||||
ifdef TX_EXE
|
||||
INCLUDES += -I$(srcdir)/xmlparse -I$(srcdir)/xmltok
|
||||
COMPILE_CFLAGS += -DXML_UNICODE
|
||||
endif
|
||||
|
||||
libs:: $(OBJS)
|
||||
|
|
|
@ -41,6 +41,8 @@
|
|||
#ifndef TX_EXE
|
||||
#include "nsSyncLoader.h"
|
||||
#include "nsNetUtil.h"
|
||||
#else
|
||||
#include "xmlparse.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -53,9 +55,6 @@
|
|||
**/
|
||||
XMLParser::XMLParser()
|
||||
{
|
||||
#ifdef TX_EXE
|
||||
errorState = MB_FALSE;
|
||||
#endif
|
||||
} //-- XMLParser
|
||||
|
||||
|
||||
|
@ -104,6 +103,17 @@ Document* XMLParser::getDocumentFromURI(const String& href,
|
|||
}
|
||||
|
||||
#ifdef TX_EXE
|
||||
/*-------------------------------------
|
||||
* Sax related methods for XML parsers
|
||||
* ------------------------------------*/
|
||||
extern "C" {
|
||||
void charData(void* userData, const XML_Char* s, int len);
|
||||
int startElement(void *userData, const XML_Char* name, const XML_Char** atts);
|
||||
int endElement(void *userData, const XML_Char* name);
|
||||
int piHandler(void *userData, const XML_Char *target, const XML_Char *data);
|
||||
void commentHandler(void *userData, const XML_Char *s);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the given input stream and returns a DOM Document.
|
||||
* A NULL pointer will be returned if errors occurred
|
||||
|
@ -114,7 +124,6 @@ Document* XMLParser::parse(istream& inputStream, const String& uri)
|
|||
|
||||
char buf[bufferSize];
|
||||
int done;
|
||||
errorState = MB_FALSE;
|
||||
errorString.clear();
|
||||
if ( !inputStream ) {
|
||||
errorString.append("unable to parse xml: invalid or unopen stream encountered.");
|
||||
|
@ -142,7 +151,6 @@ Document* XMLParser::parse(istream& inputStream, const String& uri)
|
|||
errorString.append(" at line ");
|
||||
errorString.append(XML_GetCurrentLineNumber(parser));
|
||||
done = MB_TRUE;
|
||||
errorState = MB_TRUE;
|
||||
delete ps.document;
|
||||
ps.document = NULL;
|
||||
}
|
||||
|
@ -164,7 +172,7 @@ const String& XMLParser::getErrorString()
|
|||
}
|
||||
|
||||
|
||||
void startElement(void *userData, const XML_Char *name, const XML_Char **atts)
|
||||
int startElement(void *userData, const XML_Char *name, const XML_Char **atts)
|
||||
{
|
||||
ParserState* ps = (ParserState*)userData;
|
||||
Element* newElement;
|
||||
|
@ -183,13 +191,15 @@ void startElement(void *userData, const XML_Char *name, const XML_Char **atts)
|
|||
ps->currentNode->appendChild(newElement);
|
||||
ps->currentNode = newElement;
|
||||
|
||||
return XML_ERROR_NONE;
|
||||
} //-- startElement
|
||||
|
||||
void endElement(void *userData, const XML_Char* name)
|
||||
int endElement(void *userData, const XML_Char* name)
|
||||
{
|
||||
ParserState* ps = (ParserState*)userData;
|
||||
if (ps->currentNode->getParentNode())
|
||||
ps->currentNode = ps->currentNode->getParentNode();
|
||||
return XML_ERROR_NONE;
|
||||
} //-- endElement
|
||||
|
||||
void charData(void* userData, const XML_Char* s, int len)
|
||||
|
@ -214,7 +224,7 @@ void commentHandler(void* userData, const XML_Char* s)
|
|||
/**
|
||||
* Handles ProcessingInstructions
|
||||
**/
|
||||
void piHandler(void *userData, const XML_Char *target, const XML_Char *data) {
|
||||
int piHandler(void *userData, const XML_Char *target, const XML_Char *data) {
|
||||
ParserState* ps = (ParserState*)userData;
|
||||
String targetStr((UNICODE_CHAR *)target);
|
||||
String dataStr((UNICODE_CHAR *)data);
|
||||
|
@ -222,6 +232,7 @@ void piHandler(void *userData, const XML_Char *target, const XML_Char *data) {
|
|||
ps->currentNode->appendChild(
|
||||
ps->document->createProcessingInstruction(targetStr, dataStr));
|
||||
|
||||
return XML_ERROR_NONE;
|
||||
} //-- piHandler
|
||||
|
||||
#endif
|
||||
|
|
|
@ -31,11 +31,6 @@
|
|||
#include "dom.h"
|
||||
|
||||
#ifdef TX_EXE
|
||||
#ifndef XML_UNICODE
|
||||
#define XML_UNICODE
|
||||
#endif
|
||||
|
||||
#include "xmlparse.h"
|
||||
#include <iostream.h>
|
||||
|
||||
typedef struct {
|
||||
|
@ -50,19 +45,6 @@ typedef struct {
|
|||
**/
|
||||
class XMLParser
|
||||
{
|
||||
#ifdef TX_EXE
|
||||
/*-----------------6/18/99 12:43PM------------------
|
||||
* Sax related methods for XML parsers
|
||||
* --------------------------------------------------*/
|
||||
friend void charData(void* userData, const XML_Char* s, int len);
|
||||
friend void commentHandler(void* userData, const XML_Char* s);
|
||||
friend void startElement(void *userData, const XML_Char* name,
|
||||
const XML_Char** atts);
|
||||
friend void endElement(void *userData, const XML_Char* name);
|
||||
|
||||
friend void piHandler(void *userData, const XML_Char *target, const XML_Char *data);
|
||||
#endif
|
||||
|
||||
public:
|
||||
XMLParser();
|
||||
~XMLParser();
|
||||
|
@ -73,23 +55,8 @@ class XMLParser
|
|||
const String& getErrorString();
|
||||
|
||||
protected:
|
||||
|
||||
Document* theDocument;
|
||||
Element* currentElement;
|
||||
MBool errorState;
|
||||
String errorString;
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef TX_EXE
|
||||
/*-----------------6/18/99 12:43PM------------------
|
||||
* Sax related methods for XML parsers
|
||||
* --------------------------------------------------*/
|
||||
void charData(void* userData, const XML_Char* s, int len);
|
||||
void startElement(void *userData, const XML_Char* name, const XML_Char** atts);
|
||||
void endElement(void *userData, const XML_Char* name);
|
||||
void piHandler(void *userData, const XML_Char *target, const XML_Char *data);
|
||||
void piHandler(void *userData, const XML_Char *s);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -70,7 +70,7 @@ include $(topsrcdir)/config/rules.mk
|
|||
|
||||
INCLUDES += -I$(srcdir) -I$(srcdir)/../base \
|
||||
-I$(srcdir)/../xml -I$(srcdir)/../xml/dom \
|
||||
-I$(srcdir)/../xml/parser -I$(srcdir)/../xml/parser/xmlparse \
|
||||
-I$(srcdir)/../xml/parser \
|
||||
-I$(srcdir)/../xpath -I$(srcdir)/util -I$(srcdir)/functions
|
||||
|
||||
libs:: $(OBJS)
|
||||
|
|
Загрузка…
Ссылка в новой задаче