From: Jürgen Vigna Date: Wed, 26 Apr 2000 08:46:05 +0000 (+0000) Subject: Andres fixes to sstrem problems X-Git-Tag: 1.6.10~22287 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9e5bd1d609877e602cb697bc695d410e2ab48e0d;p=lyx.git Andres fixes to sstrem problems git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@692 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/ChangeLog b/ChangeLog index ff85cbf8f3..7be58c8829 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2000-04-26 Juergen Vigna + + * src/insets/figinset.C: fixes to Lars sstream changes! + 2000-04-23 Dekel Tsur * A lot of files: Added Ascii(ostream &) methods to all inset diff --git a/src/insets/figinset.C b/src/insets/figinset.C index d40996c3e3..38d57f3f78 100644 --- a/src/insets/figinset.C +++ b/src/insets/figinset.C @@ -72,7 +72,9 @@ using std::vector; using std::find; using std::flush; using std::endl; +#ifdef HAVE_SSTREAM using std::ostringstream; +#endif extern BufferView * current_view; extern FL_OBJECT * figinset_canvas; @@ -540,12 +542,12 @@ void runqueue() ostringstream t2; #else char tbuf2[80]; - ostrstream t2(tbuf2, sizeof(tbuf)); + ostrstream t2(tbuf2, sizeof(tbuf2)); #endif t2 << "GHOSTVIEW=" << fl_get_canvas_id(figinset_canvas) << ' ' << p->data->bitmap; #ifndef HAVE_SSTREAM - << '\0'; + t2 << '\0'; #endif // now set up ghostview property on a window // #warning BUG seems that the only bug here @@ -559,7 +561,7 @@ void runqueue() t1 << "0 0 0 0 " << p->data->wid << ' ' << p->data->hgh << " 72 72 0 0 0 0"; #ifndef HAVE_SSTREAM - << '\0'; + t1 << '\0'; #endif if (lyxerr.debugging()) { @@ -614,16 +616,22 @@ void runqueue() XInternAtom(tempdisp, "GHOSTVIEW", false), XInternAtom(tempdisp, "STRING", false), 8, PropModeAppend, +#ifdef HAVE_SSTREAM reinterpret_cast(const_cast(t1.str().c_str())), - t1.str().size()); + t1.str().size() +#else + reinterpret_cast(const_cast(t1.str())), + strlen(t1.str()) +#endif + ); XUngrabServer(tempdisp); XFlush(tempdisp); #ifdef HAVE_SSTREAM ostringstream t3; #else - char tbuf[384]; - ostrstream t3(tbuf, sizeof(tbuf)); + char tbuf3[384]; + ostrstream t3(tbuf3, sizeof(tbuf3)); #endif switch (p->data->flags & 3) { case 0: t3 << 'H'; break; // Hidden @@ -640,7 +648,7 @@ void runqueue() t3 << ' ' << BlackPixelOfScreen(DefaultScreenOfDisplay(tempdisp)) << ' ' << background_pixel; #ifndef HAVE_SSTREAM - << '\0'; + t3 << '\0'; #endif XGrabServer(tempdisp); @@ -650,8 +658,14 @@ void runqueue() "GHOSTVIEW_COLORS", false), XInternAtom(tempdisp, "STRING", false), 8, PropModeReplace, +#ifdef HAVE_SSTREAM reinterpret_cast(const_cast(t3.str().c_str())), - t3.str().size()); + t3.str().size() +#else + reinterpret_cast(const_cast(t3.str())), + strlen(t3.str()) +#endif + ); XUngrabServer(tempdisp); XFlush(tempdisp);