summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorssolie <ssolie>2009-02-10 03:47:00 +0000
committerssolie <ssolie>2009-02-10 03:47:00 +0000
commit2308aa1e368cc28bb6c4bee80c9ad4970f29ee56 (patch)
treef32d55fe734c80d857337fe888630982b38e6f1d
parenta85a662db019ba499c575e0e7be5f8ce7868fa63 (diff)
downloadlibexpat-2308aa1e368cc28bb6c4bee80c9ad4970f29ee56.tar.gz
AmigaOS specific changes to merge a 68k support patch.
-rw-r--r--amiga/README.txt6
-rw-r--r--amiga/expat_68k.c112
-rwxr-xr-xamiga/expat_lib.c4
3 files changed, 117 insertions, 5 deletions
diff --git a/amiga/README.txt b/amiga/README.txt
index 632772e..f26f0f2 100644
--- a/amiga/README.txt
+++ b/amiga/README.txt
@@ -39,6 +39,12 @@ Expat repository available at http://expat.sourceforge.net/
HISTORY
=======
+5.2 - fixed XML_Parse 68k stub which enables xmlviewer to work
+ without crashing
+ - added some new functions to the 68k jump table available
+ in the latest expat.library for AmigaOS 3.x
+ - patches provided by Fredrik Wikstrom
+
5.1 - fixed package archive which was missing libexpat.so
- fixed library protection bits
- fixed up copyright notices
diff --git a/amiga/expat_68k.c b/amiga/expat_68k.c
index be672cd..d84a5a4 100644
--- a/amiga/expat_68k.c
+++ b/amiga/expat_68k.c
@@ -1,7 +1,28 @@
/*
-** This file was automatically generated by fdtrans.
-** Do not edit it by hand. Instead, edit the sfd file
-** that was used to generate this file
+** Copyright (c) 2001-2009 Expat maintainers.
+**
+** Permission is hereby granted, free of charge, to any person obtaining
+** a copy of this software and associated documentation files (the
+** "Software"), to deal in the Software without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Software, and to
+** permit persons to whom the Software is furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Software.
+**
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+/*
+** This file was originally automatically generated by fdtrans.
*/
#ifdef __USE_INLINE__
@@ -152,6 +173,7 @@ static int stub_XML_ParsePPC(ULONG *regarray)
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
+ Self->XML_SetUserData(p->p, p);
return Self->XML_Parse(p->p, (const char *)regarray[9], (int)regarray[0], (int)regarray[1]);
}
struct EmuTrap stub_XML_Parse = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParsePPC };
@@ -756,6 +778,83 @@ static const XML_Feature * stub_XML_GetFeatureListPPC(ULONG *regarray)
}
struct EmuTrap stub_XML_GetFeatureList = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetFeatureListPPC };
+static int stub_XML_StopParserPPC(ULONG *regarray)
+{
+ struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
+ struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
+ struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
+
+ M68kXML_Parser p = (M68kXML_Parser)regarray[8];
+ return Self->XML_StopParser(p->p, (XML_Bool)regarray[0]);
+}
+struct EmuTrap stub_XML_StopParser = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_StopParserPPC };
+
+static int stub_XML_ResumeParserPPC(ULONG *regarray)
+{
+ struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
+ struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
+ struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
+
+ M68kXML_Parser p = (M68kXML_Parser)regarray[8];
+ return Self->XML_ResumeParser(p->p);
+}
+struct EmuTrap stub_XML_ResumeParser = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ResumeParserPPC };
+
+static void stub_XML_GetParsingStatusPPC(ULONG *regarray)
+{
+ struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
+ struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
+ struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
+
+ M68kXML_Parser p = (M68kXML_Parser)regarray[8];
+ Self->XML_GetParsingStatus(p->p, (XML_ParsingStatus *)regarray[9]);
+}
+struct EmuTrap stub_XML_GetParsingStatus = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetParsingStatusPPC };
+
+static void stub_XML_FreeContentModelPPC(ULONG *regarray)
+{
+ struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
+ struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
+ struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
+
+ M68kXML_Parser p = (M68kXML_Parser)regarray[8];
+ Self->XML_FreeContentModel(p->p, (XML_Content *)regarray[9]);
+}
+struct EmuTrap stub_XML_FreeContentModel = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_FreeContentModelPPC };
+
+static void *stub_XML_MemMallocPPC(ULONG *regarray)
+{
+ struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
+ struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
+ struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
+
+ M68kXML_Parser p = (M68kXML_Parser)regarray[8];
+ return Self->XML_MemMalloc(p->p, (size_t)regarray[0]);
+}
+struct EmuTrap stub_XML_MemMalloc = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_MemMallocPPC };
+
+static void *stub_XML_MemReallocPPC(ULONG *regarray)
+{
+ struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
+ struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
+ struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
+
+ M68kXML_Parser p = (M68kXML_Parser)regarray[8];
+ return Self->XML_MemRealloc(p->p, (void *)regarray[9], (size_t)regarray[0]);
+}
+struct EmuTrap stub_XML_MemRealloc = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_MemReallocPPC };
+
+static void stub_XML_MemFreePPC(ULONG *regarray)
+{
+ struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
+ struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
+ struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
+
+ M68kXML_Parser p = (M68kXML_Parser)regarray[8];
+ Self->XML_MemFree(p->p, (void *)regarray[9]);
+}
+struct EmuTrap stub_XML_MemFree = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_MemFreePPC };
+
ULONG VecTable68K[] = {
(ULONG)&stub_Open,
(ULONG)&stub_Close,
@@ -819,5 +918,12 @@ ULONG VecTable68K[] = {
(ULONG)&stub_XML_SetSkippedEntityHandler,
(ULONG)&stub_XML_UseForeignDTD,
(ULONG)&stub_XML_GetFeatureList,
+ (ULONG)&stub_XML_StopParser,
+ (ULONG)&stub_XML_ResumeParser,
+ (ULONG)&stub_XML_GetParsingStatus,
+ (ULONG)&stub_XML_FreeContentModel,
+ (ULONG)&stub_XML_MemMalloc,
+ (ULONG)&stub_XML_MemRealloc,
+ (ULONG)&stub_XML_MemFree,
(ULONG)-1
};
diff --git a/amiga/expat_lib.c b/amiga/expat_lib.c
index 9fd05e5..e86ff19 100755
--- a/amiga/expat_lib.c
+++ b/amiga/expat_lib.c
@@ -27,8 +27,8 @@
#define LIBNAME "expat.library"
#define LIBPRI 0
#define VERSION 5
-#define REVISION 1
-#define VSTRING "expat.library 5.1 (31.1.2009)" /* dd.mm.yyyy */
+#define REVISION 2
+#define VSTRING "expat.library 5.2 (9.2.2009)" /* dd.mm.yyyy */
static const char* __attribute__((used)) verstag = "\0$VER: " VSTRING;