summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2001-12-31 14:25:55 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2001-12-31 14:25:55 +0000
commit754fb8af7579cc580220d489b3415bea17b28811 (patch)
tree294c4d594eed2ec4b010638ce7a81403531c8c85
parent3dbc948bb4cf3609eeea7cffaf5d61419b2e2f5e (diff)
downloadATCD-754fb8af7579cc580220d489b3415bea17b28811.tar.gz
ChangeLogTag: Mon Dec 31 15:08:08 2001 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--apps/drwho/BS_Server.cpp2
-rw-r--r--apps/drwho/Options.cpp4
-rw-r--r--apps/drwho/PMC_Ruser.cpp4
-rw-r--r--apps/drwho/PM_Client.cpp4
-rw-r--r--apps/gperf/src/Options.cpp10
-rw-r--r--docs/tutorials/010/message_queue.cpp4
-rw-r--r--docs/tutorials/011/message_queue.cpp4
-rw-r--r--docs/tutorials/012/message_queue.cpp4
-rw-r--r--docs/tutorials/013/message_queue.cpp6
-rw-r--r--examples/IOStream/server/iostream_server.cpp2
-rw-r--r--examples/Reactor/WFMO_Reactor/test_multithreading.cpp10
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i4
-rw-r--r--netsvcs/clients/Logger/direct_logging.cpp10
-rw-r--r--tests/Pipe_Test.cpp2
14 files changed, 35 insertions, 35 deletions
diff --git a/apps/drwho/BS_Server.cpp b/apps/drwho/BS_Server.cpp
index 90f37cbc67b..bddaa5a31aa 100644
--- a/apps/drwho/BS_Server.cpp
+++ b/apps/drwho/BS_Server.cpp
@@ -12,7 +12,7 @@ BS_Server::BS_Server (const char *packet)
{
const char *buf_ptr = packet + MAXUSERIDNAMELEN;
- this->count_ = atoi (packet);
+ this->count_ = ACE_OS::atoi (packet);
this->buffer_ = buf_ptr;
ACE_NEW (this->protocol_record_,
diff --git a/apps/drwho/Options.cpp b/apps/drwho/Options.cpp
index 577d35a2b7a..94fc0ee70b8 100644
--- a/apps/drwho/Options.cpp
+++ b/apps/drwho/Options.cpp
@@ -124,7 +124,7 @@ Options::set_options (int argc, char *argv[])
Options::set_opt (Options::USE_VERBOSE_FORMAT);
break;
case 'p':
- Options::port_number = atoi (getopt.opt_arg ());
+ Options::port_number = ACE_OS::atoi (getopt.opt_arg ());
break;
case 'R':
Options::protocol_type = PROTO_RUSER;
@@ -139,7 +139,7 @@ Options::set_options (int argc, char *argv[])
Options::set_opt (Options::SORT_BY_REAL_NAME);
break;
case 't':
- Options::max_server_timeout = atoi (getopt.opt_arg ());
+ Options::max_server_timeout = ACE_OS::atoi (getopt.opt_arg ());
break;
case 'w':
Options::user_name = getopt.opt_arg ();
diff --git a/apps/drwho/PMC_Ruser.cpp b/apps/drwho/PMC_Ruser.cpp
index 79adac7b9ed..f32b13a7bc2 100644
--- a/apps/drwho/PMC_Ruser.cpp
+++ b/apps/drwho/PMC_Ruser.cpp
@@ -103,8 +103,8 @@ PMC_Ruser::handle_protocol_entries (const char *cp,
Drwho_Node *current_node = protocol_record.get_drwho_list ();
protocol_record.set_host (host_name);
- current_node->set_inactive_count (atoi (cp));
- current_node->set_active_count (atoi (cp = ACE_OS::strchr (cp, ' ') + 1));
+ current_node->set_inactive_count (ACE_OS::atoi (cp));
+ current_node->set_active_count (ACE_OS::atoi (cp = ACE_OS::strchr (cp, ' ') + 1));
current_node->set_login_name (cp = ACE_OS::strchr (cp, ' ') + 1);
current_node->set_real_name (cp = ACE_OS::strchr (cp, '\0') + 1);
diff --git a/apps/drwho/PM_Client.cpp b/apps/drwho/PM_Client.cpp
index 58f1d318adf..44476007dc4 100644
--- a/apps/drwho/PM_Client.cpp
+++ b/apps/drwho/PM_Client.cpp
@@ -119,8 +119,8 @@ PM_Client::handle_protocol_entries (const char *cp,
protocol_record.set_login (login_name);
protocol_record.set_real (real_name);
- current_node->set_inactive_count (atoi (cp));
- current_node->set_active_count (atoi (cp = ACE_OS::strchr (cp, ' ') + 1));
+ current_node->set_inactive_count (ACE_OS::atoi (cp));
+ current_node->set_active_count (ACE_OS::atoi (cp = ACE_OS::strchr (cp, ' ') + 1));
current_node->set_host_name (cp = ACE_OS::strchr (cp, ' ') + 1);
this->insert_protocol_info (protocol_record);
diff --git a/apps/gperf/src/Options.cpp b/apps/gperf/src/Options.cpp
index 5355ecdf8e8..4b543045855 100644
--- a/apps/gperf/src/Options.cpp
+++ b/apps/gperf/src/Options.cpp
@@ -328,7 +328,7 @@ Options::parse_args (int argc, char *argv[])
case 'f':
{
ACE_SET_BITS (option_word_, FAST);
- iterations_ = atoi (getopt.opt_arg ());
+ iterations_ = ACE_OS::atoi (getopt.opt_arg ());
if (iterations_ < 0)
{
ACE_ERROR ((LM_ERROR, "iterations value must not be negative, assuming 0\n"));
@@ -454,7 +454,7 @@ Options::parse_args (int argc, char *argv[])
// Sets the initial value for the associated values array.
case 'i':
{
- initial_asso_value_ = atoi (getopt.opt_arg ());
+ initial_asso_value_ = ACE_OS::atoi (getopt.opt_arg ());
if (initial_asso_value_ < 0)
ACE_ERROR ((LM_ERROR,
"Initial value %d should be non-zero, ignoring and continuing.\n",
@@ -472,7 +472,7 @@ Options::parse_args (int argc, char *argv[])
// Sets the jump value, must be odd for later algorithms.
case 'j':
{
- jump_ = atoi (getopt.opt_arg ());
+ jump_ = ACE_OS::atoi (getopt.opt_arg ());
if (jump_ < 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Jump value %d must be a positive number.\n%r",
@@ -631,7 +631,7 @@ Options::parse_args (int argc, char *argv[])
// Range of associated values, determines size of final table.
case 's':
{
- size_ = atoi (getopt.opt_arg ());
+ size_ = ACE_OS::atoi (getopt.opt_arg ());
if (abs (size_) > 50)
ACE_ERROR ((LM_ERROR,
"%d is excessive, did you really mean this?! (type %n -h for help)\n",
@@ -642,7 +642,7 @@ Options::parse_args (int argc, char *argv[])
case 'S':
{
ACE_SET_BITS (option_word_, SWITCH);
- total_switches_ = atoi (getopt.opt_arg ());
+ total_switches_ = ACE_OS::atoi (getopt.opt_arg ());
if (total_switches_ <= 0)
ACE_ERROR_RETURN ((LM_ERROR,
"number of switches %s must be a positive number\n%r",
diff --git a/docs/tutorials/010/message_queue.cpp b/docs/tutorials/010/message_queue.cpp
index a67f72d01e2..f16f2606da7 100644
--- a/docs/tutorials/010/message_queue.cpp
+++ b/docs/tutorials/010/message_queue.cpp
@@ -76,8 +76,8 @@ main (int argc, char *argv[])
{
/* Set the number of iterations through our putq() loop and the
number of threads to use in our Task<> derivative. */
- int iterations = argc > 1 ? atoi (argv[1]) : 9;
- int threads = argc > 2 ? atoi (argv[2]) : 2;
+ int iterations = argc > 1 ? ACE_OS::atoi (argv[1]) : 9;
+ int threads = argc > 2 ? ACE_OS::atoi (argv[2]) : 2;
run_test (iterations, threads);
diff --git a/docs/tutorials/011/message_queue.cpp b/docs/tutorials/011/message_queue.cpp
index a0813db2e69..168a9793f9f 100644
--- a/docs/tutorials/011/message_queue.cpp
+++ b/docs/tutorials/011/message_queue.cpp
@@ -71,8 +71,8 @@ run_test (int iterations,
int
main (int argc, char *argv[])
{
- int iterations = argc > 1 ? atoi (argv[1]) : 4;
- int threads = argc > 2 ? atoi (argv[2]) : 2;
+ int iterations = argc > 1 ? ACE_OS::atoi (argv[1]) : 4;
+ int threads = argc > 2 ? ACE_OS::atoi (argv[2]) : 2;
run_test (iterations,
threads);
diff --git a/docs/tutorials/012/message_queue.cpp b/docs/tutorials/012/message_queue.cpp
index c5db97bb00b..8410d92ad5f 100644
--- a/docs/tutorials/012/message_queue.cpp
+++ b/docs/tutorials/012/message_queue.cpp
@@ -81,8 +81,8 @@ int main (int argc, char *argv[])
Give the user a chance to override the default number of
iterations and pool threads.
*/
- int iterations = argc > 1 ? atoi (argv[1]) : 4;
- int threads = argc > 2 ? atoi (argv[2]) : 2;
+ int iterations = argc > 1 ? ACE_OS::atoi (argv[1]) : 4;
+ int threads = argc > 2 ? ACE_OS::atoi (argv[2]) : 2;
/*
Use the function above to do the actual test. As I said, this
diff --git a/docs/tutorials/013/message_queue.cpp b/docs/tutorials/013/message_queue.cpp
index 6264381810a..17d1afd3d9d 100644
--- a/docs/tutorials/013/message_queue.cpp
+++ b/docs/tutorials/013/message_queue.cpp
@@ -63,11 +63,11 @@ int run_test (int iterations, int threads, int subtasks)
int main (int argc, char *argv[])
{
// Number of Work objects to put into the Task pool
- int iterations = argc > 1 ? atoi (argv[1]) : 4;
+ int iterations = argc > 1 ? ACE_OS::atoi (argv[1]) : 4;
// Number of threads for each Task
- int threads = argc > 2 ? atoi (argv[2]) : 2;
+ int threads = argc > 2 ? ACE_OS::atoi (argv[2]) : 2;
// Number of tasks to chain after the primary task
- int subtasks = argc > 3 ? atoi (argv[3]) : 1;
+ int subtasks = argc > 3 ? ACE_OS::atoi (argv[3]) : 1;
(void) run_test (iterations, threads, subtasks);
diff --git a/examples/IOStream/server/iostream_server.cpp b/examples/IOStream/server/iostream_server.cpp
index e82e069a6cc..f5fdff41327 100644
--- a/examples/IOStream/server/iostream_server.cpp
+++ b/examples/IOStream/server/iostream_server.cpp
@@ -104,7 +104,7 @@ main (int argc, char *argv [])
IOStream_Acceptor peer_acceptor;
- ACE_INET_Addr addr (argc > 1 ? atoi (argv[1]) : ACE_DEFAULT_SERVER_PORT);
+ ACE_INET_Addr addr (argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_SERVER_PORT);
if (peer_acceptor.open (addr) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/examples/Reactor/WFMO_Reactor/test_multithreading.cpp b/examples/Reactor/WFMO_Reactor/test_multithreading.cpp
index e2982059b49..ee368d18c11 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.opt_arg ());
+ concurrent_threads = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'e':
- iterations = atoi (get_opt.opt_arg ());
+ iterations = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'h':
- number_of_handles = atoi (get_opt.opt_arg ());
+ number_of_handles = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'i':
- interval = atoi (get_opt.opt_arg ());
+ interval = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 's':
- number_of_handles_to_signal = atoi (get_opt.opt_arg ());
+ number_of_handles_to_signal = ACE_OS::atoi (get_opt.opt_arg ());
break;
default:
print_usage_and_die ();
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i
index 40baa000008..29f4be5d7d1 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i
@@ -41,14 +41,14 @@ Handle_Timeout::init (int argc, char *argv[])
interval.sec (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'a':
- arg = atoi (get_opt.opt_arg ());
+ arg = ACE_OS::atoi (get_opt.opt_arg ());
break;
default:
break;
}
if (ACE_Reactor::instance ()->schedule_timer (this,
- ACE_reinterpret_cast (void *,
+ ACE_reinterpret_cast (void *,
arg),
delta,
interval) == -1)
diff --git a/netsvcs/clients/Logger/direct_logging.cpp b/netsvcs/clients/Logger/direct_logging.cpp
index 6b62c95edd9..cdbcafef39a 100644
--- a/netsvcs/clients/Logger/direct_logging.cpp
+++ b/netsvcs/clients/Logger/direct_logging.cpp
@@ -13,22 +13,22 @@ static u_short LOGGER_PORT = ACE_DEFAULT_SERVER_PORT;
static const char *const LOGGER_HOST = ACE_DEFAULT_SERVER_HOST;
static const char *const DATA = "hello world\n";
-int
+int
main (int argc, char *argv[])
{
- u_short logger_port = argc > 1 ? atoi (argv[1]) : LOGGER_PORT;
+ u_short logger_port = argc > 1 ? ACE_OS::atoi (argv[1]) : LOGGER_PORT;
const char *logger_host = argc > 2 ? argv[2] : LOGGER_HOST;
ACE_SOCK_Stream logger;
ACE_SOCK_Connector connector;
ACE_INET_Addr addr (logger_port, logger_host);
- ACE_Log_Record log_record (LM_DEBUG,
- ACE_OS::time ((time_t *) 0),
+ ACE_Log_Record log_record (LM_DEBUG,
+ ACE_OS::time ((time_t *) 0),
ACE_OS::getpid ());
if (connector.connect (logger, addr) == -1)
ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1);
-
+
log_record.msg_data (DATA);
size_t len = log_record.length ();
log_record.encode ();
diff --git a/tests/Pipe_Test.cpp b/tests/Pipe_Test.cpp
index 727ee4421b4..cad53d202e8 100644
--- a/tests/Pipe_Test.cpp
+++ b/tests/Pipe_Test.cpp
@@ -55,7 +55,7 @@ parse_args (int argc, char *argv[])
child_process = 1;
break;
case 'i':
- iterations = atoi (get_opt.opt_arg ());
+ iterations = ACE_OS::atoi (get_opt.opt_arg ());
break;
default:
print_usage_and_die ();