diff --git a/ChangeLog b/ChangeLog index 98df72d5..d1e2acf5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,8 @@ * configure.ac: Sort all the disabling options alphabetically. * src/{proto.h,files.c,global.c,nano.c,rcfile.c}, configure.ac: Convert #ifdef ENABLE_MULTIBUFFER to #ifndef DISABLE_MULTIBUFFER. + * src/{proto.h,files.c,,nano.c,winio.c}, configure.ac: + Convert #ifdef NANO_EXTRA to #ifndef DISABLE_EXTRA. 2014-04-02 Benno Schulenberg * configure.ac, doc/Makefile.am: Try to build the info documentation diff --git a/configure.ac b/configure.ac index 2f500d9c..fa76f4aa 100644 --- a/configure.ac +++ b/configure.ac @@ -69,6 +69,7 @@ AS_HELP_STRING([--enable-tiny], [Disable features for the sake of size])) if test "x$enable_tiny" = xyes; then AC_DEFINE(NANO_TINY, 1, [Define this to make the nano executable as small as possible.]) AC_DEFINE(DISABLE_BROWSER, 1, [Define this to disable the built-in file browser.]) + AC_DEFINE(DISABLE_EXTRA, 1, [Define this to disable extra stuff.]) AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the help text display.]) AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routines.]) AC_DEFINE(DISABLE_MOUSE, 1, [Define this to disable the mouse support.]) @@ -110,8 +111,8 @@ fi AC_ARG_ENABLE(extra, AS_HELP_STRING([--disable-extra], [Disable extra features, currently only easter eggs])) -if test "x$enable_extra" != xno; then - AC_DEFINE(NANO_EXTRA, 1, [Define this to enable extra stuff.]) +if test "x$enable_extra" = xno; then + AC_DEFINE(DISABLE_EXTRA, 1, [Define this to disable extra stuff.]) fi AC_ARG_ENABLE(help, diff --git a/src/files.c b/src/files.c index 59cf67b9..4b25f6ac 100644 --- a/src/files.c +++ b/src/files.c @@ -2223,7 +2223,7 @@ bool do_writeout(bool exiting) append_type append = OVERWRITE; char *ans; /* The last answer the user typed at the statusbar prompt. */ -#ifdef NANO_EXTRA +#ifndef DISABLE_EXTRA static bool did_credits = FALSE; #endif bool retval = FALSE, meta_key = FALSE, func_key = FALSE; @@ -2343,7 +2343,7 @@ bool do_writeout(bool exiting) fprintf(stderr, "filename is %s\n", answer); #endif -#ifdef NANO_EXTRA +#ifndef DISABLE_EXTRA /* If the current file has been modified, we've pressed * Ctrl-X at the edit window to exit, we've pressed "y" at * the "Save modified buffer" prompt to save, we've entered diff --git a/src/nano.c b/src/nano.c index c475f1c6..52cbcc5e 100644 --- a/src/nano.c +++ b/src/nano.c @@ -971,6 +971,9 @@ void version(void) #ifdef DISABLE_BROWSER printf(" --disable-browser"); #endif +#ifdef DISABLE_EXTRA + printf(" --disable-extra"); +#endif #ifdef DISABLE_HELP printf(" --disable-help"); #endif @@ -1007,9 +1010,6 @@ void version(void) #ifdef DEBUG printf(" --enable-debug"); #endif -#ifdef NANO_EXTRA - printf(" --enable-extra"); -#endif #ifdef ENABLE_NANORC printf(" --enable-nanorc"); #endif diff --git a/src/proto.h b/src/proto.h index add47f35..fcb1d96d 100644 --- a/src/proto.h +++ b/src/proto.h @@ -841,7 +841,7 @@ void disable_nodelay(void); extern const char *regexp_msg; #endif -#ifdef NANO_EXTRA +#ifndef DISABLE_EXTRA void do_credits(void); #endif diff --git a/src/winio.c b/src/winio.c index 900b7180..078b13da 100644 --- a/src/winio.c +++ b/src/winio.c @@ -3409,7 +3409,7 @@ void do_replace_highlight(bool highlight, const char *word) wattroff(edit, reverse_attr); } -#ifdef NANO_EXTRA +#ifndef DISABLE_EXTRA #define CREDIT_LEN 57 #define XLCREDIT_LEN 8 @@ -3576,4 +3576,4 @@ void do_credits(void) total_refresh(); } -#endif /* NANO_EXTRA */ +#endif /* !DISABLE_EXTRA */