summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2007-02-21 22:30:49 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2007-02-21 22:30:49 +0000
commit5e78db09f78db0726a17c65ed7c08af4d4d43fd3 (patch)
tree9ea2880e126e3cbbf2fb352ff86acc88c465dc62
parente2fb931d4056ac6a25aa30f3f9784ea5087ebad0 (diff)
downloadATCD-5e78db09f78db0726a17c65ed7c08af4d4d43fd3.tar.gz
ChangeLogTag:Wed Feb 21 19:27:14 UTC 2007 Ossama Othman <ossama_othman at symantec dot com>
-rw-r--r--ACE/ace/ACE.inl6
-rw-r--r--ACE/ace/Capabilities.cpp16
-rw-r--r--ACE/ace/Capabilities.h9
-rw-r--r--ACE/ace/Get_Opt.cpp8
-rw-r--r--ACE/ace/OS_NS_ctype.inl6
5 files changed, 24 insertions, 21 deletions
diff --git a/ACE/ace/ACE.inl b/ACE/ace/ACE.inl
index 704941a5b20..92ab4418bed 100644
--- a/ACE/ace/ACE.inl
+++ b/ACE/ace/ACE.inl
@@ -4,7 +4,7 @@
#include "ace/OS_NS_unistd.h"
#include "ace/OS_NS_Thread.h"
-#include "ace/os_include/os_ctype.h"
+#include "ace/OS_NS_ctype.h"
#include "ace/OS_NS_sys_socket.h"
// Open versioned namespace, if enabled by the user.
@@ -324,9 +324,9 @@ ACE::nibble2hex (u_int n)
ACE_INLINE u_char
ACE::hex2byte (ACE_TCHAR c)
{
- if (isdigit (c))
+ if (ACE_OS::ace_isdigit (c))
return (u_char) (c - ACE_LIB_TEXT ('0'));
- else if (islower (c))
+ else if (ACE_OS::ace_islower (c))
return (u_char) (10 + c - ACE_LIB_TEXT ('a'));
else
return (u_char) (10 + c - ACE_LIB_TEXT ('A'));
diff --git a/ACE/ace/Capabilities.cpp b/ACE/ace/Capabilities.cpp
index 24a650ef1ff..f0c641cc692 100644
--- a/ACE/ace/Capabilities.cpp
+++ b/ACE/ace/Capabilities.cpp
@@ -1,5 +1,5 @@
#include "ace/Capabilities.h"
-#include "ace/os_include/os_ctype.h"
+#include "ace/OS_NS_ctype.h"
#include "ace/OS_Memory.h"
#include "ace/OS_NS_string.h"
@@ -69,12 +69,12 @@ ACE_Capabilities::parse (const ACE_TCHAR *buf, ACE_TString &cap)
cap += *buf++;
continue;
}
- if (isdigit(*buf))
+ if (ACE_OS::ace_isdigit(*buf))
{
// @@ UNICODE Does this work with unicode?
int oc = 0;
for (int i = 0;
- i < 3 && *buf && isdigit (*buf);
+ i < 3 && *buf && ACE_OS::ace_isdigit (*buf);
i++)
oc = oc * 8 + (*buf++ - ACE_LIB_TEXT ('0'));
@@ -92,7 +92,7 @@ ACE_Capabilities::parse (const ACE_TCHAR *buf, int &cap)
{
int n = 0;
- while (*buf && isdigit (*buf))
+ while (*buf && ACE_OS::ace_isdigit (*buf))
n = n * 10 + (*buf++ - ACE_LIB_TEXT ('0'));
cap = n;
@@ -128,7 +128,7 @@ ACE_Capabilities::fillent (const ACE_TCHAR *buf)
ACE_CapEntry *ce;
// Skip blanks
- while (*buf && isspace(*buf)) buf++;
+ while (*buf && ACE_OS::ace_isspace(*buf)) buf++;
// If we get end of line return
if (*buf == ACE_LIB_TEXT ('\0'))
@@ -202,7 +202,7 @@ ACE_Capabilities::is_entry (const ACE_TCHAR *name, const ACE_TCHAR *line)
for (;;)
{
// Skip blanks or irrelevant characters
- while (*line && isspace(*line))
+ while (*line && ACE_OS::ace_isspace(*line))
++line;
// End of line reached
@@ -292,7 +292,7 @@ ACE_Capabilities::getval (const ACE_TCHAR *keyname, int &val)
static int
is_empty (const ACE_TCHAR *line)
{
- while (*line && isspace (*line))
+ while (*line && ACE_OS::ace_isspace (*line))
++line;
return *line == ACE_LIB_TEXT ('\0') || *line == ACE_LIB_TEXT ('#');
@@ -301,7 +301,7 @@ is_empty (const ACE_TCHAR *line)
static int
is_line (const ACE_TCHAR *line)
{
- while (*line && isspace (*line))
+ while (*line && ACE_OS::ace_isspace (*line))
++line;
return *line != ACE_LIB_TEXT ('\0');
diff --git a/ACE/ace/Capabilities.h b/ACE/ace/Capabilities.h
index 9fe870b8fe5..f4183f22986 100644
--- a/ACE/ace/Capabilities.h
+++ b/ACE/ace/Capabilities.h
@@ -27,6 +27,11 @@
#include "ace/SString.h"
#include "ace/Functor_String.h"
+#if defined (ACE_IS_SPLITTING)
+# include "ace/OS_NS_ctype.h"
+#endif /* ACE_IS_SPLITTING */
+
+
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
/**
@@ -190,7 +195,7 @@ private:
int
is_empty (const ACE_TCHAR *line)
{
- while (*line && isspace (*line))
+ while (*line && ACE_OS::ace_isspace (*line))
++line;
return *line == ACE_LIB_TEXT ('\0') || *line == ACE_LIB_TEXT ('#');
@@ -199,7 +204,7 @@ is_empty (const ACE_TCHAR *line)
int
is_line (const ACE_TCHAR *line)
{
- while (*line && isspace (*line))
+ while (*line && ACE_OS::ace_isspace (*line))
++line;
return *line != ACE_LIB_TEXT ('\0');
diff --git a/ACE/ace/Get_Opt.cpp b/ACE/ace/Get_Opt.cpp
index db472fbbdd6..7377d48ef4f 100644
--- a/ACE/ace/Get_Opt.cpp
+++ b/ACE/ace/Get_Opt.cpp
@@ -489,15 +489,7 @@ ACE_Get_Opt::long_option (const ACE_TCHAR *name,
// when the long option is found, but won't allow the caller to pass it on
// the command line (how could they?). The special case is 0, but since
// we always return it, we let the caller worry about that.
-#if defined (_MSC_VER) && (_MSC_VER >= 1300)
- // For MSVC 7.x, we need to prevent "illegal" character getting into
- // isalnum, otherwise, it will crash the program.
- if (short_option > 0 &&
- short_option < 256 &&
- ACE_OS::ace_isalnum (static_cast<char> (short_option)) != 0)
-#else
if (ACE_OS::ace_isalnum (short_option) != 0)
-#endif /* _MSC_VER && _MSC_VER >= 1300 */
{
// If the short_option already exists, make sure it matches, otherwise
// add it.
diff --git a/ACE/ace/OS_NS_ctype.inl b/ACE/ace/OS_NS_ctype.inl
index e7199338653..42054b36239 100644
--- a/ACE/ace/OS_NS_ctype.inl
+++ b/ACE/ace/OS_NS_ctype.inl
@@ -13,7 +13,13 @@ ACE_INLINE int
ACE_OS::ace_isalnum (ACE_TCHAR c)
{
#if defined (ACE_USES_WCHAR)
+# if defined (_MSC_VER) && (_MSC_VER >= 1300)
+ // For MSVC 7.x, we need to prevent "illegal" character getting into
+ // isalnum, otherwise, it will crash the program.
+ return c > 0 && c < 256 && iswalnum (c);
+# else
return iswalnum (c);
+# endif /* _MSC_VER && _MSC_VER >= 1300 */
#else /* ACE_USES_WCHAR */
return isalnum ((unsigned char) c);
#endif /* ACE_USES_WCHAR */