fix problem with strstream.h

[email protected] Mon, 8 Dec 2003 11:25:51 -0800
Newsgroups gmane.comp.lib.ivtools.patches
Message-ID <a04320402bbfa80a79f22@[68.125.197.60]>
Patch:    ivtools-031208-johnston-003
For:      ivtools-1.1.1
Author:   [email protected]
Subject:  fix problem with strstream.h
Requires:

This is an intermediate patch to ivtools-1.1.  To apply, cd to the
top-level directory of the ivtools source tree (the directory with src
and config subdirs), and apply like this:

	patch -p0 <ThisFile

Summary of Changes:

- this patch fixes a problem with using gcc-2.95 to compile
ivtools-1.1.1.  It avoids the use of a local copy of strstream.h,
which worked fine for gcc-3.3, but not for gcc-2.9.5.  Instead it uses
strstream directly, and appends istrstream and ostrstream with the
std:: using prefix.  Fix contributed by Mark Davies.

Index: AttrGlyph/attredit.c
diff -c AttrGlyph/attredit.c:1.1 AttrGlyph/attredit.c:1.2
*** AttrGlyph/attredit.c:1.1	Wed Oct 29 13:35:30 2003
--- src/AttrGlyph/attredit.c	Mon Dec  8 10:57:38 2003
***************
*** 41,47 ****

   #include <IVGlyph/textedit.h>

! #include <strstream.h>
   #include <string.h>
   #if __GNUC__==2 && __GNUC_MINOR__<=7
   #else
--- 41,47 ----

   #include <IVGlyph/textedit.h>

! #include <strstream>
   #include <string.h>
   #if __GNUC__==2 && __GNUC_MINOR__<=7
   #else
***************
*** 139,145 ****
   #else
           vbuf.push_back(' ');
   #endif
! 	strstream valstr;
   	valstr << *attr->Value() << '\0';
   	const char* val = valstr.str();
   	int vallen = val ? strlen(val) : 0;
--- 139,145 ----
   #else
           vbuf.push_back(' ');
   #endif
! 	std::strstream valstr;
   	valstr << *attr->Value() << '\0';
   	const char* val = valstr.str();
   	int vallen = val ? strlen(val) : 0;
Index: Attribute/paramlist.c
diff -c Attribute/paramlist.c:1.1 Attribute/paramlist.c:1.2
*** Attribute/paramlist.c:1.1	Wed Oct 29 13:24:38 2003
--- src/Attribute/paramlist.c	Mon Dec  8 10:57:07 2003
***************
*** 39,45 ****
   #include <stdio.h>
   #include <string.h>
   #ifndef __APPLE__
! #include <strstream.h>
   #endif

 
/*****************************************************************************/
--- 39,45 ----
   #include <stdio.h>
   #include <string.h>
   #ifndef __APPLE__
! #include <strstream>
   #endif

 
/*****************************************************************************/
Index: ComGlyph/attrdialog.c
diff -c ComGlyph/attrdialog.c:1.1 ComGlyph/attrdialog.c:1.2
*** ComGlyph/attrdialog.c:1.1	Wed Oct 29 13:35:37 2003
--- src/ComGlyph/attrdialog.c	Mon Dec  8 10:57:40 2003
***************
*** 49,55 ****
   #include <iostream.h>
   #include <stdio.h>
   #include <string.h>
! #include <strstream.h>

 
/*****************************************************************************/

--- 49,55 ----
   #include <iostream.h>
   #include <stdio.h>
   #include <string.h>
! #include <strstream>

 
/*****************************************************************************/

***************
*** 186,192 ****

   	    const int bufsiz = BUFSIZ;
   	    char buf[bufsiz];
! 	    strstream outstr(buf, bufsiz);
   	    outstr << retval;
   	    outstr.put('\0');
               result_->textvalue(buf);
--- 186,192 ----

   	    const int bufsiz = BUFSIZ;
   	    char buf[bufsiz];
! 	    std::strstream outstr(buf, bufsiz);
   	    outstr << retval;
   	    outstr.put('\0');
               result_->textvalue(buf);
