diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-03-31 18:39:35 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-03-31 18:39:35 +0000 |
commit | 46e17dd1e0e86f2dfb4d2b543ce051f1b24eb1e0 (patch) | |
tree | d58dc428b81e8cfc05c91c33db00b4807a5a6493 | |
parent | 5a81655683ac9588ae333ffe7932752cd1323361 (diff) | |
download | ATCD-46e17dd1e0e86f2dfb4d2b543ce051f1b24eb1e0.tar.gz |
ChangeLogTag:Tue Mar 31 11:05:23 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
-rw-r--r-- | TAO/ChangeLog-98c | 12 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_codegen.cpp | 14 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_helper.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/CDR.cpp | 25 | ||||
-rw-r--r-- | TAO/tao/CDR.h | 10 | ||||
-rw-r--r-- | TAO/tao/Typecode.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/decode.cpp | 7 |
7 files changed, 57 insertions, 17 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index f5044caa726..7465217ce08 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,5 +1,17 @@ Tue Mar 31 11:05:23 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + * tao/CDR.h: + * tao/CDR.cpp: + * tao/decode.cpp: + * tao/Typecode.cpp: + Added constructor for encapsulated streams to the TAO_InputCDR + class; this was causing problems on Intel machines. + + * TAO_IDL/be/be_helper.cpp: + * TAO_IDL/be/be_codegen.cpp: + We end #if/#endif blocks using C style comments (/* */) as + opposed to C++ style (// ) + * tao/Sequence.i: * tao/Sequence.cpp: * tao/Sequence_T.i: diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp index e613db990e8..2de42eed813 100644 --- a/TAO/TAO_IDL/be/be_codegen.cpp +++ b/TAO/TAO_IDL/be/be_codegen.cpp @@ -1,6 +1,8 @@ /* -*- c++ -*- */ // ============================================================================ // +// $Id$ +// // = LIBRARY // TAO IDL // @@ -300,7 +302,7 @@ TAO_CodeGen::client_stubs (const char *fname) *this->client_stubs_ << "#if !defined (__ACE_INLINE__)\n"; *this->client_stubs_ << "#include \"" << idl_global->be_get_client_inline_fname () << "\"\n"; - *this->client_stubs_ << "#endif // !defined INLINE\n\n"; + *this->client_stubs_ << "#endif /* !defined INLINE */\n\n"; return 0; } @@ -434,7 +436,7 @@ TAO_CodeGen::server_skeletons (const char *fname) *this->server_skeletons_ << "#if !defined (__ACE_INLINE__)\n"; *this->server_skeletons_ << "#include \"" << idl_global->be_get_server_inline_fname () << "\"\n"; - *this->server_skeletons_ << "#endif // !defined INLINE\n\n"; + *this->server_skeletons_ << "#endif /* !defined INLINE */\n\n"; return 0; } @@ -477,10 +479,10 @@ TAO_CodeGen::end_client_header (void) *this->client_header_ << "\n#if defined (__ACE_INLINE__)\n"; *this->client_header_ << "#include \"" << idl_global->be_get_client_inline_fname () << "\"\n"; - *this->client_header_ << "#endif // defined INLINE\n\n"; + *this->client_header_ << "#endif /* defined INLINE */\n\n"; // code to put the last #endif - *this->client_header_ << "\n#endif // if !defined\n"; + *this->client_header_ << "\n#endif /* if !defined */\n"; return 0; } @@ -491,10 +493,10 @@ TAO_CodeGen::end_server_header (void) *this->server_header_ << "\n#if defined (__ACE_INLINE__)\n"; *this->server_header_ << "#include \"" << idl_global->be_get_server_inline_fname () << "\"\n"; - *this->server_header_ << "#endif // defined INLINE\n\n"; + *this->server_header_ << "#endif /* defined INLINE */\n\n"; // code to put the last #endif - *this->server_header_ << "\n#endif // if !defined\n"; + *this->server_header_ << "\n#endif /* if !defined */\n"; return 0; } diff --git a/TAO/TAO_IDL/be/be_helper.cpp b/TAO/TAO_IDL/be/be_helper.cpp index 16b6ff39437..5ba49d8a5ae 100644 --- a/TAO/TAO_IDL/be/be_helper.cpp +++ b/TAO/TAO_IDL/be/be_helper.cpp @@ -1,5 +1,7 @@ // ============================================================================ // +// $Id$ +// // = LIBRARY // TAO IDL // @@ -204,7 +206,7 @@ TAO_OutStream::gen_ifdef_macro (const char *flatname, const char *suffix) int TAO_OutStream::gen_endif (void) { - *this << "\n#endif // end #if !defined\n\n"; + *this << "\n#endif /* end #if !defined */\n\n"; return 0; } diff --git a/TAO/tao/CDR.cpp b/TAO/tao/CDR.cpp index 03f2a307634..1fdf3c8e4a5 100644 --- a/TAO/tao/CDR.cpp +++ b/TAO/tao/CDR.cpp @@ -376,6 +376,31 @@ TAO_InputCDR::TAO_InputCDR (const TAO_InputCDR& rhs, } } +TAO_InputCDR::TAO_InputCDR (const TAO_InputCDR& rhs, + size_t size) + : start_ (ACE_Message_Block::duplicate (rhs.start_)), + factory_ (rhs.factory_), + do_byte_swap_ (rhs.do_byte_swap_), + good_bit_ (1) +{ + char* newpos = this->start_->rd_ptr(); + if (this->start_->base () <= newpos + && newpos <= this->start_->end () + && newpos + size <= this->start_->end ()) + { + this->start_->rd_ptr (newpos); + this->start_->wr_ptr (newpos + size); + + CORBA::Octet byte_order; + this->read_octet (byte_order); + this->do_byte_swap_ = (byte_order != TAO_ENCAP_BYTE_ORDER); + } + else + { + this->good_bit_ = 0; + } +} + TAO_InputCDR::TAO_InputCDR (const TAO_InputCDR& rhs) : start_ (ACE_Message_Block::duplicate (rhs.start_)), factory_ (rhs.factory_), diff --git a/TAO/tao/CDR.h b/TAO/tao/CDR.h index efede30c932..25f4e40e095 100644 --- a/TAO/tao/CDR.h +++ b/TAO/tao/CDR.h @@ -341,9 +341,13 @@ public: TAO_InputCDR (const TAO_InputCDR& rhs, size_t size, - CORBA::Long offset = 0); - // When interpreting nested or indirected TypeCodes it is useful to - // make a "copy" of the stream starting in the new position. + CORBA::Long offset); + // When interpreting indirected TypeCodes it is useful to make a + // "copy" of the stream starting in the new position. + + TAO_InputCDR (const TAO_InputCDR& rhs, size_t size); + // This creates an encapsulated stream, the first byte must be (per + // the spec) the byte order of the encapsulation. TAO_InputCDR (const TAO_OutputCDR& rhs); // Create an input CDR from an output CDR. diff --git a/TAO/tao/Typecode.cpp b/TAO/tao/Typecode.cpp index b7421a75ee3..a1c3160fec3 100644 --- a/TAO/tao/Typecode.cpp +++ b/TAO/tao/Typecode.cpp @@ -2108,7 +2108,7 @@ CORBA_TypeCode::typecode_param (CORBA::ULong n, // _know_ we're OK). Then skip the byte order code. TAO_InputCDR stream (this->buffer_, this->length_, - this->byte_order_); + this->byte_order_); CORBA::TypeCode_ptr tc = 0; switch (this->kind_) diff --git a/TAO/tao/decode.cpp b/TAO/tao/decode.cpp index 52c244b5ae5..c44d8d445c6 100644 --- a/TAO/tao/decode.cpp +++ b/TAO/tao/decode.cpp @@ -594,12 +594,7 @@ TAO_Marshal_ObjRef::decode (CORBA::TypeCode_ptr, if ( (continue_decoding = stream->read_ulong (tmp)) == CORBA::B_FALSE) continue; - CORBA::Octet byte_order; - - if ( !(continue_decoding = stream->read_octet (byte_order))) - continue; - - TAO_InputCDR str (*stream, tmp - 1, byte_order); + TAO_InputCDR str (*stream, tmp); continue_decoding = str.good_bit () && stream->skip_bytes(tmp - 1); |