summaryrefslogtreecommitdiff
path: root/games/xevil/files/patch-x11__panel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'games/xevil/files/patch-x11__panel.cpp')
-rw-r--r--games/xevil/files/patch-x11__panel.cpp52
1 files changed, 52 insertions, 0 deletions
diff --git a/games/xevil/files/patch-x11__panel.cpp b/games/xevil/files/patch-x11__panel.cpp
new file mode 100644
index 000000000000..f75f23f74adb
--- /dev/null
+++ b/games/xevil/files/patch-x11__panel.cpp
@@ -0,0 +1,52 @@
+--- x11/panel.cpp.orig 2012-05-27 06:52:29.000000000 +0900
++++ x11/panel.cpp 2012-05-27 06:52:58.000000000 +0900
+@@ -31,13 +31,14 @@
+ #include <X11/Xutil.h>
+ #include <X11/keysym.h>
+ }
+-#include <iostream.h>
+-#include <strstream.h>
++#include <iostream>
++#include <sstream>
+
+ #include "utils.h"
+ #include "xdata.h"
+ #include "panel.h"
+
++using namespace std;
+
+ #define PANEL_BORDER 1
+ #define PANEL_MARGAIN 2
+@@ -311,15 +312,14 @@
+
+
+ void WritePanel::update_message() {
+- ostrstream tmp;
++ stringstream tmp;
+ if (active) {
+- tmp << prompt << value << "_" << ends;
++ tmp << prompt << value << "_";
+ }
+ else {
+- tmp << prompt << value << ends;
++ tmp << prompt << value;
+ }
+- set_message(tmp.str());
+- delete tmp.str();
++ set_message(tmp.str().c_str());
+ }
+
+
+@@ -524,9 +524,8 @@
+ return;
+ }
+
+- ostrstream tmp;
+- tmp << "CHAT <<" << value << "\nEnter to send, Esc to cancel." << ends;
+- TextPanel::set_message(tmp.str());
+- delete tmp.str();
++ stringstream tmp;
++ tmp << "CHAT <<" << value << "\nEnter to send, Esc to cancel.";
++ TextPanel::set_message(tmp.str().c_str());
+ }
+