From ef0dd43430d3d723bf2cd1a1ca281a680e7fce6d Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Wed, 10 Oct 2012 12:29:09 +0400 Subject: [PATCH] Rename syntax_rule to edit_syntax_rule_t. Signed-off-by: Andrew Borodin --- src/editor/editwidget.h | 5 +++-- src/editor/syntax.c | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/editor/editwidget.h b/src/editor/editwidget.h index 699f9b127..521a36732 100644 --- a/src/editor/editwidget.h +++ b/src/editor/editwidget.h @@ -37,7 +37,8 @@ struct edit_book_mark_t edit_book_mark_t *prev; }; -struct syntax_rule +typedef struct edit_syntax_rule_t edit_syntax_rule_t; +struct edit_syntax_rule_t { unsigned short keyword; unsigned char end; @@ -158,7 +159,7 @@ struct WEdit struct _syntax_marker *syntax_marker; struct context_rule **rules; long last_get_rule; - struct syntax_rule rule; + edit_syntax_rule_t rule; char *syntax_type; /* description of syntax highlighting type being used */ GTree *defines; /* List of defines */ gboolean is_case_insensitive; /* selects language case sensitivity */ diff --git a/src/editor/syntax.c b/src/editor/syntax.c index 3fc3d245f..5648044f0 100644 --- a/src/editor/syntax.c +++ b/src/editor/syntax.c @@ -126,7 +126,7 @@ struct context_rule struct _syntax_marker { long offset; - struct syntax_rule rule; + edit_syntax_rule_t rule; struct _syntax_marker *next; }; @@ -351,8 +351,8 @@ xx_strchr (WEdit * edit, const unsigned char *s, int char_byte) /* --------------------------------------------------------------------------------------------- */ -static struct syntax_rule -apply_rules_going_right (WEdit * edit, long i, struct syntax_rule rule) +static edit_syntax_rule_t +apply_rules_going_right (WEdit * edit, long i, edit_syntax_rule_t rule) { struct context_rule *r; int c; @@ -361,7 +361,7 @@ apply_rules_going_right (WEdit * edit, long i, struct syntax_rule rule) gboolean keyword_foundleft = FALSE, keyword_foundright = FALSE; gboolean is_end; long end = 0; - struct syntax_rule _rule = rule; + edit_syntax_rule_t _rule = rule; c = xx_tolower (edit, edit_get_byte (edit, i)); if (c == 0) @@ -548,7 +548,7 @@ apply_rules_going_right (WEdit * edit, long i, struct syntax_rule rule) /* --------------------------------------------------------------------------------------------- */ -static struct syntax_rule +static edit_syntax_rule_t edit_get_rule (WEdit * edit, off_t byte_index) { long i; @@ -604,7 +604,7 @@ edit_get_rule (WEdit * edit, off_t byte_index) /* --------------------------------------------------------------------------------------------- */ static inline void -translate_rule_to_color (WEdit * edit, struct syntax_rule rule, int *color) +translate_rule_to_color (WEdit * edit, edit_syntax_rule_t rule, int *color) { *color = edit->rules[rule.context]->keyword[rule.keyword]->color; }