commit d17438bd1ddd9620d0411510e21890dd57c0ed09
parent 0636d7b79712fff696d59663a2e644f31f32ea03
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Thu, 3 Apr 2014 20:57:44 +0000
Converting #ifdef NANO_EXTRA to #ifndef DISABLE_EXTRA.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4713 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
6 files changed, 13 insertions(+), 10 deletions(-)
diff --git 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 <bensberg@justemail.net>
* configure.ac, doc/Makefile.am: Try to build the info documentation
diff --git 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
@@ -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
@@ -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
@@ -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
@@ -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 */