Index: ComGlyph/comtextview.c
diff -c ComGlyph/comtextview.c:1.1 ComGlyph/comtextview.c:1.2
*** ComGlyph/comtextview.c:1.1	Wed Oct 29 13:35:37 2003
--- src/ComGlyph/comtextview.c	Mon Dec  8 10:57:40 2003
***************
*** 49,55 ****
   #include <ComTerp/comvalue.h>
   #include <ctype.h>
   #include <iostream.h>
! #include <strstream.h>
   #include <string.h>

   #define XK_MISCELLANY           /* to get the keysym's we need */
--- 49,55 ----
   #include <ComTerp/comvalue.h>
   #include <ctype.h>
   #include <iostream.h>
! #include <strstream>
   #include <string.h>

   #define XK_MISCELLANY           /* to get the keysym's we need */
***************
*** 232,238 ****
   #else
     ComValue result(comterp()->pop_stack());
   #endif
!   ostream* out = new strstream();
     if (*comterp()->errmsg()) {
       *out << comterp()->errmsg() << "\n";
     } else {
--- 232,238 ----
   #else
     ComValue result(comterp()->pop_stack());
   #endif
!   ostream* out = new std::strstream();
     if (*comterp()->errmsg()) {
       *out << comterp()->errmsg() << "\n";
     } else {
***************
*** 248,254 ****
     }
     out->put('\0');
     out->flush();
!   strstream* sout = (strstream*)out;
     insert_string(sout->str(), strlen(sout->str()));
     comterp()->brief(old_brief);
     delete out;
--- 248,254 ----
     }
     out->put('\0');
     out->flush();
!   std::strstream* sout = (std::strstream*)out;
     insert_string(sout->str(), strlen(sout->str()));
     comterp()->brief(old_brief);
     delete out;
Index: ComGlyph/terpdialog.c
diff -c ComGlyph/terpdialog.c:1.1 ComGlyph/terpdialog.c:1.2
*** ComGlyph/terpdialog.c:1.1	Wed Oct 29 13:35:37 2003
--- src/ComGlyph/terpdialog.c	Mon Dec  8 10:57:40 2003
***************
*** 49,55 ****
   #include <iostream.h>
   #include <stdio.h>
   #include <string.h>
! #include <strstream.h>

 
/*****************************************************************************/

--- 49,55 ----
   #include <iostream.h>
   #include <stdio.h>
   #include <string.h>
! #include <strstream>

 
/*****************************************************************************/

