]> git.wh0rd.org Git - nano.git/commitdiff
- rcfile.c:colortoint() - Don't bomb after invalid color and print bad color name...
authorChris Allegretta <chrisa@asty.org>
Fri, 7 Feb 2003 00:02:00 +0000 (00:02 +0000)
committerChris Allegretta <chrisa@asty.org>
Fri, 7 Feb 2003 00:02:00 +0000 (00:02 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1428 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
rcfile.c

index 464edf55ccba7f0c7cd46ded9d5710bda806f664..e826007d1bf7cc3b79a8248d523beae1af00eef8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,11 @@ CVS code
   main()
        - Fix nano not compiling with ENABLE_RCFILE and DISABLE_TABCOMP
          (David Benbennick).
+- rcfile.c:
+  colortoint()
+       - Don't bomb after invalid color and print bad color name
+         (David Benbennick).
+       - And reset mcolor to -1.
 - nano.1, nano.1.html:
        - Add initialization file comments, change some options from 
          bracketed to underlined to emphasize that they are not 
index 0c43b50000133b531d3cd895078af571384ad963..dade1c4371115e3be7ac5790dd03f9d56510febd 100644 (file)
--- a/rcfile.c
+++ b/rcfile.c
@@ -215,10 +215,10 @@ int colortoint(const char *colorname, int *bright)
        rcfile_error(_("color %s not understood.\n"
                       "Valid colors are \"green\", \"red\", \"blue\", \n"
                       "\"white\", \"yellow\", \"cyan\", \"magenta\" and \n"
-                      "\"black\", with the optional prefix \"bright\".\n"));
-       exit(1);
+                      "\"black\", with the optional prefix \"bright\".\n"),
+                       colorname);
+       mcolor = -1;
     }
-
     return mcolor;
 }