Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
d054044d
Commit
d054044d
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: transform the token DISABLE_EXTRA to ENABLE_EXTRA
parent
9dc72cf3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
configure.ac
+7
-5
configure.ac
src/files.c
+2
-2
src/files.c
src/nano.c
+2
-2
src/nano.c
src/proto.h
+1
-1
src/proto.h
src/winio.c
+2
-2
src/winio.c
with
14 additions
and
12 deletions
+14
-12
configure.ac
View file @
d054044d
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
src/files.c
View file @
d054044d
...
...
@@ -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. */
#if
n
def
DIS
ABLE_EXTRA
#ifdef
EN
ABLE_EXTRA
static
bool
did_credits
=
FALSE
;
#endif
...
...
@@ -2139,7 +2139,7 @@ int do_writeout(bool exiting, bool withprompt)
continue
;
}
#if
n
def
DIS
ABLE_EXTRA
#ifdef
EN
ABLE_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
...
...
This diff is collapsed.
Click to expand it.
src/nano.c
View file @
d054044d
...
...
@@ -933,7 +933,7 @@ void version(void)
#ifdef ENABLE_COLOR
printf
(
" --enable-color"
);
#endif
#if
n
def
DIS
ABLE_EXTRA
#ifdef
EN
ABLE_EXTRA
printf
(
" --enable-extra"
);
#endif
#ifdef ENABLE_HELP
...
...
@@ -982,7 +982,7 @@ void version(void)
#ifndef ENABLE_COMMENT
printf
(
" --disable-comment"
);
#endif
#ifdef
DIS
ABLE_EXTRA
#if
n
def
EN
ABLE_EXTRA
printf
(
" --disable-extra"
);
#endif
#ifndef ENABLE_HELP
...
...
This diff is collapsed.
Click to expand it.
src/proto.h
View file @
d054044d
...
...
@@ -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
);
#if
n
def
DIS
ABLE_EXTRA
#ifdef
EN
ABLE_EXTRA
void
do_credits
(
void
);
#endif
...
...
This diff is collapsed.
Click to expand it.
src/winio.c
View file @
d054044d
...
...
@@ -3563,7 +3563,7 @@ void spotlight_softwrapped(bool active, size_t from_col, size_t to_col)
}
#endif
#if
n
def
DIS
ABLE_EXTRA
#ifdef
EN
ABLE_EXTRA
#define CREDIT_LEN 54
#define XLCREDIT_LEN 9
...
...
@@ -3712,4 +3712,4 @@ void do_credits(void)
total_refresh
();
}
#endif
/*
!DIS
ABLE_EXTRA */
#endif
/*
EN
ABLE_EXTRA */
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment