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.
This commit is contained in:
mathias 2005-05-12 20:16:45 +00:00
parent 6280b9de05
commit 64336d4cec
3 changed files with 8 additions and 17 deletions

View file

@ -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;

View file

@ -23,6 +23,7 @@
#include "StringUtil.hh"
#include "stringstream.hh"
#include "Font.hh"
#include "FontImp.hh"
#include "I18n.hh"
@ -69,15 +70,6 @@
#include <typeinfo>
#include <langinfo.h>
#ifdef HAVE_SSTREAM
#include <sstream>
#define FB_istringstream istringstream
#elif HAVE_STRSTREAM
#include <strstream>
#define FB_istringstream istrstream
#else
#error "You dont have sstream or strstream headers!"
#endif // HAVE_STRSTREAM
#ifdef HAVE_CSTDLIB
#include <cstdlib>
@ -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;
}

View file

@ -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"));