From bcc8688a3bebfd3fbf382ca4fbf0a3ee5f406e0c Mon Sep 17 00:00:00 2001
From: Chris Allegretta <chrisa@asty.org>
Date: Thu, 13 Feb 2003 01:54:41 +0000
Subject: [PATCH] - Remove do_preserve_msg, as using -p still gives Pico-style
 string behavior, so an annoying message every invocation is probably unneeded
 (all cheer)

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1458 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog |  3 +++
 nano.c    | 29 -----------------------------
 proto.h   |  1 -
 3 files changed, 3 insertions(+), 30 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b9dedf2e..969d8e78 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,9 @@ CVS code
 	- Change various const char *s to char *s because Irix curses
 	  waddnstr() complains about const char's, I imagine this is a
 	  common System V curses issue.	  
+	- Remove do_preserve_msg, as using -p still gives Pico-style
+	  string behavior, so an annoying message every invocation is
+	  probably unneeded (all cheer).
 - files.c:
   cwd_tab_completion()
 	- Memory leak fix (David Benbennick).
diff --git a/nano.c b/nano.c
index d21f1632..f23f21ff 100644
--- a/nano.c
+++ b/nano.c
@@ -780,16 +780,6 @@ void nano_disabled_msg(void)
 }
 #endif
 
-void do_preserve_msg(void)
-{
-    fprintf(stderr, _("\nThe -p flag now invokes the Pico \"preserve\" flag.\n"
-		      "The Pico compatibility flag has been removed as nano\n"
-		      "now fully Pico compatible.  Please see the nano FAQ\n"
-		      "for more info on this change...\n\n"
-		      "Press return to continue\n"));
-    while (getchar() != '\n');
-}
-
 #ifndef NANO_SMALL
 static int pid;		/* This is the PID of the newly forked process 
 			 * below.  It must be global since the signal
@@ -3025,9 +3015,6 @@ int main(int argc, char *argv[])
     int keyhandled = 0;	/* Have we handled the keystroke yet? */
     int kbinput = -1;		/* Input from keyboard */
 
-#ifdef HAVE_GETOPT_LONG
-    int preserveopt = 0;	/* Did the cmdline include --preserve? */
-#endif
 #ifndef NANO_SMALL
     const toggle *t;
 #endif
@@ -3098,20 +3085,6 @@ int main(int argc, char *argv[])
     textdomain(PACKAGE);
 #endif
 
-#ifdef HAVE_GETOPT_LONG
-    {
-	/* Check for the --preserve flag, and report error if people are
-	   still using --pico. */
-	int i;
-	for (i = 1; i < argc; i++) {
-	    if (!strcmp(argv[i], "--preserve"))
-		preserveopt = 1;
-	    else if (!strcmp(argv[i], "--pico"))
-		do_preserve_msg();
-	}
-    }
-#endif
-
 #if !defined(ENABLE_NANORC) && defined(DISABLE_ROOTWRAP) && !defined(DISABLE_WRAPPING)
     /* if we don't have rcfile support, we're root, and
        --disable-wrapping-as-root is used, turn wrapping off */
@@ -3237,8 +3210,6 @@ int main(int argc, char *argv[])
 	case 'p':
 	    SET(PRESERVE);
 #ifdef HAVE_GETOPT_LONG
-	    if (!preserveopt)
-		do_preserve_msg();
 #endif
 	    break;
 #ifndef DISABLE_WRAPJUSTIFY
diff --git a/proto.h b/proto.h
index dbfcb9a8..4e05653f 100644
--- a/proto.h
+++ b/proto.h
@@ -261,7 +261,6 @@ int no_help(void);
 #if defined(DISABLE_JUSTIFY) || defined(DISABLE_SPELLER) || defined(DISABLE_HELP) || defined(NANO_SMALL)
 void nano_disabled_msg(void);
 #endif
-void do_preserve_msg(void);
 #ifndef NANO_SMALL
 RETSIGTYPE cancel_fork(int signal);
 int open_pipe(const char *command);
-- 
GitLab