***************
*** 446,452 ****
       } else {
           char buf[BUFSIZ];
           buf[0] = '\0';
!         ostrstream ostr(buf, BUFSIZ);

           ostr << retval;
   	ostr << '\0';
--- 446,452 ----
       } else {
           char buf[BUFSIZ];
           buf[0] = '\0';
!         std::ostrstream ostr(buf, BUFSIZ);

           ostr << retval;
   	ostr << '\0';
Index: ComTerp/comterp.c
diff -c ComTerp/comterp.c:1.1 ComTerp/comterp.c:1.2
*** ComTerp/comterp.c:1.1	Wed Oct 29 13:25:26 2003
--- src/ComTerp/comterp.c	Mon Dec  8 10:57:10 2003
***************
*** 58,64 ****
   #include <ctype.h>
   #include <iostream.h>
   #include <string.h>
! #include <strstream.h>
   #include <unistd.h>
   #if __GNUC__>=3
   #include <fstream.h>
--- 58,64 ----
   #include <ctype.h>
   #include <iostream.h>
   #include <string.h>
! #include <strstream>
   #include <unistd.h>
   #if __GNUC__>=3
   #include <fstream.h>
Index: ComTerp/debugfunc.c
diff -c ComTerp/debugfunc.c:1.1 ComTerp/debugfunc.c:1.2
*** ComTerp/debugfunc.c:1.1	Wed Oct 29 13:25:27 2003
--- src/ComTerp/debugfunc.c	Mon Dec  8 10:57:10 2003
***************
*** 26,32 ****

   #include <ComTerp/debugfunc.h>
   #include <ComTerp/comterpserv.h>
! #include <strstream.h>
   #if __GNUC__==2 && __GNUC_MINOR__<=7
   #else
   #include <vector.h>
--- 26,32 ----

   #include <ComTerp/debugfunc.h>
   #include <ComTerp/comterpserv.h>
! #include <strstream>
   #if __GNUC__==2 && __GNUC_MINOR__<=7
   #else
   #include <vector.h>
***************
*** 76,88 ****
     comterp()->npause()++;

    if (msgstrv.is_string()) {
!     ostrstream sbuf1_s;
       sbuf1_s << (stepfunc() ? "step(" : "pause(") << 
comterp()->npause() << "): "
   	    << msgstrv.string_ptr() << "\n";
       sbuf1_s.put('\0');
       cerr << sbuf1_s.str();
    }
!   ostrstream sbuf2_s;
     sbuf2_s << (stepfunc() ? "step(" : "pause(") << 
comterp()->npause() << "): enter command or press C/R to continue\n";
     sbuf2_s.put('\0');
     cerr << sbuf2_s.str();
--- 76,88 ----
     comterp()->npause()++;

    if (msgstrv.is_string()) {
!     std::ostrstream sbuf1_s;
       sbuf1_s << (stepfunc() ? "step(" : "pause(") << 
comterp()->npause() << "): "
   	    << msgstrv.string_ptr() << "\n";
       sbuf1_s.put('\0');
       cerr << sbuf1_s.str();
    }
!   std::ostrstream sbuf2_s;
     sbuf2_s << (stepfunc() ? "step(" : "pause(") << 
comterp()->npause() << "): enter command or press C/R to continue\n";
     sbuf2_s.put('\0');
     cerr << sbuf2_s.str();
***************
*** 149,155 ****
       }
     } while (cvect[0] != '\n');
     comterp()->pop_servstate();
!   ostrstream sbuf_e;
     sbuf_e << (stepfunc() ? "end of step(" : "end of pause(") << 
comterp()->npause()-- << ")\n";
     sbuf_e.put('\0');
     cerr << sbuf_e.str();
--- 149,155 ----
       }
     } while (cvect[0] != '\n');
     comterp()->pop_servstate();
!   std::ostrstream sbuf_e;
     sbuf_e << (stepfunc() ? "end of step(" : "end of pause(") << 
comterp()->npause()-- << ")\n";
     sbuf_e.put('\0');
     cerr << sbuf_e.str();
Index: ComTerp/helpfunc.c
diff -c ComTerp/helpfunc.c:1.1 ComTerp/helpfunc.c:1.2
*** ComTerp/helpfunc.c:1.1	Wed Oct 29 13:25:27 2003
--- src/ComTerp/helpfunc.c	Mon Dec  8 10:57:10 2003
***************
*** 34,40 ****
   #include <OS/math.h>

   #include <iostream.h>
! #include <strstream.h>
   #if __GNUC__>=3
   #include <fstream.h>
   #endif
--- 34,40 ----
   #include <OS/math.h>

   #include <iostream.h>
! #include <strstream>
   #if __GNUC__>=3
   #include <fstream.h>
   #endif
***************
*** 127,133 ****

     reset_stack();

!   strstreambuf sbuf;
   #if __GNUC__<3
     filebuf fbuf;
     if (comterp()->handler()) {
--- 127,133 ----

     reset_stack();

!   std::strstreambuf sbuf;
   #if __GNUC__<3
     filebuf fbuf;
     if (comterp()->handler()) {
Index: ComTerp/iofunc.c
diff -c ComTerp/iofunc.c:1.1 ComTerp/iofunc.c:1.2
*** ComTerp/iofunc.c:1.1	Wed Oct 29 13:25:28 2003
--- src/ComTerp/iofunc.c	Mon Dec  8 10:57:10 2003
***************
*** 31,37 ****
   #include <Attribute/attrlist.h>
   #include <OS/math.h>
   #include <iostream.h>
! #include <strstream.h>
   #if __GNUC__>=3
   #include <fstream.h>
   #endif
--- 31,37 ----
   #include <Attribute/attrlist.h>
   #include <OS/math.h>
   #include <iostream.h>
! #include <strstream>
   #if __GNUC__>=3
   #include <fstream.h>
   #endif
***************
*** 73,79 ****
       } else
         fbuf->attach(fileno(errflag.is_false() ? stdout : stderr));
     } else {
!     strmbuf = new strstreambuf();
     }
   #else
     streambuf* strmbuf = nil;
