aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gtk/PlatGTK.cxx1
-rw-r--r--gtk/ScintillaGTK.cxx10
-rw-r--r--src/KeyWords.cxx44
-rw-r--r--src/PropSet.cxx4
4 files changed, 55 insertions, 4 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx
index 2dd35be7e..13d9778d6 100644
--- a/gtk/PlatGTK.cxx
+++ b/gtk/PlatGTK.cxx
@@ -5,6 +5,7 @@
#include <string.h>
#include <stdio.h>
+#include <stdlib.h>
#include <gtk/gtk.h>
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index 310ef032b..2bfdc8101 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -78,7 +78,7 @@ private:
virtual void SetVerticalScrollPos();
virtual void SetHorizontalScrollPos();
virtual bool ModifyScrollBars(int nMax, int nPage);
- void ScintillaGTK::ReconfigureScrollBars();
+ void ReconfigureScrollBars();
virtual void NotifyChange();
virtual void NotifyFocus(bool focus);
virtual void NotifyParent(SCNotification scn);
@@ -504,7 +504,7 @@ void ScintillaGTK::SetTicking(bool on) {
if (timer.ticking != on) {
timer.ticking = on;
if (timer.ticking) {
- timer.tickerID = gtk_timeout_add(timer.tickSize, TimeOut, this);
+ timer.tickerID = gtk_timeout_add(timer.tickSize, (GtkFunction)TimeOut, this);
} else {
gtk_timeout_remove(timer.tickerID);
}
@@ -1243,8 +1243,10 @@ guint scintilla_get_type() {
sizeof (ScintillaClass),
(GtkClassInitFunc) scintilla_class_init,
(GtkObjectInitFunc) scintilla_init,
- (GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL,
+ //(GtkArgSetFunc) NULL,
+ //(GtkArgGetFunc) NULL,
+ (gpointer) NULL,
+ (gpointer) NULL,
0
};
diff --git a/src/KeyWords.cxx b/src/KeyWords.cxx
index 113ba222d..7355580ed 100644
--- a/src/KeyWords.cxx
+++ b/src/KeyWords.cxx
@@ -43,3 +43,47 @@ void LexerModule::Colourise(unsigned int startPos, int lengthDoc, int initStyle,
styler.ColourTo(startPos + lengthDoc - 1, 0);
}
}
+
+#ifdef __vms
+
+// The following code forces a reference to all of the Scintilla lexers.
+// If we don't do something like this, then the linker tends to "optimize"
+// them away. (eric@sourcegear.com)
+
+// Taken from wxWindow's stc.cpp. Walter.
+
+int wxForceScintillaLexers(void) {
+ extern LexerModule lmCPP;
+ extern LexerModule lmHTML;
+ extern LexerModule lmXML;
+ extern LexerModule lmProps;
+ extern LexerModule lmErrorList;
+ extern LexerModule lmMake;
+ extern LexerModule lmBatch;
+ extern LexerModule lmPerl;
+ extern LexerModule lmPython;
+ extern LexerModule lmSQL;
+ extern LexerModule lmVB;
+
+ if (
+ &lmCPP
+ && &lmHTML
+ && &lmXML
+ && &lmProps
+ && &lmErrorList
+ && &lmMake
+ && &lmBatch
+ && &lmPerl
+ && &lmPython
+ && &lmSQL
+ && &lmVB
+ )
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+#endif
diff --git a/src/PropSet.cxx b/src/PropSet.cxx
index d5be286e1..48b6cc782 100644
--- a/src/PropSet.cxx
+++ b/src/PropSet.cxx
@@ -315,7 +315,11 @@ void PropSet::ReadFromMemory(const char *data, int len, const char *directoryFor
void PropSet::Read(const char *filename, const char *directoryForImports) {
char propsData[60000];
+#ifdef __vms
+ FILE *rcfile = fopen(filename, "r");
+#else
FILE *rcfile = fopen(filename, "rb");
+#endif
if (rcfile) {
int lenFile = fread(propsData, 1, sizeof(propsData), rcfile);
fclose(rcfile);