in parse_rcfile(), properly generate an error if we've read in a syntax
without any associated color command git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3573 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
2ef7dae971
commit
0b4920adc9
|
@ -259,6 +259,9 @@ CVS code -
|
||||||
parse_colors()
|
parse_colors()
|
||||||
- Check for a color command's not following a syntax line before
|
- Check for a color command's not following a syntax line before
|
||||||
anything else. (DLR)
|
anything else. (DLR)
|
||||||
|
parse_rcfile()
|
||||||
|
- Properly generate an error if we've read in a syntax without
|
||||||
|
any associated color commands. (DLR)
|
||||||
do_rcfile()
|
do_rcfile()
|
||||||
- Check for the rcfile's being a directory or device file and
|
- Check for the rcfile's being a directory or device file and
|
||||||
reject it if it is, for consistency with file handling
|
reject it if it is, for consistency with file handling
|
||||||
|
|
|
@ -835,6 +835,9 @@ void parse_rcfile(FILE *rcstream
|
||||||
rcfile_error(N_("Unknown flag %s"), option);
|
rcfile_error(N_("Unknown flag %s"), option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (endsyntax != NULL && endcolor == NULL)
|
||||||
|
rcfile_error(N_("Syntax has no color commands"));
|
||||||
|
|
||||||
free(buf);
|
free(buf);
|
||||||
fclose(rcstream);
|
fclose(rcstream);
|
||||||
lineno = 0;
|
lineno = 0;
|
||||||
|
|
Loading…
Reference in New Issue