diff --git a/ChangeLog b/ChangeLog index 04bb74e5..296b641e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Apr 16 19:52:01 CEST 2002 Igor Zlatkovic + + * include/libxml/encoding.h: Patch for the Borland C++ builder + * include/libxml/tree.h: Patch for the Borland C++ builder + * threads.c: Patch for the Borland C++ builder + Tue Apr 16 19:46:55 CEST 2002 Igor Zlatkovic * win32/Makefile.msvc: Update for XML Schema support diff --git a/include/libxml/encoding.h b/include/libxml/encoding.h index 8b4a36c2..a1946c22 100644 --- a/include/libxml/encoding.h +++ b/include/libxml/encoding.h @@ -21,7 +21,7 @@ #ifndef __XML_CHAR_ENCODING_H__ #define __XML_CHAR_ENCODING_H__ -#if defined(WIN32) && defined(_MSC_VER) +#if defined(WIN32) && (defined(_MSC_VER) || defined(__BORLANDC__)) #include #else #include diff --git a/include/libxml/tree.h b/include/libxml/tree.h index 940426dd..e9c8d83a 100644 --- a/include/libxml/tree.h +++ b/include/libxml/tree.h @@ -14,7 +14,7 @@ #define __XML_TREE_H__ #include -#if defined(WIN32) && defined(_MSC_VER) +#if defined(WIN32) && (defined(_MSC_VER) || defined(__BORLANDC__)) #include #else #include diff --git a/threads.c b/threads.c index b790d055..07a14698 100644 --- a/threads.c +++ b/threads.c @@ -87,7 +87,7 @@ static pthread_key_t globalkey; static pthread_t mainthread; static pthread_once_t once_control = PTHREAD_ONCE_INIT; #elif defined HAVE_WIN32_THREADS -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined(__BORLANDC__) static __declspec (thread) xmlGlobalState tlstate; static __declspec (thread) int tlstate_inited = 0; #else @@ -330,7 +330,7 @@ xmlNewGlobalState(void) */ #ifdef HAVE_WIN32_THREADS -#ifndef _MSC_VER +#if !defined(_MSC_VER) && !defined(__BORLANDC__) typedef struct _xmlGlobalStateCleanupHelperParams { HANDLE thread; @@ -366,7 +366,7 @@ xmlGetGlobalState(void) } return (globalval); #elif defined HAVE_WIN32_THREADS -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined(__BORLANDC__) if (!tlstate_inited) { tlstate_inited = 1; @@ -525,7 +525,7 @@ xmlOnceInit(void) { (void) pthread_key_create(&globalkey, xmlFreeGlobalState); mainthread = pthread_self(); #elif defined HAVE_WIN32_THREADS -#ifndef _MSC_VER +#if !defined(_MSC_VER) && !defined(__BORLANDC__) globalkey = TlsAlloc (); #endif /* _MSC_VER */ mainthread = GetCurrentThreadId (); diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc index 013e6d0a..e0346536 100644 --- a/win32/Makefile.msvc +++ b/win32/Makefile.msvc @@ -38,6 +38,7 @@ AUTOCONF = .\configure.txt #WITH_ICONV = 1 #WITH_DEBUG = 1 #WITH_MEM_DEBUG = 0 +#WITH_SCHEMAS = 1 #DEBUG = 0 #STATIC = 0 #PREFIX = . # set this to the right value. @@ -135,16 +136,23 @@ XML_OBJS = $(XML_INTDIR)\c14n.obj\ $(XML_INTDIR)\xlink.obj\ $(XML_INTDIR)\xmlIO.obj\ $(XML_INTDIR)\xmlmemory.obj\ + $(XML_INTDIR)\xmlregexp.obj\ + $(XML_INTDIR)\xmlschemas.obj\ + $(XML_INTDIR)\xmlschemastypes.obj\ + $(XML_INTDIR)\xmlunicode.obj\ $(XML_INTDIR)\xpath.obj\ $(XML_INTDIR)\xpointer.obj # Xmllint and friends executables. UTILS = $(BINDIR)\xmllint.exe\ $(BINDIR)\xmlcatalog.exe\ + $(BINDIR)\testAutomata.exe\ $(BINDIR)\testC14N.exe\ $(BINDIR)\testDocbook.exe\ $(BINDIR)\testHTML.exe\ + $(BINDIR)\testRegexp.exe\ $(BINDIR)\testSAX.exe\ + $(BINDIR)\testSchemas.exe\ $(BINDIR)\testURI.exe\ $(BINDIR)\testXPath.exe diff --git a/win32/Readme.txt b/win32/Readme.txt index a8006d08..b7d85d26 100644 --- a/win32/Readme.txt +++ b/win32/Readme.txt @@ -25,7 +25,7 @@ refer to your compiler's documentation regarding that. The first thing you want to do is configure the source. You can have the configuration script do this automatically for you. The configuration script is written in JScript, a Microsoft's -implementation of the ECMS scripting language. Almost every Windows +implementation of the ECMA scripting language. Almost every Windows machine can execute this through the Windows Scripting Host. If your system lacks the ability to execute JScript for some reason, you must perform the configuration manually. diff --git a/win32/bcb5/Readme.txt b/win32/bcb5/Readme.txt new file mode 100644 index 00000000..299be17f --- /dev/null +++ b/win32/bcb5/Readme.txt @@ -0,0 +1,19 @@ + +Build for Borland C++ Builder 5 (libxml2 2.4.19) +=============================== + +This procedure will build the following file: + +libxml2_a.lib - static libxml library + +libxml2_a.bpr - for the static version + +And build it. The resulting files should be in this directory afterwards. +There will be a lot of warnings which are supposed to be ignored. +If you want to reconfigure the package, you must edit the file +..\..\include\libxml\xmlversion.h + +You must define the symbol WIN32 in all your projects to use the header +files. + +April 2002, Moritz Both diff --git a/win32/bcb5/libxml2_a.bpf b/win32/bcb5/libxml2_a.bpf new file mode 100644 index 00000000..bb3ead72 --- /dev/null +++ b/win32/bcb5/libxml2_a.bpf @@ -0,0 +1,36 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +USEUNIT("..\..\xpointer.c"); +USEUNIT("..\..\debugXML.c"); +USEUNIT("..\..\DOCBparser.c"); +USEUNIT("..\..\encoding.c"); +USEUNIT("..\..\entities.c"); +USEUNIT("..\..\error.c"); +USEUNIT("..\..\globals.c"); +USEUNIT("..\..\hash.c"); +USEUNIT("..\..\HTMLparser.c"); +USEUNIT("..\..\HTMLtree.c"); +USEUNIT("..\..\list.c"); +USEUNIT("..\..\nanoftp.c"); +USEUNIT("..\..\nanohttp.c"); +USEUNIT("..\..\parser.c"); +USEUNIT("..\..\parserInternals.c"); +USEUNIT("..\..\SAX.c"); +USEUNIT("..\..\threads.c"); +USEUNIT("..\..\tree.c"); +USEUNIT("..\..\uri.c"); +USEUNIT("..\..\valid.c"); +USEUNIT("..\..\xinclude.c"); +USEUNIT("..\..\xlink.c"); +USEUNIT("..\..\xmlIO.c"); +USEUNIT("..\..\xmlmemory.c"); +USEUNIT("..\..\xpath.c"); +USEUNIT("..\..\catalog.c"); +USEUNIT("..\..\c14n.c"); +//--------------------------------------------------------------------------- +#define Library + +// To add a file to the library use the Project menu 'Add to Project'. + diff --git a/win32/bcb5/libxml2_a.bpr b/win32/bcb5/libxml2_a.bpr new file mode 100644 index 00000000..0fc7fdeb --- /dev/null +++ b/win32/bcb5/libxml2_a.bpr @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1031 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=5 +Item0=$(BCB)\include;..\..\include;..\..\include\xmllib +Item1=..\..;$(BCB)\include;..\..\include;..\..\include\xmllib +Item2=..\..;$(BCB)\include;D:\Programme\Borland\include\;D:\Programme\Borland\include\libxml\ +Item3=$(BCB)\include;..\..\include;..\..\include\libxml +Item4=G:\cvs_src\herrmann\libxml2-2.4.19;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=3 +Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\lib\obj;$(BCB)\lib +Item2=G:\cvs_src\herrmann\libxml2-2.4.19;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=WIN32 + +[HistoryLists\hlTlibPageSize] +Count=1 +Item0=0x0010 + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/win32/configure.js b/win32/configure.js index 01c9a270..98c22988 100644 --- a/win32/configure.js +++ b/win32/configure.js @@ -44,6 +44,7 @@ var withXinclude = true; var withIconv = true; var withDebug = true; var withMemDebug = false; +var withSchemas = true; /* Win32 build options. */ var buildDebug = 0; var buildStatic = 0; @@ -105,6 +106,7 @@ function usage() txt += " iconv: Enable ICONV support (" + (withIconv? "yes" : "no") + ")\n"; txt += " xml_debug: Enable XML debbugging module (" + (withDebug? "yes" : "no") + ")\n"; txt += " mem_debug: Enable memory debugger (" + (withMemDebug? "yes" : "no") + ")\n"; + txt += " schemas: Enable XML Schema support (" + (withSchemas? "yes" : "no") + ")\n"; txt += "\nWin32 build options, default value given in parentheses:\n\n"; txt += " debug: Build unoptimised debug executables (" + (buildDebug? "yes" : "no") + ")\n"; txt += " static: Link xmllint statically to libxml2 (" + (buildStatic? "yes" : "no") + ")\n"; @@ -168,6 +170,7 @@ function discoverVersion() vf.WriteLine("WITH_ICONV=" + (withIconv? "1" : "0")); vf.WriteLine("WITH_DEBUG=" + (withDebug? "1" : "0")); vf.WriteLine("WITH_MEM_DEBUG=" + (withMemDebug? "1" : "0")); + vf.WriteLine("WITH_SCHEMAS=" + (withSchemas? "1" : "0")); vf.WriteLine("DEBUG=" + (buildDebug? "1" : "0")); vf.WriteLine("STATIC=" + (buildStatic? "1" : "0")); vf.WriteLine("PREFIX=" + buildPrefix); @@ -225,6 +228,8 @@ function configureLibxml() of.WriteLine(s.replace(/\@WITH_DEBUG\@/, withDebug? "1" : "0")); } else if (s.search(/\@WITH_MEM_DEBUG\@/) != -1) { of.WriteLine(s.replace(/\@WITH_MEM_DEBUG\@/, withMemDebug? "1" : "0")); + } else if (s.search(/\@WITH_SCHEMAS\@/) != -1) { + of.WriteLine(s.replace(/\@WITH_SCHEMAS\@/, withSchemas? "1" : "0")); } else of.WriteLine(ln); } @@ -305,6 +310,8 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) { withDebug = strToBool(arg.substring(opt.length + 1, arg.length)); else if (opt == "mem_debug") withMemDebug = strToBool(arg.substring(opt.length + 1, arg.length)); + else if (opt == "schemas") + withSchemas = strToBool(arg.substring(opt.length + 1, arg.length)); else if (opt == "debug") buildDebug = strToBool(arg.substring(opt.length + 1, arg.length)); else if (opt == "static") @@ -384,6 +391,7 @@ txtOut += " XInclude support: " + boolToStr(withXinclude) + "\n"; txtOut += " ICONV support: " + boolToStr(withIconv) + "\n"; txtOut += " Debugging module: " + boolToStr(withDebug) + "\n"; txtOut += " Memory debugging: " + boolToStr(withMemDebug) + "\n"; +txtOut += "XML Schema support: " + boolToStr(withSchemas) + "\n"; txtOut += "\n"; txtOut += "Win32 build configuration\n"; txtOut += "-------------------------\n"; diff --git a/win32/libxml2.def.src b/win32/libxml2.def.src index c1f124ff..ce413fa8 100644 --- a/win32/libxml2.def.src +++ b/win32/libxml2.def.src @@ -195,7 +195,7 @@ EXPORTS xmlFreeEntitiesTable xmlDumpEntitiesTable xmlDumpEntityDecl - xmlCleanupPredefinedEntities +xmlCleanupPredefinedEntities /* globals.h @@ -687,6 +687,8 @@ EXPORTS htmlCreateFileParserCtxt #endif /* LIBXML_HTML_ENABLED */ + /* Specific function to keep track of entities references and used by the XSLT debugger. */ + xmlSetEntityReferenceFunc /* SAX.h --------------------------------------------------------------------- */ @@ -1011,6 +1013,23 @@ EXPORTS #endif +/* xmlautomata.h + --------------------------------------------------------------------- */ +#ifdef LIBXML_SCHEMAS_ENABLED + /* Building API */ + xmlNewAutomata + xmlFreeAutomata + xmlAutomataGetInitState + xmlAutomataSetFinalState + xmlAutomataNewState + xmlAutomataNewTransition + xmlAutomataNewCountTrans + xmlAutomataNewEpsilon + // xmlAutomataNewCounter <-- not activated in the source (xmlregexp.c). + xmlAutomataCompile +#endif /* LIBXML_SCHEMAS_ENABLED */ + + /* xmlerror.h --------------------------------------------------------------------- */ xmlSetGenericErrorFunc @@ -1083,6 +1102,194 @@ EXPORTS #endif /* DEBUG_MEMORY_LOCATION */ +/* xmlregexp.h + --------------------------------------------------------------------- */ +#ifdef LIBXML_SCHEMAS_ENABLED + /* The POSIX like API */ + xmlRegexpCompile + xmlRegFreeRegexp + xmlRegexpExec + xmlRegexpPrint + + /* The progressive API */ + xmlRegNewExecCtxt + xmlRegFreeExecCtxt + xmlRegExecPushString +#endif /* LIBXML_SCHEMAS_ENABLED */ + + +/* xmlschemas.h + --------------------------------------------------------------------- */ +#ifdef LIBXML_SCHEMAS_ENABLED + /* Interfaces for parsing. */ + xmlSchemaNewParserCtxt + xmlSchemaFreeParserCtxt + xmlSchemaSetParserErrors + xmlSchemaParse + xmlSchemaFree + xmlSchemaDump + + /* Interfaces for validating */ + xmlSchemaSetValidErrors + xmlSchemaNewValidCtxt + xmlSchemaFreeValidCtxt + xmlSchemaValidateDoc + xmlSchemaValidateStream +#endif /* LIBXML_SCHEMAS_ENABLED */ + + +/* xmlschemastypes.h + --------------------------------------------------------------------- */ +#ifdef LIBXML_SCHEMAS_ENABLED + xmlSchemaInitTypes + xmlSchemaCleanupTypes + xmlSchemaGetPredefinedType + xmlSchemaValidatePredefinedType + xmlSchemaValidateFacet + xmlSchemaFreeValue +#endif /* LIBXML_SCHEMAS_ENABLED */ + + +/* xmlunicode.h + --------------------------------------------------------------------- */ +#ifdef LIBXML_SCHEMAS_ENABLED + xmlUCSIsAlphabeticPresentationForms + xmlUCSIsArabic + xmlUCSIsArabicPresentationFormsA + xmlUCSIsArabicPresentationFormsB + xmlUCSIsArmenian + xmlUCSIsArrows + xmlUCSIsBasicLatin + xmlUCSIsBengali + xmlUCSIsBlockElements + xmlUCSIsBopomofo + xmlUCSIsBopomofoExtended + xmlUCSIsBoxDrawing + xmlUCSIsBraillePatterns + xmlUCSIsByzantineMusicalSymbols + xmlUCSIsCJKCompatibility + xmlUCSIsCJKCompatibilityForms + xmlUCSIsCJKCompatibilityIdeographs + xmlUCSIsCJKCompatibilityIdeographsSupplement + xmlUCSIsCJKRadicalsSupplement + xmlUCSIsCJKSymbolsandPunctuation + xmlUCSIsCJKUnifiedIdeographs + xmlUCSIsCJKUnifiedIdeographsExtensionA + xmlUCSIsCJKUnifiedIdeographsExtensionB + xmlUCSIsCherokee + xmlUCSIsCombiningDiacriticalMarks + xmlUCSIsCombiningHalfMarks + xmlUCSIsCombiningMarksforSymbols + xmlUCSIsControlPictures + xmlUCSIsCurrencySymbols + xmlUCSIsCyrillic + xmlUCSIsDeseret + xmlUCSIsDevanagari + xmlUCSIsDingbats + xmlUCSIsEnclosedAlphanumerics + xmlUCSIsEnclosedCJKLettersandMonths + xmlUCSIsEthiopic + xmlUCSIsGeneralPunctuation + xmlUCSIsGeometricShapes + xmlUCSIsGeorgian + xmlUCSIsGothic + xmlUCSIsGreek + xmlUCSIsGreekExtended + xmlUCSIsGujarati + xmlUCSIsGurmukhi + xmlUCSIsHalfwidthandFullwidthForms + xmlUCSIsHangulCompatibilityJamo + xmlUCSIsHangulJamo + xmlUCSIsHangulSyllables + xmlUCSIsHebrew + xmlUCSIsHighPrivateUseSurrogates + xmlUCSIsHighSurrogates + xmlUCSIsHiragana + xmlUCSIsIPAExtensions + xmlUCSIsIdeographicDescriptionCharacters + xmlUCSIsKanbun + xmlUCSIsKangxiRadicals + xmlUCSIsKannada + xmlUCSIsKatakana + xmlUCSIsKhmer + xmlUCSIsLao + xmlUCSIsLatin1Supplement + xmlUCSIsLatinExtendedA + xmlUCSIsLatinExtendedB + xmlUCSIsLatinExtendedAdditional + xmlUCSIsLetterlikeSymbols + xmlUCSIsLowSurrogates + xmlUCSIsMalayalam + xmlUCSIsMathematicalAlphanumericSymbols + xmlUCSIsMathematicalOperators + xmlUCSIsMiscellaneousSymbols + xmlUCSIsMiscellaneousTechnical + xmlUCSIsMongolian + xmlUCSIsMusicalSymbols + xmlUCSIsMyanmar + xmlUCSIsNumberForms + xmlUCSIsOgham + xmlUCSIsOldItalic + xmlUCSIsOpticalCharacterRecognition + xmlUCSIsOriya + xmlUCSIsPrivateUse + xmlUCSIsRunic + xmlUCSIsSinhala + xmlUCSIsSmallFormVariants + xmlUCSIsSpacingModifierLetters + xmlUCSIsSpecials + xmlUCSIsSuperscriptsandSubscripts + xmlUCSIsSyriac + xmlUCSIsTags + xmlUCSIsTamil + xmlUCSIsTelugu + xmlUCSIsThaana + xmlUCSIsThai + xmlUCSIsTibetan + xmlUCSIsUnifiedCanadianAboriginalSyllabics + xmlUCSIsYiRadicals + xmlUCSIsYiSyllables + xmlUCSIsBlock + xmlUCSIsCatC + xmlUCSIsCatCc + xmlUCSIsCatCf + xmlUCSIsCatCo + xmlUCSIsCatCs + xmlUCSIsCatL + xmlUCSIsCatLl + xmlUCSIsCatLm + xmlUCSIsCatLo + xmlUCSIsCatLt + xmlUCSIsCatLu + xmlUCSIsCatM + xmlUCSIsCatMc + xmlUCSIsCatMe + xmlUCSIsCatMn + xmlUCSIsCatN + xmlUCSIsCatNd + xmlUCSIsCatNl + xmlUCSIsCatNo + xmlUCSIsCatP + xmlUCSIsCatPc + xmlUCSIsCatPd + xmlUCSIsCatPe + xmlUCSIsCatPf + xmlUCSIsCatPi + xmlUCSIsCatPo + xmlUCSIsCatPs + xmlUCSIsCatS + xmlUCSIsCatSc + xmlUCSIsCatSk + xmlUCSIsCatSm + xmlUCSIsCatSo + xmlUCSIsCatZ + xmlUCSIsCatZl + xmlUCSIsCatZp + xmlUCSIsCatZs + xmlUCSIsCat +#endif /* LIBXML_SCHEMAS_ENABLED */ + + /* xmlversion.h --------------------------------------------------------------------- */ xmlCheckVersion