+2004-07-24 Lars Gullik Bjonnes <larsbj@gullik.net>
+
+ * common.am (AM_ETAGSFLAGS): setup variable
+
2004-05-28 Lars Gullik Bjonnes <larsbj@gullik.net>
* depcomp.diff: remove file
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
+2004-07-24 Lars Gullik Bjonnes <larsbj@gullik.net>
+
+ * 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 <sstream>
+
2004-07-23 Lars Gullik Bjonnes <larsbj@gullik.net>
* lyxserver.C (startPipe): use this (pointer) not *this (reference)
#include "support/filetools.h"
-#include "support/std_sstream.h"
+#include <sstream>
using lyx::support::IsSGMLFilename;
using lyx::support::MakeRelPath;
}
packages << "]{natbib}\n";
}
-
+
// jurabib -- we need version 0.6 at least.
if (isRequired("jurabib")) {
packages << "\\RequirePackage{jurabib}[2004/01/25]\n";
#include "frontends/LyXView.h"
#include "support/lstrings.h"
-#include "support/std_sstream.h"
+
+#include <sstream>
using lyx::support::rtrim;
*/
#include <config.h>
-#include <string>
#include "Spacing.h"
-#include "support/std_sstream.h"
+#include <sstream>
+#include <string>
using std::ios;
using std::istringstream;
#include "support/path.h"
#include "support/textutils.h"
#include "support/tostr.h"
-#include "support/std_sstream.h"
#include <boost/bind.hpp>
+#include <utime.h>
+
#include <iomanip>
#include <stack>
+#include <sstream>
-#include <utime.h>
using lyx::pos_type;
using lyx::par_type;
<< "\"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;
#include <boost/array.hpp>
-#include "support/std_sstream.h"
+#include <sstream>
namespace support = lyx::support;
using lyx::support::bformat;
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();
#include "insets/insettext.h"
#include "support/tostr.h"
-#include "support/std_sstream.h"
+
+#include <sstream>
using lyx::support::bformat;
#include "debug.h"
#include "support/lstrings.h"
-#include "support/std_sstream.h"
#include "support/tostr.h"
#include <boost/assert.hpp>
+#include <sstream>
+
using std::endl;
using std::ostringstream;
using std::string;
#include "mathed/math_macrotable.h"
#include "support/limited_stack.h"
-#include "support/std_sstream.h"
#include "frontends/LyXView.h"
#include <boost/assert.hpp>
+#include <sstream>
+
using lyx::par_type;
using std::string;
#include "frontends/LyXView.h"
#include "support/lstrings.h"
-#include "support/std_sstream.h"
#include <boost/assert.hpp>
+#include <sstream>
+
using lyx::support::compare_ascii_no_case;
using std::auto_ptr;
+2004-07-24 Lars Gullik Bjonnes <larsbj@gullik.net>
+
+ * biblio.C, ControlPrefs.C, ControlParagraph.C:
+ * ControlLog.C, ControlDocument.C, ControlAboutlyx.C: replace
+ "support/std_sstream.h" with <sstream>
+
2004-05-19 Angus Leeming <leeming@lyx.org>
* *.[Ch]: wrap all code up inside namespace lyx::frontend.
#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 <fstream>
+#include <sstream>
using std::ostream;
using std::ostringstream;
#include "LColor.h"
#include "lyxtextclasslist.h"
-#include "support/std_sstream.h"
+#include <sstream>
using std::ostringstream;
using std::string;
#include "gettext.h"
#include "lyxlex.h"
-#include "support/std_sstream.h"
-
+#include <sstream>
#include <fstream>
using std::istringstream;
#include "lyxlex.h"
#include "paragraph.h"
#include "ParagraphParameters.h"
-#include "support/std_sstream.h"
+#include <sstream>
using std::istringstream;
using std::ostringstream;
#include "support/globbing.h"
#include "support/path_defines.h"
-#include "support/std_sstream.h"
+#include <sstream>
using std::ostringstream;
using std::pair;
#include "gettext.h"
#include "support/lstrings.h"
-#include "support/std_sstream.h"
#include <boost/regex.hpp>
#include <algorithm>
+#include <sstream>
using std::string;
using std::ostringstream;
+2004-07-24 Lars Gullik Bjonnes <larsbj@gullik.net>
+
+ * lyx_gui.C:
+ * GAbout.C: change "support/std_sstream.h" to <sstream>
+
2004-05-28 Lars Gullik Bjonnes <larsbj@gullik.net>
* Makefile.am (libgnome_la_SOURCES): add support.c and support.h
#include <config.h>
#include "support/lstrings.h"
-#include "support/std_sstream.h"
#include "gnome_helpers.h"
#include "gnomeBC.h"
#include <gtkmm/button.h>
#include <gtkmm/textview.h>
+#include <sstream>
+
using std::istringstream;
#include "xfont_loader.h"
#include "xformsImage.h"
-#include "support/std_sstream.h"
+#include <boost/bind.hpp>
+
+#include <sstream>
#include <iomanip>
#include <fcntl.h>
-#include <boost/bind.hpp>
#include "gnome_helpers.h"
#include <gtkmm/main.h>
+2004-07-24 Lars Gullik Bjonnes <larsbj@gullik.net>
+
+ * lyx_gui.C: change "support/std_sstream.h" to <sstream>
+
2004-07-22 Lars Gullik Bjonnes <larsbj@gullik.net>
* lyx_gui.C (register_socket_callback,unregister_socket_callback):
#include "xftFontLoader.h"
#include "GWorkArea.h"
-#include "support/std_sstream.h"
-#include <iomanip>
-#include <fcntl.h>
#include <boost/bind.hpp>
#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
+#include <fcntl.h>
+
+#include <sstream>
+#include <iomanip>
+
//just for xforms
#include "lyx_forms.h"
#include "xformsImage.h"
+2004-07-24 Lars Gullik Bjonnes <larsbj@gullik.net>
+
+ * QPrefs.C, QMathMatrixDialog.C:
+ * QLog.C, QAbout.C: change "support/std_sstream.h" to <sstream>
+
2004-07-22 Lars Gullik Bjonnes <larsbj@gullik.net>
- * 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
#include "controllers/ControlAboutlyx.h"
#include "support/lstrings.h"
-#include "support/std_sstream.h"
+
+#include <sstream>
#include <qlabel.h>
#include <qpushbutton.h>
#include "controllers/ControlLog.h"
-#include "support/std_sstream.h"
+#include <sstream>
#include <qtextview.h>
#include <qpushbutton.h>
#include "controllers/ControlMath.h"
-#include "support/std_sstream.h"
+#include <sstream>
#include <qcombobox.h>
#include <qlineedit.h>
#include "support/lstrings.h"
#include "support/tostr.h"
-#include "support/std_sstream.h"
#include "controllers/ControlPrefs.h"
#include "controllers/frnt_lang.h"
#include <boost/tuple/tuple.hpp>
#include <iomanip>
+#include <sstream>
using lyx::support::compare_no_case;
using lyx::support::strToDbl;
+2004-07-24 Lars Gullik Bjonnes <larsbj@gullik.net>
+
+ * lyx_gui.C, FormMathsMatrix.C, FormLog.C:
+ * FormAboutlyx.C, Color.C: change "support/std_sstream.h" to
+ <sstream>
+
2004-07-22 Lars Gullik Bjonnes <larsbj@gullik.net>
* 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 <larsbj@gullik.net>
#include "LColor.h"
-#include "support/std_sstream.h"
-
#include <cmath>
+#include <sstream>
#include <iomanip>
#ifndef CXX_GLOBAL_CSTD
#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 <sstream>
+
using std::ostringstream;
namespace lyx {
#include "ControlLog.h"
#include "forms/form_browser.h"
-#include "support/std_sstream.h"
-
#include "lyx_forms.h"
+#include <sstream>
+
namespace lyx {
namespace frontend {
#include "controllers/ButtonController.h"
-#include "support/std_sstream.h"
+#include <sstream>
using std::ostringstream;
#include "lyx_forms.h"
-#include "support/std_sstream.h"
+#include <sstream>
using std::ostringstream;
#include <boost/bind.hpp>
-#include "support/std_sstream.h"
-#include <iomanip>
#include <fcntl.h>
+#include <sstream>
+#include <iomanip>
+
using lyx::support::AddName;
using lyx::support::user_lyxdir;
#include "funcrequest.h"
-#include "support/std_sstream.h"
-
#include <iostream>
+#include <sstream>
#include <vector>
using std::getline;
+2004-07-24 Lars Gullik Bjonnes <larsbj@gullik.net>
+
+ * PreviewLoader.C, GraphicsParams.C, GraphicsConverter.C: change
+ "support/std_sstream.h" to <sstream>
+
2004-04-19 Angus Leeming <leeming@lyx.org>
* Previews.[Ch] (status): new member function, replacing activated.
#include <boost/bind.hpp>
-#include "support/std_sstream.h"
+#include <sstream>
#include <fstream>
namespace support = lyx::support;
#include "lyxlength.h"
-#include "support/std_sstream.h"
+#include <sstream>
using std::string;
#include <boost/bind.hpp>
-#include "support/std_sstream.h"
+#include <sstream>
#include <fstream>
#include <iomanip>
+2004-07-24 Lars Gullik Bjonnes <larsbj@gullik.net>
+
+ * 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 <sstream>
+
2004-06-22 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* insetgraphics.C (prepareFile): remove conversion_needed flag.
#include "support/translator.h"
#include <boost/regex.hpp>
-#include "support/std_sstream.h"
+
#include <cmath> // std::abs
+#include <sstream>
using lyx::support::float_equal;
#include "metricsinfo.h"
#include "paragraph.h"
-#include "support/std_sstream.h"
#include "support/translator.h"
+#include <sstream>
+
using std::auto_ptr;
using std::string;
using std::istringstream;
#include "lyxlex.h"
#include "paragraph.h"
-#include "support/std_sstream.h"
+#include <sstream>
using std::string;
using std::auto_ptr;
#include "support/lstrings.h"
-#include "support/std_sstream.h"
+#include <sstream>
using lyx::support::bformat;
#include "frontends/font_metrics.h"
#include "frontends/Painter.h"
-#include "support/std_sstream.h"
+
+#include <sstream>
using std::string;
#include "lyxlex.h"
#include "metricsinfo.h"
-#include "support/std_sstream.h"
+#include <sstream>
using std::string;
#include "frontends/Alert.h"
#include "frontends/LyXView.h"
-#include "support/std_sstream.h"
+#include <sstream>
using lyx::pos_type;
#include "support/lyxlib.h"
#include "support/tostr.h"
#include "support/translator.h"
-#include "support/std_sstream.h"
#include <boost/bind.hpp>
+#include <sstream>
namespace support = lyx::support;
namespace external = lyx::external;
#include "support/lstrings.h"
#include "support/tostr.h"
-#include "support/std_sstream.h"
+
+#include <sstream>
using lyx::support::contains;
#include "support/os.h"
#include "support/systemcall.h"
#include "support/tostr.h"
-#include "support/std_sstream.h"
#include <boost/bind.hpp>
#include <boost/tuple/tuple.hpp>
+#include <sstream>
+
namespace support = lyx::support;
+
using lyx::support::AbsolutePath;
using lyx::support::bformat;
using lyx::support::ChangeExtension;
#include <boost/bind.hpp>
#include "support/std_ostream.h"
-#include "support/std_sstream.h"
+
+#include <sstream>
using lyx::support::AddName;
using lyx::support::AbsolutePath;
#include "paragraph.h"
#include "support/lyxalgo.h"
-#include "support/std_sstream.h"
#include "support/translator.h"
+#include <sstream>
using std::string;
using std::auto_ptr;
#include "frontends/LyXView.h"
#include "frontends/Painter.h"
-#include "support/std_sstream.h"
-
+#include <sstream>
#include <iostream>
using lyx::graphics::PreviewLoader;
#include "frontends/font_metrics.h"
#include "frontends/Painter.h"
-#include "support/std_sstream.h"
+#include <sstream>
using std::istringstream;
using std::ostream;
#include "outputparams.h"
#include "paragraph.h"
-#include "support/std_sstream.h"
#include "support/tostr.h"
+#include <sstream>
using std::string;
using std::endl;
#include "frontends/LyXKeySym.h"
#include "support/filetools.h"
-#include "support/std_sstream.h"
+
+#include <sstream>
using lyx::support::i18nLibFileSearch;
}
-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
{
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) {
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<LyXKeySym const *, key_modifier::state>(0, key_modifier::none);
-}
+}
#include "support/textutils.h"
#include "support/tostr.h"
-#include "support/std_sstream.h"
+#include <sstream>
using lyx::support::lowercase;
using lyx::support::uppercase;
#include "lyxrc.h"
#include "support/lstrings.h"
-#include "support/std_sstream.h"
+
+#include <sstream>
using lyx::support::ascii_lowercase;
using lyx::support::bformat;
#include "support/path_defines.h"
#include "support/systemcall.h"
#include "support/tostr.h"
-#include "support/std_sstream.h"
#include "support/os.h"
+#include <sstream>
+
using bv_funcs::freefont2string;
using lyx::support::AddName;
// 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
#include "lyxgluelength.h"
#include "lengthcommon.h"
-#include "support/std_sstream.h"
+#include <sstream>
using std::ostringstream;
using std::string;
#include "lengthcommon.h"
#include "lyxrc.h"
+#include <sstream>
-#include "support/std_sstream.h"
using std::abs;
using std::ostringstream;
+2004-07-24 Lars Gullik Bjonnes <larsbj@gullik.net>
+
+ * 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 <sstream>
+
2004-07-24 Lars Gullik Bjonnes <larsbj@gullik.net>
* math_macrotable.C (expand): n is now size_t
#include "dispatchresult.h"
#include "funcrequest.h"
-#include "support/std_sstream.h"
+#include <sstream>
using std::string;
using std::auto_ptr;
#include "frontends/font_metrics.h"
#include "support/lstrings.h"
-#include "support/std_sstream.h"
+
+#include <sstream>
using lyx::support::bformat;
#include "math_parser.h"
#include "math_mathmlstream.h"
#include "math_streamstr.h"
-#include "support/std_sstream.h"
#include <iterator>
+#include <sstream>
using std::getline;
#include "math_parser.h"
#include "debug.h"
-#include "support/std_sstream.h"
#include "support/filetools.h" // LibFileSearch
#include <fstream>
+#include <sstream>
using lyx::support::LibFileSearch;
#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 <algorithm>
+#include <sstream>
using lyx::support::cmd_ret;
using lyx::support::getVectorFromString;
#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 <fstream>
+#include <sstream>
using lyx::support::LibFileSearch;
using lyx::support::split;
#include "frontends/Painter.h"
-#include "support/std_sstream.h"
-
#include "insets/mailinset.h"
+#include <sstream>
+
using std::endl;
using std::max;
using std::min;
#include "graphics/PreviewImage.h"
#include "graphics/PreviewLoader.h"
-#include "support/std_sstream.h"
-
#include <boost/bind.hpp>
+#include <sstream>
+
using lyx::cap::grabAndEraseSelection;
using std::endl;
#include "debug.h"
#include "dociterator.h"
-#include "support/std_sstream.h"
-
#include <boost/assert.hpp>
+#include <sstream>
+
using std::endl;
using std::istringstream;
using std::map;
#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 <sstream>
+
using lyx::cap::copySelection;
using lyx::cap::grabAndEraseSelection;
using lyx::cap::cutSelection;
#include "ref_inset.h"
#include "lyxlex.h"
-#include "support/std_sstream.h"
#include "debug.h"
+#include <sstream>
+
#ifndef CXX_GLOBAL_CSTD
using std::atoi;
#endif
theCatcode[int('~')] = catActive;
theCatcode[int('%')] = catComment;
}
-
-
-
#include "frontends/font_metrics.h"
#include "frontends/lyx_gui.h"
-#include "support/std_sstream.h"
-
#include <map>
+#include <sstream>
using std::string;
#include "insets/insetoptarg.h"
#include "support/lstrings.h"
-#include "support/std_sstream.h"
#include "support/textutils.h"
#include "support/tostr.h"
#include <list>
#include <stack>
+#include <sstream>
using lyx::pos_type;
#include "support/filetools.h"
#include "support/lstrings.h"
#include "support/lyxlib.h"
-#include "support/std_sstream.h"
+#include <sstream>
#include <vector>
using lyx::pos_type;
+2004-07-24 Lars Gullik Bjonnes <larsbj@gullik.net>
+
+ * tostr.C, lstrings.C, globbing.C, filetools.C: change
+ "support/std_sstream.h" to <sstream>
+
+ * 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 <lasgouttes@lyx.org>
* filetools.C (i18nLibFileSearch): honor case where LANGUAGE
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 <kayvan@sylvan.com>
-
+
* Makefile.am (libsupport_la_SOURCES): remove reference to
nt_defines.h
snprintf.c \
socktools.C \
socktools.h \
- sstream.h \
std_istream.h \
std_ostream.h \
- std_sstream.h \
systemcall.C \
systemcall.h \
tempname.C \
#include "lyxlib.h"
#include "os.h"
-#include "support/std_sstream.h"
-
#include <boost/assert.hpp>
#include <boost/regex.hpp>
+#include <fcntl.h>
+
#include <cctype>
#include <cstdlib>
#include <cstdio>
-#include <fcntl.h>
#include <cerrno>
#include <utility>
#include <fstream>
+#include <sstream>
// Which part of this is still necessary? (JMarc).
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())
#include "lstrings.h"
#include "path.h"
-#include "std_sstream.h"
#include <boost/regex.hpp>
#include <boost/tokenizer.hpp>
-#include "glob.h"
+#include <glob.h>
+
+#include <sstream>
using std::distance;
using std::ostringstream;
#include <config.h>
#include "lstrings.h"
-#include "support/std_sstream.h"
#include "debug.h"
#include "lyxlib.h"
#include "tostr.h"
#include <cctype>
#include <cstdlib>
+#include <sstream>
+
using std::transform;
using std::string;
using std::vector;
+++ /dev/null
-/* 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 <string>
-#include <iostream>
-#include <streambuf.h>
-
-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<ios::open_mode>(which)),
- rpos(0), bufsize(1)
- { }
-
- explicit stringbuf(const std::string &s, int which=ios::in|ios::out) :
- streambuf(which), buf(s), mode(static_cast<ios::open_mode>(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<stringbuf*>(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<stringbuf*>(_strbuf)->str();
- }
- void str(const std::string& s)
- {
- clear();
- static_cast<stringbuf*>(_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__ */
+++ /dev/null
-// -*- 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 <sstream>
-#else
-#include "support/sstream.h"
-#endif
-
-#endif // NOT STD_SSTREAM_H
#include <config.h>
-#include "support/std_sstream.h"
+#include <sstream>
using std::string;
using std::ostringstream;
#include "support/lstrings.h"
#include "support/tostr.h"
-#include "support/std_sstream.h"
+#include <sstream>
using lyx::support::ltrim;
using lyx::support::prefixIs;
#include "support/lstrings.h"
#include "support/textutils.h"
#include "support/tostr.h"
-#include "support/std_sstream.h"
+
+#include <sstream>
using lyx::par_type;
using lyx::pos_type;
#include "support/lstrings.h"
#include "support/textutils.h"
#include "support/tostr.h"
-#include "support/std_sstream.h"
+
+#include <sstream>
using lyx::par_type;
using lyx::pos_type;
#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 <clocale>
+#include <sstream>
using lyx::pos_type;