summaryrefslogtreecommitdiff
path: root/examples/DLL/test_dll.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/DLL/test_dll.cpp')
-rw-r--r--examples/DLL/test_dll.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/examples/DLL/test_dll.cpp b/examples/DLL/test_dll.cpp
index 45df35c4f87..cbae44b4e0a 100644
--- a/examples/DLL/test_dll.cpp
+++ b/examples/DLL/test_dll.cpp
@@ -10,8 +10,8 @@
ACE_RCSID(DLL, test_dll, "$Id$")
typedef Magazine* (*Magazine_Creator) (void);
-
-int
+
+int
main (int argc, char *argv[])
{
ACE_UNUSED_ARG (argc);
@@ -36,13 +36,13 @@ main (int argc, char *argv[])
dll.error ()),
-1);
{
- auto_ptr <Magazine> magazine (mc ());
-
+ auto_ptr <Magazine> magazine = mc ();
+
magazine->title ();
}
dll.close ();
-
+
// The other library is now loaded on demand.
retval = dll.open ("./" ACE_DLL_PREFIX "Newsweek" ACE_DLL_SUFFIX);
@@ -52,7 +52,7 @@ main (int argc, char *argv[])
"%s",
dll.error ()),
-1);
-
+
mc = (Magazine_Creator) dll.symbol ("create_magazine");
if (mc == 0)
@@ -61,14 +61,14 @@ main (int argc, char *argv[])
dll.error ()),
-1);
{
- auto_ptr <Magazine> magazine (mc ());
+ auto_ptr <Magazine> magazine = mc ();
magazine->title ();
}
dll.close ();
-
- return 0;
+
+ return 0;
}
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
@@ -76,3 +76,5 @@ template class auto_ptr <Magazine>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate auto_ptr <Magazine>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+
+