--- 73,79 ----
       } else
         fbuf->attach(fileno(errflag.is_false() ? stdout : stderr));
     } else {
!     strmbuf = new std::strstreambuf();
     }
   #else
     streambuf* strmbuf = nil;
***************
*** 87,93 ****
         fbuf = new fileptr_filebuf(errflag.is_false() ? stdout : 
stderr, ios_base::out);
       strmbuf = fbuf;
     } else
!     strmbuf = new strstreambuf();
   #endif
     ostream out(strmbuf);

--- 87,93 ----
         fbuf = new fileptr_filebuf(errflag.is_false() ? stdout : 
stderr, ios_base::out);
       strmbuf = fbuf;
     } else
!     strmbuf = new std::strstreambuf();
   #endif
     ostream out(strmbuf);

***************
*** 177,187 ****

     if (stringflag.is_true() || strflag.is_true()) {
       out << '\0';
!     ComValue retval(((strstreambuf*)strmbuf)->str());
       push_stack(retval);
     } else if (symbolflag.is_true() || symflag.is_true()) {
       out << '\0';
!     int symbol_id = symbol_add(((strstreambuf*)strmbuf)->str());
       ComValue retval(symbol_id, ComValue::SymbolType);
       push_stack(retval);
     }
--- 177,187 ----

     if (stringflag.is_true() || strflag.is_true()) {
       out << '\0';
!     ComValue retval(((std::strstreambuf*)strmbuf)->str());
       push_stack(retval);
     } else if (symbolflag.is_true() || symflag.is_true()) {
       out << '\0';
!     int symbol_id = symbol_add(((std::strstreambuf*)strmbuf)->str());
       ComValue retval(symbol_id, ComValue::SymbolType);
       push_stack(retval);
     }
Index: ComUnidraw/comeditor.c
diff -c ComUnidraw/comeditor.c:1.1 ComUnidraw/comeditor.c:1.2
*** ComUnidraw/comeditor.c:1.1	Wed Oct 29 13:37:58 2003
--- src/ComUnidraw/comeditor.c	Mon Dec  8 10:57:52 2003
***************
*** 58,64 ****

   #include <Attribute/attrlist.h>

! #include <strstream.h>
   #include <string.h>

 
/*****************************************************************************/
--- 58,64 ----

   #include <Attribute/attrlist.h>

! #include <strstream>
   #include <string.h>

 
