From 64336d4cec99202a7740fc062190c1f1cfa577db Mon Sep 17 00:00:00 2001 From: mathias Date: Thu, 12 May 2005 20:16:45 +0000 Subject: llittle rewrite for the FbTk_istringstream usage.. was needed coz gcc2.95.x systems had problems before. with this change fluxbox should compile on such old compilers. --- src/FbCommandFactory.cc | 2 +- src/FbTk/Font.cc | 14 +++----------- src/Remember.cc | 9 ++++----- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/src/FbCommandFactory.cc b/src/FbCommandFactory.cc index 8279edb..ec91a86 100644 --- a/src/FbCommandFactory.cc +++ b/src/FbCommandFactory.cc @@ -358,7 +358,7 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command, // else if (command == "deiconify") { - FbTk_istringstream iss(arguments); + FbTk_istringstream iss(arguments.c_str()); string mode; string d; DeiconifyCmd::Destination dest; diff --git a/src/FbTk/Font.cc b/src/FbTk/Font.cc index 3b17fda..05dae54 100644 --- a/src/FbTk/Font.cc +++ b/src/FbTk/Font.cc @@ -23,6 +23,7 @@ #include "StringUtil.hh" +#include "stringstream.hh" #include "Font.hh" #include "FontImp.hh" #include "I18n.hh" @@ -69,15 +70,6 @@ #include #include -#ifdef HAVE_SSTREAM -#include -#define FB_istringstream istringstream -#elif HAVE_STRSTREAM -#include -#define FB_istringstream istrstream -#else -#error "You dont have sstream or strstream headers!" -#endif // HAVE_STRSTREAM #ifdef HAVE_CSTDLIB #include @@ -202,14 +194,14 @@ int extract_shadow_options(const std::string& opts, } else if ( (*token).find("offsetx=", 0) != std::string::npos ) { size_t s= (*token).find_first_of('='); - FB_istringstream o((*token).substr(s + 1, (*token).length())); + FbTk_istringstream o((*token).substr(s + 1, (*token).length()).c_str()); if ( !o.eof() ) { o >> offx; } } else if ( (*token).find("offsety=", 0) != std::string::npos ) { size_t s= (*token).find_first_of('='); - FB_istringstream o((*token).substr(s + 1, (*token).length())); + FbTk_istringstream o((*token).substr(s + 1, (*token).length()).c_str()); if ( !o.eof() ) { o >> offy; } diff --git a/src/Remember.cc b/src/Remember.cc index c49ee35..b15a861 100644 --- a/src/Remember.cc +++ b/src/Remember.cc @@ -354,7 +354,6 @@ int Remember::parseApp(ifstream &file, Application &app, string *first_line) { iss >> w >> h; app.rememberDimensions(w,h); } else if (str_key == "Position") { - FbTk_istringstream iss; unsigned int r= 0; unsigned int x= 0; unsigned int y= 0; @@ -370,13 +369,13 @@ int Remember::parseApp(ifstream &file, Application &app, string *first_line) { else if ( str_option == "CENTER" ) r= POS_CENTER; else if ( str_option == "WINCENTER" ) r= POS_WINCENTER; else { - iss.str(str_option); - iss >> r; + FbTk_istringstream iss_r(str_option.c_str()); + iss_r >> r; } } - iss.str(str_label.c_str()); - iss >> x >> y; + FbTk_istringstream iss_xy(str_label.c_str()); + iss_xy >> x >> y; app.rememberPosition(x, y, r); } else if (str_key == "Shaded") { app.rememberShadedstate((str_label=="yes")); -- cgit v0.11.2