From: Chris Allegretta Date: Fri, 7 Feb 2003 00:02:00 +0000 (+0000) Subject: - rcfile.c:colortoint() - Don't bomb after invalid color and print bad color name... X-Git-Tag: v1.1.99pre3~40 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=d6e84363d780fefae747d613cc22353082a22d91;p=nano.git - 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 --- diff --git a/ChangeLog b/ChangeLog index 464edf55..e826007d 100644 --- 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 diff --git a/rcfile.c b/rcfile.c index 0c43b500..dade1c43 100644 --- 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; }