From f56d76341185054d6f52695b9b1ec4946191e2e6 Mon Sep 17 00:00:00 2001 From: steve Date: Tue, 14 Jan 2003 21:16:18 +0000 Subject: [PATCH] Move strstream to ostringstream for compatibility. --- elaborate.cc | 11 +++++++---- net_design.cc | 14 +++++++++----- net_link.cc | 15 +++++++++------ net_scope.cc | 11 +++++++---- pform.cc | 25 ++++++++++++++----------- t-xnf.cc | 11 +++++++---- xnfio.cc | 6 ++++-- 7 files changed, 57 insertions(+), 36 deletions(-) diff --git a/elaborate.cc b/elaborate.cc index 7e57b0878..95c33e0d3 100644 --- a/elaborate.cc +++ b/elaborate.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: elaborate.cc,v 1.267 2002/12/21 19:42:17 steve Exp $" +#ident "$Id: elaborate.cc,v 1.268 2003/01/14 21:16:18 steve Exp $" #endif # include "config.h" @@ -30,7 +30,7 @@ */ # include -# include +# include # include # include "pform.h" # include "PEvent.h" @@ -314,14 +314,14 @@ void PGBuiltin::elaborate(Design*des, NetScope*scope) const a unique name, and set the delay times. */ for (unsigned idx = 0 ; idx < count ; idx += 1) { - strstream tmp; + ostringstream tmp; unsigned index; if (low < high) index = low + idx; else index = low - idx; - tmp << name << "<" << index << ">" << ends; + tmp << name << "<" << index << ">"; const string inm = tmp.str(); switch (type()) { @@ -2513,6 +2513,9 @@ Design* elaborate(listroots) /* * $Log: elaborate.cc,v $ + * Revision 1.268 2003/01/14 21:16:18 steve + * Move strstream to ostringstream for compatibility. + * * Revision 1.267 2002/12/21 19:42:17 steve * Account for local units in calculated delays. * diff --git a/net_design.cc b/net_design.cc index 426794d05..f822a13bd 100644 --- a/net_design.cc +++ b/net_design.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: net_design.cc,v 1.30 2002/12/07 02:49:24 steve Exp $" +#ident "$Id: net_design.cc,v 1.31 2003/01/14 21:16:18 steve Exp $" #endif # include "config.h" @@ -31,7 +31,7 @@ # include "netlist.h" # include "util.h" -# include +# include Design:: Design() : errors(0), nodes_(0), procs_(0), lcounter_(0) @@ -48,10 +48,11 @@ Design::~Design() string Design::local_symbol(const string&path) { - strstream res; - res << "_L" << (lcounter_++) << ends; + ostringstream res; + res << path << "." << "_L" << lcounter_; + lcounter_ += 1; - return path + "." + res.str(); + return res.str(); } void Design::set_precision(int val) @@ -600,6 +601,9 @@ void Design::delete_process(NetProcTop*top) /* * $Log: net_design.cc,v $ + * Revision 1.31 2003/01/14 21:16:18 steve + * Move strstream to ostringstream for compatibility. + * * Revision 1.30 2002/12/07 02:49:24 steve * Named event triggers can take hierarchical names. * diff --git a/net_link.cc b/net_link.cc index eb2942010..0a79583ab 100644 --- a/net_link.cc +++ b/net_link.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: net_link.cc,v 1.12 2002/10/21 01:42:08 steve Exp $" +#ident "$Id: net_link.cc,v 1.13 2003/01/14 21:16:18 steve Exp $" #endif # include "config.h" @@ -25,7 +25,7 @@ # include # include "netlist.h" -# include +# include # include # include #ifdef HAVE_MALLOC_H @@ -363,14 +363,14 @@ const char* Nexus::name() const } assert(sig); - ostrstream tmp; + ostringstream tmp; tmp << sig->name(); if (sig->pin_count() > 1) tmp << "<" << pin << ">"; - tmp << ends; - name_ = new char[strlen(tmp.str()) + 1]; - strcpy(name_, tmp.str()); + const string tmps = tmp.str(); + name_ = new char[strlen(tmps.c_str()) + 1]; + strcpy(name_, tmps.c_str()); return name_; } @@ -499,6 +499,9 @@ bool NexusSet::intersect(const NexusSet&that) const /* * $Log: net_link.cc,v $ + * Revision 1.13 2003/01/14 21:16:18 steve + * Move strstream to ostringstream for compatibility. + * * Revision 1.12 2002/10/21 01:42:08 steve * Synthesizer support for synchronous begin-end blocks. * diff --git a/net_scope.cc b/net_scope.cc index 57692d4ae..f7b7ef204 100644 --- a/net_scope.cc +++ b/net_scope.cc @@ -17,13 +17,13 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: net_scope.cc,v 1.21 2002/12/07 02:49:24 steve Exp $" +#ident "$Id: net_scope.cc,v 1.22 2003/01/14 21:16:18 steve Exp $" #endif # include "config.h" # include "netlist.h" -# include +# include /* * The NetScope class keeps a scope tree organized. Each node of the @@ -419,8 +419,8 @@ const NetScope* NetScope::parent() const string NetScope::local_symbol() { - strstream res; - res << "_s" << (lcounter_++) << ends; + ostringstream res; + res << "_s" << (lcounter_++); return res.str(); } @@ -432,6 +432,9 @@ string NetScope::local_hsymbol() /* * $Log: net_scope.cc,v $ + * Revision 1.22 2003/01/14 21:16:18 steve + * Move strstream to ostringstream for compatibility. + * * Revision 1.21 2002/12/07 02:49:24 steve * Named event triggers can take hierarchical names. * diff --git a/pform.cc b/pform.cc index f8c8cb14d..5c3453973 100644 --- a/pform.cc +++ b/pform.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: pform.cc,v 1.103 2003/01/10 03:08:13 steve Exp $" +#ident "$Id: pform.cc,v 1.104 2003/01/14 21:16:18 steve Exp $" #endif # include "config.h" @@ -32,7 +32,7 @@ # include # include # include -# include +# include map pform_modules; map pform_primitives; @@ -820,11 +820,11 @@ void pform_module_define_port(const struct vlltype&li, hname_t name = hier_name(nm); PWire*cur = pform_cur_module->get_wire(name); if (cur) { - strstream msg; + ostringstream msg; msg << name << " definition conflicts with " << "definition at " << cur->get_line() - << "." << ends; - VLerror(msg.str()); + << "."; + VLerror(msg.str().c_str()); return; } @@ -874,18 +874,18 @@ void pform_makewire(const vlltype&li, const char*nm, if (cur) { if ((cur->get_wire_type() != NetNet::IMPLICIT) && (cur->get_wire_type() != NetNet::IMPLICIT_REG)) { - strstream msg; + ostringstream msg; msg << name << " previously defined at " << - cur->get_line() << "." << ends; - VLerror(msg.str()); + cur->get_line() << "."; + VLerror(msg.str().c_str()); } else { bool rc = cur->set_wire_type(type); if (rc == false) { - strstream msg; + ostringstream msg; msg << name << " definition conflicts with " << "definition at " << cur->get_line() - << "." << ends; - VLerror(msg.str()); + << "."; + VLerror(msg.str().c_str()); } } @@ -1360,6 +1360,9 @@ int pform_parse(const char*path, FILE*file) /* * $Log: pform.cc,v $ + * Revision 1.104 2003/01/14 21:16:18 steve + * Move strstream to ostringstream for compatibility. + * * Revision 1.103 2003/01/10 03:08:13 steve * Spelling fixes. * diff --git a/t-xnf.cc b/t-xnf.cc index 279e900dd..fb3464c10 100644 --- a/t-xnf.cc +++ b/t-xnf.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: t-xnf.cc,v 1.45 2002/08/12 01:35:01 steve Exp $" +#ident "$Id: t-xnf.cc,v 1.46 2003/01/14 21:16:18 steve Exp $" #endif # include "config.h" @@ -77,7 +77,7 @@ # include "netlist.h" # include "target.h" # include -# include +# include verinum::V link_get_ival(const Link&lnk) { @@ -765,8 +765,8 @@ void target_xnf::lpm_ram_dq(const NetRamDq*ram) draw_pin(out_, "WE", ram->pin_WE()); draw_pin(out_, "WCLK", ram->pin_InClock()); for (unsigned adr = 0 ; adr < ram->awidth() ; adr += 1) { - strstream tmp; - tmp << "A" << adr << ends; + ostringstream tmp; + tmp << "A" << adr; draw_pin(out_, tmp.str(), ram->pin_Address(adr)); } @@ -927,6 +927,9 @@ extern const struct target tgt_xnf = { "xnf", &target_xnf_obj }; /* * $Log: t-xnf.cc,v $ + * Revision 1.46 2003/01/14 21:16:18 steve + * Move strstream to ostringstream for compatibility. + * * Revision 1.45 2002/08/12 01:35:01 steve * conditional ident string using autoconfig. * diff --git a/xnfio.cc b/xnfio.cc index e86d4e61f..0ebf0e883 100644 --- a/xnfio.cc +++ b/xnfio.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: xnfio.cc,v 1.23 2002/08/12 01:35:01 steve Exp $" +#ident "$Id: xnfio.cc,v 1.24 2003/01/14 21:16:18 steve Exp $" #endif # include "config.h" @@ -27,7 +27,6 @@ # include "functor.h" # include "netlist.h" # include "netmisc.h" -# include class xnfio_f : public functor_t { @@ -363,6 +362,9 @@ void xnfio(Design*des) /* * $Log: xnfio.cc,v $ + * Revision 1.24 2003/01/14 21:16:18 steve + * Move strstream to ostringstream for compatibility. + * * Revision 1.23 2002/08/12 01:35:01 steve * conditional ident string using autoconfig. *