summaryrefslogtreecommitdiff
path: root/ace/Get_Opt.cpp
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-05 09:52:56 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-05 09:52:56 +0000
commita88a9ed99c706658a9e6cdb5cdedbb3d977c6a62 (patch)
tree80ad8b136bf72d82f20771a08d5a39f4ffbab77d /ace/Get_Opt.cpp
parentc4c4914a8a212dffcedccf3ab15ec1118eab5bbb (diff)
downloadATCD-a88a9ed99c706658a9e6cdb5cdedbb3d977c6a62.tar.gz
Pure unicode fixes.
Diffstat (limited to 'ace/Get_Opt.cpp')
-rw-r--r--ace/Get_Opt.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/ace/Get_Opt.cpp b/ace/Get_Opt.cpp
index ac21a57ad8f..5c0d98476c6 100644
--- a/ace/Get_Opt.cpp
+++ b/ace/Get_Opt.cpp
@@ -45,14 +45,14 @@ ACE_RCSID(ace, Get_Opt, "$Id$")
ACE_ALLOC_HOOK_DEFINE(ACE_Get_Opt)
-ACE_Get_Opt::ACE_Get_Opt (int argc,
+ACE_Get_Opt::ACE_Get_Opt (int argc,
ASYS_TCHAR **argv,
- const ASYS_TCHAR *optstring,
- int skip,
+ const ASYS_TCHAR *optstring,
+ int skip,
int report_errors)
- : optarg (0),
+ : optarg (0),
optind (skip),
- opterr (report_errors),
+ opterr (report_errors),
argc_ (argc),
argv_ (argv),
nextchar_ (0),
@@ -87,30 +87,30 @@ ACE_Get_Opt::operator () (void)
const ASYS_TCHAR *oli; // Option letter index.
if (this->nextchar_ == 0 || *this->nextchar_ == '\0')
- {
+ {
// Update scanning pointer.
- if (this->optind >= this->argc_
- || *(this->nextchar_ = this->argv_[this->optind]) != '-')
+ if (this->optind >= this->argc_
+ || *(this->nextchar_ = this->argv_[this->optind]) != '-')
{
- this->nextchar_ = ACE_const_cast (char *, ASYS_TEXT (""));
+ this->nextchar_ = ACE_const_cast (ASYS_TCHAR *, ASYS_TEXT (""));
return EOF;
}
if (this->nextchar_[1] != 0
- && *++this->nextchar_ == '-')
- {
+ && *++this->nextchar_ == '-')
+ {
// Found "--".
++this->optind;
- this->nextchar_ = ACE_const_cast (char *, ASYS_TEXT (""));
+ this->nextchar_ = ACE_const_cast (ASYS_TCHAR *, ASYS_TEXT (""));
return EOF;
}
- }
+ }
- // Option letter okay?
+ // Option letter okay?
opt = (int) *this->nextchar_++;
- if (opt == (int) ':'
+ if (opt == (int) ':'
|| ((oli = ACE_OS::strchr (this->optstring_, opt)) == 0))
{
// If the user didn't specify '-' as an option, assume it means
@@ -123,26 +123,26 @@ ACE_Get_Opt::operator () (void)
if (this->opterr && *this->optstring_ != ':')
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%s: illegal option -- %c\n"),
+ ASYS_TEXT ("%s: illegal option -- %c\n"),
this->argv_[0],
opt));
return '?';
}
- if (*++oli != ':')
+ if (*++oli != ':')
{ // Don't need argument.
this->optarg = 0;
if (!*this->nextchar_)
++this->optind;
}
- else
+ else
{ // Need an argument.
if (*this->nextchar_) // No white space.
this->optarg = this->nextchar_;
- else if (this->argc_ <= ++this->optind)
- {
+ else if (this->argc_ <= ++this->optind)
+ {
// No arg.
- this->nextchar_ = ACE_const_cast (char *, ASYS_TEXT (""));
+ this->nextchar_ = ACE_const_cast (ASYS_TCHAR *, ASYS_TEXT (""));
if (*this->optstring_ == ':')
return ':';
@@ -155,7 +155,7 @@ ACE_Get_Opt::operator () (void)
else // White space.
this->optarg = this->argv_[this->optind];
- this->nextchar_ = ACE_const_cast (char *, ASYS_TEXT (""));
+ this->nextchar_ = ACE_const_cast (ASYS_TCHAR *, ASYS_TEXT (""));
++this->optind;
}