check for sstream header
fluxgen fluxgen
2 files changed,
37 insertions(+),
8 deletions(-)
M
src/ClientPattern.cc
→
src/ClientPattern.cc
@@ -20,7 +20,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: ClientPattern.cc,v 1.4 2003/10/12 16:25:28 rathnor Exp $ +// $Id: ClientPattern.cc,v 1.5 2003/11/17 00:29:30 fluxgen Exp $ #include "ClientPattern.hh" #include "RegExp.hh"@@ -34,7 +34,6 @@ #endif // _GNU_SOURCE
#include <iostream> -#include <sstream> #include <fstream> #include <string> #include <memory>@@ -42,6 +41,21 @@ #include <cstdio>
// needed as well for index on some systems (e.g. solaris) #include <strings.h> + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif // HAVE_CONFIG_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 + using namespace std;@@ -120,7 +134,7 @@ err = FbTk::StringUtil::getStringBetween(number,
str+pos, '{', '}'); if (err > 0) { - istringstream iss(number.c_str()); + FB_istringstream iss(number.c_str()); iss >> m_matchlimit; pos+=err; }
M
src/FbCommandFactory.cc
→
src/FbCommandFactory.cc
@@ -20,7 +20,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbCommandFactory.cc,v 1.19 2003/10/25 22:11:22 fluxgen Exp $ +// $Id: FbCommandFactory.cc,v 1.20 2003/11/17 00:33:16 fluxgen Exp $ #include "FbCommandFactory.hh"@@ -36,7 +36,22 @@ #include "FbTk/StringUtil.hh"
#include "FbTk/MacroCommand.hh" #include <string> + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif // HAVE_CONFIG_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 + +using namespace std; // autoregister this module to command parser FbCommandFactory FbCommandFactory::s_autoreg;@@ -141,13 +156,13 @@ return new CurrentWindowCmd(&FluxboxWindow::maximizeVertical);
else if (command == "maximizehorizontal") return new CurrentWindowCmd(&FluxboxWindow::maximizeHorizontal); else if (command == "resize") { - std::istringstream is(arguments); + FB_istringstream is(arguments.c_str()); int dx = 0, dy = 0; is >> dx >> dy; return new ResizeCmd(dx, dy); } else if (command == "resizeto") { - std::istringstream is(arguments); + FB_istringstream is(arguments.c_str()); int dx = 0, dy = 0; is >> dx >> dy; return new ResizeToCmd(dx, dy);@@ -157,13 +172,13 @@ return new ResizeCmd(atoi(arguments.c_str()),0);
else if (command == "resizevertical") return new ResizeCmd(0,atoi(arguments.c_str())); else if (command == "moveto") { - std::istringstream is(arguments); + FB_istringstream is(arguments.c_str()); int dx = 0, dy = 0; is >> dx >> dy; return new MoveToCmd(dx,dy); } else if (command == "move") { - std::istringstream is(arguments); + FB_istringstream is(arguments.c_str()); int dx = 0, dy = 0; is >> dx >> dy; return new MoveCmd(dx, dy);