tweaks: transform the token DISABLE_EXTRA to ENABLE_EXTRA

master
Benno Schulenberg 2017-11-01 20:33:14 +01:00
parent 9dc72cf3ba
commit d054044d30
5 changed files with 14 additions and 12 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 */