mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
* syntax.c (syntax_change_callback): Remove, it's unused.
(edit_set_syntax_change_callback): Likewise.
This commit is contained in:
parent
2b9d151923
commit
47ab84d950
@ -1,5 +1,8 @@
|
|||||||
2002-11-12 Pavel Roskin <proski@gnu.org>
|
2002-11-12 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* syntax.c (syntax_change_callback): Remove, it's unused.
|
||||||
|
(edit_set_syntax_change_callback): Likewise.
|
||||||
|
|
||||||
* edit.c (edit_execute_cmd): Fool gcc to prevent Y2K warning.
|
* edit.c (edit_execute_cmd): Fool gcc to prevent Y2K warning.
|
||||||
|
|
||||||
* editwidget.c (edit_adjust_size): Use find_buttonbar().
|
* editwidget.c (edit_adjust_size): Use find_buttonbar().
|
||||||
|
@ -285,8 +285,6 @@ void edit_paste_from_history (WEdit *edit);
|
|||||||
|
|
||||||
void edit_split_filename (WEdit * edit, const char *name);
|
void edit_split_filename (WEdit * edit, const char *name);
|
||||||
|
|
||||||
#define CWidget Widget
|
|
||||||
void edit_set_syntax_change_callback (void (*callback) (CWidget *));
|
|
||||||
void edit_load_syntax (WEdit * edit, char **names, char *type);
|
void edit_load_syntax (WEdit * edit, char **names, char *type);
|
||||||
void edit_free_syntax_rules (WEdit * edit);
|
void edit_free_syntax_rules (WEdit * edit);
|
||||||
void edit_get_syntax_color (WEdit * edit, long byte_index, int *color);
|
void edit_get_syntax_color (WEdit * edit, long byte_index, int *color);
|
||||||
|
@ -776,13 +776,6 @@ int edit_check_spelling (WEdit * edit)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void (*syntax_change_callback) (CWidget *) = 0;
|
|
||||||
|
|
||||||
void edit_set_syntax_change_callback (void (*callback) (CWidget *))
|
|
||||||
{
|
|
||||||
syntax_change_callback = callback;
|
|
||||||
}
|
|
||||||
|
|
||||||
void edit_free_syntax_rules (WEdit * edit)
|
void edit_free_syntax_rules (WEdit * edit)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
@ -793,8 +786,6 @@ void edit_free_syntax_rules (WEdit * edit)
|
|||||||
edit_get_rule (edit, -1);
|
edit_get_rule (edit, -1);
|
||||||
syntax_free (edit->syntax_type);
|
syntax_free (edit->syntax_type);
|
||||||
edit->syntax_type = 0;
|
edit->syntax_type = 0;
|
||||||
if (syntax_change_callback)
|
|
||||||
(*syntax_change_callback) (&edit->widget);
|
|
||||||
for (i = 0; edit->rules[i]; i++) {
|
for (i = 0; edit->rules[i]; i++) {
|
||||||
if (edit->rules[i]->keyword) {
|
if (edit->rules[i]->keyword) {
|
||||||
for (j = 0; edit->rules[i]->keyword[j]; j++) {
|
for (j = 0; edit->rules[i]->keyword[j]; j++) {
|
||||||
@ -905,9 +896,6 @@ static int edit_read_syntax_file (WEdit * edit, char **names, char *syntax_file,
|
|||||||
edit_free_syntax_rules (edit);
|
edit_free_syntax_rules (edit);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* notify the callback of a change in rule set */
|
|
||||||
if (syntax_change_callback)
|
|
||||||
(*syntax_change_callback) (&edit->widget);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user