diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-10-14 16:06:30 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-10-14 16:06:30 +0200 |
commit | 574a7ff80b7a5c73e0993a25ef7996f83eee0d45 (patch) | |
tree | 092b9c2fa823d584306226478e4c137a0b24f7a3 /src | |
parent | 5cc0aeb15280903018e5e4dd00ab47c26d5f4e7c (diff) | |
download | sciteco-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')
-rw-r--r-- | src/cmdline.cpp | 8 | ||||
-rw-r--r-- | src/interface-curses.h | 2 |
2 files changed, 5 insertions, 5 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); diff --git a/src/interface-curses.h b/src/interface-curses.h index 6116cae..e3bbbf5 100644 --- a/src/interface-curses.h +++ b/src/interface-curses.h @@ -96,7 +96,7 @@ typedef class InterfaceCurses : public Interface<InterfaceCurses, ViewCurses> { */ struct { short r, g, b; - } orig_color_table[G_N_ELEMENTS(color_table)]; + } orig_color_table[16]; int stdout_orig, stderr_orig; SCREEN *screen; |