nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit ccabaac5a035f4caf352bc0b422071129595b666
parent 80f7852941cf314de864cb4ff7ad52c3d35f9e18
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 29 Aug 2022 08:44:28 +0200

build: exclude two unneeded functions correctly from the tiny version

This also amends commit 4f9abb52 from yesterday -- I don't know how I
managed to overlook the warning.  :/

Diffstat:
Msrc/prototypes.h | 4+++-
Msrc/search.c | 2++
Msrc/utils.c | 2++
3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/prototypes.h b/src/prototypes.h @@ -469,7 +469,9 @@ ssize_t do_replace_loop(const char *needle, bool whole_word_only, const linestruct *real_current, size_t *real_current_x); void do_replace(void); void ask_for_and_do_replacements(void); +#if !defined(NANO_TINY) || defined(ENABLE_SPELLER) || defined (ENABLE_LINTER) || defined (ENABLE_FORMATTER) void goto_line_posx(ssize_t line, size_t pos_x); +#endif void goto_line_and_column(ssize_t line, ssize_t column, bool retain_answer, bool interactive); void do_gotolinecolumn(void); @@ -572,7 +574,7 @@ void get_region(linestruct **top, size_t *top_x, linestruct **bot, size_t *bot_x void get_range(linestruct **top, linestruct **bot); #endif size_t number_of_characters_in(const linestruct *begin, const linestruct *end); -#ifndef NANO_TINY +#if !defined(NANO_TINY) || defined(ENABLE_SPELLER) || defined (ENABLE_LINTER) || defined (ENABLE_FORMATTER) linestruct *line_from_number(ssize_t number); #endif diff --git a/src/search.c b/src/search.c @@ -736,6 +736,7 @@ void ask_for_and_do_replacements(void) "Replaced %zd occurrences", numreplaced), numreplaced); } +#if !defined(NANO_TINY) || defined(ENABLE_SPELLER) || defined (ENABLE_LINTER) || defined (ENABLE_FORMATTER) /* Go to the specified line and x position. */ void goto_line_posx(ssize_t linenumber, size_t pos_x) { @@ -751,6 +752,7 @@ void goto_line_posx(ssize_t linenumber, size_t pos_x) refresh_needed = TRUE; } +#endif /* Go to the specified line and column, or ask for them if interactive * is TRUE. In the latter case also update the screen afterwards. diff --git a/src/utils.c b/src/utils.c @@ -486,6 +486,7 @@ void get_range(linestruct **top, linestruct **bot) } #endif /* !NANO_TINY */ +#if !defined(NANO_TINY) || defined(ENABLE_SPELLER) || defined (ENABLE_LINTER) || defined (ENABLE_FORMATTER) /* Return a pointer to the line that has the given line number. */ linestruct *line_from_number(ssize_t number) { @@ -500,6 +501,7 @@ linestruct *line_from_number(ssize_t number) return line; } +#endif /* Count the number of characters from begin to end, and return it. */ size_t number_of_characters_in(const linestruct *begin, const linestruct *end)