* help.c (help_index_cmd): Eliminate unneeded search for
"[Help]", which always fails. Fix crash if "[Contents]" cannot be found. Reuse more generic error message.
Этот коммит содержится в:
родитель
52caab36b8
Коммит
afae5939cd
@ -1,5 +1,9 @@
|
|||||||
2002-09-03 Pavel Roskin <proski@gnu.org>
|
2002-09-03 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* help.c (help_index_cmd): Eliminate unneeded search for
|
||||||
|
"[Help]", which always fails. Fix crash if "[Contents]" cannot
|
||||||
|
be found. Reuse more generic error message.
|
||||||
|
|
||||||
* filegui.c: Eliminate x_set_dialog_title().
|
* filegui.c: Eliminate x_set_dialog_title().
|
||||||
* hotlist.c: Likewise.
|
* hotlist.c: Likewise.
|
||||||
* help.c: Likewise.
|
* help.c: Likewise.
|
||||||
|
20
src/help.c
20
src/help.c
@ -556,19 +556,21 @@ help_help_cmd (Dlg_head *h)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
help_index_cmd (Dlg_head *h)
|
help_index_cmd (Dlg_head * h)
|
||||||
{
|
{
|
||||||
char *new_item;
|
char *new_item;
|
||||||
|
|
||||||
history_ptr = (history_ptr+1) % HISTORY_SIZE;
|
if (!(new_item = search_string (data, "[Contents]"))) {
|
||||||
history [history_ptr].page = currentpoint;
|
message (1, MSG_ERROR, _(" Cannot find node %s in help file "),
|
||||||
history [history_ptr].link = selected_item;
|
"[Contents]");
|
||||||
currentpoint = startpoint = search_string (data, "[Help]") + 1;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!(new_item = search_string (data, "[Contents]")))
|
history_ptr = (history_ptr + 1) % HISTORY_SIZE;
|
||||||
message (1, MSG_ERROR, _(" Cannot find node [Contents] in help file "));
|
history[history_ptr].page = currentpoint;
|
||||||
else
|
history[history_ptr].link = selected_item;
|
||||||
currentpoint = startpoint = new_item + 1;
|
|
||||||
|
currentpoint = startpoint = new_item + 1;
|
||||||
selected_item = NULL;
|
selected_item = NULL;
|
||||||
help_callback (h, 0, DLG_DRAW);
|
help_callback (h, 0, DLG_DRAW);
|
||||||
}
|
}
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user