From 7c15014ec2884e50a17559c1269747658c924eb3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Sat, 24 Jul 2004 10:55:30 +0000 Subject: [PATCH] change "support/std_sstream.h" to git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8849 a592a061-630c-0410-9148-cb99ea01b6c8 --- config/ChangeLog | 4 + config/common.am | 2 +- src/ChangeLog | 9 + src/LaTeXFeatures.C | 4 +- src/ParagraphParameters.C | 3 +- src/Spacing.C | 4 +- src/buffer.C | 7 +- src/bufferparams.C | 4 +- src/bufferview_funcs.C | 3 +- src/counters.C | 3 +- src/cursor.C | 3 +- src/factory.C | 3 +- src/frontends/controllers/ChangeLog | 6 + src/frontends/controllers/ControlAboutlyx.C | 2 +- src/frontends/controllers/ControlDocument.C | 2 +- src/frontends/controllers/ControlLog.C | 3 +- src/frontends/controllers/ControlParagraph.C | 2 +- src/frontends/controllers/ControlPrefs.C | 2 +- src/frontends/controllers/biblio.C | 2 +- src/frontends/gnome/ChangeLog | 5 + src/frontends/gnome/GAbout.C | 3 +- src/frontends/gnome/lyx_gui.C | 5 +- src/frontends/gtk/ChangeLog | 4 + src/frontends/gtk/lyx_gui.C | 8 +- src/frontends/qt2/ChangeLog | 7 +- src/frontends/qt2/QAbout.C | 3 +- src/frontends/qt2/QLog.C | 2 +- src/frontends/qt2/QMathMatrixDialog.C | 2 +- src/frontends/qt2/QPrefs.C | 2 +- src/frontends/xforms/ChangeLog | 8 +- src/frontends/xforms/Color.C | 3 +- src/frontends/xforms/FormAboutlyx.C | 3 +- src/frontends/xforms/FormLog.C | 4 +- src/frontends/xforms/FormMathsDelim.C | 2 +- src/frontends/xforms/FormMathsMatrix.C | 2 +- src/frontends/xforms/lyx_gui.C | 5 +- src/funcrequest.C | 3 +- src/graphics/ChangeLog | 5 + src/graphics/GraphicsConverter.C | 2 +- src/graphics/GraphicsParams.C | 2 +- src/graphics/PreviewLoader.C | 2 +- src/insets/ChangeLog | 8 + src/insets/ExternalTransforms.C | 3 +- src/insets/insetbox.C | 3 +- src/insets/insetbranch.C | 2 +- src/insets/insetcaption.C | 2 +- src/insets/insetcharstyle.C | 3 +- src/insets/insetcommand.C | 2 +- src/insets/insetert.C | 2 +- src/insets/insetexternal.C | 2 +- src/insets/insetfloat.C | 3 +- src/insets/insetgraphics.C | 4 +- src/insets/insetinclude.C | 3 +- src/insets/insetnote.C | 2 +- src/insets/insettabular.C | 3 +- src/insets/insetvspace.C | 2 +- src/insets/insetwrap.C | 2 +- src/kbmap.C | 13 +- src/lyxfind.C | 2 +- src/lyxfont.C | 3 +- src/lyxfunc.C | 5 +- src/lyxgluelength.C | 2 +- src/lyxlength.C | 2 +- src/mathed/ChangeLog | 8 + src/mathed/command_inset.C | 2 +- src/mathed/formulamacro.C | 3 +- src/mathed/math_arrayinset.C | 2 +- src/mathed/math_autocorrect.C | 2 +- src/mathed/math_extern.C | 2 +- src/mathed/math_factory.C | 2 +- src/mathed/math_gridinset.C | 4 +- src/mathed/math_hullinset.C | 4 +- src/mathed/math_macrotable.C | 4 +- src/mathed/math_nestinset.C | 3 +- src/mathed/math_parser.C | 6 +- src/mathed/math_support.C | 3 +- src/paragraph.C | 2 +- src/paragraph_funcs.C | 2 +- src/support/ChangeLog | 14 +- src/support/Makefile.am | 2 - src/support/filetools.C | 8 +- src/support/globbing.C | 5 +- src/support/lstrings.C | 3 +- src/support/sstream.h | 235 ------------------- src/support/std_sstream.h | 22 -- src/support/tostr.C | 2 +- src/tabular.C | 2 +- src/text.C | 3 +- src/text2.C | 3 +- src/text3.C | 2 +- 90 files changed, 203 insertions(+), 370 deletions(-) delete mode 100644 src/support/sstream.h delete mode 100644 src/support/std_sstream.h diff --git a/config/ChangeLog b/config/ChangeLog index 9e5fa2e28f..b386debc1c 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2004-07-24 Lars Gullik Bjonnes + + * common.am (AM_ETAGSFLAGS): setup variable + 2004-05-28 Lars Gullik Bjonnes * depcomp.diff: remove file diff --git a/config/common.am b/config/common.am index 476213313a..e8fceee999 100644 --- a/config/common.am +++ b/config/common.am @@ -6,7 +6,7 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefile.in AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D -ETAGS_ARGS = --lang=c++ +AM_ETAGSFLAGS = --lang=c++ if USE_INCLUDED_BOOST BOOST_INCLUDES = -I$(top_srcdir)/boost diff --git a/src/ChangeLog b/src/ChangeLog index 56fa5d201a..8153039eff 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2004-07-24 Lars Gullik Bjonnes + + * text3.C, text2.C, text.C, tabular.C, paragraph_funcs.C, paragraph.C: + * lyxlength.C, lyxgluelength.C, lyxfunc.C, lyxfont.C, lyxfind.C: + * kbmap.C, funcrequest.C, factory.C, cursor.C, counters.C: + * bufferview_funcs.C, bufferparams.C, buffer.C, Spacing.C: + * ParagraphParameters.C, LaTeXFeatures.C: replace + "support/std_sstream.h" with + 2004-07-23 Lars Gullik Bjonnes * lyxserver.C (startPipe): use this (pointer) not *this (reference) diff --git a/src/LaTeXFeatures.C b/src/LaTeXFeatures.C index 406d50e493..1741883794 100644 --- a/src/LaTeXFeatures.C +++ b/src/LaTeXFeatures.C @@ -27,7 +27,7 @@ #include "support/filetools.h" -#include "support/std_sstream.h" +#include using lyx::support::IsSGMLFilename; using lyx::support::MakeRelPath; @@ -307,7 +307,7 @@ string const LaTeXFeatures::getPackages() const } packages << "]{natbib}\n"; } - + // jurabib -- we need version 0.6 at least. if (isRequired("jurabib")) { packages << "\\RequirePackage{jurabib}[2004/01/25]\n"; diff --git a/src/ParagraphParameters.C b/src/ParagraphParameters.C index 7f4ecfcdb9..2d0ee33f20 100644 --- a/src/ParagraphParameters.C +++ b/src/ParagraphParameters.C @@ -28,7 +28,8 @@ #include "frontends/LyXView.h" #include "support/lstrings.h" -#include "support/std_sstream.h" + +#include using lyx::support::rtrim; diff --git a/src/Spacing.C b/src/Spacing.C index 7769790521..ddb9ddbba1 100644 --- a/src/Spacing.C +++ b/src/Spacing.C @@ -10,11 +10,11 @@ */ #include -#include #include "Spacing.h" -#include "support/std_sstream.h" +#include +#include using std::ios; using std::istringstream; diff --git a/src/buffer.C b/src/buffer.C index d2f07cf19e..d6665c8352 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -71,14 +71,15 @@ #include "support/path.h" #include "support/textutils.h" #include "support/tostr.h" -#include "support/std_sstream.h" #include +#include + #include #include +#include -#include using lyx::pos_type; using lyx::par_type; @@ -1078,7 +1079,7 @@ void Buffer::makeDocBookFile(string const & fname, << "\"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd\""; else ofs << " PUBLIC \"-//OASIS//DTD DocBook V4.2//EN\""; - + string preamble = params().preamble; string const name = runparams.nice ? ChangeExtension(pimpl_->filename, ".sgml") : fname; diff --git a/src/bufferparams.C b/src/bufferparams.C index da924693fe..448edc75dc 100644 --- a/src/bufferparams.C +++ b/src/bufferparams.C @@ -41,7 +41,7 @@ #include -#include "support/std_sstream.h" +#include namespace support = lyx::support; using lyx::support::bformat; @@ -328,7 +328,7 @@ string const BufferParams::readToken(LyXLex & lex, string const & token) cite_engine = biblio::ENGINE_NATBIB_AUTHORYEAR; else if (engine == "jurabib") cite_engine = biblio::ENGINE_JURABIB; - + } else if (token == "\\use_bibtopic") { lex.nextToken(); use_bibtopic = lex.getInteger(); diff --git a/src/bufferview_funcs.C b/src/bufferview_funcs.C index 0bcc2e892d..5428d11ed1 100644 --- a/src/bufferview_funcs.C +++ b/src/bufferview_funcs.C @@ -35,7 +35,8 @@ #include "insets/insettext.h" #include "support/tostr.h" -#include "support/std_sstream.h" + +#include using lyx::support::bformat; diff --git a/src/counters.C b/src/counters.C index 087a0bd2c4..657c28e225 100644 --- a/src/counters.C +++ b/src/counters.C @@ -16,11 +16,12 @@ #include "debug.h" #include "support/lstrings.h" -#include "support/std_sstream.h" #include "support/tostr.h" #include +#include + using std::endl; using std::ostringstream; using std::string; diff --git a/src/cursor.C b/src/cursor.C index 903593c551..82a0a58b31 100644 --- a/src/cursor.C +++ b/src/cursor.C @@ -40,12 +40,13 @@ #include "mathed/math_macrotable.h" #include "support/limited_stack.h" -#include "support/std_sstream.h" #include "frontends/LyXView.h" #include +#include + using lyx::par_type; using std::string; diff --git a/src/factory.C b/src/factory.C index 8d3b9b6ac1..66ae5f30e5 100644 --- a/src/factory.C +++ b/src/factory.C @@ -60,10 +60,11 @@ #include "frontends/LyXView.h" #include "support/lstrings.h" -#include "support/std_sstream.h" #include +#include + using lyx::support::compare_ascii_no_case; using std::auto_ptr; diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 5b148a6f00..c8e09e94ae 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,9 @@ +2004-07-24 Lars Gullik Bjonnes + + * biblio.C, ControlPrefs.C, ControlParagraph.C: + * ControlLog.C, ControlDocument.C, ControlAboutlyx.C: replace + "support/std_sstream.h" with + 2004-05-19 Angus Leeming * *.[Ch]: wrap all code up inside namespace lyx::frontend. diff --git a/src/frontends/controllers/ControlAboutlyx.C b/src/frontends/controllers/ControlAboutlyx.C index 5541173009..6591b6f748 100644 --- a/src/frontends/controllers/ControlAboutlyx.C +++ b/src/frontends/controllers/ControlAboutlyx.C @@ -14,12 +14,12 @@ #include "ControlAboutlyx.h" #include "gettext.h" #include "version.h" -#include "support/std_sstream.h" #include "support/filetools.h" // FileSearch #include "support/path_defines.h" #include +#include using std::ostream; using std::ostringstream; diff --git a/src/frontends/controllers/ControlDocument.C b/src/frontends/controllers/ControlDocument.C index f614db1e33..689c395a55 100644 --- a/src/frontends/controllers/ControlDocument.C +++ b/src/frontends/controllers/ControlDocument.C @@ -21,7 +21,7 @@ #include "LColor.h" #include "lyxtextclasslist.h" -#include "support/std_sstream.h" +#include using std::ostringstream; using std::string; diff --git a/src/frontends/controllers/ControlLog.C b/src/frontends/controllers/ControlLog.C index dad828aaba..4f849af0b8 100644 --- a/src/frontends/controllers/ControlLog.C +++ b/src/frontends/controllers/ControlLog.C @@ -16,8 +16,7 @@ #include "gettext.h" #include "lyxlex.h" -#include "support/std_sstream.h" - +#include #include using std::istringstream; diff --git a/src/frontends/controllers/ControlParagraph.C b/src/frontends/controllers/ControlParagraph.C index 4d597ddcc4..88e2f7a3bb 100644 --- a/src/frontends/controllers/ControlParagraph.C +++ b/src/frontends/controllers/ControlParagraph.C @@ -17,8 +17,8 @@ #include "lyxlex.h" #include "paragraph.h" #include "ParagraphParameters.h" -#include "support/std_sstream.h" +#include using std::istringstream; using std::ostringstream; diff --git a/src/frontends/controllers/ControlPrefs.C b/src/frontends/controllers/ControlPrefs.C index 7da7e88683..8236af8c56 100644 --- a/src/frontends/controllers/ControlPrefs.C +++ b/src/frontends/controllers/ControlPrefs.C @@ -24,7 +24,7 @@ #include "support/globbing.h" #include "support/path_defines.h" -#include "support/std_sstream.h" +#include using std::ostringstream; using std::pair; diff --git a/src/frontends/controllers/biblio.C b/src/frontends/controllers/biblio.C index b7776a5452..8522f1fc66 100644 --- a/src/frontends/controllers/biblio.C +++ b/src/frontends/controllers/biblio.C @@ -18,11 +18,11 @@ #include "gettext.h" #include "support/lstrings.h" -#include "support/std_sstream.h" #include #include +#include using std::string; using std::ostringstream; diff --git a/src/frontends/gnome/ChangeLog b/src/frontends/gnome/ChangeLog index 05f7798f8d..e7e0e7c34b 100644 --- a/src/frontends/gnome/ChangeLog +++ b/src/frontends/gnome/ChangeLog @@ -1,3 +1,8 @@ +2004-07-24 Lars Gullik Bjonnes + + * lyx_gui.C: + * GAbout.C: change "support/std_sstream.h" to + 2004-05-28 Lars Gullik Bjonnes * Makefile.am (libgnome_la_SOURCES): add support.c and support.h diff --git a/src/frontends/gnome/GAbout.C b/src/frontends/gnome/GAbout.C index d91d751942..f390388a53 100644 --- a/src/frontends/gnome/GAbout.C +++ b/src/frontends/gnome/GAbout.C @@ -12,7 +12,6 @@ #include #include "support/lstrings.h" -#include "support/std_sstream.h" #include "gnome_helpers.h" #include "gnomeBC.h" @@ -21,6 +20,8 @@ #include #include +#include + using std::istringstream; diff --git a/src/frontends/gnome/lyx_gui.C b/src/frontends/gnome/lyx_gui.C index 141731ef59..13e4607d86 100644 --- a/src/frontends/gnome/lyx_gui.C +++ b/src/frontends/gnome/lyx_gui.C @@ -38,10 +38,11 @@ #include "xfont_loader.h" #include "xformsImage.h" -#include "support/std_sstream.h" +#include + +#include #include #include -#include #include "gnome_helpers.h" #include diff --git a/src/frontends/gtk/ChangeLog b/src/frontends/gtk/ChangeLog index 50a6880344..7476275ba7 100644 --- a/src/frontends/gtk/ChangeLog +++ b/src/frontends/gtk/ChangeLog @@ -1,3 +1,7 @@ +2004-07-24 Lars Gullik Bjonnes + + * lyx_gui.C: change "support/std_sstream.h" to + 2004-07-22 Lars Gullik Bjonnes * lyx_gui.C (register_socket_callback,unregister_socket_callback): diff --git a/src/frontends/gtk/lyx_gui.C b/src/frontends/gtk/lyx_gui.C index 6c4f31cf9d..9fbf7a1b6e 100644 --- a/src/frontends/gtk/lyx_gui.C +++ b/src/frontends/gtk/lyx_gui.C @@ -47,13 +47,15 @@ #include "xftFontLoader.h" #include "GWorkArea.h" -#include "support/std_sstream.h" -#include -#include #include #include #include +#include + +#include +#include + //just for xforms #include "lyx_forms.h" #include "xformsImage.h" diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 90064bf3dd..2e7b4aee92 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,6 +1,11 @@ +2004-07-24 Lars Gullik Bjonnes + + * QPrefs.C, QMathMatrixDialog.C: + * QLog.C, QAbout.C: change "support/std_sstream.h" to + 2004-07-22 Lars Gullik Bjonnes - * lyx_gui.C (set_read_callback,remove_read_callback): delete funcs + * lyx_gui.C (set_read_callback,remove_read_callback): delete funcs * Makefile.dialogs (MOCFILES): remove io_callback.[Ch] * io_callback.[Ch]: delete files diff --git a/src/frontends/qt2/QAbout.C b/src/frontends/qt2/QAbout.C index bfe0e5bf5e..fe9c83febd 100644 --- a/src/frontends/qt2/QAbout.C +++ b/src/frontends/qt2/QAbout.C @@ -19,7 +19,8 @@ #include "controllers/ControlAboutlyx.h" #include "support/lstrings.h" -#include "support/std_sstream.h" + +#include #include #include diff --git a/src/frontends/qt2/QLog.C b/src/frontends/qt2/QLog.C index 7e9e3086af..4bc69419a2 100644 --- a/src/frontends/qt2/QLog.C +++ b/src/frontends/qt2/QLog.C @@ -16,7 +16,7 @@ #include "controllers/ControlLog.h" -#include "support/std_sstream.h" +#include #include #include diff --git a/src/frontends/qt2/QMathMatrixDialog.C b/src/frontends/qt2/QMathMatrixDialog.C index f9815edddb..26a5529c6e 100644 --- a/src/frontends/qt2/QMathMatrixDialog.C +++ b/src/frontends/qt2/QMathMatrixDialog.C @@ -18,7 +18,7 @@ #include "controllers/ControlMath.h" -#include "support/std_sstream.h" +#include #include #include diff --git a/src/frontends/qt2/QPrefs.C b/src/frontends/qt2/QPrefs.C index 3e345c7134..47fbdd6e8d 100644 --- a/src/frontends/qt2/QPrefs.C +++ b/src/frontends/qt2/QPrefs.C @@ -37,7 +37,6 @@ #include "support/lstrings.h" #include "support/tostr.h" -#include "support/std_sstream.h" #include "controllers/ControlPrefs.h" #include "controllers/frnt_lang.h" @@ -56,6 +55,7 @@ #include #include +#include using lyx::support::compare_no_case; using lyx::support::strToDbl; diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 2d68b73f02..0dfb2137a4 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,7 +1,13 @@ +2004-07-24 Lars Gullik Bjonnes + + * lyx_gui.C, FormMathsMatrix.C, FormLog.C: + * FormAboutlyx.C, Color.C: change "support/std_sstream.h" to + + 2004-07-22 Lars Gullik Bjonnes * lyx_gui.C (C_read_callback, set_read_callback, - remove_read_callback): delete funcs + remove_read_callback): delete funcs 2004-07-21 Lars Gullik Bjonnes diff --git a/src/frontends/xforms/Color.C b/src/frontends/xforms/Color.C index 7c683b9b36..c39283214a 100644 --- a/src/frontends/xforms/Color.C +++ b/src/frontends/xforms/Color.C @@ -16,9 +16,8 @@ #include "LColor.h" -#include "support/std_sstream.h" - #include +#include #include #ifndef CXX_GLOBAL_CSTD diff --git a/src/frontends/xforms/FormAboutlyx.C b/src/frontends/xforms/FormAboutlyx.C index 66858aefe2..467da4bb1c 100644 --- a/src/frontends/xforms/FormAboutlyx.C +++ b/src/frontends/xforms/FormAboutlyx.C @@ -18,11 +18,12 @@ #include "ControlAboutlyx.h" #include "forms/form_aboutlyx.h" #include "xforms_helpers.h" -#include "support/std_sstream.h" #include "version.h" #include "lyx_forms.h" +#include + using std::ostringstream; namespace lyx { diff --git a/src/frontends/xforms/FormLog.C b/src/frontends/xforms/FormLog.C index be6d6625eb..685d6aca7a 100644 --- a/src/frontends/xforms/FormLog.C +++ b/src/frontends/xforms/FormLog.C @@ -14,10 +14,10 @@ #include "ControlLog.h" #include "forms/form_browser.h" -#include "support/std_sstream.h" - #include "lyx_forms.h" +#include + namespace lyx { namespace frontend { diff --git a/src/frontends/xforms/FormMathsDelim.C b/src/frontends/xforms/FormMathsDelim.C index 2bcc42f06f..26a5beb559 100644 --- a/src/frontends/xforms/FormMathsDelim.C +++ b/src/frontends/xforms/FormMathsDelim.C @@ -22,7 +22,7 @@ #include "controllers/ButtonController.h" -#include "support/std_sstream.h" +#include using std::ostringstream; diff --git a/src/frontends/xforms/FormMathsMatrix.C b/src/frontends/xforms/FormMathsMatrix.C index 7076fc3054..6e02d40147 100644 --- a/src/frontends/xforms/FormMathsMatrix.C +++ b/src/frontends/xforms/FormMathsMatrix.C @@ -25,7 +25,7 @@ #include "lyx_forms.h" -#include "support/std_sstream.h" +#include using std::ostringstream; diff --git a/src/frontends/xforms/lyx_gui.C b/src/frontends/xforms/lyx_gui.C index d4579ab048..14ff26790e 100644 --- a/src/frontends/xforms/lyx_gui.C +++ b/src/frontends/xforms/lyx_gui.C @@ -42,10 +42,11 @@ #include -#include "support/std_sstream.h" -#include #include +#include +#include + using lyx::support::AddName; using lyx::support::user_lyxdir; diff --git a/src/funcrequest.C b/src/funcrequest.C index 9e36053e06..382ac4fa4a 100644 --- a/src/funcrequest.C +++ b/src/funcrequest.C @@ -12,9 +12,8 @@ #include "funcrequest.h" -#include "support/std_sstream.h" - #include +#include #include using std::getline; diff --git a/src/graphics/ChangeLog b/src/graphics/ChangeLog index 4a8e85db58..e420bede36 100644 --- a/src/graphics/ChangeLog +++ b/src/graphics/ChangeLog @@ -1,3 +1,8 @@ +2004-07-24 Lars Gullik Bjonnes + + * PreviewLoader.C, GraphicsParams.C, GraphicsConverter.C: change + "support/std_sstream.h" to + 2004-04-19 Angus Leeming * Previews.[Ch] (status): new member function, replacing activated. diff --git a/src/graphics/GraphicsConverter.C b/src/graphics/GraphicsConverter.C index dc9c5d0b73..4e1a754f8d 100644 --- a/src/graphics/GraphicsConverter.C +++ b/src/graphics/GraphicsConverter.C @@ -24,7 +24,7 @@ #include -#include "support/std_sstream.h" +#include #include namespace support = lyx::support; diff --git a/src/graphics/GraphicsParams.C b/src/graphics/GraphicsParams.C index f9317fed70..6274ea1d6b 100644 --- a/src/graphics/GraphicsParams.C +++ b/src/graphics/GraphicsParams.C @@ -14,7 +14,7 @@ #include "lyxlength.h" -#include "support/std_sstream.h" +#include using std::string; diff --git a/src/graphics/PreviewLoader.C b/src/graphics/PreviewLoader.C index f592de1c39..f3109b910e 100644 --- a/src/graphics/PreviewLoader.C +++ b/src/graphics/PreviewLoader.C @@ -37,7 +37,7 @@ #include -#include "support/std_sstream.h" +#include #include #include diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 56937ad8cf..f22182495d 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,11 @@ +2004-07-24 Lars Gullik Bjonnes + + * insetwrap.C, insetvspace.C, insettabular.C, insetnote.C: + * insetinclude.C, insetgraphics.C, insetfloat.C: + * insetexternal.C, insetert.C, insetcharstyle.C, insetcaption.C: + * insetbranch.C, insetbox.C, ExternalTransforms.C: change + "support/std_sstream.h" to + 2004-06-22 Georg Baum * insetgraphics.C (prepareFile): remove conversion_needed flag. diff --git a/src/insets/ExternalTransforms.C b/src/insets/ExternalTransforms.C index ee31553ba4..806943dbfb 100644 --- a/src/insets/ExternalTransforms.C +++ b/src/insets/ExternalTransforms.C @@ -19,8 +19,9 @@ #include "support/translator.h" #include -#include "support/std_sstream.h" + #include // std::abs +#include using lyx::support::float_equal; diff --git a/src/insets/insetbox.C b/src/insets/insetbox.C index 4f8124fff5..f93283ad24 100644 --- a/src/insets/insetbox.C +++ b/src/insets/insetbox.C @@ -25,9 +25,10 @@ #include "metricsinfo.h" #include "paragraph.h" -#include "support/std_sstream.h" #include "support/translator.h" +#include + using std::auto_ptr; using std::string; using std::istringstream; diff --git a/src/insets/insetbranch.C b/src/insets/insetbranch.C index ac64ed5dc3..1485bb8f05 100644 --- a/src/insets/insetbranch.C +++ b/src/insets/insetbranch.C @@ -23,7 +23,7 @@ #include "lyxlex.h" #include "paragraph.h" -#include "support/std_sstream.h" +#include using std::string; using std::auto_ptr; diff --git a/src/insets/insetcaption.C b/src/insets/insetcaption.C index bddcf21a1e..37e9c4ef9f 100644 --- a/src/insets/insetcaption.C +++ b/src/insets/insetcaption.C @@ -29,7 +29,7 @@ #include "support/lstrings.h" -#include "support/std_sstream.h" +#include using lyx::support::bformat; diff --git a/src/insets/insetcharstyle.C b/src/insets/insetcharstyle.C index da213d2483..910350243c 100644 --- a/src/insets/insetcharstyle.C +++ b/src/insets/insetcharstyle.C @@ -27,7 +27,8 @@ #include "frontends/font_metrics.h" #include "frontends/Painter.h" -#include "support/std_sstream.h" + +#include using std::string; diff --git a/src/insets/insetcommand.C b/src/insets/insetcommand.C index a1a28733be..77a357b05e 100644 --- a/src/insets/insetcommand.C +++ b/src/insets/insetcommand.C @@ -19,7 +19,7 @@ #include "lyxlex.h" #include "metricsinfo.h" -#include "support/std_sstream.h" +#include using std::string; diff --git a/src/insets/insetert.C b/src/insets/insetert.C index cddd553b48..b3d14d210f 100644 --- a/src/insets/insetert.C +++ b/src/insets/insetert.C @@ -29,7 +29,7 @@ #include "frontends/Alert.h" #include "frontends/LyXView.h" -#include "support/std_sstream.h" +#include using lyx::pos_type; diff --git a/src/insets/insetexternal.C b/src/insets/insetexternal.C index 822893a403..b4548c6250 100644 --- a/src/insets/insetexternal.C +++ b/src/insets/insetexternal.C @@ -43,10 +43,10 @@ #include "support/lyxlib.h" #include "support/tostr.h" #include "support/translator.h" -#include "support/std_sstream.h" #include +#include namespace support = lyx::support; namespace external = lyx::external; diff --git a/src/insets/insetfloat.C b/src/insets/insetfloat.C index 41da3b33a9..41d7dffe8e 100644 --- a/src/insets/insetfloat.C +++ b/src/insets/insetfloat.C @@ -32,7 +32,8 @@ #include "support/lstrings.h" #include "support/tostr.h" -#include "support/std_sstream.h" + +#include using lyx::support::contains; diff --git a/src/insets/insetgraphics.C b/src/insets/insetgraphics.C index 34db409c60..fe29faf3ba 100644 --- a/src/insets/insetgraphics.C +++ b/src/insets/insetgraphics.C @@ -77,12 +77,14 @@ TODO #include "support/os.h" #include "support/systemcall.h" #include "support/tostr.h" -#include "support/std_sstream.h" #include #include +#include + namespace support = lyx::support; + using lyx::support::AbsolutePath; using lyx::support::bformat; using lyx::support::ChangeExtension; diff --git a/src/insets/insetinclude.C b/src/insets/insetinclude.C index da8f3c795c..a8bd6600b9 100644 --- a/src/insets/insetinclude.C +++ b/src/insets/insetinclude.C @@ -49,7 +49,8 @@ #include #include "support/std_ostream.h" -#include "support/std_sstream.h" + +#include using lyx::support::AddName; using lyx::support::AbsolutePath; diff --git a/src/insets/insetnote.C b/src/insets/insetnote.C index 0dc7091403..3be5403fb5 100644 --- a/src/insets/insetnote.C +++ b/src/insets/insetnote.C @@ -27,9 +27,9 @@ #include "paragraph.h" #include "support/lyxalgo.h" -#include "support/std_sstream.h" #include "support/translator.h" +#include using std::string; using std::auto_ptr; diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index 91be3b9d37..515f95cf22 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -37,8 +37,7 @@ #include "frontends/LyXView.h" #include "frontends/Painter.h" -#include "support/std_sstream.h" - +#include #include using lyx::graphics::PreviewLoader; diff --git a/src/insets/insetvspace.C b/src/insets/insetvspace.C index 5559fa325b..5946dd70e2 100644 --- a/src/insets/insetvspace.C +++ b/src/insets/insetvspace.C @@ -27,7 +27,7 @@ #include "frontends/font_metrics.h" #include "frontends/Painter.h" -#include "support/std_sstream.h" +#include using std::istringstream; using std::ostream; diff --git a/src/insets/insetwrap.C b/src/insets/insetwrap.C index a307258d99..0fa0ad5306 100644 --- a/src/insets/insetwrap.C +++ b/src/insets/insetwrap.C @@ -28,9 +28,9 @@ #include "outputparams.h" #include "paragraph.h" -#include "support/std_sstream.h" #include "support/tostr.h" +#include using std::string; using std::endl; diff --git a/src/kbmap.C b/src/kbmap.C index 280a72df58..9377be0c43 100644 --- a/src/kbmap.C +++ b/src/kbmap.C @@ -23,7 +23,8 @@ #include "frontends/LyXKeySym.h" #include "support/filetools.h" -#include "support/std_sstream.h" + +#include using lyx::support::i18nLibFileSearch; @@ -293,14 +294,14 @@ string const kb_keymap::printbindings(FuncRequest const & func) const } -kb_keymap::Bindings +kb_keymap::Bindings kb_keymap::findbindings(FuncRequest const & func) const { return findbindings(func, kb_sequence(0, 0)); } -kb_keymap::Bindings +kb_keymap::Bindings kb_keymap::findbindings(FuncRequest const & func, kb_sequence const & prefix) const { @@ -313,7 +314,7 @@ kb_keymap::findbindings(FuncRequest const & func, if (cit->table.get()) { kb_sequence seq = prefix; seq.addkey(cit->code, cit->mod.first); - Bindings res2 = + Bindings res2 = cit->table->findbindings(func, seq); res.insert(res.end(), res2.begin(), res2.end()); } else if (cit->func == func) { @@ -333,9 +334,9 @@ kb_keymap::find1keybinding(FuncRequest const & func) const Table::const_iterator end = table.end(); for (Table::const_iterator cit = table.begin(); cit != end; ++cit) { - if (!cit->table.get() && cit->func == func) + if (!cit->table.get() && cit->func == func) return std::make_pair(cit->code.get(), cit->mod.first); } return std::make_pair(0, key_modifier::none); -} +} diff --git a/src/lyxfind.C b/src/lyxfind.C index cfee2c9f04..0c4c9e9eec 100644 --- a/src/lyxfind.C +++ b/src/lyxfind.C @@ -33,7 +33,7 @@ #include "support/textutils.h" #include "support/tostr.h" -#include "support/std_sstream.h" +#include using lyx::support::lowercase; using lyx::support::uppercase; diff --git a/src/lyxfont.C b/src/lyxfont.C index 8ddc66ad54..cc05bac8f0 100644 --- a/src/lyxfont.C +++ b/src/lyxfont.C @@ -25,7 +25,8 @@ #include "lyxrc.h" #include "support/lstrings.h" -#include "support/std_sstream.h" + +#include using lyx::support::ascii_lowercase; using lyx::support::bformat; diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 2b268bc98b..934cb51fec 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -87,9 +87,10 @@ #include "support/path_defines.h" #include "support/systemcall.h" #include "support/tostr.h" -#include "support/std_sstream.h" #include "support/os.h" +#include + using bv_funcs::freefont2string; using lyx::support::AddName; @@ -299,7 +300,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const // the default error message if we disable the command setStatusMessage(N_("Command disabled")); - if (!flag.enabled()) + if (!flag.enabled()) return flag; // Check whether we need a buffer diff --git a/src/lyxgluelength.C b/src/lyxgluelength.C index c38c814d22..bd76faffe5 100644 --- a/src/lyxgluelength.C +++ b/src/lyxgluelength.C @@ -15,7 +15,7 @@ #include "lyxgluelength.h" #include "lengthcommon.h" -#include "support/std_sstream.h" +#include using std::ostringstream; using std::string; diff --git a/src/lyxlength.C b/src/lyxlength.C index 8ca0118783..eaee147fc4 100644 --- a/src/lyxlength.C +++ b/src/lyxlength.C @@ -19,8 +19,8 @@ #include "lengthcommon.h" #include "lyxrc.h" +#include -#include "support/std_sstream.h" using std::abs; using std::ostringstream; diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index d3d2d442dc..b812e68e07 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,11 @@ +2004-07-24 Lars Gullik Bjonnes + + * math_support.C, math_parser.C, math_nestinset.C, math_macrotable.C: + * math_hullinset.C, math_gridinset.C, math_factory.C: + * math_extern.C, math_autocorrect.C, math_arrayinset.C: + * formulamacro.C, command_inset.C: change "support/std_sstream.h" + to + 2004-07-24 Lars Gullik Bjonnes * math_macrotable.C (expand): n is now size_t diff --git a/src/mathed/command_inset.C b/src/mathed/command_inset.C index b38f46115a..076dfd34b9 100644 --- a/src/mathed/command_inset.C +++ b/src/mathed/command_inset.C @@ -16,7 +16,7 @@ #include "dispatchresult.h" #include "funcrequest.h" -#include "support/std_sstream.h" +#include using std::string; using std::auto_ptr; diff --git a/src/mathed/formulamacro.C b/src/mathed/formulamacro.C index 9919748e98..303cb70490 100644 --- a/src/mathed/formulamacro.C +++ b/src/mathed/formulamacro.C @@ -28,7 +28,8 @@ #include "frontends/font_metrics.h" #include "support/lstrings.h" -#include "support/std_sstream.h" + +#include using lyx::support::bformat; diff --git a/src/mathed/math_arrayinset.C b/src/mathed/math_arrayinset.C index 9e1ea21f42..28dc9e9569 100644 --- a/src/mathed/math_arrayinset.C +++ b/src/mathed/math_arrayinset.C @@ -15,9 +15,9 @@ #include "math_parser.h" #include "math_mathmlstream.h" #include "math_streamstr.h" -#include "support/std_sstream.h" #include +#include using std::getline; diff --git a/src/mathed/math_autocorrect.C b/src/mathed/math_autocorrect.C index 986f3da9d8..4d06c78259 100644 --- a/src/mathed/math_autocorrect.C +++ b/src/mathed/math_autocorrect.C @@ -17,10 +17,10 @@ #include "math_parser.h" #include "debug.h" -#include "support/std_sstream.h" #include "support/filetools.h" // LibFileSearch #include +#include using lyx::support::LibFileSearch; diff --git a/src/mathed/math_extern.C b/src/mathed/math_extern.C index 99e381d78a..c33a53c376 100644 --- a/src/mathed/math_extern.C +++ b/src/mathed/math_extern.C @@ -31,12 +31,12 @@ #include "math_stringinset.h" #include "math_symbolinset.h" #include "math_parser.h" -#include "support/std_sstream.h" #include "debug.h" #include "support/filetools.h" #include "support/lstrings.h" #include +#include using lyx::support::cmd_ret; using lyx::support::getVectorFromString; diff --git a/src/mathed/math_factory.C b/src/mathed/math_factory.C index acaa0ca69e..3da237bd52 100644 --- a/src/mathed/math_factory.C +++ b/src/mathed/math_factory.C @@ -57,13 +57,13 @@ #include "debug.h" #include "math_support.h" -#include "support/std_sstream.h" #include "support/filetools.h" // LibFileSearch #include "support/lstrings.h" #include "frontends/lyx_gui.h" #include +#include using lyx::support::LibFileSearch; using lyx::support::split; diff --git a/src/mathed/math_gridinset.C b/src/mathed/math_gridinset.C index 168dc625b2..07325ab759 100644 --- a/src/mathed/math_gridinset.C +++ b/src/mathed/math_gridinset.C @@ -26,10 +26,10 @@ #include "frontends/Painter.h" -#include "support/std_sstream.h" - #include "insets/mailinset.h" +#include + using std::endl; using std::max; using std::min; diff --git a/src/mathed/math_hullinset.C b/src/mathed/math_hullinset.C index a39330fca1..b56dec9d2c 100644 --- a/src/mathed/math_hullinset.C +++ b/src/mathed/math_hullinset.C @@ -40,10 +40,10 @@ #include "graphics/PreviewImage.h" #include "graphics/PreviewLoader.h" -#include "support/std_sstream.h" - #include +#include + using lyx::cap::grabAndEraseSelection; using std::endl; diff --git a/src/mathed/math_macrotable.C b/src/mathed/math_macrotable.C index 09930bd598..f7bb45efcb 100644 --- a/src/mathed/math_macrotable.C +++ b/src/mathed/math_macrotable.C @@ -19,10 +19,10 @@ #include "debug.h" #include "dociterator.h" -#include "support/std_sstream.h" - #include +#include + using std::endl; using std::istringstream; using std::map; diff --git a/src/mathed/math_nestinset.C b/src/mathed/math_nestinset.C index 9f501423e9..2f593493da 100644 --- a/src/mathed/math_nestinset.C +++ b/src/mathed/math_nestinset.C @@ -41,13 +41,14 @@ #include "outputparams.h" #include "undo.h" -#include "support/std_sstream.h" #include "support/lstrings.h" #include "frontends/Dialogs.h" #include "frontends/LyXView.h" #include "frontends/Painter.h" +#include + using lyx::cap::copySelection; using lyx::cap::grabAndEraseSelection; using lyx::cap::cutSelection; diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index 89ed19a208..0264350e87 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -62,9 +62,10 @@ following hack as starting point to write some macros: #include "ref_inset.h" #include "lyxlex.h" -#include "support/std_sstream.h" #include "debug.h" +#include + #ifndef CXX_GLOBAL_CSTD using std::atoi; #endif @@ -1282,6 +1283,3 @@ void initParser() theCatcode[int('~')] = catActive; theCatcode[int('%')] = catComment; } - - - diff --git a/src/mathed/math_support.C b/src/mathed/math_support.C index ea2ccd667d..5016368254 100644 --- a/src/mathed/math_support.C +++ b/src/mathed/math_support.C @@ -24,9 +24,8 @@ #include "frontends/font_metrics.h" #include "frontends/lyx_gui.h" -#include "support/std_sstream.h" - #include +#include using std::string; diff --git a/src/paragraph.C b/src/paragraph.C index 5657b2f77c..66eebe04eb 100644 --- a/src/paragraph.C +++ b/src/paragraph.C @@ -41,7 +41,6 @@ #include "insets/insetoptarg.h" #include "support/lstrings.h" -#include "support/std_sstream.h" #include "support/textutils.h" #include "support/tostr.h" @@ -50,6 +49,7 @@ #include #include +#include using lyx::pos_type; diff --git a/src/paragraph_funcs.C b/src/paragraph_funcs.C index 86db8b948b..b2794d996a 100644 --- a/src/paragraph_funcs.C +++ b/src/paragraph_funcs.C @@ -30,8 +30,8 @@ #include "support/filetools.h" #include "support/lstrings.h" #include "support/lyxlib.h" -#include "support/std_sstream.h" +#include #include using lyx::pos_type; diff --git a/src/support/ChangeLog b/src/support/ChangeLog index 27e34e2327..1d8fbc8cb2 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,13 @@ +2004-07-24 Lars Gullik Bjonnes + + * tostr.C, lstrings.C, globbing.C, filetools.C: change + "support/std_sstream.h" to + + * Makefile.am (libsupport_la_SOURCES): delete std_sstream.h and + sstream.h + (std_sstream.h): delete file + (sstream.h): delete file + 2004-06-29 Jean-Marc Lasgouttes * filetools.C (i18nLibFileSearch): honor case where LANGUAGE @@ -10,10 +20,10 @@ its po files when moved around; set default user directory to ~/Library/Preferences/LyX/ for LyX/Mac. (lyx_localedir): return the value that may have been computed in - setLyXPaths + setLyXPaths 2004-05-27 Kayvan Sylvan - + * Makefile.am (libsupport_la_SOURCES): remove reference to nt_defines.h diff --git a/src/support/Makefile.am b/src/support/Makefile.am index 85b6e14916..7f12f2cc3c 100644 --- a/src/support/Makefile.am +++ b/src/support/Makefile.am @@ -66,10 +66,8 @@ libsupport_la_SOURCES = \ snprintf.c \ socktools.C \ socktools.h \ - sstream.h \ std_istream.h \ std_ostream.h \ - std_sstream.h \ systemcall.C \ systemcall.h \ tempname.C \ diff --git a/src/support/filetools.C b/src/support/filetools.C index 4d1cd6c8b2..c9ea4562a8 100644 --- a/src/support/filetools.C +++ b/src/support/filetools.C @@ -35,19 +35,19 @@ #include "lyxlib.h" #include "os.h" -#include "support/std_sstream.h" - #include #include +#include + #include #include #include -#include #include #include #include +#include // Which part of this is still necessary? (JMarc). @@ -335,7 +335,7 @@ i18nLibFileSearch(string const & dir, string const & name, string l; lang = split(lang, l, ':'); while (!l.empty() && l != "C" && l != "POSIX") { - string const tmp = LibFileSearch(dir, + string const tmp = LibFileSearch(dir, token(l, '_', 0) + '_' + name, ext); if (!tmp.empty()) diff --git a/src/support/globbing.C b/src/support/globbing.C index b0d16e88e4..b112db32ae 100644 --- a/src/support/globbing.C +++ b/src/support/globbing.C @@ -16,12 +16,13 @@ #include "lstrings.h" #include "path.h" -#include "std_sstream.h" #include #include -#include "glob.h" +#include + +#include using std::distance; using std::ostringstream; diff --git a/src/support/lstrings.C b/src/support/lstrings.C index c4182fb5a1..9910d54007 100644 --- a/src/support/lstrings.C +++ b/src/support/lstrings.C @@ -12,7 +12,6 @@ #include #include "lstrings.h" -#include "support/std_sstream.h" #include "debug.h" #include "lyxlib.h" #include "tostr.h" @@ -26,6 +25,8 @@ #include #include +#include + using std::transform; using std::string; using std::vector; diff --git a/src/support/sstream.h b/src/support/sstream.h deleted file mode 100644 index ecc91bf712..0000000000 --- a/src/support/sstream.h +++ /dev/null @@ -1,235 +0,0 @@ -/* This is part of libio/iostream, providing -*- C++ -*- input/output. -Copyright (C) 2000 Free Software Foundation - -This file is part of the GNU IO Library. This library is free -software; you can redistribute it and/or modify it under the -terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) -any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this library; see the file COPYING. If not, write to the Free -Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -As a special exception, if you link this library with files -compiled with a GNU compiler to produce an executable, this does not cause -the resulting executable to be covered by the GNU General Public License. -This exception does not however invalidate any other reasons why -the executable file might be covered by the GNU General Public License. */ - -/* Written by Magnus Fromreide (magfr@lysator.liu.se). */ - -/* Sligtly modified for use in The LyX Project. - Made to be usable with both std::string (as supplied with Gcc 2.95.2), - and with lyxstring. Dynamic casts have been replaced by static_casts. - One fix to avoid unsigned/signed warnings. - - Lars Gullik Bjønnes (larsbj@lyx.org) -*/ - -#ifndef SSTREAM_H -#define SSTREAM_H - -#include -#include -#include - -namespace std -{ - class stringbuf : public streambuf - { - public: - typedef char char_type; - typedef int int_type; - typedef streampos pos_type; - typedef streamoff off_type; - - explicit stringbuf(int which=ios::in|ios::out) : - streambuf(which), buf(), mode(static_cast(which)), - rpos(0), bufsize(1) - { } - - explicit stringbuf(const std::string &s, int which=ios::in|ios::out) : - streambuf(which), buf(s), mode(static_cast(which)), - bufsize(1) - { - if(mode & ios::in) - { - setg(&defbuf, &defbuf + bufsize, &defbuf + bufsize); - } - if(mode & ios::out) - { - setp(&defbuf, &defbuf + bufsize); - } - rpos = (mode & ios::ate ? s.size() : 0); - } - - std::string str() const - { - const_cast(this)->sync(); // Sigh, really ugly hack - return buf; - }; - - void str(const std::string& s) - { - buf = s; - if(mode & ios::in) - { - gbump(egptr() - gptr()); - } - if(mode & ios::out) - { - pbump(pbase() - pptr()); - } - rpos = (mode & ios::ate ? s.size() : 0); - } - - protected: - inline virtual int sync(); - inline virtual int overflow(int = EOF); - inline virtual int underflow(); - private: - std::string buf; - ios::open_mode mode; - std::string::size_type rpos; - streamsize bufsize; - char defbuf; - }; - - class stringstreambase : virtual public ios { - protected: - stringbuf __my_sb; - public: - std::string str() const - { - return static_cast(_strbuf)->str(); - } - void str(const std::string& s) - { - clear(); - static_cast(_strbuf)->str(s); - } - - stringbuf* rdbuf() - { - return &__my_sb; - } - protected: - stringstreambase(int which) : - __my_sb(which) - { - init (&__my_sb); - } - - stringstreambase(const std::string& s, int which) : - __my_sb(s, which) - { - init (&__my_sb); - } - }; - - class istringstream : public stringstreambase, public istream { - public: - istringstream(int which=ios::in) : - stringstreambase(which) - { } - - istringstream(const std::string& s, int which=ios::in) : - stringstreambase(s, which) - { } - }; - - class ostringstream : public stringstreambase, public ostream { - public: - ostringstream(int which=ios::out) : - stringstreambase(which) - { } - - ostringstream(const std::string& s, int which=ios::out) : - stringstreambase(s, which) - { } - }; - - class stringstream : public stringstreambase, public iostream { - public: - stringstream(int which=ios::in|ios::out) : - stringstreambase(which) - { } - - stringstream(const std::string &s, int which=ios::in|ios::out) : - stringstreambase(s, which) - { } - }; - -} // namespace std - -inline int stringbuf::sync() -{ - if((mode & ios::out) == 0) - return EOF; - - streamsize n = pptr() - pbase(); - if(n) - { - buf.replace(rpos, std::string::npos, pbase(), n); - //if(buf.size() - rpos != n) - if (buf.size() != n + rpos) - return EOF; - rpos += n; - pbump(-n); - gbump(egptr() - gptr()); - } - return 0; -} - -inline int stringbuf::overflow(int ch) -{ - if((mode & ios::out) == 0) - return EOF; - - streamsize n = pptr() - pbase(); - - if(n && sync()) - return EOF; - - if(ch != EOF) - { - std::string::size_type oldSize = buf.size(); - - buf.replace(rpos, std::string::npos, 1, ch); - if(buf.size() - oldSize != 1) - return EOF; - ++rpos; - } - return 0; -} - -inline int stringbuf::underflow() -{ - sync(); - if((mode & ios::in) == 0) - { - return EOF; - } - if(rpos >= buf.size()) - { - return EOF; - } - - std::string::size_type n = egptr() - eback(); - std::string::size_type s; - - s = buf.copy(eback(), n, rpos); - pbump(pbase() - pptr()); - gbump(eback() - gptr()); - int res = (0377 & buf[rpos]); - rpos += s; - return res; -} - -#endif /* not __STRSTREAM__ */ diff --git a/src/support/std_sstream.h b/src/support/std_sstream.h deleted file mode 100644 index 782cdf0cbd..0000000000 --- a/src/support/std_sstream.h +++ /dev/null @@ -1,22 +0,0 @@ -// -*- C++ -*- -/** - * \file std_sstream.h - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author Lars Gullik Bjønnes - * \author Jean-Marc Lasgouttes - * - * Full author contact details are available in file CREDITS. - */ - -#ifndef STD_SSTREAM_H -#define STD_SSTREAM_H - -#ifdef HAVE_SSTREAM -#include -#else -#include "support/sstream.h" -#endif - -#endif // NOT STD_SSTREAM_H diff --git a/src/support/tostr.C b/src/support/tostr.C index da5b7aaa8d..81058d5d87 100644 --- a/src/support/tostr.C +++ b/src/support/tostr.C @@ -10,7 +10,7 @@ #include -#include "support/std_sstream.h" +#include using std::string; using std::ostringstream; diff --git a/src/tabular.C b/src/tabular.C index 06e3aa1772..98411af660 100644 --- a/src/tabular.C +++ b/src/tabular.C @@ -32,7 +32,7 @@ #include "support/lstrings.h" #include "support/tostr.h" -#include "support/std_sstream.h" +#include using lyx::support::ltrim; using lyx::support::prefixIs; diff --git a/src/text.C b/src/text.C index 15374a2f3d..daa001ce32 100644 --- a/src/text.C +++ b/src/text.C @@ -66,7 +66,8 @@ #include "support/lstrings.h" #include "support/textutils.h" #include "support/tostr.h" -#include "support/std_sstream.h" + +#include using lyx::par_type; using lyx::pos_type; diff --git a/src/text2.C b/src/text2.C index 1988bd3e66..dfcac666b5 100644 --- a/src/text2.C +++ b/src/text2.C @@ -58,7 +58,8 @@ #include "support/lstrings.h" #include "support/textutils.h" #include "support/tostr.h" -#include "support/std_sstream.h" + +#include using lyx::par_type; using lyx::pos_type; diff --git a/src/text3.C b/src/text3.C index 5709367613..2b4f91be62 100644 --- a/src/text3.C +++ b/src/text3.C @@ -54,12 +54,12 @@ #include "support/lstrings.h" #include "support/lyxlib.h" #include "support/tostr.h" -#include "support/std_sstream.h" #include "mathed/math_hullinset.h" #include "mathed/math_macrotemplate.h" #include +#include using lyx::pos_type; -- 2.39.2