diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-08-27 17:32:37 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-08-27 17:32:37 +0000 |
commit | 1563c0a3192f62eb91346dbe8f25d183321e493f (patch) | |
tree | 9be946128402c9f21f8a2d73c4037f7d986cae86 | |
parent | 4f9ffcd6df321bd8530612a1bb56035a13b463dc (diff) | |
download | ATCD-1563c0a3192f62eb91346dbe8f25d183321e493f.tar.gz |
ChangeLogTag:Thu Aug 27 12:23:37 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
-rw-r--r-- | TAO/ChangeLog-98c | 20 | ||||
-rw-r--r-- | TAO/Makefile | 1 | ||||
-rw-r--r-- | TAO/tao/Environment.cpp | 6 | ||||
-rw-r--r-- | TAO/utils/IorParser/ior-handler.cpp | 11 | ||||
-rw-r--r-- | TAO/utils/IorParser/ior-handler.h | 5 | ||||
-rw-r--r-- | TAO/utils/Makefile | 23 | ||||
-rw-r--r-- | TAO/utils/catior/catior.cpp | 3 |
7 files changed, 58 insertions, 11 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index f5a4ef1a63b..6773f64edcb 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,3 +1,23 @@ +Thu Aug 27 12:23:37 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * Makefile: + * utils/Makefile: + Added a Makefile for the utils directory. + + * utils/catior/catior.cpp: + Fixed some problems with EGCS and the new scope rules in for() + loops. + + * utils/IorParser/ior-handler.h: + * utils/IorParser/ior-handler.cpp: + Removed a hardcoded ASCII code (yikes!) and moved some buffers + to the class, so we don't return local variables (re-yikes!), + using a fixed size buffer looks like a bad idea also; but I'm + not going there yet. + + * tao/Environment.cpp: + Fixed the initialization for the first default environment. + Thu Aug 27 11:55:29 1998 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> * utils/IOR-parser/ior-handler.cpp (hexChar2int): Added a return 0 diff --git a/TAO/Makefile b/TAO/Makefile index d000462f1cd..05e9658fa43 100644 --- a/TAO/Makefile +++ b/TAO/Makefile @@ -23,6 +23,7 @@ DIRS = tao \ TAO_IDL \ orbsvcs \ tests \ + utils \ CLONE = Makefile \ tao \ diff --git a/TAO/tao/Environment.cpp b/TAO/tao/Environment.cpp index 8dea3abfc62..a052fc88d83 100644 --- a/TAO/tao/Environment.cpp +++ b/TAO/tao/Environment.cpp @@ -30,7 +30,9 @@ CORBA_Environment::CORBA_Environment (TAO_ORB_Core* orb_core) { orb_core->default_environment (this); } + #else + CORBA_Environment::CORBA_Environment (void) : exception_ (0), previous_ (0) @@ -48,9 +50,9 @@ CORBA_Environment::CORBA_Environment (const CORBA_Environment& rhs) CORBA_Environment::CORBA_Environment (TAO_ORB_Core* orb_core) : exception_ (0), - previous_ (0) + previous_ (orb_core->default_environment ()) { - // orb_core->default_environment (this); + orb_core->default_environment (this); } #endif diff --git a/TAO/utils/IorParser/ior-handler.cpp b/TAO/utils/IorParser/ior-handler.cpp index 162133a48b8..1b99dc9c6a7 100644 --- a/TAO/utils/IorParser/ior-handler.cpp +++ b/TAO/utils/IorParser/ior-handler.cpp @@ -114,7 +114,6 @@ IorHandler::skipNullOctets (char *readPtr, int *hexCharsRead) char * IorHandler::getString (char *readPtr, int givenLen) { - char parsedStr[MAX_IOR_FIELD_LEN]; char octetPair[2]; char parsedOctetPair[2]; int intEquiv; @@ -175,7 +174,6 @@ void IorHandler::interpretIor (char *thisIor, struct IOR *thisIorInfo) { int numCharsToSkip; - char nullOctet[2]; // Skip the prefix "IOR:" int numHexCharsRead = 4; @@ -371,16 +369,13 @@ IorHandler::interpretIor (char *thisIor, struct IOR *thisIorInfo) char * IorHandler::getIdlInterface (char *typeId) { - char idlInterface[MAX_TYPE_ID_LEN]; int lenInterface; - // @@ Priya, can you please avoid the use of "magic constants" like - // 58. - char *readStart = strchr (typeId, 58); + char *readStart = strchr (typeId, ':'); // A sample type_id for an IDL interface name "EchoTests" is // IDL:EchoTests:1.0 => the trick is to isolate the parts between - // the two colons. The ASCII equivalent of ":" is 58. + // the two colons. if (readStart == NULL) { @@ -389,7 +384,7 @@ IorHandler::getIdlInterface (char *typeId) ACE_OS::exit (1); } - char *readEnd = strrchr (typeId, 58); + char *readEnd = strrchr (typeId, ':'); if (readEnd == NULL) { diff --git a/TAO/utils/IorParser/ior-handler.h b/TAO/utils/IorParser/ior-handler.h index 49f5c7394fd..1ce62bf6a50 100644 --- a/TAO/utils/IorParser/ior-handler.h +++ b/TAO/utils/IorParser/ior-handler.h @@ -94,6 +94,11 @@ private: u_long getOctet2Field (char *readPtr, int *hexCharsRead); void skipNullOctets (char *readPtr, int *hexCharsRead); char *getString (char *readPtr, int givenLen); + +private: + // Just buffers, to avoid memory alloc. + char parsedStr[MAX_IOR_FIELD_LEN]; + char idlInterface[MAX_TYPE_ID_LEN]; }; #endif /* __IORPARSER_H__ */ diff --git a/TAO/utils/Makefile b/TAO/utils/Makefile new file mode 100644 index 00000000000..ca4a0cbc307 --- /dev/null +++ b/TAO/utils/Makefile @@ -0,0 +1,23 @@ +#---------------------------------------------------------------------------- +# +# $Id$ +# +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# Local macros +#---------------------------------------------------------------------------- + +DIRS = catior \ + IorParser \ + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nested.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nolocal.GNU + diff --git a/TAO/utils/catior/catior.cpp b/TAO/utils/catior/catior.cpp index 4e8e8124e73..275fd72ff7e 100644 --- a/TAO/utils/catior/catior.cpp +++ b/TAO/utils/catior/catior.cpp @@ -361,7 +361,8 @@ catior (CORBA::String str, short counter = -1; - for (u_int i = 0; i < objKeyLength; i++) + u_int i = 0; + for (; i < objKeyLength; i++) { if (++counter == 8) { |