summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2001-12-26 15:46:44 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2001-12-26 15:46:44 +0000
commitc13d83545ee97972e556b1fdc6eb81c318435f76 (patch)
tree3e074e160a2e59a236f10781cfcb0e071b49fac8 /examples
parent5a4937548f54d003dc238b834281b3f3b43067dd (diff)
downloadATCD-c13d83545ee97972e556b1fdc6eb81c318435f76.tar.gz
ChangeLogTag:Wed Dec 26 09:07:45 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
Diffstat (limited to 'examples')
-rw-r--r--examples/ASX/Event_Server/Event_Server/Options.cpp20
-rw-r--r--examples/ASX/Event_Server/Transceiver/transceiver.cpp4
-rw-r--r--examples/ASX/UPIPE_Event_Server/Options.cpp24
-rw-r--r--examples/ASX/UPIPE_Event_Server/Peer_Router.cpp2
-rw-r--r--examples/Connection/blocking/SPIPE-acceptor.cpp6
-rw-r--r--examples/Connection/blocking/SPIPE-connector.cpp4
-rw-r--r--examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp14
-rw-r--r--examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp4
-rw-r--r--examples/IPC_SAP/SSL_SAP/SSL-client-simple.cpp12
-rw-r--r--examples/IPC_SAP/SSL_SAP/SSL-client.cpp14
-rw-r--r--examples/IPC_SAP/SSL_SAP/SSL-server-fancy.cpp4
-rw-r--r--examples/Logger/Acceptor-server/server_loggerd.cpp2
-rw-r--r--examples/Logger/simple-server/server_loggerd.cpp2
-rw-r--r--examples/Mem_Map/IO-tests/test_io.cpp6
-rw-r--r--examples/Misc/test_get_opt.cpp10
-rw-r--r--examples/NT_Service/main.cpp6
-rw-r--r--examples/OS/Process/imore.cpp4
-rw-r--r--examples/OS/Process/process.cpp6
-rw-r--r--examples/QOS/Change_Receiver_FlowSpec/QoS_Util.cpp10
-rw-r--r--examples/QOS/Change_Sender_TSpec/QoS_Util.cpp10
-rw-r--r--examples/QOS/Simple/QoS_Util.cpp10
-rw-r--r--examples/Reactor/Multicast/client.cpp4
-rw-r--r--examples/Reactor/Ntalker/ntalker.cpp2
-rw-r--r--examples/Reactor/Proactor/simple_test_proactor.cpp4
-rw-r--r--examples/Reactor/Proactor/test_cancel.cpp4
-rw-r--r--examples/Reactor/Proactor/test_proactor.cpp8
-rw-r--r--examples/Reactor/Proactor/test_proactor2.cpp8
-rw-r--r--examples/Reactor/Proactor/test_proactor3.cpp14
-rw-r--r--examples/Reactor/Proactor/test_udp_proactor.cpp4
-rw-r--r--examples/Reactor/WFMO_Reactor/test_multithreading.cpp10
-rw-r--r--examples/Reactor/WFMO_Reactor/test_talker.cpp4
-rw-r--r--examples/Service_Configurator/IPC-tests/client/broadcast_client_test.cpp2
-rw-r--r--examples/Service_Configurator/IPC-tests/client/local_dgram_client_test.cpp6
-rw-r--r--examples/Service_Configurator/IPC-tests/client/local_fifo_client_test.cpp2
-rw-r--r--examples/Service_Configurator/IPC-tests/client/local_pipe_client_test.cpp4
-rw-r--r--examples/Service_Configurator/IPC-tests/client/local_spipe_client_test.cpp2
-rw-r--r--examples/Service_Configurator/IPC-tests/client/local_stream_client_test.cpp4
-rw-r--r--examples/Service_Configurator/IPC-tests/client/remote_dgram_client_test.cpp6
-rw-r--r--examples/Service_Configurator/IPC-tests/client/remote_service_directory_test.cpp4
-rw-r--r--examples/Service_Configurator/IPC-tests/client/remote_stream_client_test.cpp6
-rw-r--r--examples/Service_Configurator/IPC-tests/client/remote_thr_stream_client_test.cpp6
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.i2
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_L_CODgram.i2
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_L_Dgram.i2
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.i2
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.i2
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.i2
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_L_Stream.i2
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.i2
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.i2
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.cpp4
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i6
-rw-r--r--examples/Shared_Malloc/Options.cpp6
-rw-r--r--examples/Shared_Malloc/test_position_independent_malloc.cpp2
-rw-r--r--examples/Synch/proc_sema.cpp6
-rw-r--r--examples/Threads/process_manager.cpp4
-rw-r--r--examples/Threads/reader_writer.cpp8
-rw-r--r--examples/Threads/recursive_mutex.cpp4
-rw-r--r--examples/Web_Crawler/Options.cpp20
59 files changed, 178 insertions, 178 deletions
diff --git a/examples/ASX/Event_Server/Event_Server/Options.cpp b/examples/ASX/Event_Server/Event_Server/Options.cpp
index 3f180fe0b5d..b6aab6b1d2c 100644
--- a/examples/ASX/Event_Server/Event_Server/Options.cpp
+++ b/examples/ASX/Event_Server/Event_Server/Options.cpp
@@ -115,40 +115,40 @@ Options::parse_args (int argc, char *argv[])
this->t_flags (THR_BOUND);
break;
case 'c':
- this->consumer_port (ACE_OS::atoi (get_opt.optarg));
+ this->consumer_port (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'd':
this->debugging_ = 1;
break;
case 'H':
- this->high_water_mark (ACE_OS::atoi (get_opt.optarg));
+ this->high_water_mark (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'i':
- this->iterations (ACE_OS::atoi (get_opt.optarg));
+ this->iterations (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'L':
- this->low_water_mark (ACE_OS::atoi (get_opt.optarg));
+ this->low_water_mark (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'l':
- this->initial_queue_length (ACE_OS::atoi (get_opt.optarg));
+ this->initial_queue_length (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'M':
- this->message_size (ACE_OS::atoi (get_opt.optarg));
+ this->message_size (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'n':
this->t_flags (THR_NEW_LWP);
break;
case 's':
- this->supplier_port (ACE_OS::atoi (get_opt.optarg));
+ this->supplier_port (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'T':
- if (ACE_OS::strcasecmp (get_opt.optarg, "ON") == 0)
+ if (ACE_OS::strcasecmp (get_opt.opt_arg (), "ON") == 0)
ACE_Trace::start_tracing ();
- else if (ACE_OS::strcasecmp (get_opt.optarg, "OFF") == 0)
+ else if (ACE_OS::strcasecmp (get_opt.opt_arg (), "OFF") == 0)
ACE_Trace::stop_tracing ();
break;
case 't':
- this->thr_count (ACE_OS::atoi (get_opt.optarg));
+ this->thr_count (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'v':
this->verbosity_ = 1;
diff --git a/examples/ASX/Event_Server/Transceiver/transceiver.cpp b/examples/ASX/Event_Server/Transceiver/transceiver.cpp
index b9c1f7ab33c..2e2aedb7fc9 100644
--- a/examples/ASX/Event_Server/Transceiver/transceiver.cpp
+++ b/examples/ASX/Event_Server/Transceiver/transceiver.cpp
@@ -31,10 +31,10 @@ Event_Transceiver::parse_args (int argc, char *argv[])
this->role_ = "Consumer";
break;
case 'h':
- this->host_name_ = get_opt.optarg;
+ this->host_name_ = get_opt.opt_arg ();
break;
case 'p':
- this->port_number_ = ACE_OS::atoi (get_opt.optarg);
+ this->port_number_ = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'S':
this->role_ = "Supplier";
diff --git a/examples/ASX/UPIPE_Event_Server/Options.cpp b/examples/ASX/UPIPE_Event_Server/Options.cpp
index f497db4fd29..c39f5eefcde 100644
--- a/examples/ASX/UPIPE_Event_Server/Options.cpp
+++ b/examples/ASX/UPIPE_Event_Server/Options.cpp
@@ -104,46 +104,46 @@ Options::parse_args (int argc, char *argv[])
this->t_flags (THR_BOUND);
break;
case 'C':
- this->consumer_file (getopt.optarg);
+ this->consumer_file (getopt.opt_arg ());
break;
case 'c':
- this->consumer_port (getopt.optarg);
+ this->consumer_port (getopt.opt_arg ());
break;
case 'd':
this->debugging_ = 1;
break;
case 'H':
- this->high_water_mark (ACE_OS::atoi (getopt.optarg));
+ this->high_water_mark (ACE_OS::atoi (getopt.opt_arg ()));
break;
case 'i':
- this->iterations (ACE_OS::atoi (getopt.optarg));
+ this->iterations (ACE_OS::atoi (getopt.opt_arg ()));
break;
case 'L':
- this->low_water_mark (ACE_OS::atoi (getopt.optarg));
+ this->low_water_mark (ACE_OS::atoi (getopt.opt_arg ()));
break;
case 'l':
- this->initial_queue_length (ACE_OS::atoi (getopt.optarg));
+ this->initial_queue_length (ACE_OS::atoi (getopt.opt_arg ()));
break;
case 'M':
- this->message_size (ACE_OS::atoi (getopt.optarg));
+ this->message_size (ACE_OS::atoi (getopt.opt_arg ()));
break;
case 'n':
this->t_flags (THR_NEW_LWP);
break;
case 'S':
- this->supplier_file (getopt.optarg);
+ this->supplier_file (getopt.opt_arg ());
break;
case 's':
- this->supplier_port (getopt.optarg);
+ this->supplier_port (getopt.opt_arg ());
break;
case 'T':
- if (ACE_OS::strcasecmp (getopt.optarg, "ON") == 0)
+ if (ACE_OS::strcasecmp (getopt.opt_arg (), "ON") == 0)
ACE_Trace::start_tracing ();
- else if (ACE_OS::strcasecmp (getopt.optarg, "OFF") == 0)
+ else if (ACE_OS::strcasecmp (getopt.opt_arg (), "OFF") == 0)
ACE_Trace::stop_tracing ();
break;
case 't':
- this->thr_count (ACE_OS::atoi (getopt.optarg));
+ this->thr_count (ACE_OS::atoi (getopt.opt_arg ()));
break;
case 'v':
this->verbosity_ = 1;
diff --git a/examples/ASX/UPIPE_Event_Server/Peer_Router.cpp b/examples/ASX/UPIPE_Event_Server/Peer_Router.cpp
index 325456c46d4..0be7305d31b 100644
--- a/examples/ASX/UPIPE_Event_Server/Peer_Router.cpp
+++ b/examples/ASX/UPIPE_Event_Server/Peer_Router.cpp
@@ -33,7 +33,7 @@ Acceptor_Factory<PH, PK>::init (int argc, char *argv[])
switch (c)
{
case 'f':
- addr.set (get_opt.optarg);
+ addr.set (get_opt.opt_arg ());
break;
case 'd':
break;
diff --git a/examples/Connection/blocking/SPIPE-acceptor.cpp b/examples/Connection/blocking/SPIPE-acceptor.cpp
index 1eec2118bbf..dcbd28c8f99 100644
--- a/examples/Connection/blocking/SPIPE-acceptor.cpp
+++ b/examples/Connection/blocking/SPIPE-acceptor.cpp
@@ -131,13 +131,13 @@ IPC_Server::parse_args (int argc, char *argv[])
{
case 'r':
ACE_OS::strncpy (rendezvous_,
- ACE_TEXT_CHAR_TO_TCHAR (get_opt.optarg),
+ ACE_TEXT_CHAR_TO_TCHAR (get_opt.opt_arg ()),
sizeof rendezvous_ / sizeof ACE_TCHAR);
break;
case 't':
- n_threads_ = ACE_OS::atoi (get_opt.optarg);
+ n_threads_ = ACE_OS::atoi (get_opt.opt_arg ());
ACE_DEBUG ((LM_DEBUG, "%s == %d.\n",
- get_opt.optarg,
+ get_opt.opt_arg (),
n_threads_));
ACE_Proactor::instance (2 * n_threads_);
// This is a lame way to tell the proactor how many threads
diff --git a/examples/Connection/blocking/SPIPE-connector.cpp b/examples/Connection/blocking/SPIPE-connector.cpp
index 8f8bdaabc92..284417cc1de 100644
--- a/examples/Connection/blocking/SPIPE-connector.cpp
+++ b/examples/Connection/blocking/SPIPE-connector.cpp
@@ -200,11 +200,11 @@ IPC_Client::parse_args (int argc, char *argv[])
{
case 'r':
ACE_OS::strncpy (rendezvous_,
- ACE_TEXT_CHAR_TO_TCHAR (get_opt.optarg),
+ ACE_TEXT_CHAR_TO_TCHAR (get_opt.opt_arg ()),
sizeof rendezvous_ / sizeof ACE_TCHAR);
break;
case 'i':
- iterations_ = ACE_OS::atoi (get_opt.optarg);
+ iterations_ = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'u':
default:
diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp
index 673cdd8caeb..98c01c2bfae 100644
--- a/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp
+++ b/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp
@@ -122,28 +122,28 @@ Options::parse_args (int argc, ACE_TCHAR *argv[])
this->oneway_ = 0;
break;
case 'h':
- this->host_ = getopt.optarg;
+ this->host_ = getopt.opt_arg ();
break;
case 'i':
- this->iterations_ = ACE_OS::atoi (getopt.optarg);
+ this->iterations_ = ACE_OS::atoi (getopt.opt_arg ());
break;
case 'm':
- this->message_len_ = ACE_OS::atoi (getopt.optarg);
+ this->message_len_ = ACE_OS::atoi (getopt.opt_arg ());
break;
case 'p':
- this->port_ = ACE_OS::atoi (getopt.optarg);
+ this->port_ = ACE_OS::atoi (getopt.opt_arg ());
break;
case 'q':
- this->quit_string_ = getopt.optarg;
+ this->quit_string_ = getopt.opt_arg ();
break;
case 's':
this->io_source_ = ACE_STDIN;
break;
case 't':
- this->threads_ = (size_t) ACE_OS::atoi (getopt.optarg);
+ this->threads_ = (size_t) ACE_OS::atoi (getopt.opt_arg ());
break;
case 'T':
- this->sleep_time_.set (0, ACE_OS::atoi (getopt.optarg));
+ this->sleep_time_.set (0, ACE_OS::atoi (getopt.opt_arg ()));
break;
default:
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp
index d928608a7b5..c4d6d46cfa2 100644
--- a/examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp
+++ b/examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp
@@ -168,10 +168,10 @@ Options::parse_args (int argc, ACE_TCHAR *argv[])
switch (c)
{
case 'p':
- this->port_ = ACE_OS::atoi (getopt.optarg);
+ this->port_ = ACE_OS::atoi (getopt.opt_arg ());
break;
case 'r':
- this->reply_message_len_ = ACE_OS::atoi (getopt.optarg);
+ this->reply_message_len_ = ACE_OS::atoi (getopt.opt_arg ());
break;
case 'v':
this->verbose_ = 1;
diff --git a/examples/IPC_SAP/SSL_SAP/SSL-client-simple.cpp b/examples/IPC_SAP/SSL_SAP/SSL-client-simple.cpp
index f82b930dd10..b998c1322a5 100644
--- a/examples/IPC_SAP/SSL_SAP/SSL-client-simple.cpp
+++ b/examples/IPC_SAP/SSL_SAP/SSL-client-simple.cpp
@@ -107,25 +107,25 @@ Options::parse_args (int argc, char *argv[])
this->oneway_ = 0;
break;
case 'h':
- this->host_ = getopt.optarg;
+ this->host_ = getopt.opt_arg ();
break;
case 'i':
- this->iterations_ = ACE_OS::atoi (getopt.optarg);
+ this->iterations_ = ACE_OS::atoi (getopt.opt_arg ());
break;
case 'm':
- this->message_len_ = ACE_OS::atoi (getopt.optarg);
+ this->message_len_ = ACE_OS::atoi (getopt.opt_arg ());
break;
case 'p':
- this->port_ = ACE_OS::atoi (getopt.optarg);
+ this->port_ = ACE_OS::atoi (getopt.opt_arg ());
break;
case 'q':
- this->quit_string_ = getopt.optarg;
+ this->quit_string_ = getopt.opt_arg ();
break;
case 's':
this->io_source_ = ACE_STDIN;
break;
case 'T':
- this->sleep_time_.set (0, ACE_OS::atoi (getopt.optarg));
+ this->sleep_time_.set (0, ACE_OS::atoi (getopt.opt_arg ()));
break;
default:
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/examples/IPC_SAP/SSL_SAP/SSL-client.cpp b/examples/IPC_SAP/SSL_SAP/SSL-client.cpp
index 84781c6f80c..966292d0d9d 100644
--- a/examples/IPC_SAP/SSL_SAP/SSL-client.cpp
+++ b/examples/IPC_SAP/SSL_SAP/SSL-client.cpp
@@ -118,28 +118,28 @@ Options::parse_args (int argc, char *argv[])
this->oneway_ = 0;
break;
case 'h':
- this->host_ = getopt.optarg;
+ this->host_ = getopt.opt_arg ();
break;
case 'i':
- this->iterations_ = ACE_OS::atoi (getopt.optarg);
+ this->iterations_ = ACE_OS::atoi (getopt.opt_arg ());
break;
case 'm':
- this->message_len_ = ACE_OS::atoi (getopt.optarg);
+ this->message_len_ = ACE_OS::atoi (getopt.opt_arg ());
break;
case 'p':
- this->port_ = ACE_OS::atoi (getopt.optarg);
+ this->port_ = ACE_OS::atoi (getopt.opt_arg ());
break;
case 'q':
- this->quit_string_ = getopt.optarg;
+ this->quit_string_ = getopt.opt_arg ();
break;
case 's':
this->io_source_ = ACE_STDIN;
break;
case 't':
- this->threads_ = (size_t) ACE_OS::atoi (getopt.optarg);
+ this->threads_ = (size_t) ACE_OS::atoi (getopt.opt_arg ());
break;
case 'T':
- this->sleep_time_.set (0, ACE_OS::atoi (getopt.optarg));
+ this->sleep_time_.set (0, ACE_OS::atoi (getopt.opt_arg ()));
break;
default:
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/examples/IPC_SAP/SSL_SAP/SSL-server-fancy.cpp b/examples/IPC_SAP/SSL_SAP/SSL-server-fancy.cpp
index 4acc024fa64..d50a6366abb 100644
--- a/examples/IPC_SAP/SSL_SAP/SSL-server-fancy.cpp
+++ b/examples/IPC_SAP/SSL_SAP/SSL-server-fancy.cpp
@@ -179,10 +179,10 @@ Options::parse_args (int argc, char *argv[])
switch (c)
{
case 'p':
- this->port_ = ACE_OS::atoi (getopt.optarg);
+ this->port_ = ACE_OS::atoi (getopt.opt_arg ());
break;
case 'r':
- this->reply_message_len_ = ACE_OS::atoi (getopt.optarg);
+ this->reply_message_len_ = ACE_OS::atoi (getopt.opt_arg ());
break;
case 'v':
this->verbose_ = 1;
diff --git a/examples/Logger/Acceptor-server/server_loggerd.cpp b/examples/Logger/Acceptor-server/server_loggerd.cpp
index 8faf229e7b7..a67550e9fb7 100644
--- a/examples/Logger/Acceptor-server/server_loggerd.cpp
+++ b/examples/Logger/Acceptor-server/server_loggerd.cpp
@@ -40,7 +40,7 @@ Options::parse_args (int argc, char *argv[])
switch (c)
{
case 'p':
- this->port_ = ACE_OS::atoi (get_opt.optarg);
+ this->port_ = ACE_OS::atoi (get_opt.opt_arg ());
break;
default:
break;
diff --git a/examples/Logger/simple-server/server_loggerd.cpp b/examples/Logger/simple-server/server_loggerd.cpp
index b4e3161b236..d35c6c8eb15 100644
--- a/examples/Logger/simple-server/server_loggerd.cpp
+++ b/examples/Logger/simple-server/server_loggerd.cpp
@@ -46,7 +46,7 @@ main (int argc, char *argv[])
switch (c)
{
case 'p':
- addr.set (ACE_OS::atoi (get_opt.optarg));
+ addr.set (ACE_OS::atoi (get_opt.opt_arg ()));
break;
default:
break;
diff --git a/examples/Mem_Map/IO-tests/test_io.cpp b/examples/Mem_Map/IO-tests/test_io.cpp
index e9ecaf87b88..934bf31a7fb 100644
--- a/examples/Mem_Map/IO-tests/test_io.cpp
+++ b/examples/Mem_Map/IO-tests/test_io.cpp
@@ -61,13 +61,13 @@ parse_args (int argc, char *argv[])
switch (c)
{
case 'i':
- input_filename = get_opt.optarg;
+ input_filename = get_opt.opt_arg ();
break;
case 'n':
- iteration_count = ACE_OS::atoi (get_opt.optarg);
+ iteration_count = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'o':
- output_filename = get_opt.optarg;
+ output_filename = get_opt.opt_arg ();
break;
case 'r':
remove_output = 0;
diff --git a/examples/Misc/test_get_opt.cpp b/examples/Misc/test_get_opt.cpp
index 756acb64ea7..69cf02a4059 100644
--- a/examples/Misc/test_get_opt.cpp
+++ b/examples/Misc/test_get_opt.cpp
@@ -20,32 +20,32 @@ main (int argc, ACE_TCHAR *argv[])
ACE_DEBUG ((LM_DEBUG, "got a\n"));
break;
case 'b':
- ACE_DEBUG ((LM_DEBUG, "got b with arg %s\n", get_opt.optarg));
+ ACE_DEBUG ((LM_DEBUG, "got b with arg %s\n", get_opt.opt_arg ()));
break;
case 'c':
ACE_DEBUG ((LM_DEBUG, "got c\n"));
break;
case 'd':
- ACE_DEBUG ((LM_DEBUG, "got d with arg %s\n", get_opt.optarg));
+ ACE_DEBUG ((LM_DEBUG, "got d with arg %s\n", get_opt.opt_arg ()));
break;
case 'e':
ACE_DEBUG ((LM_DEBUG, "got e\n"));
break;
case 'f':
- ACE_DEBUG ((LM_DEBUG, "got f with arg %s\n", get_opt.optarg));
+ ACE_DEBUG ((LM_DEBUG, "got f with arg %s\n", get_opt.opt_arg ()));
break;
case 'g':
ACE_DEBUG ((LM_DEBUG, "got g\n"));
break;
case 'h':
- ACE_DEBUG ((LM_DEBUG, "got h with arg %s\n", get_opt.optarg));
+ ACE_DEBUG ((LM_DEBUG, "got h with arg %s\n", get_opt.opt_arg ()));
break;
default:
ACE_DEBUG ((LM_DEBUG, "got %c, which is unrecognized!\n", c));
break;
}
- for (int i = get_opt.optind; i < argc; i++)
+ for (int i = get_opt.opt_ind (); i < argc; i++)
ACE_DEBUG ((LM_DEBUG, "optind = %d, argv[optind] = %s\n",
i, argv[i]));
diff --git a/examples/NT_Service/main.cpp b/examples/NT_Service/main.cpp
index c517615a11e..5f23fa3fb7d 100644
--- a/examples/NT_Service/main.cpp
+++ b/examples/NT_Service/main.cpp
@@ -100,7 +100,7 @@ Process::parse_args (int argc, ACE_TCHAR* argv[])
{
case 'i':
opt_install = 1;
- opt_startup = ACE_OS::atoi (get_opt.optarg);
+ opt_startup = ACE_OS::atoi (get_opt.opt_arg ());
if (opt_startup <= 0)
print_usage_and_die ();
break;
@@ -115,7 +115,7 @@ Process::parse_args (int argc, ACE_TCHAR* argv[])
break;
case 't':
opt_type = 1;
- opt_startup = ACE_OS::atoi (get_opt.optarg);
+ opt_startup = ACE_OS::atoi (get_opt.opt_arg ());
if (opt_startup <= 0)
print_usage_and_die ();
break;
@@ -125,7 +125,7 @@ Process::parse_args (int argc, ACE_TCHAR* argv[])
default:
// -i can also be given without a value - if so, it defaults
// to defined value.
- if (ACE_OS::strcmp (get_opt.argv_[get_opt.optind-1], ACE_TEXT ("-i")) == 0)
+ if (ACE_OS::strcmp (get_opt.argv ()[get_opt.opt_ind () - 1], ACE_TEXT ("-i")) == 0)
{
opt_install = 1;
opt_startup = DEFAULT_SERVICE_INIT_STARTUP;
diff --git a/examples/OS/Process/imore.cpp b/examples/OS/Process/imore.cpp
index 5f1d120b983..981b416b2bb 100644
--- a/examples/OS/Process/imore.cpp
+++ b/examples/OS/Process/imore.cpp
@@ -79,13 +79,13 @@ parse_args (int argc, char **argv)
}
}
- if (get_opt.optind >= argc) // Do you forget to give me a filename to "more?"
+ if (get_opt.opt_ind () >= argc) // Do you forget to give me a filename to "more?"
{
usage ();
return -1;
}
else
- fname = argv[get_opt.optind]; // Alright.
+ fname = argv[get_opt.opt_int ()]; // Alright.
return 0;
}
diff --git a/examples/OS/Process/process.cpp b/examples/OS/Process/process.cpp
index 8b05831a303..8acdc3a579c 100644
--- a/examples/OS/Process/process.cpp
+++ b/examples/OS/Process/process.cpp
@@ -74,13 +74,13 @@ parse_args (int argc, char **argv)
run_ls = 1;
break;
case 'x':
- executable = get_opt.optarg;
+ executable = get_opt.opt_arg ();
break;
case 'p':
- print_file = get_opt.optarg;
+ print_file = get_opt.opt_arg ();
break;
case 'e':
- environment_string = get_opt.optarg;
+ environment_string = get_opt.opt_arg ();
break;
case 'g':
get_env = 1;
diff --git a/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.cpp b/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.cpp
index d75e9343ba6..9a72bf56df1 100644
--- a/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.cpp
+++ b/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.cpp
@@ -43,16 +43,16 @@ QoS_Util::parse_args (void)
{
case 'm': // multicast session address.
this->multicast_flag_ = 1;
- this->mult_session_addr_->set (get_opts.optarg);
+ this->mult_session_addr_->set (get_opts.opt_arg ());
break;
case 'n': // to be used by Senders only to specify the destination.
- this->dest_addr_->set (get_opts.optarg);
+ this->dest_addr_->set (get_opts.opt_arg ());
break;
case 'p': // protocol.
- if (ACE_OS::strcasecmp (get_opts.optarg, "tcp") == 0)
+ if (ACE_OS::strcasecmp (get_opts.opt_arg (), "tcp") == 0)
this->protocol_ = IPPROTO_TCP;
else
- if (ACE_OS::strcasecmp (get_opts.optarg, "udp") == 0)
+ if (ACE_OS::strcasecmp (get_opts.opt_arg (), "udp") == 0)
this->protocol_ = IPPROTO_UDP;
else
ACE_DEBUG ((LM_DEBUG,
@@ -60,7 +60,7 @@ QoS_Util::parse_args (void)
"UDP assumed\n"));
break;
case 'P': // sender source port.
- this->source_port_ = ACE_OS::atoi (get_opts.optarg);
+ this->source_port_ = ACE_OS::atoi (get_opts.opt_arg ());
break;
case 'h': // display help for different options.
default:
diff --git a/examples/QOS/Change_Sender_TSpec/QoS_Util.cpp b/examples/QOS/Change_Sender_TSpec/QoS_Util.cpp
index d75e9343ba6..9a72bf56df1 100644
--- a/examples/QOS/Change_Sender_TSpec/QoS_Util.cpp
+++ b/examples/QOS/Change_Sender_TSpec/QoS_Util.cpp
@@ -43,16 +43,16 @@ QoS_Util::parse_args (void)
{
case 'm': // multicast session address.
this->multicast_flag_ = 1;
- this->mult_session_addr_->set (get_opts.optarg);
+ this->mult_session_addr_->set (get_opts.opt_arg ());
break;
case 'n': // to be used by Senders only to specify the destination.
- this->dest_addr_->set (get_opts.optarg);
+ this->dest_addr_->set (get_opts.opt_arg ());
break;
case 'p': // protocol.
- if (ACE_OS::strcasecmp (get_opts.optarg, "tcp") == 0)
+ if (ACE_OS::strcasecmp (get_opts.opt_arg (), "tcp") == 0)
this->protocol_ = IPPROTO_TCP;
else
- if (ACE_OS::strcasecmp (get_opts.optarg, "udp") == 0)
+ if (ACE_OS::strcasecmp (get_opts.opt_arg (), "udp") == 0)
this->protocol_ = IPPROTO_UDP;
else
ACE_DEBUG ((LM_DEBUG,
@@ -60,7 +60,7 @@ QoS_Util::parse_args (void)
"UDP assumed\n"));
break;
case 'P': // sender source port.
- this->source_port_ = ACE_OS::atoi (get_opts.optarg);
+ this->source_port_ = ACE_OS::atoi (get_opts.opt_arg ());
break;
case 'h': // display help for different options.
default:
diff --git a/examples/QOS/Simple/QoS_Util.cpp b/examples/QOS/Simple/QoS_Util.cpp
index d75e9343ba6..9a72bf56df1 100644
--- a/examples/QOS/Simple/QoS_Util.cpp
+++ b/examples/QOS/Simple/QoS_Util.cpp
@@ -43,16 +43,16 @@ QoS_Util::parse_args (void)
{
case 'm': // multicast session address.
this->multicast_flag_ = 1;
- this->mult_session_addr_->set (get_opts.optarg);
+ this->mult_session_addr_->set (get_opts.opt_arg ());
break;
case 'n': // to be used by Senders only to specify the destination.
- this->dest_addr_->set (get_opts.optarg);
+ this->dest_addr_->set (get_opts.opt_arg ());
break;
case 'p': // protocol.
- if (ACE_OS::strcasecmp (get_opts.optarg, "tcp") == 0)
+ if (ACE_OS::strcasecmp (get_opts.opt_arg (), "tcp") == 0)
this->protocol_ = IPPROTO_TCP;
else
- if (ACE_OS::strcasecmp (get_opts.optarg, "udp") == 0)
+ if (ACE_OS::strcasecmp (get_opts.opt_arg (), "udp") == 0)
this->protocol_ = IPPROTO_UDP;
else
ACE_DEBUG ((LM_DEBUG,
@@ -60,7 +60,7 @@ QoS_Util::parse_args (void)
"UDP assumed\n"));
break;
case 'P': // sender source port.
- this->source_port_ = ACE_OS::atoi (get_opts.optarg);
+ this->source_port_ = ACE_OS::atoi (get_opts.opt_arg ());
break;
case 'h': // display help for different options.
default:
diff --git a/examples/Reactor/Multicast/client.cpp b/examples/Reactor/Multicast/client.cpp
index 10c16b7c24a..2845d556cf0 100644
--- a/examples/Reactor/Multicast/client.cpp
+++ b/examples/Reactor/Multicast/client.cpp
@@ -33,10 +33,10 @@ parse_args (int argc, ACE_TCHAR *argv[])
switch (c)
{
case 'm':
- max_message_size = ACE_OS::atoi (getopt.optarg) * BUFSIZ;
+ max_message_size = ACE_OS::atoi (getopt.opt_arg ()) * BUFSIZ;
break;
case 'i':
- iterations = ACE_OS::atoi (getopt.optarg);
+ iterations = ACE_OS::atoi (getopt.opt_arg ());
break;
case 'u':
// usage fallthrough
diff --git a/examples/Reactor/Ntalker/ntalker.cpp b/examples/Reactor/Ntalker/ntalker.cpp
index 6b0038289de..e114876cfcb 100644
--- a/examples/Reactor/Ntalker/ntalker.cpp
+++ b/examples/Reactor/Ntalker/ntalker.cpp
@@ -186,7 +186,7 @@ parse_args (int argc, ACE_TCHAR *argv[])
switch (c)
{
case 'i':
- INTERFACE = get_opt.optarg;
+ INTERFACE = get_opt.opt_arg ();
break;
case 'u':
// Usage fallthrough.
diff --git a/examples/Reactor/Proactor/simple_test_proactor.cpp b/examples/Reactor/Proactor/simple_test_proactor.cpp
index cbb7a6d9164..511b95d956c 100644
--- a/examples/Reactor/Proactor/simple_test_proactor.cpp
+++ b/examples/Reactor/Proactor/simple_test_proactor.cpp
@@ -230,10 +230,10 @@ parse_args (int argc, char *argv[])
switch (c)
{
case 'f':
- file = get_opt.optarg;
+ file = get_opt.opt_arg ();
break;
case 'd':
- dump_file = get_opt.optarg;
+ dump_file = get_opt.opt_arg ();
break;
default:
ACE_ERROR ((LM_ERROR, "%p.\n",
diff --git a/examples/Reactor/Proactor/test_cancel.cpp b/examples/Reactor/Proactor/test_cancel.cpp
index f9dc8cc5521..5823fe82de6 100644
--- a/examples/Reactor/Proactor/test_cancel.cpp
+++ b/examples/Reactor/Proactor/test_cancel.cpp
@@ -223,10 +223,10 @@ parse_args (int argc, char *argv[])
switch (c)
{
case 'p':
- port = ACE_OS::atoi (get_opt.optarg);
+ port = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 's':
- read_size = ACE_OS::atoi (get_opt.optarg);
+ read_size = ACE_OS::atoi (get_opt.opt_arg ());
break;
default:
ACE_ERROR ((LM_ERROR, "%p.\n",
diff --git a/examples/Reactor/Proactor/test_proactor.cpp b/examples/Reactor/Proactor/test_proactor.cpp
index 9eaf6c99e5a..a2ec5dd138c 100644
--- a/examples/Reactor/Proactor/test_proactor.cpp
+++ b/examples/Reactor/Proactor/test_proactor.cpp
@@ -640,16 +640,16 @@ parse_args (int argc, char *argv[])
switch (c)
{
case 'h':
- host = get_opt.optarg;
+ host = get_opt.opt_arg ();
break;
case 'p':
- port = ACE_OS::atoi (get_opt.optarg);
+ port = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'f':
- file = get_opt.optarg;
+ file = get_opt.opt_arg ();
break;
case 'd':
- dump_file = get_opt.optarg;
+ dump_file = get_opt.opt_arg ();
break;
default:
ACE_ERROR ((LM_ERROR, "%p.\n",
diff --git a/examples/Reactor/Proactor/test_proactor2.cpp b/examples/Reactor/Proactor/test_proactor2.cpp
index 1f972d1c018..384de47be02 100644
--- a/examples/Reactor/Proactor/test_proactor2.cpp
+++ b/examples/Reactor/Proactor/test_proactor2.cpp
@@ -636,16 +636,16 @@ parse_args (int argc, char *argv[])
switch (c)
{
case 'h':
- host = get_opt.optarg;
+ host = get_opt.opt_arg ();
break;
case 'n':
- nThreads = ACE_OS::atoi (get_opt.optarg) ;
+ nThreads = ACE_OS::atoi (get_opt.opt_arg ()) ;
break;
case 'p':
- port = ACE_OS::atoi (get_opt.optarg);
+ port = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'd':
- duplex = ACE_OS::atoi (get_opt.optarg);
+ duplex = ACE_OS::atoi (get_opt.opt_arg ());
break;
default:
ACE_ERROR ((LM_ERROR, "%p.\n",
diff --git a/examples/Reactor/Proactor/test_proactor3.cpp b/examples/Reactor/Proactor/test_proactor3.cpp
index 38b9d3c0daa..d651bb5341d 100644
--- a/examples/Reactor/Proactor/test_proactor3.cpp
+++ b/examples/Reactor/Proactor/test_proactor3.cpp
@@ -674,27 +674,27 @@ parse_args (int argc, char *argv[])
switch (c)
{
case 'd': // duplex
- duplex = ACE_OS::atoi (get_opt.optarg);
+ duplex = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'h': // host for sender
- host = get_opt.optarg;
+ host = get_opt.opt_arg ();
break;
case 'p': // port number
- port = ACE_OS::atoi (get_opt.optarg);
+ port = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'n': // thread pool size
- threads = ACE_OS::atoi (get_opt.optarg);
+ threads = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 's': // number of senders
- senders = ACE_OS::atoi (get_opt.optarg);
+ senders = ACE_OS::atoi (get_opt.opt_arg ());
if (senders > MaxSenders)
senders = MaxSenders;
break;
case 'o': // max number of aio for proactor
- max_aio_operations = ACE_OS::atoi (get_opt.optarg);
+ max_aio_operations = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 't': // Proactor Type
- if (set_proactor_type (get_opt.optarg))
+ if (set_proactor_type (get_opt.opt_arg ()))
break;
case 'u':
default:
diff --git a/examples/Reactor/Proactor/test_udp_proactor.cpp b/examples/Reactor/Proactor/test_udp_proactor.cpp
index 88f48937620..31029eab233 100644
--- a/examples/Reactor/Proactor/test_udp_proactor.cpp
+++ b/examples/Reactor/Proactor/test_udp_proactor.cpp
@@ -372,10 +372,10 @@ parse_args (int argc, char *argv[])
switch (c)
{
case 'h':
- host = get_opt.optarg;
+ host = get_opt.opt_arg ();
break;
case 'p':
- port = ACE_OS::atoi (get_opt.optarg);
+ port = ACE_OS::atoi (get_opt.opt_arg ());
break;
default:
ACE_ERROR_RETURN ((LM_ERROR, "%p.\n",
diff --git a/examples/Reactor/WFMO_Reactor/test_multithreading.cpp b/examples/Reactor/WFMO_Reactor/test_multithreading.cpp
index b0a3bdca5fc..e2982059b49 100644
--- a/examples/Reactor/WFMO_Reactor/test_multithreading.cpp
+++ b/examples/Reactor/WFMO_Reactor/test_multithreading.cpp
@@ -60,19 +60,19 @@ parse_args (int argc, char **argv)
switch (c)
{
case 't':
- concurrent_threads = atoi (get_opt.optarg);
+ concurrent_threads = atoi (get_opt.opt_arg ());
break;
case 'e':
- iterations = atoi (get_opt.optarg);
+ iterations = atoi (get_opt.opt_arg ());
break;
case 'h':
- number_of_handles = atoi (get_opt.optarg);
+ number_of_handles = atoi (get_opt.opt_arg ());
break;
case 'i':
- interval = atoi (get_opt.optarg);
+ interval = atoi (get_opt.opt_arg ());
break;
case 's':
- number_of_handles_to_signal = atoi (get_opt.optarg);
+ number_of_handles_to_signal = atoi (get_opt.opt_arg ());
break;
default:
print_usage_and_die ();
diff --git a/examples/Reactor/WFMO_Reactor/test_talker.cpp b/examples/Reactor/WFMO_Reactor/test_talker.cpp
index 76d6a5f12d0..84ccb8a78b6 100644
--- a/examples/Reactor/WFMO_Reactor/test_talker.cpp
+++ b/examples/Reactor/WFMO_Reactor/test_talker.cpp
@@ -269,10 +269,10 @@ Peer_Handler::Peer_Handler (int argc, char *argv[])
switch (c)
{
case 'h':
- host_ = get_opt.optarg;
+ host_ = get_opt.opt_arg ();
break;
case 'p':
- port_ = ACE_OS::atoi (get_opt.optarg);
+ port_ = ACE_OS::atoi (get_opt.opt_arg ());
break;
}
}
diff --git a/examples/Service_Configurator/IPC-tests/client/broadcast_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/broadcast_client_test.cpp
index 8d8c0b15e19..aeba5fbc4da 100644
--- a/examples/Service_Configurator/IPC-tests/client/broadcast_client_test.cpp
+++ b/examples/Service_Configurator/IPC-tests/client/broadcast_client_test.cpp
@@ -33,7 +33,7 @@ parse_args (int argc, ACE_TCHAR *argv[])
switch (c)
{
case 'p':
- broadcast_port_number = ACE_OS::atoi (get_opt.optarg);
+ broadcast_port_number = ACE_OS::atoi (get_opt.opt_arg ());
break;
default:
print_usage_and_die ();
diff --git a/examples/Service_Configurator/IPC-tests/client/local_dgram_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/local_dgram_client_test.cpp
index 9e8aeef81ef..d36e916ec1f 100644
--- a/examples/Service_Configurator/IPC-tests/client/local_dgram_client_test.cpp
+++ b/examples/Service_Configurator/IPC-tests/client/local_dgram_client_test.cpp
@@ -38,13 +38,13 @@ parse_args (int argc, char *argv[])
switch (c)
{
case 'f':
- file_name = get_opt.optarg;
+ file_name = get_opt.opt_arg ();
break;
case 'r':
- rendezvous_dgram = get_opt.optarg;
+ rendezvous_dgram = get_opt.opt_arg ();
break;
case 'c':
- rendezvous_codgram = get_opt.optarg;
+ rendezvous_codgram = get_opt.opt_arg ();
break;
default:
print_usage_and_die ();
diff --git a/examples/Service_Configurator/IPC-tests/client/local_fifo_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/local_fifo_client_test.cpp
index 03418e46d80..2c6fdc7818e 100644
--- a/examples/Service_Configurator/IPC-tests/client/local_fifo_client_test.cpp
+++ b/examples/Service_Configurator/IPC-tests/client/local_fifo_client_test.cpp
@@ -45,7 +45,7 @@ parse_arguments (int argc, ACE_TCHAR *argv[])
debug = 1;
break;
case 'f':
- rendezvous_fifo = get_opt.optarg;
+ rendezvous_fifo = get_opt.opt_arg ();
break;
default:
print_usage_and_die ();
diff --git a/examples/Service_Configurator/IPC-tests/client/local_pipe_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/local_pipe_client_test.cpp
index 607bc81ea3a..93216dca095 100644
--- a/examples/Service_Configurator/IPC-tests/client/local_pipe_client_test.cpp
+++ b/examples/Service_Configurator/IPC-tests/client/local_pipe_client_test.cpp
@@ -40,10 +40,10 @@ parse_args (int argc, char *argv[])
switch (c)
{
case 'f':
- file_name = get_opt.optarg;
+ file_name = get_opt.opt_arg ();
break;
case 'r':
- rendezvous = get_opt.optarg;
+ rendezvous = get_opt.opt_arg ();
break;
default:
print_usage_and_die ();
diff --git a/examples/Service_Configurator/IPC-tests/client/local_spipe_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/local_spipe_client_test.cpp
index be6a6d6be27..706a857b3a9 100644
--- a/examples/Service_Configurator/IPC-tests/client/local_spipe_client_test.cpp
+++ b/examples/Service_Configurator/IPC-tests/client/local_spipe_client_test.cpp
@@ -44,7 +44,7 @@ parse_arguments (int argc, char *argv[])
debug = 1;
break;
case 'r':
- rendezvous_spipe = get_opt.optarg;
+ rendezvous_spipe = get_opt.opt_arg ();
break;
default:
print_usage_and_die ();
diff --git a/examples/Service_Configurator/IPC-tests/client/local_stream_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/local_stream_client_test.cpp
index 28a51b26509..350d3cdca4b 100644
--- a/examples/Service_Configurator/IPC-tests/client/local_stream_client_test.cpp
+++ b/examples/Service_Configurator/IPC-tests/client/local_stream_client_test.cpp
@@ -37,10 +37,10 @@ parse_args (int argc, char *argv[])
switch (c)
{
case 'f':
- file_name = get_opt.optarg;
+ file_name = get_opt.opt_arg ();
break;
case 'r':
- rendezvous = get_opt.optarg;
+ rendezvous = get_opt.opt_arg ();
break;
default:
print_usage_and_die ();
diff --git a/examples/Service_Configurator/IPC-tests/client/remote_dgram_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/remote_dgram_client_test.cpp
index 739c87f6be0..24ad5ac7f09 100644
--- a/examples/Service_Configurator/IPC-tests/client/remote_dgram_client_test.cpp
+++ b/examples/Service_Configurator/IPC-tests/client/remote_dgram_client_test.cpp
@@ -41,13 +41,13 @@ parse_args (int argc, ACE_TCHAR *argv[])
switch (c)
{
case 'f':
- file_name = get_opt.optarg;
+ file_name = get_opt.opt_arg ();
break;
case 'h':
- host_name = get_opt.optarg;
+ host_name = get_opt.opt_arg ();
break;
case 'p':
- port_number = ACE_OS::atoi (get_opt.optarg);
+ port_number = ACE_OS::atoi (get_opt.opt_arg ());
break;
default:
print_usage_and_die ();
diff --git a/examples/Service_Configurator/IPC-tests/client/remote_service_directory_test.cpp b/examples/Service_Configurator/IPC-tests/client/remote_service_directory_test.cpp
index cb2652b1f9c..18d1b23bff8 100644
--- a/examples/Service_Configurator/IPC-tests/client/remote_service_directory_test.cpp
+++ b/examples/Service_Configurator/IPC-tests/client/remote_service_directory_test.cpp
@@ -35,10 +35,10 @@ parse_args (int argc, ACE_TCHAR *argv[])
switch (c)
{
case 'h':
- host_name = get_opt.optarg;
+ host_name = get_opt.opt_arg ();
break;
case 'p':
- port_number = ACE_OS::atoi (get_opt.optarg);
+ port_number = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'r':
remote_reconfigure = 1;
diff --git a/examples/Service_Configurator/IPC-tests/client/remote_stream_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/remote_stream_client_test.cpp
index ba81947b315..6684d67bd2c 100644
--- a/examples/Service_Configurator/IPC-tests/client/remote_stream_client_test.cpp
+++ b/examples/Service_Configurator/IPC-tests/client/remote_stream_client_test.cpp
@@ -42,13 +42,13 @@ parse_args (int argc, ACE_TCHAR *argv[])
switch (c)
{
case 'f':
- file_name = get_opt.optarg;
+ file_name = get_opt.opt_arg ();
break;
case 'h':
- host_name = get_opt.optarg;
+ host_name = get_opt.opt_arg ();
break;
case 'p':
- port_number = ACE_OS::atoi (get_opt.optarg);
+ port_number = ACE_OS::atoi (get_opt.opt_arg ());
break;
default:
print_usage_and_die ();
diff --git a/examples/Service_Configurator/IPC-tests/client/remote_thr_stream_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/remote_thr_stream_client_test.cpp
index 8d5b4575cf4..3a5a91facdf 100644
--- a/examples/Service_Configurator/IPC-tests/client/remote_thr_stream_client_test.cpp
+++ b/examples/Service_Configurator/IPC-tests/client/remote_thr_stream_client_test.cpp
@@ -42,13 +42,13 @@ parse_args (int argc, char *argv[])
switch (c)
{
case 'f':
- file_name = get_opt.optarg;
+ file_name = get_opt.opt_arg ();
break;
case 'h':
- host_name = get_opt.optarg;
+ host_name = get_opt.opt_arg ();
break;
case 'p':
- port_number = ACE_OS::atoi (get_opt.optarg);
+ port_number = ACE_OS::atoi (get_opt.opt_arg ());
break;
default:
print_usage_and_die ();
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.i b/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.i
index 172597705c4..2d960f3e9dd 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.i
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.i
@@ -52,7 +52,7 @@ Handle_Broadcast::init (int argc, char *argv[])
switch (c)
{
case 'p':
- sba.set (ACE_OS::atoi (get_opt.optarg));
+ sba.set (ACE_OS::atoi (get_opt.opt_arg ()));
break;
default:
break;
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_CODgram.i b/examples/Service_Configurator/IPC-tests/server/Handle_L_CODgram.i
index 0574138cc2e..4865b5eaa36 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_L_CODgram.i
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_L_CODgram.i
@@ -49,7 +49,7 @@ Handle_L_CODgram::init (int argc, char *argv[])
switch (c)
{
case 'r':
- r = get_opt.optarg;
+ r = get_opt.opt_arg ();
break;
default:
break;
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_Dgram.i b/examples/Service_Configurator/IPC-tests/server/Handle_L_Dgram.i
index 0fca5d4d2d5..295bdd7d76d 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_L_Dgram.i
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_L_Dgram.i
@@ -48,7 +48,7 @@ Handle_L_Dgram::init (int argc, char *argv[])
switch (c)
{
case 'r':
- r = get_opt.optarg;
+ r = get_opt.opt_arg ();
break;
default:
break;
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.i b/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.i
index 5c98ecf30b3..930b4390fd8 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.i
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.i
@@ -45,7 +45,7 @@ Handle_L_FIFO::init (int argc, char *argv[])
switch (c)
{
case 'r':
- rendezvous_fifo = get_opt.optarg;
+ rendezvous_fifo = get_opt.opt_arg ();
break;
default:
break;
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.i b/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.i
index 84e648d4ecb..a48081058e1 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.i
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.i
@@ -53,7 +53,7 @@ Handle_L_Pipe::init (int argc, char *argv[])
switch (c)
{
case 'r':
- r = get_opt.optarg;
+ r = get_opt.opt_arg ();
break;
default:
break;
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.i b/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.i
index b3cb6005b58..209acc871de 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.i
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.i
@@ -50,7 +50,7 @@ Handle_L_SPIPE::init (int argc, char *argv[])
switch (c)
{
case 'r':
- rendezvous = get_opt.optarg;
+ rendezvous = get_opt.opt_arg ();
break;
default:
break;
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_Stream.i b/examples/Service_Configurator/IPC-tests/server/Handle_L_Stream.i
index b395f3149f8..465eb3e2fbe 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_L_Stream.i
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_L_Stream.i
@@ -58,7 +58,7 @@ Handle_L_Stream::init (int argc, char *argv[])
switch (c)
{
case 'r':
- r = get_opt.optarg;
+ r = get_opt.opt_arg ();
break;
default:
break;
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.i b/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.i
index e39c1fce30b..505735ba3ed 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.i
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.i
@@ -47,7 +47,7 @@ Handle_R_Dgram::init (int argc, char *argv[])
switch (c)
{
case 'p':
- sidg.set (ACE_OS::atoi (get_opt.optarg));
+ sidg.set (ACE_OS::atoi (get_opt.opt_arg ()));
break;
default:
break;
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.i b/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.i
index 73c2af2e489..f6599713678 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.i
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.i
@@ -54,7 +54,7 @@ Handle_R_Stream::init (int argc, char *argv[])
switch (c)
{
case 'p':
- sis.set (ACE_OS::atoi (get_opt.optarg));
+ sis.set (ACE_OS::atoi (get_opt.opt_arg ()));
break;
default:
break;
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.cpp b/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.cpp
index 00c75f552bd..18e9951d41d 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.cpp
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.cpp
@@ -66,10 +66,10 @@ Handle_Thr_Acceptor<SVH, PR_AC_2>::init (int argc, char *argv[])
switch (c)
{
case 'p':
- local_addr.set (ACE_OS::atoi (get_opt.optarg));
+ local_addr.set (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 't':
- n_threads = ACE_OS::atoi (get_opt.optarg);
+ n_threads = ACE_OS::atoi (get_opt.opt_arg ());
break;
default:
break;
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i
index be6ea286a9a..40baa000008 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i
@@ -35,13 +35,13 @@ Handle_Timeout::init (int argc, char *argv[])
switch (c)
{
case 'd':
- delta.sec (ACE_OS::atoi (get_opt.optarg));
+ delta.sec (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'i':
- interval.sec (ACE_OS::atoi (get_opt.optarg));
+ interval.sec (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'a':
- arg = atoi (get_opt.optarg);
+ arg = atoi (get_opt.opt_arg ());
break;
default:
break;
diff --git a/examples/Shared_Malloc/Options.cpp b/examples/Shared_Malloc/Options.cpp
index 90a84b458e0..3338c55a810 100644
--- a/examples/Shared_Malloc/Options.cpp
+++ b/examples/Shared_Malloc/Options.cpp
@@ -160,13 +160,13 @@ Options::parse_args (int argc, char *argv[])
this->use_sbrk_ = 0;
break;
case 'L':
- this->max_msg_size_ = ACE_OS::atoi (get_opt.optarg);
+ this->max_msg_size_ = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'm':
this->use_mmap_ = 1;
break;
case 'n':
- this->iteration_count_ = ACE_OS::atoi (get_opt.optarg);
+ this->iteration_count_ = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'p': // Spawn processes rather than threads
this->spawn_threads_ = 0;
@@ -176,7 +176,7 @@ Options::parse_args (int argc, char *argv[])
this->use_shmem_ = 1;
break;
case 't':
- this->spawn_count_ = ACE_OS::atoi (get_opt.optarg);
+ this->spawn_count_ = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'T':
ACE_Trace::start_tracing ();
diff --git a/examples/Shared_Malloc/test_position_independent_malloc.cpp b/examples/Shared_Malloc/test_position_independent_malloc.cpp
index 3203b700601..1938fd68607 100644
--- a/examples/Shared_Malloc/test_position_independent_malloc.cpp
+++ b/examples/Shared_Malloc/test_position_independent_malloc.cpp
@@ -129,7 +129,7 @@ parse_args (int argc, char *argv[])
case 'a':
// Override the default base address.
base_addr = ACE_reinterpret_cast (void *,
- ACE_OS::atoi (get_opt.optarg));
+ ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'T':
ACE_Trace::start_tracing ();
diff --git a/examples/Synch/proc_sema.cpp b/examples/Synch/proc_sema.cpp
index a0a15099b3c..85d829c9d3c 100644
--- a/examples/Synch/proc_sema.cpp
+++ b/examples/Synch/proc_sema.cpp
@@ -67,13 +67,13 @@ int main (int argc, ACE_TCHAR *argv[])
delete_sema = 1;
break;
case 'n': // Specify the name of the semaphore.
- sema_name = getopt.optarg;
+ sema_name = getopt.opt_arg ();
break;
case 'i': // Number of acquire/release we'll perform.
- iteration = ACE_OS::atoi (getopt.optarg);
+ iteration = ACE_OS::atoi (getopt.opt_arg ());
break;
case 'd':
- exit_delay = ACE_OS::atoi (getopt.optarg);
+ exit_delay = ACE_OS::atoi (getopt.opt_arg ());
break;
default:
return -1;
diff --git a/examples/Threads/process_manager.cpp b/examples/Threads/process_manager.cpp
index 4a772b86142..7b5fcc19a49 100644
--- a/examples/Threads/process_manager.cpp
+++ b/examples/Threads/process_manager.cpp
@@ -135,10 +135,10 @@ parse_args (int argc, ACE_TCHAR *argv[])
switch (c)
{
case 'i':
- n_iterations = ACE_OS::atoi (get_opt.optarg);
+ n_iterations = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'e':
- exit_code = ACE_OS::atoi (get_opt.optarg);
+ exit_code = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'c':
child = 1;
diff --git a/examples/Threads/reader_writer.cpp b/examples/Threads/reader_writer.cpp
index c5844abac54..34d4cc6ae57 100644
--- a/examples/Threads/reader_writer.cpp
+++ b/examples/Threads/reader_writer.cpp
@@ -58,16 +58,16 @@ parse_args (int argc, ACE_TCHAR *argv[])
switch (c)
{
case 'r':
- n_readers = ACE_OS::atoi (get_opt.optarg);
+ n_readers = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'w':
- n_writers = ACE_OS::atoi (get_opt.optarg);
+ n_writers = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'n':
- n_iterations = ACE_OS::atoi (get_opt.optarg);
+ n_iterations = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'l':
- n_loops = ACE_OS::atoi (get_opt.optarg);
+ n_loops = ACE_OS::atoi (get_opt.opt_arg ());
break;
default:
print_usage_and_die ();
diff --git a/examples/Threads/recursive_mutex.cpp b/examples/Threads/recursive_mutex.cpp
index ef019fdc3fb..33a276207dd 100644
--- a/examples/Threads/recursive_mutex.cpp
+++ b/examples/Threads/recursive_mutex.cpp
@@ -38,10 +38,10 @@ parse_args (int argc, ACE_TCHAR *argv[])
switch (c)
{
case 'n':
- n_iterations = ACE_OS::atoi (get_opt.optarg);
+ n_iterations = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 't':
- n_threads = ACE_OS::atoi (get_opt.optarg);
+ n_threads = ACE_OS::atoi (get_opt.opt_arg ());
break;
default:
print_usage_and_die ();
diff --git a/examples/Web_Crawler/Options.cpp b/examples/Web_Crawler/Options.cpp
index 89b8e90e5bc..b9c7585a807 100644
--- a/examples/Web_Crawler/Options.cpp
+++ b/examples/Web_Crawler/Options.cpp
@@ -35,27 +35,27 @@ Options::parse_args (int argc, char *argv[])
this->debug_ = 1;
break;
case 'f':
- this->url_filter_ = getopt.optarg;
+ this->url_filter_ = getopt.opt_arg ();
break;
case 'h':
- this->hostname_ = getopt.optarg;
+ this->hostname_ = getopt.opt_arg ();
break;
case 'i':
- this->uri_ = getopt.optarg;
+ this->uri_ = getopt.opt_arg ();
break;
case 'l':
- this->handle_limit_ = ACE_OS::atoi (getopt.optarg);
+ this->handle_limit_ = ACE_OS::atoi (getopt.opt_arg ());
break;
case 'r':
this->recurse_ = 1;
break;
case 't':
- this->timeout_.sec (ACE_OS::atoi (getopt.optarg));
+ this->timeout_.sec (ACE_OS::atoi (getopt.opt_arg ()));
break;
case 'u':
{
- this->hostname_ = getopt.optarg;
- char *s = ACE_OS::strchr (getopt.optarg, '/');
+ this->hostname_ = getopt.opt_arg ();
+ char *s = ACE_OS::strchr (getopt.opt_arg (), '/');
if (s != 0)
{
this->uri_ = s + 1;
@@ -64,7 +64,7 @@ Options::parse_args (int argc, char *argv[])
else
ACE_ERROR ((LM_ERROR,
"invalid URL %s\n",
- getopt.optarg));
+ getopt.opt_arg ()));
}
break;
case 'v':
@@ -72,11 +72,11 @@ Options::parse_args (int argc, char *argv[])
break;
case 'o':
{
- this->order_ = getopt.optarg;
+ this->order_ = getopt.opt_arg ();
}
break;
case 'p':
- this->port_no_ = ACE_OS::atoi (getopt.optarg);
+ this->port_no_ = ACE_OS::atoi (getopt.opt_arg ());
break;
default:
ACE_ERROR ((LM_ERROR,