From 5cee9f183b5f6b3d79b1d50c035adaed4e9726fd Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Thu, 11 Aug 2022 15:37:35 +0200 Subject: [PATCH] build: exclude some pieces that are not needed with --disable-nanorc --- src/nano.c | 2 ++ src/winio.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/nano.c b/src/nano.c index ec243767..206d3705 100644 --- 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 index 98c4b4bc..2462e427 100644 --- 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;