1
1

tweaks: transform the token DISABLE_EXTRA to ENABLE_EXTRA

Этот коммит содержится в:
Benno Schulenberg 2017-11-01 20:33:14 +01:00
родитель 9dc72cf3ba
Коммит d054044d30
5 изменённых файлов: 14 добавлений и 12 удалений

Просмотреть файл

@ -112,8 +112,13 @@ fi
AC_ARG_ENABLE(extra, AC_ARG_ENABLE(extra,
AS_HELP_STRING([--disable-extra], [Disable the Easter egg])) AS_HELP_STRING([--disable-extra], [Disable the Easter egg]))
if test "x$enable_extra" = xno; then if test "x$enable_tiny" = xyes; then
AC_DEFINE(DISABLE_EXTRA, 1, [Define this to disable extra stuff.]) 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 fi
AC_ARG_ENABLE(help, AC_ARG_ENABLE(help,
@ -284,9 +289,6 @@ AC_ARG_ENABLE(tiny,
AS_HELP_STRING([--enable-tiny], [Disable features for the sake of size])) AS_HELP_STRING([--enable-tiny], [Disable features for the sake of size]))
if test "x$enable_tiny" = xyes; then 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(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 if test "x$enable_libmagic" != xyes; then
enable_libmagic=no enable_libmagic=no
fi fi

Просмотреть файл

@ -2030,7 +2030,7 @@ int do_writeout(bool exiting, bool withprompt)
/* The filename we offer, or what the user typed so far. */ /* The filename we offer, or what the user typed so far. */
bool maychange = (openfile->filename[0] == '\0'); bool maychange = (openfile->filename[0] == '\0');
/* Whether it's okay to save the file under a different name. */ /* Whether it's okay to save the file under a different name. */
#ifndef DISABLE_EXTRA #ifdef ENABLE_EXTRA
static bool did_credits = FALSE; static bool did_credits = FALSE;
#endif #endif
@ -2139,7 +2139,7 @@ int do_writeout(bool exiting, bool withprompt)
continue; continue;
} }
#ifndef DISABLE_EXTRA #ifdef ENABLE_EXTRA
/* If the current file has been modified, we've pressed /* If the current file has been modified, we've pressed
* Ctrl-X at the edit window to exit, we've pressed "y" at * Ctrl-X at the edit window to exit, we've pressed "y" at
* the "Save modified buffer" prompt to save, we've entered * the "Save modified buffer" prompt to save, we've entered

Просмотреть файл

@ -933,7 +933,7 @@ void version(void)
#ifdef ENABLE_COLOR #ifdef ENABLE_COLOR
printf(" --enable-color"); printf(" --enable-color");
#endif #endif
#ifndef DISABLE_EXTRA #ifdef ENABLE_EXTRA
printf(" --enable-extra"); printf(" --enable-extra");
#endif #endif
#ifdef ENABLE_HELP #ifdef ENABLE_HELP
@ -982,7 +982,7 @@ void version(void)
#ifndef ENABLE_COMMENT #ifndef ENABLE_COMMENT
printf(" --disable-comment"); printf(" --disable-comment");
#endif #endif
#ifdef DISABLE_EXTRA #ifndef ENABLE_EXTRA
printf(" --disable-extra"); printf(" --disable-extra");
#endif #endif
#ifndef ENABLE_HELP #ifndef ENABLE_HELP

Просмотреть файл

@ -691,7 +691,7 @@ void spotlight_softwrapped(bool active, size_t from_col, size_t to_col);
void do_suspend_void(void); void do_suspend_void(void);
void disable_waiting(void); void disable_waiting(void);
void enable_waiting(void); void enable_waiting(void);
#ifndef DISABLE_EXTRA #ifdef ENABLE_EXTRA
void do_credits(void); void do_credits(void);
#endif #endif

Просмотреть файл

@ -3563,7 +3563,7 @@ void spotlight_softwrapped(bool active, size_t from_col, size_t to_col)
} }
#endif #endif
#ifndef DISABLE_EXTRA #ifdef ENABLE_EXTRA
#define CREDIT_LEN 54 #define CREDIT_LEN 54
#define XLCREDIT_LEN 9 #define XLCREDIT_LEN 9
@ -3712,4 +3712,4 @@ void do_credits(void)
total_refresh(); total_refresh();
} }
#endif /* !DISABLE_EXTRA */ #endif /* ENABLE_EXTRA */