diff --git a/configure.ac b/configure.ac index b8103ce6..02c8a658 100644 --- a/configure.ac +++ b/configure.ac @@ -112,8 +112,13 @@ fi AC_ARG_ENABLE(extra, AS_HELP_STRING([--disable-extra], [Disable the Easter egg])) -if test "x$enable_extra" = xno; then - AC_DEFINE(DISABLE_EXTRA, 1, [Define this to disable extra stuff.]) +if test "x$enable_tiny" = xyes; then + if test "x$enable_extra" != xyes; then + enable_extra=no + fi +fi +if test "x$enable_extra" != xno; then + AC_DEFINE(ENABLE_EXTRA, 1, [Define this to have an Easter egg.]) fi AC_ARG_ENABLE(help, @@ -284,9 +289,6 @@ AC_ARG_ENABLE(tiny, 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.]) - if test "x$enable_extra" != xyes; then - AC_DEFINE(DISABLE_EXTRA, 1, [Define this to disable extra stuff.]) - fi if test "x$enable_libmagic" != xyes; then enable_libmagic=no fi diff --git a/src/files.c b/src/files.c index 27a8a506..42426e33 100644 --- a/src/files.c +++ b/src/files.c @@ -2030,7 +2030,7 @@ int do_writeout(bool exiting, bool withprompt) /* The filename we offer, or what the user typed so far. */ bool maychange = (openfile->filename[0] == '\0'); /* Whether it's okay to save the file under a different name. */ -#ifndef DISABLE_EXTRA +#ifdef ENABLE_EXTRA static bool did_credits = FALSE; #endif @@ -2139,7 +2139,7 @@ int do_writeout(bool exiting, bool withprompt) continue; } -#ifndef DISABLE_EXTRA +#ifdef ENABLE_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 d9710b35..f4196aac 100644 --- a/src/nano.c +++ b/src/nano.c @@ -933,7 +933,7 @@ void version(void) #ifdef ENABLE_COLOR printf(" --enable-color"); #endif -#ifndef DISABLE_EXTRA +#ifdef ENABLE_EXTRA printf(" --enable-extra"); #endif #ifdef ENABLE_HELP @@ -982,7 +982,7 @@ void version(void) #ifndef ENABLE_COMMENT printf(" --disable-comment"); #endif -#ifdef DISABLE_EXTRA +#ifndef ENABLE_EXTRA printf(" --disable-extra"); #endif #ifndef ENABLE_HELP diff --git a/src/proto.h b/src/proto.h index dfc8f228..9c3c6383 100644 --- a/src/proto.h +++ b/src/proto.h @@ -691,7 +691,7 @@ void spotlight_softwrapped(bool active, size_t from_col, size_t to_col); void do_suspend_void(void); void disable_waiting(void); void enable_waiting(void); -#ifndef DISABLE_EXTRA +#ifdef ENABLE_EXTRA void do_credits(void); #endif diff --git a/src/winio.c b/src/winio.c index d4facab4..cd466d2d 100644 --- a/src/winio.c +++ b/src/winio.c @@ -3563,7 +3563,7 @@ void spotlight_softwrapped(bool active, size_t from_col, size_t to_col) } #endif -#ifndef DISABLE_EXTRA +#ifdef ENABLE_EXTRA #define CREDIT_LEN 54 #define XLCREDIT_LEN 9 @@ -3712,4 +3712,4 @@ void do_credits(void) total_refresh(); } -#endif /* !DISABLE_EXTRA */ +#endif /* ENABLE_EXTRA */