nano

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

commit 41704548377f1487ee1ae33877c1c176669c9e82
parent e90b7cf4aa5d55296c77da9eeb98fd11cc96073b
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sat,  4 Aug 2018 10:53:34 +0200

tweaks: exclude a global flagging variable when it is not needed

Diffstat:
Msrc/global.c | 3++-
Msrc/nano.c | 2++
Msrc/proto.h | 2++
3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/global.c b/src/global.c @@ -239,9 +239,10 @@ char *homedir = NULL; /* The user's home directory, from $HOME or /etc/passwd. */ char *statedir = NULL; /* The directory for nano's history files. */ +#ifdef ENABLE_NANORC char *rcfile_with_errors = NULL; /* The first nanorc file, if any, that produced warnings. */ - +#endif /* Return the number of entries in the shortcut list for a given menu. */ size_t length_of_list(int menu) diff --git a/src/nano.c b/src/nano.c @@ -2661,8 +2661,10 @@ int main(int argc, char **argv) prepare_for_display(); +#ifdef ENABLE_NANORC if (rcfile_with_errors != NULL) statusline(ALERT, _("Mistakes in '%s'"), rcfile_with_errors); +#endif #ifdef ENABLE_HELP if (*openfile->filename == '\0' && openfile->totsize == 0 && diff --git a/src/proto.h b/src/proto.h @@ -178,7 +178,9 @@ extern int interface_color_pair[NUMBER_OF_ELEMENTS]; extern char *homedir; extern char *statedir; +#ifdef ENABLE_NANORC extern char *rcfile_with_errors; +#endif typedef void (*functionptrtype)(void);