summaryrefslogtreecommitdiff
path: root/ace/ARGV.i
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1998-08-01 04:16:29 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1998-08-01 04:16:29 +0000
commit3bd89a9c8780832dfd6e6ee149a65459441fe4dd (patch)
treec44f310f7ae767f226e0b32e37ad9a1df97e5464 /ace/ARGV.i
parentccf2ba4743056b131b8c8a76b18ea1ad83a5eb27 (diff)
downloadATCD-3bd89a9c8780832dfd6e6ee149a65459441fe4dd.tar.gz
*** empty log message ***
Diffstat (limited to 'ace/ARGV.i')
-rw-r--r--ace/ARGV.i23
1 files changed, 12 insertions, 11 deletions
diff --git a/ace/ARGV.i b/ace/ARGV.i
index 9a6fd8670fa..f9fc1e73f12 100644
--- a/ace/ARGV.i
+++ b/ace/ARGV.i
@@ -1,8 +1,6 @@
/* -*- C++ -*- */
// $Id$
-// ARGV.i
-
// Return the number of args
ACE_INLINE size_t
ACE_ARGV::argc (void) const
@@ -32,35 +30,38 @@ ACE_ARGV::buf (void)
}
// Return the arguments in an entry-per-argument array
+
ACE_INLINE ASYS_TCHAR **
ACE_ARGV::argv (void)
{
ACE_TRACE ("ACE_ARGV::argv");
// Try to create the argv_ if it isn't there
- if (this->argv_ == 0) {
-
- if (this->state_ == ITERATIVE && this->buf_ == 0)
- this->create_buf_from_queue();
+ if (this->argv_ == 0)
+ {
+ if (this->state_ == ITERATIVE && this->buf_ == 0)
+ this->create_buf_from_queue ();
- // Convert buf_ to argv_
- this->string_to_array();
- }
+ // Convert buf_ to argv_
+ if (this->string_to_argv () == -1)
+ return 0;
+ }
return this->argv_;
}
// Subscript operator.
+
ACE_INLINE const ASYS_TCHAR *
ACE_ARGV::operator[] (size_t i)
{
ACE_TRACE ("ACE_ARGV::operator[]");
- // Don't go out of bounds
+ // Don't go out of bounds.
if (i >= this->argc_)
return 0;
- return (const ASYS_TCHAR *)(this->argv()[i]);
+ return (const ASYS_TCHAR *) this->argv ()[i];
}