diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2023-04-14 20:42:03 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2023-04-14 20:42:03 +0300 |
commit | 030e0f5859698638a33d3a34c0659871d1dc7333 (patch) | |
tree | 4be596a4c481e7fcc70a358a2ad34934ea4f7e12 /src/symbols.c | |
parent | ba0875373d2250e3a6d63d5269ff1a4a89a280ed (diff) | |
download | sciteco-030e0f5859698638a33d3a34c0659871d1dc7333.tar.gz |
allow disabling Lexilla (Lexer) support by specifying --without-lexilla
* This does not make sense for most SciTECO builds, but only when you
want to optimize for size as the lexers take up 50% of the compressed binary
size.
Without Lexilla, it should be possible get it compiled in about 500kb.
* It can be useful for instance when building for embedded distributions.
* When Lexilla is disabled, symbols-scilexer.c is also not generated
(we assume that the Lexilla sources are not available and it also doesn't serve any purpose).
* Consequently, most of the lexer configuration scripts are also not installed
under --without-lexilla.
Diffstat (limited to 'src/symbols.c')
-rw-r--r-- | src/symbols.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/symbols.c b/src/symbols.c index 39703e8..ce7a7f6 100644 --- a/src/symbols.c +++ b/src/symbols.c @@ -25,7 +25,9 @@ #include <glib.h> #include <Scintilla.h> +#ifdef HAVE_LEXILLA #include <Lexilla.h> +#endif #include "sciteco.h" #include "string-utils.h" @@ -319,6 +321,7 @@ teco_state_scintilla_lparam_done(teco_machine_main_t *ctx, const teco_string_t * sptr_t lParam = 0; +#ifdef HAVE_LEXILLA if (ctx->scintilla.iMessage == SCI_SETILEXER) { if (teco_string_contains(str, '\0')) { g_set_error_literal(error, TECO_ERROR, TECO_ERROR_FAILED, @@ -333,7 +336,9 @@ teco_state_scintilla_lparam_done(teco_machine_main_t *ctx, const teco_string_t * "Lexilla lexer \"%s\" not found.", lexer); return NULL; } - } else if (str->len > 0) { + } else +#endif + if (str->len > 0) { /* * NOTE: There may even be messages that read strings * with embedded nulls. |