nano-devel
[Top][All Lists]
Advanced

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

[Nano-devel] patch w/more minor fixes


From: David Lawrence Ramsey
Subject: [Nano-devel] patch w/more minor fixes
Date: Sun, 17 Feb 2002 13:00:27 -0800 (PST)

Bugs fixed in the attached patch:

* In do_rcfile() in rcfile.c, there's an unused variable:
the int skip is initialized to zero but never used.

* The manual page doesn't have an entry for -N/--noconvert.

* The shortcut *replace_list_2 isn't initialized to NULL as
the rest of the shortcuts are.

* The binary character checking that turns on NO_CONVERT if
necessary turns it off on encountering tabs and characters
with the high bit set; both of these are also blocked.

There's one last bug which I haven't fixed yet (I don't
have any more time today to work on it): the new dynamic
shortcuts always add to the existing shortcuts, but some
code still assumes that they reinitialize it (e. g.
changing Justify to Unjustify after justification or Exit
to Close in multibuffer mode).  This ends up causing the
main list items to overflow the main list length and spill
over into the search (whereis) list items.  (After justifying
or inserting a file in multibuffer mode, press Ctrl-W and
look at the search menu; you'll see what I mean.)


_____________________________________________________________
Sluggy.Net: The Sluggy Freelance Community!
diff -urN nano-1.1.6-cvs/files.c nano-1.1.6-cvs-fixed/files.c
--- nano-1.1.6-cvs/files.c      Sat Feb 16 15:03:44 2002
+++ nano-1.1.6-cvs-fixed/files.c        Sun Feb 17 15:18:07 2002
@@ -210,8 +210,9 @@
            buf[0] = 0;
            i = 0;
 #ifndef NANO_SMALL
-        } else if (!ISSET(NO_CONVERT) && input[0] < 32 
-                       && input[0] != '\r' && input[0] != '\n') 
+        } else if (!ISSET(NO_CONVERT) && input[0] >= 0 && input[0] <= 31 
+                       && input[0] != '\t' && input[0] != '\r'
+                       && input[0] != '\n') 
            /* If the file has binary chars in it, don't stupidly
                assume it's a DOS or Mac formatted file! */
            SET(NO_CONVERT);
diff -urN nano-1.1.6-cvs/global.c nano-1.1.6-cvs-fixed/global.c
--- nano-1.1.6-cvs/global.c     Fri Feb 15 14:17:02 2002
+++ nano-1.1.6-cvs-fixed/global.c       Sun Feb 17 15:03:08 2002
@@ -87,7 +87,7 @@
 shortcut *main_list = NULL;
 shortcut *whereis_list = NULL;
 shortcut *replace_list = NULL;
-shortcut *replace_list_2;      /* 2nd half of replace dialog */
+shortcut *replace_list_2 = NULL;       /* 2nd half of replace dialog */
 shortcut *goto_list = NULL;
 shortcut *gotodir_list = NULL;
 shortcut *writefile_list = NULL;
diff -urN nano-1.1.6-cvs/nano.1 nano-1.1.6-cvs-fixed/nano.1
--- nano-1.1.6-cvs/nano.1       Fri Feb  1 08:40:34 2002
+++ nano-1.1.6-cvs-fixed/nano.1 Sun Feb 17 15:01:56 2002
@@ -45,6 +45,9 @@
 .B \-M (\-\-mac)
 Write file in Mac format.
 .TP
+.B \-N (\-\-noconvert)
+Disable automatic conversion of files from DOS/Mac format.
+.TP
 .B \-R (\-\-regexp)
 Enable regular expression matching for search strings, as well as
 \\n subexpression replacement for replace strings, if available.
diff -urN nano-1.1.6-cvs/rcfile.c nano-1.1.6-cvs-fixed/rcfile.c
--- nano-1.1.6-cvs/rcfile.c     Sat Feb 16 15:34:58 2002
+++ nano-1.1.6-cvs-fixed/rcfile.c       Sun Feb 17 15:01:56 2002
@@ -432,7 +432,6 @@
 {
     char *unable = _("Unable to open ~/.nanorc file, %s");
     struct stat fileinfo;
-    int skip=0;
     FILE *rcstream;
 
     if (getenv("HOME") == NULL)

reply via email to

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