commit 5cee9f183b5f6b3d79b1d50c035adaed4e9726fd
parent 958ec294b247c7104fe8af34a519935e5e1cd8a9
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Thu, 11 Aug 2022 15:37:35 +0200
build: exclude some pieces that are not needed with --disable-nanorc
Diffstat:
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/nano.c b/src/nano.c
@@ -1269,10 +1269,12 @@ void unbound_key(int code)
/* TRANSLATORS: This refers to a sequence of escape codes
* (from the keyboard) that nano does not recognize. */
statusline(AHEM, _("Unknown sequence"));
+#ifdef ENABLE_NANORC
else if (code == MISSING_BRACE)
statusline(AHEM, _("Missing }"));
else if (code == NO_SUCH_FUNCTION)
statusline(AHEM, _("No such function: %s"), commandname);
+#endif
#ifndef NANO_TINY
else if (code > KEY_F0 && code < KEY_F0 + 25)
/* TRANSLATORS: This refers to an unbound function key. */
diff --git a/src/winio.c b/src/winio.c
@@ -64,8 +64,10 @@ static bool has_more = FALSE;
/* Whether the current line has more text after the displayed part. */
static bool is_shorter = TRUE;
/* Whether a row's text is narrower than the screen's width. */
+#ifdef ENABLE_NANORC
static const char *plants_pointer = NULL;
/* Points into the expansion string for the current implantation. */
+#endif
#ifndef NANO_TINY
static size_t sequel_column = 0;
/* The starting column of the next chunk when softwrapping. */
@@ -395,10 +397,12 @@ int get_input(WINDOW *frame)
if (waiting_codes > 0) {
waiting_codes--;
+#ifdef ENABLE_NANORC
if (*nextcodes == MORE_PLANTS) {
nextcodes++;
return get_code_from_plantation();
} else
+#endif
return *(nextcodes++);
} else
return ERR;