nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] [PATCH 2/3] build: eradicate the --disable-wrapping-as-root


From: Benno Schulenberg
Subject: [Nano-devel] [PATCH 2/3] build: eradicate the --disable-wrapping-as-root configure option
Date: Wed, 16 Jan 2019 19:58:18 +0100

It is no longer needed because hard-wrapping is disabled by default
for any user.
---
 configure.ac  |  6 ------
 doc/nano.texi |  4 ----
 src/nano.c    | 12 +-----------
 3 files changed, 1 insertion(+), 21 deletions(-)

diff --git a/configure.ac b/configure.ac
index 16cd4d34..dc06f559 100644
--- a/configure.ac
+++ b/configure.ac
@@ -298,12 +298,6 @@ if test "x$enable_wrapping" != xno; then
        AC_DEFINE(ENABLE_WRAPPING, 1, [Define this to have hard text wrapping.])
 fi
 
-AC_ARG_ENABLE(wrapping-as-root,
-AS_HELP_STRING([--disable-wrapping-as-root], [Disable wrapping of text as root 
by default]))
-if test "x$enable_wrapping_as_root" = xno; then
-       AC_DEFINE(DISABLE_ROOTWRAPPING, 1, [Define this to disable text 
wrapping as root by default.])
-fi
-
 AC_ARG_ENABLE(debug,
 AS_HELP_STRING([--enable-debug], [Enable debugging (disabled by default)]))
 if test "x$enable_debug" = xyes; then
diff --git a/doc/nano.texi b/doc/nano.texi
index a0cbdb1b..06f0b695 100644
--- a/doc/nano.texi
+++ b/doc/nano.texi
@@ -1687,10 +1687,6 @@ chances are you only want this feature when you're 
working on the nano source.
 Disables Native Language support.  This will disable the use of any
 available GNU @command{nano} translations.
 
address@hidden --disable-wrapping-as-root
-Disable hard-wrapping of overlong lines by default when @command{nano}
-is run as root.
-
 @item --enable-utf8
 Enable support for reading and writing Unicode files.  This will require
 either a wide version of curses, or a UTF-8-enabled version of Slang.
diff --git a/src/nano.c b/src/nano.c
index b801a150..168ac748 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -1016,9 +1016,6 @@ void version(void)
 #endif
 #endif /* !NANO_TINY */
 
-#ifdef DISABLE_ROOTWRAPPING
-       printf(" --disable-wrapping-as-root");
-#endif
 #ifdef DEBUG
        printf(" --enable-debug");
 #endif
@@ -2397,17 +2394,10 @@ int main(int argc, char **argv)
                for (i = 0; i < sizeof(flags) / sizeof(flags[0]); i++)
                        flags[i] |= flags_cmdline[i];
        }
-#ifdef DISABLE_ROOTWRAPPING
-       /* If we don't have any rcfiles, --disable-wrapping-as-root is used,
-        * and we're root, turn wrapping off. */
-       else if (geteuid() == NANO_ROOT_UID)
-               SET(NO_WRAP);
-#endif
 #endif /* ENABLE_NANORC */
 
 #ifdef ENABLE_WRAPPING
-       /* Override a "set nowrap" in an rcfile (or a 
--disable-wrapping-as-root)
-        * if --fill was given on the command line and not undone by --nowrap. 
*/
+       /* A --fill on the command line overrides a "set nowrap" in an rcfile. 
*/
        if (forced_wrapping)
                UNSET(NO_WRAP);
 #endif
-- 
2.19.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]