From 9caa193fe1657abda88bdce35b77acac9e290718 Mon Sep 17 00:00:00 2001
From: Chris Allegretta <chrisa@asty.org>
Date: Fri, 15 Feb 2002 20:08:05 +0000
Subject: [PATCH] 407 == ^z fix, get rid of unusaed variables

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1074 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog | 3 +++
 nano.c    | 7 ++++---
 winio.c   | 7 +++----
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a6daa396..bc8ca932 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,9 @@ CVS code -
 - nano.c:
   help_init()
 	- Added message re: having multiple blank buffers (DLR).
+  main()
+	- Add 407 as equiv of 26, this seems to be sent when using
+	  ^Z in linux console with keypad() enabled.
 - winio.c:
   do_cursorpos()
 	- Rewritten to show col place as well as charcter place, without
diff --git a/nano.c b/nano.c
index de8da4c4..105ceedf 100644
--- a/nano.c
+++ b/nano.c
@@ -2711,7 +2711,7 @@ int main(int argc, char *argv[])
     int kbinput;		/* Input from keyboard */
     long startline = 0;		/* Line to try and start at */
     int keyhandled;		/* Have we handled the keystroke yet? */
-    int i, modify_control_seq;
+    int modify_control_seq;
     char *argv0;
     shortcut *s;
     toggle *t;
@@ -3277,8 +3277,9 @@ int main(int argc, char *argv[])
 	if (kbinput == 17 || kbinput == 19)
 	    keyhandled = 1;
 
-	/* Catch ^Z by hand when triggered also */
-	if (kbinput == 26) {
+	/* Catch ^Z by hand when triggered also 
+	   407 == ^Z in Linux console when keypad() is used? */
+	if (kbinput == 26 || kbinput == 407) {
 	    if (ISSET(SUSPEND))
 		do_suspend(0);
 	    keyhandled = 1;
diff --git a/winio.c b/winio.c
index 4a1f0c29..7c5c7b14 100644
--- a/winio.c
+++ b/winio.c
@@ -261,7 +261,7 @@ void nanoget_repaint(char *buf, char *inputbuf, int x)
 int nanogetstr(int allowtabs, char *buf, char *def, shortcut *s,
 	       int start_x, int list)
 {
-    int kbinput = 0, j = 0, x = 0, xend, slen;
+    int kbinput = 0, x = 0, xend, slen;
     int x_left = 0, inputlen, tabbed = 0;
     char *inputbuf;
     shortcut *t;
@@ -598,7 +598,7 @@ void clear_bottomwin(void)
 
 void bottombars(shortcut *s)
 {
-    int i, j, k;
+    int i, k;
     char keystr[10];
     shortcut *t;
     int slen;
@@ -1310,7 +1310,7 @@ int statusq(int tabs, shortcut *s, char *def, char *msg, ...)
 {
     va_list ap;
     char foo[133];
-    int ret, slen;
+    int ret;
 
 #ifndef DISABLE_TABCOMP
     int list = 0;
@@ -1669,7 +1669,6 @@ int do_help(void)
     int i, j, row = 0, page = 1, kbinput = 0, no_more = 0, kp, kp2;
     int no_help_flag = 0;
     shortcut *oldshortcut;
-    int oldslen;
 
     blank_edit();
     curs_set(0);
-- 
GitLab