[Expat-checkins] expat/amiga launch.c,1.1,1.2
Steven Solie
ssolie at users.sourceforge.net
Sun Jun 3 17:00:12 CEST 2007
Update of /cvsroot/expat/expat/amiga
In directory sc8-pr-cvs17:/tmp/cvs-serv1696/amiga
Modified Files:
launch.c
Log Message:
Removed need for amiga_main().
Index: launch.c
===================================================================
RCS file: /cvsroot/expat/expat/amiga/launch.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- launch.c 24 Dec 2005 06:39:56 -0000 1.1
+++ launch.c 3 Jun 2007 15:00:09 -0000 1.2
@@ -1,5 +1,5 @@
/*
-** Copyright (c) 2001-2005 Expat maintainers.
+** Copyright (c) 2001-2007 Expat maintainers.
**
** Permission is hereby granted, free of charge, to any person obtaining
** a copy of this software and associated documentation files (the
@@ -28,27 +28,17 @@
struct ExpatIFace* IExpat = 0;
-int amiga_main(int argc, char** argv);
-void cleanup();
+void setup() __attribute__((constructor));
+void cleanup() __attribute__((destructor));
-int main(int argc, char** argv)
+void setup()
{
- int result = -1;
-
- atexit(cleanup);
-
- ExpatBase = OpenLibrary("expat.library", 2);
- if ( ExpatBase != 0 ) {
- IExpat = (struct ExpatIFace*)GetInterface(ExpatBase, "main", 1, NULL);
- if ( IExpat != 0 ) {
- result = amiga_main(argc, argv);
- }
+ ExpatBase = OpenLibrary("expat.library", 4);
+ IExpat = (struct ExpatIFace*)GetInterface(ExpatBase, "main", 1, NULL);
+ if ( IExpat == 0 ) {
+ DebugPrintF("Can't open expat.library\n");
}
-
- cleanup();
-
- return result;
}
More information about the Expat-checkins
mailing list