summaryrefslogtreecommitdiff
path: root/editbox2.cc
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir@cohens.org.il>2012-09-15 03:17:45 +0300
committerTzafrir Cohen <tzafrir@cohens.org.il>2012-09-15 03:17:45 +0300
commit7e13676d807471211320962d6e420ebec8cf7eec (patch)
tree2da516744dfeb375efdd06d98f65560458292773 /editbox2.cc
parent8e2e05e4bd041b559a0352f0ad93729b7b65db91 (diff)
Reqwritten autoconf. Now builds
* Rewritten autoconf * (Hopefully not over-)Simplified it. * Quite a few build fixes (not well done, probably)
Diffstat (limited to 'editbox2.cc')
-rw-r--r--editbox2.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/editbox2.cc b/editbox2.cc
index 2d055ea..76c4aaa 100644
--- a/editbox2.cc
+++ b/editbox2.cc
@@ -15,6 +15,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
#include <config.h>
+#include <stdlib.h>
#include "editbox.h"
#include "transtbl.h"
@@ -1616,11 +1617,12 @@ void EditBox::log2vis(const char *options)
opt_nopad = true;
if (strstr(options, "engpad"))
opt_engpad = true;
- char *s;
- if ((s = strstr(options, "emph"))) {
+ const char *s;
+ // FIXME: The following writes on s, which is in the read-only buffer options.
+ if (s = strstr(options, "emph")) {
opt_emph = true;
if (s[4] == ':') {
- opt_emph_ch = strtol(s + 5, &s, 0);
+ opt_emph_ch = strtol(s + 5, (char**)&s, 0); // FIXME: Brute force. Tzafrir
if (s && (*s == ':' || *s == ','))
opt_emph_marker = strtol(s + 1, NULL, 0);
}