in parse_syntax(), properly generate an error if we've read in a
previous syntax without any associated color commands git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3377 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
33619f1ac5
Коммит
a33ec1deff
@ -56,6 +56,9 @@ CVS code -
|
|||||||
- rcfile.c:
|
- rcfile.c:
|
||||||
parse_argument()
|
parse_argument()
|
||||||
- Rename variable ptr_bak to ptr_save, for consistency. (DLR)
|
- Rename variable ptr_bak to ptr_save, for consistency. (DLR)
|
||||||
|
parse_syntax()
|
||||||
|
- Properly generate an error if we've read in a previous syntax
|
||||||
|
without any associated color commands. (DLR)
|
||||||
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)
|
||||||
|
@ -282,6 +282,11 @@ void parse_syntax(char *ptr)
|
|||||||
|
|
||||||
assert(ptr != NULL);
|
assert(ptr != NULL);
|
||||||
|
|
||||||
|
if (endsyntax != NULL && endcolor == NULL) {
|
||||||
|
rcfile_error(N_("Previous syntax has no color commands"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (*ptr == '\0') {
|
if (*ptr == '\0') {
|
||||||
rcfile_error(N_("Missing syntax name"));
|
rcfile_error(N_("Missing syntax name"));
|
||||||
return;
|
return;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user