summaryrefslogtreecommitdiff
path: root/ACE/ACEXML/apps
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/ACEXML/apps')
-rw-r--r--ACE/ACEXML/apps/svcconf/Svcconf.cpp36
-rw-r--r--ACE/ACEXML/apps/svcconf/Svcconf_Handler.cpp56
-rw-r--r--ACE/ACEXML/apps/svcconf/Svcconf_Handler.h57
3 files changed, 58 insertions, 91 deletions
diff --git a/ACE/ACEXML/apps/svcconf/Svcconf.cpp b/ACE/ACEXML/apps/svcconf/Svcconf.cpp
index 7fd69046ec3..3ee564a523b 100644
--- a/ACE/ACEXML/apps/svcconf/Svcconf.cpp
+++ b/ACE/ACEXML/apps/svcconf/Svcconf.cpp
@@ -26,27 +26,21 @@ ACEXML_Svcconf_Parser::ACEXML_Svcconf_Parser ()
this->parser_.setDTDHandler (&this->svcconf_handler_);
this->parser_.setErrorHandler (&this->svcconf_handler_);
this->parser_.setEntityResolver (&this->svcconf_handler_);
- ACEXML_TRY_NEW_ENV
+ try
{
this->parser_.setFeature (ACE_TEXT ("http://xml.org/sax/features/validation"),
- 0
- ACEXML_ENV_ARG_PARAMETER);
- ACEXML_TRY_CHECK;
+ 0);
}
- ACEXML_CATCH (ACEXML_SAXException, ex)
+ catch (const ACEXML_SAXException& ex)
{
ex.print (); // Can't do much except printing the error.
- return;
}
- ACEXML_ENDTRY;
}
ACEXML_Svcconf_Parser::~ACEXML_Svcconf_Parser ()
{
-
}
-
int
ACEXML_Svcconf_Parser::parse_file (const ACE_TCHAR file[])
{
@@ -66,17 +60,15 @@ ACEXML_Svcconf_Parser::parse_file (const ACE_TCHAR file[])
this->input_stream_.setCharStream (fstm);
- ACEXML_TRY_NEW_ENV
+ try
{
- this->parser_.parse (&this->input_stream_ ACEXML_ENV_ARG_PARAMETER);
- ACEXML_TRY_CHECK;
+ this->parser_.parse (&this->input_stream_);
}
- ACEXML_CATCH (ACEXML_SAXException, ex)
+ catch (const ACEXML_SAXException& ex)
{
ex.print ();
return -1;
}
- ACEXML_ENDTRY;
return 0;
}
@@ -94,12 +86,12 @@ ACEXML_Svcconf_Parser::parse_string (const ACE_TCHAR str[])
"input stream.\n"), -1);
this->input_stream_.setCharStream (stm);
- ACEXML_TRY_NEW_ENV
+ try
{
- this->parser_.parse (&this->input_stream_ ACEXML_ENV_ARG_PARAMETER);
+ this->parser_.parse (&this->input_stream_);
ACEXML_TRY_CHECK;
}
- ACEXML_CATCH (ACEXML_SAXException, ex)
+ catch (const ACEXML_SAXException& ex)
{
// If there was a problem parsing the stream, set the errno
// to EINVAL to indicate to upper levels that the stream was
@@ -108,17 +100,7 @@ ACEXML_Svcconf_Parser::parse_string (const ACE_TCHAR str[])
ex.print ();
return -1;
}
- ACEXML_ENDTRY;
return 0;
}
-#else
-
-# if defined (_AIX) && \
- (defined (__IBMCPP__) && (__IBMCPP__ >= 500) && (__IBMCPP__ < 600))
-// This simply shuts up the AIX linker that complains there are no
-// csects or exported symbols when building with Visual Age C++ 5.
-extern "C" void ace_shut_up_aix_ld (void) {};
-# endif /* AIX && __IBMCPP__ == 500 */
-
#endif /* ACE_USES_CLASSIC_SVC_CONF == 0 */
diff --git a/ACE/ACEXML/apps/svcconf/Svcconf_Handler.cpp b/ACE/ACEXML/apps/svcconf/Svcconf_Handler.cpp
index 95f79bc38fe..9d687c486ce 100644
--- a/ACE/ACEXML/apps/svcconf/Svcconf_Handler.cpp
+++ b/ACE/ACEXML/apps/svcconf/Svcconf_Handler.cpp
@@ -36,13 +36,13 @@ ACEXML_Svcconf_Handler::~ACEXML_Svcconf_Handler (void)
void
ACEXML_Svcconf_Handler::characters (const ACEXML_Char *,
int,
- int ACEXML_ENV_ARG_DECL_NOT_USED)
+ int)
{
// no-op
}
void
-ACEXML_Svcconf_Handler::endDocument ( ACEXML_ENV_SINGLE_ARG_DECL_NOT_USED)
+ACEXML_Svcconf_Handler::endDocument (void)
{
// no-op
}
@@ -50,7 +50,7 @@ ACEXML_Svcconf_Handler::endDocument ( ACEXML_ENV_SINGLE_ARG_DECL_NOT_USED)
void
ACEXML_Svcconf_Handler::endElement (const ACEXML_Char *,
const ACEXML_Char *,
- const ACEXML_Char *qName ACEXML_ENV_ARG_DECL)
+ const ACEXML_Char *qName)
{
if (ACE_OS::strcmp (qName, ACE_TEXT ("dynamic")) == 0)
{
@@ -268,7 +268,7 @@ ACEXML_Svcconf_Handler::endElement (const ACEXML_Char *,
}
void
-ACEXML_Svcconf_Handler::endPrefixMapping (const ACEXML_Char * ACEXML_ENV_ARG_DECL_NOT_USED)
+ACEXML_Svcconf_Handler::endPrefixMapping (const ACEXML_Char *)
{
// no-op
}
@@ -276,14 +276,14 @@ ACEXML_Svcconf_Handler::endPrefixMapping (const ACEXML_Char * ACEXML_ENV_ARG_DEC
void
ACEXML_Svcconf_Handler::ignorableWhitespace (const ACEXML_Char *,
int,
- int ACEXML_ENV_ARG_DECL_NOT_USED)
+ int)
{
// no-op
}
void
ACEXML_Svcconf_Handler::processingInstruction (const ACEXML_Char *,
- const ACEXML_Char * ACEXML_ENV_ARG_DECL_NOT_USED)
+ const ACEXML_Char *)
{
// no-op
}
@@ -295,13 +295,13 @@ ACEXML_Svcconf_Handler::setDocumentLocator (ACEXML_Locator* locator)
}
void
-ACEXML_Svcconf_Handler::skippedEntity (const ACEXML_Char * ACEXML_ENV_ARG_DECL_NOT_USED)
+ACEXML_Svcconf_Handler::skippedEntity (const ACEXML_Char *)
{
// no-op
}
void
-ACEXML_Svcconf_Handler::startDocument ( ACEXML_ENV_SINGLE_ARG_DECL_NOT_USED)
+ACEXML_Svcconf_Handler::startDocument (void)
{
// no-op
}
@@ -310,24 +310,24 @@ void
ACEXML_Svcconf_Handler::startElement (const ACEXML_Char *,
const ACEXML_Char *,
const ACEXML_Char *qName,
- ACEXML_Attributes *alist ACEXML_ENV_ARG_DECL)
+ ACEXML_Attributes *alist)
{
if (ACE_OS::strcmp (qName, ACE_TEXT ("dynamic")) == 0)
{
- this->get_dynamic_attrs (alist ACEXML_ENV_ARG_PARAMETER);
+ this->get_dynamic_attrs (alist);
}
else if (ACE_OS::strcmp (qName, ACE_TEXT ("initializer")) == 0)
{
- this->get_initializer_attrs (alist ACEXML_ENV_ARG_PARAMETER);
+ this->get_initializer_attrs (alist);
}
else if (ACE_OS::strcmp (qName, ACE_TEXT ("static")) == 0)
{
- this->get_static_attrs (alist ACEXML_ENV_ARG_PARAMETER);
+ this->get_static_attrs (alist);
}
else if (ACE_OS::strcmp (qName, ACE_TEXT ("stream")) == 0)
{
- this->get_stream_id (alist ACEXML_ENV_ARG_PARAMETER);
+ this->get_stream_id (alist);
if (ACE_Service_Repository::instance()->find
(this->stream_info_.name (),
@@ -359,7 +359,7 @@ ACEXML_Svcconf_Handler::startElement (const ACEXML_Char *,
}
else if (ACE_OS::strcmp (qName, ACE_TEXT ("resume")) == 0)
{
- this->get_id (alist ACEXML_ENV_ARG_PARAMETER);
+ this->get_id (alist);
if (this->in_module_)
{
// ACE_DEBUG ((LM_INFO, ACE_TEXT ("Resume %s in stream %s\n"),
@@ -400,7 +400,7 @@ ACEXML_Svcconf_Handler::startElement (const ACEXML_Char *,
}
else if (ACE_OS::strcmp (qName, ACE_TEXT ("suspend")) == 0)
{
- this->get_id (alist ACEXML_ENV_ARG_PARAMETER);
+ this->get_id (alist);
if (this->in_module_)
{
// ACE_DEBUG ((LM_INFO, ACE_TEXT ("Suspend %s in stream %s\n"),
@@ -441,7 +441,7 @@ ACEXML_Svcconf_Handler::startElement (const ACEXML_Char *,
}
else if (ACE_OS::strcmp (qName, ACE_TEXT ("remove")) == 0)
{
- this->get_id (alist ACEXML_ENV_ARG_PARAMETER);
+ this->get_id (alist);
if (this->in_module_)
{
// ACE_DEBUG ((LM_INFO, ACE_TEXT ("Remove %s in stream %s\n"),
@@ -495,7 +495,7 @@ ACEXML_Svcconf_Handler::startElement (const ACEXML_Char *,
void
ACEXML_Svcconf_Handler::startPrefixMapping (const ACEXML_Char *,
- const ACEXML_Char * ACEXML_ENV_ARG_DECL_NOT_USED)
+ const ACEXML_Char *)
{
// No-op.
}
@@ -505,7 +505,7 @@ ACEXML_Svcconf_Handler::startPrefixMapping (const ACEXML_Char *,
void
ACEXML_Svcconf_Handler::notationDecl (const ACEXML_Char *,
const ACEXML_Char *,
- const ACEXML_Char * ACEXML_ENV_ARG_DECL_NOT_USED)
+ const ACEXML_Char *)
{
// No-op.
}
@@ -514,7 +514,7 @@ void
ACEXML_Svcconf_Handler::unparsedEntityDecl (const ACEXML_Char *,
const ACEXML_Char *,
const ACEXML_Char *,
- const ACEXML_Char * ACEXML_ENV_ARG_DECL_NOT_USED)
+ const ACEXML_Char *)
{
// No-op.
}
@@ -523,7 +523,7 @@ ACEXML_Svcconf_Handler::unparsedEntityDecl (const ACEXML_Char *,
ACEXML_InputSource *
ACEXML_Svcconf_Handler::resolveEntity (const ACEXML_Char *,
- const ACEXML_Char * ACEXML_ENV_ARG_DECL_NOT_USED)
+ const ACEXML_Char *)
{
// No-op.
return 0;
@@ -535,7 +535,7 @@ ACEXML_Svcconf_Handler::resolveEntity (const ACEXML_Char *,
* Receive notification of a recoverable error.
*/
void
-ACEXML_Svcconf_Handler::error (ACEXML_SAXParseException& ex ACEXML_ENV_ARG_DECL_NOT_USED)
+ACEXML_Svcconf_Handler::error (ACEXML_SAXParseException& ex)
{
ACE_DEBUG ((LM_DEBUG, "%s: line :%d col: %d ", this->locator_->getSystemId(),
this->locator_->getLineNumber(),
@@ -544,7 +544,7 @@ ACEXML_Svcconf_Handler::error (ACEXML_SAXParseException& ex ACEXML_ENV_ARG_DECL_
}
void
-ACEXML_Svcconf_Handler::fatalError (ACEXML_SAXParseException& ex ACEXML_ENV_ARG_DECL_NOT_USED)
+ACEXML_Svcconf_Handler::fatalError (ACEXML_SAXParseException& ex)
{
ACE_DEBUG ((LM_DEBUG, "%s: line :%d col: %d ", this->locator_->getSystemId(),
this->locator_->getLineNumber(),
@@ -553,7 +553,7 @@ ACEXML_Svcconf_Handler::fatalError (ACEXML_SAXParseException& ex ACEXML_ENV_ARG_
}
void
-ACEXML_Svcconf_Handler::warning (ACEXML_SAXParseException& ex ACEXML_ENV_ARG_DECL_NOT_USED)
+ACEXML_Svcconf_Handler::warning (ACEXML_SAXParseException& ex)
{
ACE_DEBUG ((LM_DEBUG, "%s: line :%d col: %d ", this->locator_->getSystemId(),
this->locator_->getLineNumber(),
@@ -562,7 +562,7 @@ ACEXML_Svcconf_Handler::warning (ACEXML_SAXParseException& ex ACEXML_ENV_ARG_DEC
}
int
-ACEXML_Svcconf_Handler::get_stream_id (ACEXML_Attributes *alist ACEXML_ENV_ARG_DECL)
+ACEXML_Svcconf_Handler::get_stream_id (ACEXML_Attributes *alist)
{
if (alist != 0)
for (size_t i = 0; i < alist->getLength (); ++i)
@@ -588,7 +588,7 @@ ACEXML_Svcconf_Handler::get_stream_id (ACEXML_Attributes *alist ACEXML_ENV_ARG_D
}
int
-ACEXML_Svcconf_Handler::get_id (ACEXML_Attributes *alist ACEXML_ENV_ARG_DECL)
+ACEXML_Svcconf_Handler::get_id (ACEXML_Attributes *alist)
{
if (alist != 0)
for (size_t i = 0; i < alist->getLength (); ++i)
@@ -615,7 +615,7 @@ ACEXML_Svcconf_Handler::get_id (ACEXML_Attributes *alist ACEXML_ENV_ARG_DECL)
}
int
-ACEXML_Svcconf_Handler::get_dynamic_attrs (ACEXML_Attributes *alist ACEXML_ENV_ARG_DECL)
+ACEXML_Svcconf_Handler::get_dynamic_attrs (ACEXML_Attributes *alist)
{
if (alist != 0)
{
@@ -696,7 +696,7 @@ ACEXML_Svcconf_Handler::get_dynamic_attrs (ACEXML_Attributes *alist ACEXML_ENV_A
}
int
-ACEXML_Svcconf_Handler::get_initializer_attrs (ACEXML_Attributes *alist ACEXML_ENV_ARG_DECL)
+ACEXML_Svcconf_Handler::get_initializer_attrs (ACEXML_Attributes *alist)
{
if (alist != 0)
{
@@ -734,7 +734,7 @@ ACEXML_Svcconf_Handler::get_initializer_attrs (ACEXML_Attributes *alist ACEXML_E
}
int
-ACEXML_Svcconf_Handler::get_static_attrs (ACEXML_Attributes *alist ACEXML_ENV_ARG_DECL)
+ACEXML_Svcconf_Handler::get_static_attrs (ACEXML_Attributes *alist)
{
if (alist != 0)
{
diff --git a/ACE/ACEXML/apps/svcconf/Svcconf_Handler.h b/ACE/ACEXML/apps/svcconf/Svcconf_Handler.h
index b15e20d7426..ebf4af74445 100644
--- a/ACE/ACEXML/apps/svcconf/Svcconf_Handler.h
+++ b/ACE/ACEXML/apps/svcconf/Svcconf_Handler.h
@@ -102,43 +102,37 @@ public:
*/
virtual void characters (const ACEXML_Char *ch,
int start,
- int length ACEXML_ENV_ARG_DECL)
- ;
+ int length);
/*
* Receive notification of the end of a document.
*/
- virtual void endDocument (ACEXML_ENV_SINGLE_ARG_DECL)
- ;
+ virtual void endDocument (void);
/*
* Receive notification of the end of an element.
*/
virtual void endElement (const ACEXML_Char *namespaceURI,
const ACEXML_Char *localName,
- const ACEXML_Char *qName ACEXML_ENV_ARG_DECL)
- ;
+ const ACEXML_Char *qName);
/*
* End the scope of a prefix-URI mapping.
*/
- virtual void endPrefixMapping (const ACEXML_Char *prefix ACEXML_ENV_ARG_DECL)
- ;
+ virtual void endPrefixMapping (const ACEXML_Char *prefix);
/*
* Receive notification of ignorable whitespace in element content.
*/
virtual void ignorableWhitespace (const ACEXML_Char *ch,
int start,
- int length ACEXML_ENV_ARG_DECL)
- ;
+ int length);
/*
* Receive notification of a processing instruction.
*/
virtual void processingInstruction (const ACEXML_Char *target,
- const ACEXML_Char *data ACEXML_ENV_ARG_DECL)
- ;
+ const ACEXML_Char *data);
/*
* Receive an object for locating the origin of SAX document events.
@@ -148,13 +142,12 @@ public:
/*
* Receive notification of a skipped entity.
*/
- virtual void skippedEntity (const ACEXML_Char *name ACEXML_ENV_ARG_DECL)
- ;
+ virtual void skippedEntity (const ACEXML_Char *name);
/*
* Receive notification of the beginning of a document.
*/
- virtual void startDocument (ACEXML_ENV_SINGLE_ARG_DECL)
+ virtual void startDocument (void)
;
/*
@@ -163,15 +156,13 @@ public:
virtual void startElement (const ACEXML_Char *namespaceURI,
const ACEXML_Char *localName,
const ACEXML_Char *qName,
- ACEXML_Attributes *atts ACEXML_ENV_ARG_DECL)
- ;
+ ACEXML_Attributes *atts);
/*
* Begin the scope of a prefix-URI Namespace mapping.
*/
virtual void startPrefixMapping (const ACEXML_Char *prefix,
- const ACEXML_Char *uri ACEXML_ENV_ARG_DECL)
- ;
+ const ACEXML_Char *uri);
// *** Methods inherit from ACEXML_DTDHandler.
@@ -180,8 +171,7 @@ public:
*/
virtual void notationDecl (const ACEXML_Char *name,
const ACEXML_Char *publicId,
- const ACEXML_Char *systemId ACEXML_ENV_ARG_DECL)
- ;
+ const ACEXML_Char *systemId);
/*
* Receive notification of an unparsed entity declaration event.
@@ -189,8 +179,7 @@ public:
virtual void unparsedEntityDecl (const ACEXML_Char *name,
const ACEXML_Char *publicId,
const ACEXML_Char *systemId,
- const ACEXML_Char *notationName ACEXML_ENV_ARG_DECL)
- ;
+ const ACEXML_Char *notationName);
// Methods inherit from ACEXML_EnitityResolver.
@@ -198,54 +187,50 @@ public:
* Allow the application to resolve external entities.
*/
virtual ACEXML_InputSource *resolveEntity (const ACEXML_Char *publicId,
- const ACEXML_Char *systemId ACEXML_ENV_ARG_DECL)
- ;
+ const ACEXML_Char *systemId);
// Methods inherit from ACEXML_ErrorHandler.
/*
* Receive notification of a recoverable error.
*/
- virtual void error (ACEXML_SAXParseException &exception ACEXML_ENV_ARG_DECL)
- ;
+ virtual void error (ACEXML_SAXParseException &exception);
/*
* Receive notification of a non-recoverable error.
*/
- virtual void fatalError (ACEXML_SAXParseException &exception ACEXML_ENV_ARG_DECL)
- ;
+ virtual void fatalError (ACEXML_SAXParseException &exception);
/*
* Receive notification of a warning.
*/
- virtual void warning (ACEXML_SAXParseException &exception ACEXML_ENV_ARG_DECL)
- ;
+ virtual void warning (ACEXML_SAXParseException &exception);
protected:
/**
* Get the only attribute in <stream> or <streamdef>.
*/
- int get_stream_id (ACEXML_Attributes *alist ACEXML_ENV_ARG_DECL);
+ int get_stream_id (ACEXML_Attributes *alist);
/**
* Get the only attribute in <resume>, <suspend>, <remove>
*/
- int get_id (ACEXML_Attributes *alist ACEXML_ENV_ARG_DECL);
+ int get_id (ACEXML_Attributes *alist);
/**
* Get the dynamic tag attributes.
*/
- int get_dynamic_attrs (ACEXML_Attributes *alist ACEXML_ENV_ARG_DECL);
+ int get_dynamic_attrs (ACEXML_Attributes *alist);
/**
* Get the initializer tag attributes.
*/
- int get_initializer_attrs (ACEXML_Attributes *alist ACEXML_ENV_ARG_DECL);
+ int get_initializer_attrs (ACEXML_Attributes *alist);
/**
* Get the static tag attributes.
*/
- int get_static_attrs (ACEXML_Attributes *alist ACEXML_ENV_ARG_DECL);
+ int get_static_attrs (ACEXML_Attributes *alist);
private:
/// We are parsing a stream definition