diff options
Diffstat (limited to 'TAO/TAO_IDL/be/be_sunsoft.cpp')
-rw-r--r-- | TAO/TAO_IDL/be/be_sunsoft.cpp | 56 |
1 files changed, 18 insertions, 38 deletions
diff --git a/TAO/TAO_IDL/be/be_sunsoft.cpp b/TAO/TAO_IDL/be/be_sunsoft.cpp index ece0a19776d..ee090cc22e5 100644 --- a/TAO/TAO_IDL/be/be_sunsoft.cpp +++ b/TAO/TAO_IDL/be/be_sunsoft.cpp @@ -1,12 +1,13 @@ // $Id$ -#include "idl.h" -#include "idl_extern.h" -#include "be.h" -#include "be_sunsoft.h" +#include "idl.h" +#include "idl_extern.h" +#include "be.h" +#include "be_sunsoft.h" ACE_RCSID(be, be_sunsoft, "$Id$") + TAO_SunSoft_OutStream::TAO_SunSoft_OutStream (void) : TAO_OutStream () { @@ -19,53 +20,35 @@ TAO_SunSoft_OutStream::~TAO_SunSoft_OutStream (void) TAO_OutStream & TAO_SunSoft_OutStream::print (Identifier *id) { - ACE_OS::fprintf (this->fp_, - id->get_string ()); - + ACE_OS::fprintf (this->fp_, id->get_string ()); return *this; } TAO_OutStream & TAO_SunSoft_OutStream::print (UTL_IdList *idl) { - long first = I_TRUE; - long second = I_FALSE; - - UTL_IdListActiveIterator *i = 0; - ACE_NEW_RETURN (i, - UTL_IdListActiveIterator (idl), - *this); + UTL_IdListActiveIterator *i = new UTL_IdListActiveIterator (idl); + long first = I_TRUE; + long second = I_FALSE; - while (!i->is_done ()) + while (!(i->is_done ())) { if (!first) - { - *this << "::"; - } + *this << "::"; else if (second) - { - first = second = I_FALSE; - } - - // Print the identifier. + first = second = I_FALSE; + // print the identifier *this << i->item (); - if (first) { if (ACE_OS::strcmp (i->item ()->get_string (), "") != 0) - { - // Does not start with a "". - first = I_FALSE; - } + // does not start with a "" + first = I_FALSE; else - { - second = I_TRUE; - } + second = I_TRUE; } - i->next (); } - return *this; } @@ -97,9 +80,7 @@ TAO_SunSoft_OutStream::print (AST_Expression *expr) break; case AST_Expression::EV_ulonglong: #if ! defined (ACE_LACKS_LONGLONG_T) - this->TAO_OutStream::print (ACE_UINT64_FORMAT_SPECIFIER "%c", - ev->u.ullval, - 'U'); + this->TAO_OutStream::print ("%u%c", ev->u.ullval, 'U'); #endif /* ! defined (ACE_LACKS_LONGLONG_T) */ break; case AST_Expression::EV_float: @@ -177,10 +158,9 @@ TAO_SunSoft_OutStream::print (AST_Expression *expr) break; } } - else + else // { // XXXASG: need to add code here } - return *this; } |