/*****************************************************************************/
***************
*** 231,237 ****
     if(!whiteboard())
       OverlayEditor::ExecuteCmd(cmd);
     else {
!     ostrstream sbuf;
       boolean oldflag = OverlayScript::ptlist_parens();
       OverlayScript::ptlist_parens(false);
       switch (cmd->GetClassId()) {
--- 231,237 ----
     if(!whiteboard())
       OverlayEditor::ExecuteCmd(cmd);
     else {
!     std::ostrstream sbuf;
       boolean oldflag = OverlayScript::ptlist_parens();
       OverlayScript::ptlist_parens(false);
       switch (cmd->GetClassId()) {
Index: ComUnidraw/unifunc.c
diff -c ComUnidraw/unifunc.c:1.1 ComUnidraw/unifunc.c:1.2
*** ComUnidraw/unifunc.c:1.1	Wed Oct 29 13:38:01 2003
--- src/ComUnidraw/unifunc.c	Mon Dec  8 10:57:52 2003
***************
*** 56,62 ****
   #include <ComTerp/comvalue.h>
   #include <Attribute/attrlist.h>
   #include <stdio.h>
! #include <strstream.h>
   #include <unistd.h>
   #if __GNUC__>=3
   #include <fstream.h>
--- 56,62 ----
   #include <ComTerp/comvalue.h>
   #include <Attribute/attrlist.h>
   #include <stdio.h>
! #include <strstream>
   #include <unistd.h>
   #if __GNUC__>=3
   #include <fstream.h>
***************
*** 494,500 ****
   #endif
       ostream* out;
       if (string.is_true()||str.is_true())
!       out = new strstream();
       else
   #if __GNUC__<3
         out = new ostream(&fbuf);
--- 494,500 ----
   #endif
       ostream* out;
       if (string.is_true()||str.is_true())
!       out = new std::strstream();
       else
   #if __GNUC__<3
         out = new ostream(&fbuf);
***************
*** 557,563 ****

       if (string.is_true()||str.is_true()) {
         *out << '\0'; out->flush();
!       ComValue retval(((strstream*)out)->str());
         push_stack(retval);
       }
       delete out;
--- 557,563 ----

       if (string.is_true()||str.is_true()) {
         *out << '\0'; out->flush();
!       ComValue retval(((std::strstream*)out)->str());
         push_stack(retval);
       }
       delete out;
***************
*** 652,665 ****
   	tv->insert_string((char*)msgstrv.string_ptr(), 
strlen(msgstrv.string_ptr()));
   	tv->insert_char('\n');
         }
!       ostrstream sbuf_s;
         sbuf_s << "pause(" << comterpserv()->npause() << "): enter 
command or press C/R to continue\n";
         sbuf_s.put('\0');
         tv->insert_string(sbuf_s.str(), strlen(sbuf_s.str()));
         comterpserv()->push_servstate();
         unidraw->Run();
         comterpserv()->pop_servstate();
!       ostrstream sbuf_e;
         sbuf_e << "end of pause(" << comterpserv()->npause()+1 << ")\n";
         sbuf_e.put('\0');
         tv->insert_string(sbuf_e.str(), strlen(sbuf_e.str()));
--- 652,665 ----
   	tv->insert_string((char*)msgstrv.string_ptr(), 
strlen(msgstrv.string_ptr()));
   	tv->insert_char('\n');
         }
!       std::ostrstream sbuf_s;
         sbuf_s << "pause(" << comterpserv()->npause() << "): enter 
command or press C/R to continue\n";
         sbuf_s.put('\0');
         tv->insert_string(sbuf_s.str(), strlen(sbuf_s.str()));
         comterpserv()->push_servstate();
         unidraw->Run();
         comterpserv()->pop_servstate();
!       std::ostrstream sbuf_e;
         sbuf_e << "end of pause(" << comterpserv()->npause()+1 << ")\n";
         sbuf_e.put('\0');
         tv->insert_string(sbuf_e.str(), strlen(sbuf_e.str()));
Index: GraphUnidraw/nodecomp.c
diff -c GraphUnidraw/nodecomp.c:1.1 GraphUnidraw/nodecomp.c:1.2
*** GraphUnidraw/nodecomp.c:1.1	Wed Oct 29 13:38:53 2003
--- src/GraphUnidraw/nodecomp.c	Mon Dec  8 10:57:55 2003
***************
*** 78,84 ****
   #include <iostream.h>
   #include <stdio.h>
   #include <string.h>
! #include <strstream.h>

   FullGraphic* NodeView::_nv_gs = nil;

--- 78,84 ----
   #include <iostream.h>
   #include <stdio.h>
   #include <string.h>
! #include <strstream>

   FullGraphic* NodeView::_nv_gs = nil;

***************
*** 602,608 ****
   	GetComTerp();
         boolean old_brief = comterp->brief();
         comterp->brief(true);
!       ostrstream outstr;
         NodeComp* node;
         int incnt = 1;
         while (node = NodeIn(incnt)) {
--- 602,608 ----
   	GetComTerp();
         boolean old_brief = comterp->brief();
         comterp->brief(true);
!       std::ostrstream outstr;
         NodeComp* node;
         int incnt = 1;
         while (node = NodeIn(incnt)) {
Index: OverlayUnidraw/ovimport.c
diff -c OverlayUnidraw/ovimport.c:1.1 OverlayUnidraw/ovimport.c:1.2
*** OverlayUnidraw/ovimport.c:1.1	Wed Oct 29 13:37:33 2003
--- src/OverlayUnidraw/ovimport.c	Mon Dec  8 10:57:47 2003
***************
*** 100,106 ****
   #include <ctype.h>
   #include <fstream.h>
   #include <string.h>
! #include <strstream.h>
   #include <fcntl.h>
   #include <errno.h>
   #include <phold.h>
--- 100,106 ----
   #include <ctype.h>
   #include <fstream.h>
   #include <string.h>
! #include <strstream>
   #include <fcntl.h>
   #include <errno.h>
   #include <phold.h>
***************
*** 246,252 ****
   class ReadPpmIterator {
   public:
     ReadPpmIterator(OverlayRaster*);
!   void getPixels(strstream&);
     OverlayRaster* raster() const;
     u_long xcur() { return _xcur; }
     u_long ycur() { return _ycur; }
--- 246,252 ----
   class ReadPpmIterator {
   public:
     ReadPpmIterator(OverlayRaster*);
!   void getPixels(std::strstream&);
     OverlayRaster* raster() const;
     u_long xcur() { return _xcur; }
     u_long ycur() { return _ycur; }
***************
*** 282,288 ****
   {
   }

! void ReadPpmIterator::getPixels(strstream& in) {
     // cerr << "pcount: " << in.pcount() << "\ttellg: " << in.tellg() << endl;
     while((in.pcount() - in.tellg()) >= 3 && in.good() && !in.eof()) {
       u_char r, g, b;
--- 282,288 ----
   {
   }

! void ReadPpmIterator::getPixels(std::strstream& in) {
     // cerr << "pcount: " << in.pcount() << "\ttellg: " << in.tellg() << endl;
     while((in.pcount() - in.tellg()) >= 3 && in.good() && !in.eof()) {
       u_char r, g, b;
***************
*** 357,363 ****

     ReadPpmIterator* _itr;

!   ostrstream _save;
   };

   HandlerList ReadImageHandler::_handlers;
--- 357,363 ----

     ReadPpmIterator* _itr;

!   std::ostrstream _save;
   };

   HandlerList ReadImageHandler::_handlers;
***************
*** 442,448 ****


   int ReadImageHandler::process(const char* newdat, int len) {
!   strstream in;
     in.write(_save.str(), _save.tellp());
     _save.freeze(0);
     in.write(newdat, len);
--- 442,448 ----


   int ReadImageHandler::process(const char* newdat, int len) {
!   std::strstream in;
     in.write(_save.str(), _save.tellp());
     _save.freeze(0);
     in.write(newdat, len);
***************
*** 452,458 ****
         "^[ \f\n\r\t\v]*[0-9]+[ \f\n\r\t\v]+[0-9]+[ \f\n\r\t\v]+[0-9]+"
       );

!     ostrstream tmp;  // need to placate Regexp :-(
       tmp.write(in.str(), in.pcount());
       in.freeze(0);
       int pos = endOfHeader.Search(
--- 452,458 ----
         "^[ \f\n\r\t\v]*[0-9]+[ \f\n\r\t\v]+[0-9]+[ \f\n\r\t\v]+[0-9]+"
       );

!     std::ostrstream tmp;  // need to placate Regexp :-(
       tmp.write(in.str(), in.pcount());
       in.freeze(0);
       int pos = endOfHeader.Search(
Index: OverlayUnidraw/ovipcmds.c
diff -c OverlayUnidraw/ovipcmds.c:1.1 OverlayUnidraw/ovipcmds.c:1.2
*** OverlayUnidraw/ovipcmds.c:1.1	Wed Oct 29 13:37:34 2003
--- src/OverlayUnidraw/ovipcmds.c	Mon Dec  8 10:57:47 2003
***************
*** 76,82 ****
   #include <stdlib.h>
   #include <string.h>
   #include <iostream.h>
! #include <strstream.h>


   RasterTerp::RasterTerp(Editor* ed) : _editor(ed) {
--- 76,82 ----
   #include <stdlib.h>
   #include <string.h>
   #include <iostream.h>
! #include <strstream>


   RasterTerp::RasterTerp(Editor* ed) : _editor(ed) {
***************
*** 639,645 ****
          "Enter min and max for linear scaling of gray values",
          "0.0 1.0");
       if (newminmax) {
!       istrstream in(newminmax);
         float fmin, fmax;
         in >> fmin >> fmax;
         if (in.good()) {
--- 639,645 ----
          "Enter min and max for linear scaling of gray values",
          "0.0 1.0");
       if (newminmax) {
!       std::istrstream in(newminmax);
         float fmin, fmax;
         in >> fmin >> fmax;
         if (in.good()) {
***************
*** 731,737 ****
       char* newminmax = StrEditDialog::post
         (GetEditor()->GetWindow(), message, range);
       if (newminmax) {
!       istrstream in(newminmax);
         float fmin, fmax;
         in >> fmin >> fmax;
         if (in.good()) {
--- 731,737 ----
       char* newminmax = StrEditDialog::post
         (GetEditor()->GetWindow(), message, range);
       if (newminmax) {
!       std::istrstream in(newminmax);
         float fmin, fmax;
         in >> fmin >> fmax;
         if (in.good()) {
***************
*** 815,821 ****
          "Enter min and max for logarithmic scaling of gray values",
          "0.0 1.0");
       if (newminmax) {
!       istrstream in(newminmax);
         float fmin, fmax;
         in >> fmin >> fmax;
         if (in.good()) {
--- 815,821 ----
          "Enter min and max for logarithmic scaling of gray values",
          "0.0 1.0");
       if (newminmax) {
!       std::istrstream in(newminmax);
         float fmin, fmax;
         in >> fmin >> fmax;
         if (in.good()) {
Index: OverlayUnidraw/ovprecise.c
diff -c OverlayUnidraw/ovprecise.c:1.1 OverlayUnidraw/ovprecise.c:1.2
*** OverlayUnidraw/ovprecise.c:1.1	Wed Oct 29 13:37:35 2003
--- src/OverlayUnidraw/ovprecise.c	Mon Dec  8 10:57:47 2003
***************
*** 39,45 ****
   #include <InterViews/window.h>
   #include <stdio.h>
   #include <string.h>
! #include <strstream.h>

 
/*****************************************************************************/

--- 39,45 ----
   #include <InterViews/window.h>
   #include <stdio.h>
   #include <string.h>
! #include <strstream>

 
/*****************************************************************************/

***************
*** 90,96 ****
       _default_enumval = cur_unit;

       if (movestr) {
!       istrstream in(movestr);
         float xmove = 0, ymove = 0;
         in >> xmove >> ymove;

--- 90,96 ----
       _default_enumval = cur_unit;

       if (movestr) {
!       std::istrstream in(movestr);
         float xmove = 0, ymove = 0;
         in >> xmove >> ymove;

***************
*** 135,141 ****
   			  "Enter X and Y scaling:",
   			  default_scalestr);
       if (scalestr) {
!       istrstream in(scalestr);
         float xscale = 0.0, yscale = 0.0;
         in >> xscale >> yscale;
         if (xscale !=0.0 && yscale != 0.0) {
--- 135,141 ----
   			  "Enter X and Y scaling:",
   			  default_scalestr);
       if (scalestr) {
!       std::istrstream in(scalestr);
         float xscale = 0.0, yscale = 0.0;
         in >> xscale >> yscale;
         if (xscale !=0.0 && yscale != 0.0) {
***************
*** 173,179 ****
   			  "Enter rotation in degrees:",
   			  default_rotatestr);
       if (rotatestr) {
!       istrstream in(rotatestr);
         float angle = 0.0;
         in >> angle;
         if (angle!=0.0) {
--- 173,179 ----
   			  "Enter rotation in degrees:",
   			  default_rotatestr);
       if (rotatestr) {
!       std::istrstream in(rotatestr);
         float angle = 0.0;
         in >> angle;
         if (angle!=0.0) {
***************
*** 218,224 ****
   			  "Enter width and height of page:",
   			  default_pagestr);
       if (pagestr) {
!       istrstream in(pagestr);
         int xpage = 0, ypage = 0;
         in >> xpage >> ypage;
         if (xpage !=0 && ypage != 0) {
--- 218,224 ----
   			  "Enter width and height of page:",
   			  default_pagestr);
       if (pagestr) {
!       std::istrstream in(pagestr);
         int xpage = 0, ypage = 0;
         in >> xpage >> ypage;
         if (xpage !=0 && ypage != 0) {
***************
*** 256,262 ****
   			  "Enter brush width in pixels:",
   			  default_widthstr);
       if (widthstr) {
!       istrstream in(widthstr);
         float width = 0;
         in >> width;
         if (width>=0.0) {
--- 256,262 ----
   			  "Enter brush width in pixels:",
   			  default_widthstr);
       if (widthstr) {
!       std::istrstream in(widthstr);
         float width = 0;
         in >> width;
         if (width>=0.0) {
Index: src_x11/xdrag.c
diff -c src_x11/xdrag.c:1.1 src_x11/xdrag.c:1.2
*** src_x11/xdrag.c:1.1	Wed Oct 29 13:27:20 2003
--- src/IV-X11/xdrag.c	Mon Dec  8 10:57:16 2003
***************
*** 41,47 ****
   #include <OS/math.h>
   #include <OS/types.h>
   #include <string.h>
! #include <strstream.h>

   // how is this done portably? it is used to generate a name unique to
   // this process.
--- 41,47 ----
   #include <OS/math.h>
   #include <OS/types.h>
   #include <string.h>
! #include <strstream>

   // how is this done portably? it is used to generate a name unique to
   // this process.
***************
*** 129,135 ****
       Atom property = None;
       if (length != 0) {
   	char buffer[256];
! 	ostrstream name(buffer, 256);
   	name << dragName << "_" << Host::name() << "_" << getpid() << "_"  <<
   	    dropUid++ << '\0';
   	property = XInternAtom(display, name.str(), False);
--- 129,135 ----
       Atom property = None;
       if (length != 0) {
   	char buffer[256];
! 	std::ostrstream name(buffer, 256);
   	name << dragName << "_" << Host::name() << "_" << getpid() << "_"  <<
   	    dropUid++ << '\0';
   	property = XInternAtom(display, name.str(), False);
Index: Unidraw/catalog.c
diff -c Unidraw/catalog.c:1.1 Unidraw/catalog.c:1.2
*** Unidraw/catalog.c:1.1	Wed Oct 29 13:36:24 2003
--- src/Unidraw/catalog.c	Mon Dec  8 10:57:42 2003
***************
*** 63,69 ****
   #include <stdlib.h>
   #include <string.h>
   #include <stream.h>
! #include <strstream.h>
   #ifdef SYSV
   #include <OS/types.h>
   #include <unistd.h>
--- 63,69 ----
   #include <stdlib.h>
   #include <string.h>
   #include <stream.h>
! #include <strstream>
   #ifdef SYSV
   #include <OS/types.h>
   #include <unistd.h>
***************
*** 1660,1666 ****
   	    }

   	} else {
! 	    istrstream in(definition, strlen(definition) + 1);
               int data[patternHeight];
               int i;
   	    for (i = 0; !in.eof() && in.good() && i < patternHeight; i++) {
--- 1660,1666 ----
   	    }

   	} else {
! 	    std::istrstream in(definition, strlen(definition) + 1);
               int data[patternHeight];
               int i;
   	    for (i = 0; !in.eof() && in.good() && i < patternHeight; i++) {
*** /dev/null	 Mon Dec 8 10:58:11 PST 2003
--- patches/ivtools-031208-johnston-002
*************** patches/ivtools-031208-johnston-002
*** 0 ****
--- 1 ----
+ ivtools-031208-johnston-003


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/