Commit d6e84363 authored by Chris Allegretta's avatar Chris Allegretta
Browse files

- rcfile.c:colortoint() - Don't bomb after invalid color and print bad color...

- rcfile.c:colortoint() - Don't bomb after invalid color and print bad color name (David Benbennick). And reset mcolor to -1.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1428 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 3083ff90
Showing with 8 additions and 3 deletions
+8 -3
...@@ -7,6 +7,11 @@ CVS code ...@@ -7,6 +7,11 @@ CVS code
main() main()
- Fix nano not compiling with ENABLE_RCFILE and DISABLE_TABCOMP - Fix nano not compiling with ENABLE_RCFILE and DISABLE_TABCOMP
(David Benbennick). (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: - nano.1, nano.1.html:
- Add initialization file comments, change some options from - Add initialization file comments, change some options from
bracketed to underlined to emphasize that they are not bracketed to underlined to emphasize that they are not
......
...@@ -215,10 +215,10 @@ int colortoint(const char *colorname, int *bright) ...@@ -215,10 +215,10 @@ int colortoint(const char *colorname, int *bright)
rcfile_error(_("color %s not understood.\n" rcfile_error(_("color %s not understood.\n"
"Valid colors are \"green\", \"red\", \"blue\", \n" "Valid colors are \"green\", \"red\", \"blue\", \n"
"\"white\", \"yellow\", \"cyan\", \"magenta\" and \n" "\"white\", \"yellow\", \"cyan\", \"magenta\" and \n"
"\"black\", with the optional prefix \"bright\".\n")); "\"black\", with the optional prefix \"bright\".\n"),
exit(1); colorname);
mcolor = -1;
} }
return mcolor; return mcolor;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment