Changeset 7061 for trunk


Ignore:
Timestamp:
2004-03-16T16:21:03+13:00 (20 years ago)
Author:
sjboddie
Message:

Fixed up the sstream stuff in browsetools.cpp so it compiles under VC4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/browsetools.cpp

    r4983 r7061  
    3131#include "gsdlunicode.h"
    3232
    33 #include <sstream>
     33#if defined(GSDL_USE_IOS_H)
     34#  if defined(__WIN32__)
     35#    include <strstrea.h> // vc4
     36#  else
     37#    include <strstream.h>
     38#  endif
     39#else
     40#  include <sstream>
     41#endif
    3442
    3543
     
    836844  options["DocImage"] = get_cover_image();
    837845
    838   ostringstream tmpstr(ostringstream::binary);
     846#if defined(GSDL_USE_IOS_H)
     847  ostrstream *tmpstr = new ostrstream();
     848#else
     849  ostringstream *tmpstr = new ostringstream(ostringstream::binary);
     850#endif
     851
    839852  if (args["gc"] == "1") {
    840853    expanded_contents (args, 0, false, browsers, formatinfo,
    841                collectproto, disp, outconvert, tmpstr,
     854               collectproto, disp, outconvert, *tmpstr,
    842855               logout);
    843856  } else {
    844857    contracted_contents (args, 0, false, browsers, formatinfo,
    845              collectproto, disp, outconvert, tmpstr, logout);
    846   }
    847   text_t tmp = (char *)(tmpstr.str().c_str());
     858             collectproto, disp, outconvert, *tmpstr, logout);
     859  }
     860#if defined(GSDL_USE_IOS_H)
     861  char *t = tmpstr->str();
     862  text_t tmp;
     863  tmp.setcarr(t, tmpstr->pcount());
     864  delete [] t;
     865#else
     866  text_t tmp = (char *)(tmpstr->str().c_str());
     867#endif
    848868  int len = tmp.size();
    849869  char *ctmp = tmp.getcstr();
     
    854874  options["DocTOC"] = tmp;
    855875  delete ctmp;
     876  delete tmpstr;
    856877
    857878  options["DocumentButtonDetach"] = "_document:imagedetach_";
Note: See TracChangeset for help on using the changeset viewer.