aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-11-17 00:33:16 (GMT)
committerfluxgen <fluxgen>2003-11-17 00:33:16 (GMT)
commita2f947e3003b353f2ac0b5de63eab6b6d6483534 (patch)
tree294695acd706f095942153184c201036c6d92232
parentf592b67c70b29542d716fe633bdca2c20f2db689 (diff)
downloadfluxbox-a2f947e3003b353f2ac0b5de63eab6b6d6483534.zip
fluxbox-a2f947e3003b353f2ac0b5de63eab6b6d6483534.tar.bz2
check for sstream header
-rw-r--r--src/ClientPattern.cc20
-rw-r--r--src/FbCommandFactory.cc25
2 files changed, 37 insertions, 8 deletions
diff --git a/src/ClientPattern.cc b/src/ClientPattern.cc
index 99f6b49..5c110fc 100644
--- a/src/ClientPattern.cc
+++ b/src/ClientPattern.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: ClientPattern.cc,v 1.4 2003/10/12 16:25:28 rathnor Exp $ 23// $Id: ClientPattern.cc,v 1.5 2003/11/17 00:29:30 fluxgen Exp $
24 24
25#include "ClientPattern.hh" 25#include "ClientPattern.hh"
26#include "RegExp.hh" 26#include "RegExp.hh"
@@ -34,7 +34,6 @@
34 34
35 35
36#include <iostream> 36#include <iostream>
37#include <sstream>
38#include <fstream> 37#include <fstream>
39#include <string> 38#include <string>
40#include <memory> 39#include <memory>
@@ -43,6 +42,21 @@
43// needed as well for index on some systems (e.g. solaris) 42// needed as well for index on some systems (e.g. solaris)
44#include <strings.h> 43#include <strings.h>
45 44
45#ifdef HAVE_CONFIG_H
46#include "config.h"
47#endif // HAVE_CONFIG_H
48
49#ifdef HAVE_SSTREAM
50#include <sstream>
51#define FB_istringstream istringstream
52#elif HAVE_STRSTREAM
53#include <strstream>
54#define FB_istringstream istrstream
55#else
56#error "You dont have sstream or strstream headers!"
57#endif // HAVE_STRSTREAM
58
59
46using namespace std; 60using namespace std;
47 61
48ClientPattern::ClientPattern(): 62ClientPattern::ClientPattern():
@@ -120,7 +134,7 @@ ClientPattern::ClientPattern(const char *str):
120 str+pos, 134 str+pos,
121 '{', '}'); 135 '{', '}');
122 if (err > 0) { 136 if (err > 0) {
123 istringstream iss(number.c_str()); 137 FB_istringstream iss(number.c_str());
124 iss >> m_matchlimit; 138 iss >> m_matchlimit;
125 pos+=err; 139 pos+=err;
126 } 140 }
diff --git a/src/FbCommandFactory.cc b/src/FbCommandFactory.cc
index b0b5976..b62a9ce 100644
--- a/src/FbCommandFactory.cc
+++ b/src/FbCommandFactory.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: FbCommandFactory.cc,v 1.19 2003/10/25 22:11:22 fluxgen Exp $ 23// $Id: FbCommandFactory.cc,v 1.20 2003/11/17 00:33:16 fluxgen Exp $
24 24
25#include "FbCommandFactory.hh" 25#include "FbCommandFactory.hh"
26 26
@@ -36,7 +36,22 @@
36#include "FbTk/MacroCommand.hh" 36#include "FbTk/MacroCommand.hh"
37 37
38#include <string> 38#include <string>
39
40#ifdef HAVE_CONFIG_H
41#include "config.h"
42#endif // HAVE_CONFIG_H
43
44#ifdef HAVE_SSTREAM
39#include <sstream> 45#include <sstream>
46#define FB_istringstream istringstream
47#elif HAVE_STRSTREAM
48#include <strstream>
49#define FB_istringstream istrstream
50#else
51#error "You dont have sstream or strstream headers!"
52#endif // HAVE_STRSTREAM
53
54using namespace std;
40 55
41// autoregister this module to command parser 56// autoregister this module to command parser
42FbCommandFactory FbCommandFactory::s_autoreg; 57FbCommandFactory FbCommandFactory::s_autoreg;
@@ -141,13 +156,13 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command,
141 else if (command == "maximizehorizontal") 156 else if (command == "maximizehorizontal")
142 return new CurrentWindowCmd(&FluxboxWindow::maximizeHorizontal); 157 return new CurrentWindowCmd(&FluxboxWindow::maximizeHorizontal);
143 else if (command == "resize") { 158 else if (command == "resize") {
144 std::istringstream is(arguments); 159 FB_istringstream is(arguments.c_str());
145 int dx = 0, dy = 0; 160 int dx = 0, dy = 0;
146 is >> dx >> dy; 161 is >> dx >> dy;
147 return new ResizeCmd(dx, dy); 162 return new ResizeCmd(dx, dy);
148 } 163 }
149 else if (command == "resizeto") { 164 else if (command == "resizeto") {
150 std::istringstream is(arguments); 165 FB_istringstream is(arguments.c_str());
151 int dx = 0, dy = 0; 166 int dx = 0, dy = 0;
152 is >> dx >> dy; 167 is >> dx >> dy;
153 return new ResizeToCmd(dx, dy); 168 return new ResizeToCmd(dx, dy);
@@ -157,13 +172,13 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command,
157 else if (command == "resizevertical") 172 else if (command == "resizevertical")
158 return new ResizeCmd(0,atoi(arguments.c_str())); 173 return new ResizeCmd(0,atoi(arguments.c_str()));
159 else if (command == "moveto") { 174 else if (command == "moveto") {
160 std::istringstream is(arguments); 175 FB_istringstream is(arguments.c_str());
161 int dx = 0, dy = 0; 176 int dx = 0, dy = 0;
162 is >> dx >> dy; 177 is >> dx >> dy;
163 return new MoveToCmd(dx,dy); 178 return new MoveToCmd(dx,dy);
164 } 179 }
165 else if (command == "move") { 180 else if (command == "move") {
166 std::istringstream is(arguments); 181 FB_istringstream is(arguments.c_str());
167 int dx = 0, dy = 0; 182 int dx = 0, dy = 0;
168 is >> dx >> dy; 183 is >> dx >> dy;
169 return new MoveCmd(dx, dy); 184 return new MoveCmd(dx, dy);