aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cmdline.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2015-10-14 16:06:30 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2015-10-14 16:06:30 +0200
commit574a7ff80b7a5c73e0993a25ef7996f83eee0d45 (patch)
tree092b9c2fa823d584306226478e4c137a0b24f7a3 /src/cmdline.cpp
parent5cc0aeb15280903018e5e4dd00ab47c26d5f4e7c (diff)
downloadsciteco-574a7ff80b7a5c73e0993a25ef7996f83eee0d45.tar.gz
minor Clang and OS X compilation fixes
* we cannot use G_N_ELEMENTS in attribute declarations with Clang unless declaring C++11. In this case, since the size of the orig_color_table is fixed anyway, the declaration was simply fixed. * some reordering was necessary in cmdline.cpp. This should not have any influence on GCC when optimizations are enabled. * Scintilla/Scinterm had to be updated as well.
Diffstat (limited to 'src/cmdline.cpp')
-rw-r--r--src/cmdline.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmdline.cpp b/src/cmdline.cpp
index 1a3447f..59dba59 100644
--- a/src/cmdline.cpp
+++ b/src/cmdline.cpp
@@ -554,15 +554,15 @@ Cmdline::fnmacro(const gchar *name)
FNMACRO_MASK_STRING = (1 << 1)
};
- if (!(Flags::ed & Flags::ED_FNKEYS))
- /* function key macros disabled */
- goto default_action;
-
gchar macro_name[1 + strlen(name) + 1];
QRegister *reg;
tecoInt mask;
gchar *macro;
+ if (!(Flags::ed & Flags::ED_FNKEYS))
+ /* function key macros disabled */
+ goto default_action;
+
macro_name[0] = CTL_KEY('F');
g_strlcpy(macro_name + 1, name, sizeof(macro_name) - 1);