version 1.1.1.1, 2012/02/21 23:00:54
|
version 1.1.1.2, 2014/06/15 16:09:43
|
Line 1
|
Line 1
|
/* |
/* |
** Copyright (c) 2001-2007 Expat maintainers. | ** Copyright (c) 2001-2009 Expat maintainers. |
** |
** |
** Permission is hereby granted, free of charge, to any person obtaining |
** Permission is hereby granted, free of charge, to any person obtaining |
** a copy of this software and associated documentation files (the |
** a copy of this software and associated documentation files (the |
Line 8
|
Line 8
|
** distribute, sublicense, and/or sell copies of the Software, and to |
** distribute, sublicense, and/or sell copies of the Software, and to |
** permit persons to whom the Software is furnished to do so, subject to |
** permit persons to whom the Software is furnished to do so, subject to |
** the following conditions: |
** the following conditions: |
** | ** |
** The above copyright notice and this permission notice shall be included |
** The above copyright notice and this permission notice shall be included |
** in all copies or substantial portions of the Software. |
** in all copies or substantial portions of the Software. |
** | ** |
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
Line 21
|
Line 21
|
** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
*/ |
*/ |
|
|
|
#ifdef __USE_INLINE__ |
|
#undef __USE_INLINE__ |
|
#endif |
|
|
#include <stdlib.h> |
#include <stdlib.h> |
#include <proto/exec.h> |
#include <proto/exec.h> |
|
|
Line 34 void cleanup() __attribute__((destructor));
|
Line 38 void cleanup() __attribute__((destructor));
|
|
|
void setup() |
void setup() |
{ |
{ |
ExpatBase = OpenLibrary("expat.library", 4); | ExpatBase = IExec->OpenLibrary("expat.library", 53); |
IExpat = (struct ExpatIFace*)GetInterface(ExpatBase, "main", 1, NULL); | IExpat = (struct ExpatIFace*)IExec->GetInterface(ExpatBase, "main", 1, NULL); |
| |
if ( IExpat == 0 ) { |
if ( IExpat == 0 ) { |
DebugPrintF("Can't open expat.library\n"); | IExec->DebugPrintF("Can't open expat.library\n"); |
} |
} |
} |
} |
|
|
|
|
void cleanup() |
void cleanup() |
{ |
{ |
if ( IExpat != 0 ) { | IExec->DropInterface((struct Interface*)IExpat); |
DropInterface((struct Interface*)IExpat); | IExpat = 0; |
IExpat = 0; | |
} | |
|
|
if ( ExpatBase != 0 ) { | IExec->CloseLibrary(ExpatBase); |
CloseLibrary(ExpatBase); | ExpatBase = 0; |
ExpatBase = 0; | |
} | |
} |
} |