summaryrefslogtreecommitdiff
path: root/ASNMP
diff options
context:
space:
mode:
Diffstat (limited to 'ASNMP')
-rw-r--r--ASNMP/asnmp/address.cpp24
-rw-r--r--ASNMP/asnmp/octet.cpp3
-rw-r--r--ASNMP/asnmp/oid.cpp1
-rw-r--r--ASNMP/asnmp/vb.cpp4
-rw-r--r--ASNMP/examples/set/set.cpp1
5 files changed, 19 insertions, 14 deletions
diff --git a/ASNMP/asnmp/address.cpp b/ASNMP/asnmp/address.cpp
index 230788e9f67..77da41ec76e 100644
--- a/ASNMP/asnmp/address.cpp
+++ b/ASNMP/asnmp/address.cpp
@@ -37,6 +37,8 @@
=====================================================================*/
#include "asnmp/address.h"
+#include "ace/OS_String.h"
+#include "ace/os_include/ctype.h"
ACE_RCSID(asnmp, address, "$Id$")
@@ -88,7 +90,7 @@ unsigned char& Address::operator[]( const int position)
// overloaded equivlence operator, are two addresses equal?
int operator==( const Address &lhs, const Address &rhs)
{
- if ( strcmp( (const char*) lhs, (const char*)rhs)==0)
+ if ( ACE_OS_String::strcmp( (const char*) lhs, (const char*)rhs)==0)
return 1;
else
return 0;
@@ -106,7 +108,7 @@ int operator!=( const Address &lhs, const Address &rhs)
// overloaded > operator, is a1 > a2
int operator>( const Address &lhs, const Address &rhs)
{
- if ( strcmp( (const char*) lhs, (const char*)rhs)>0)
+ if ( ACE_OS_String::strcmp( (const char*) lhs, (const char*)rhs)>0)
return 1;
else
return 0;
@@ -136,7 +138,7 @@ int operator<=( const Address &lhs,const Address &rhs)
// overloaded < operator, is a1 < a2
int operator<( const Address &lhs, const Address &rhs)
{
- if ( strcmp( (const char*) lhs, (const char*)rhs)<0)
+ if ( ACE_OS_String::strcmp( (const char*) lhs, (const char*)rhs)<0)
return 1;
else
return 0;
@@ -148,7 +150,7 @@ int operator==( const Address &lhs,const char *rhs)
{
if (!rhs && !lhs.valid())
return 1;
- if (strcmp( (const char *) lhs, rhs)== 0)
+ if (ACE_OS_String::strcmp( (const char *) lhs, rhs)== 0)
return 1;
else
return 0;
@@ -167,7 +169,7 @@ int operator>( const Address &lhs,const char *rhs)
{
if (!rhs)
return lhs.valid(); // if lhs valid then > 0, else invalid !> 0
- if (strcmp( (const char *) lhs, rhs)> 0)
+ if (ACE_OS_String::strcmp( (const char *) lhs, rhs)> 0)
return 1;
else
return 0;
@@ -179,7 +181,7 @@ int operator>=( const Address &lhs,const char *rhs)
{
if (!rhs)
return 1; // always >= 0
- if (strcmp( (const char *) lhs, rhs)>= 0)
+ if (ACE_OS_String::strcmp( (const char *) lhs, rhs)>= 0)
return 1;
else
return 0;
@@ -191,7 +193,7 @@ int operator<( const Address &lhs,const char *rhs)
{
if (!rhs)
return 0; // always >= 0
- if (strcmp( (const char *) lhs, rhs)< 0)
+ if (ACE_OS_String::strcmp( (const char *) lhs, rhs)< 0)
return 1;
else
return 0;
@@ -203,7 +205,7 @@ int operator<=( const Address &lhs,const char *rhs)
{
if (!rhs)
return !lhs.valid(); // invalid == 0, else valid > 0
- if (strcmp( (const char *) lhs, rhs)<= 0)
+ if (ACE_OS_String::strcmp( (const char *) lhs, rhs)<= 0)
return 1;
else
return 0;
@@ -450,7 +452,7 @@ int IpAddress::parse_dotted_ipstring( const char *inaddr)
return 0;
// look for dot token separator
- ip_token = strtok( (char *) temp,".");
+ ip_token = ACE_OS_String::strtok( (char *) temp,".");
// while more tokens..
while ( ip_token != 0) {
@@ -466,12 +468,12 @@ int IpAddress::parse_dotted_ipstring( const char *inaddr)
if (( value > 0)&& ( value <=255))
address_buffer[token_count] = (unsigned char) value;
else
- if ( strcmp(ip_token,"0")==0)
+ if (ACE_OS_String::strcmp(ip_token,"0")==0)
address_buffer[token_count]= (unsigned char) 0;
else
error_status = 1;
token_count++;
- ip_token = strtok( 0, ".");
+ ip_token = ACE_OS_String::strtok( 0, ".");
}
// gota be four in len
diff --git a/ASNMP/asnmp/octet.cpp b/ASNMP/asnmp/octet.cpp
index 2a422a5fe88..b1e9c0e6a3d 100644
--- a/ASNMP/asnmp/octet.cpp
+++ b/ASNMP/asnmp/octet.cpp
@@ -35,6 +35,7 @@
#include "ace/OS.h"
#include "asnmp/octet.h" // include definition for octet class
+#include "ace/os_include/ctype.h"
ACE_RCSID(asnmp, octet, "$Id$")
@@ -587,7 +588,7 @@ char *OctetStr::to_string_hex()
#endif // _WIN32
ACE_OS::sprintf(line_ptr, fmt, char_buf);
- line_ptr += 3 + strlen(char_buf);
+ line_ptr += 3 + ACE_OS_String::strlen(char_buf);
}
return output_buffer;
diff --git a/ASNMP/asnmp/oid.cpp b/ASNMP/asnmp/oid.cpp
index d0bbcd3c4aa..c0a14b00dc5 100644
--- a/ASNMP/asnmp/oid.cpp
+++ b/ASNMP/asnmp/oid.cpp
@@ -36,6 +36,7 @@
//---------[ external C libaries used ]--------------------------------
#include "asnmp/oid.h" // include def for oid class
+#include "ace/os_include/ctype.h"
ACE_RCSID(asnmp, oid, "$Id$")
diff --git a/ASNMP/asnmp/vb.cpp b/ASNMP/asnmp/vb.cpp
index ff9c22bb773..cbd6ba5290b 100644
--- a/ASNMP/asnmp/vb.cpp
+++ b/ASNMP/asnmp/vb.cpp
@@ -387,8 +387,8 @@ int operator==( const Vb &lhs, const Vb &rhs)
return 0;
if (lhs.iv_vb_value_ != 0 && rhs.iv_vb_value_ != 0) {
- int val = strcmp(lhs.iv_vb_value_->to_string(),
- rhs.iv_vb_value_->to_string());
+ int val = ACE_OS_String::strcmp(lhs.iv_vb_value_->to_string(),
+ rhs.iv_vb_value_->to_string());
return !val;
}
else
diff --git a/ASNMP/examples/set/set.cpp b/ASNMP/examples/set/set.cpp
index ebbd022d6d4..63c9cf0b34b 100644
--- a/ASNMP/examples/set/set.cpp
+++ b/ASNMP/examples/set/set.cpp
@@ -72,6 +72,7 @@ int main( int argc, char *argv[])
return 1;
}
+int
set::valid() const
{
return valid_;