* edit.h (struct key_word): Remove time field.

* syntax.c: Remove MAD support.
This commit is contained in:
Andrew V. Samoilov 2002-09-26 12:23:13 +00:00
parent de8ccb62fd
commit 790b85b555
3 changed files with 6 additions and 15 deletions

View File

@ -1,3 +1,8 @@
2002-09-26 Andrew V. Samoilov <sav@bcs.zp.ua>
* edit.h (struct key_word): Remove time field.
* syntax.c: Remove MAD support.
2002-09-24 Pavel Roskin <proski@gnu.org> 2002-09-24 Pavel Roskin <proski@gnu.org>
* editwidget.c (edit): Make edit_dlg local variable. * editwidget.c (edit): Make edit_dlg local variable.

View File

@ -144,7 +144,6 @@ struct key_word {
unsigned char first; unsigned char first;
char *whole_word_chars_left; char *whole_word_chars_left;
char *whole_word_chars_right; char *whole_word_chars_right;
time_t time;
#define NO_COLOR 0x7FFFFFFF #define NO_COLOR 0x7FFFFFFF
#define SPELLING_ERROR 0x7EFEFEFE #define SPELLING_ERROR 0x7EFEFEFE
int line_start; int line_start;
@ -158,9 +157,6 @@ struct context_rule {
unsigned char first_right; unsigned char first_right;
char line_start_left; char line_start_left;
char line_start_right; char line_start_right;
#if 0
int single_char;
#endif
int between_delimiters; int between_delimiters;
char *whole_word_chars_left; char *whole_word_chars_left;
char *whole_word_chars_right; char *whole_word_chars_right;

View File

@ -190,8 +190,6 @@ static inline struct syntax_rule apply_rules_going_right (WEdit * edit, long i,
is_end = (rule.end == (unsigned char) i); is_end = (rule.end == (unsigned char) i);
/* check to turn off a keyword */ /* check to turn off a keyword */
if (_rule.keyword) { if (_rule.keyword) {
struct key_word *k;
k = edit->rules[_rule.context]->keyword[_rule.keyword];
if (edit_get_byte (edit, i - 1) == '\n') if (edit_get_byte (edit, i - 1) == '\n')
_rule.keyword = 0; _rule.keyword = 0;
if (is_end) { if (is_end) {
@ -373,12 +371,7 @@ void edit_get_syntax_color (WEdit * edit, long byte_index, int *color)
Returns 0 on error/eof or a count of the number of bytes read Returns 0 on error/eof or a count of the number of bytes read
including the newline. Result must be free'd. including the newline. Result must be free'd.
*/ */
#ifdef HAVE_MAD
static int mad_read_one_line (char **line, FILE * f, char *file, int line_)
#define read_one_line(a,b) mad_read_one_line(a,b,__FILE__,__LINE__)
#else
static int read_one_line (char **line, FILE * f) static int read_one_line (char **line, FILE * f)
#endif
{ {
char *p; char *p;
int len = 256, c, r = 0, i = 0; int len = 256, c, r = 0, i = 0;
@ -673,9 +666,6 @@ static int edit_read_syntax_rules (WEdit * edit, FILE * f)
c->right = (char *) strdup (*a++); c->right = (char *) strdup (*a++);
c->first_left = *c->left; c->first_left = *c->left;
c->first_right = *c->right; c->first_right = *c->right;
#if 0
c->single_char = (strlen (c->right) == 1);
#endif
} }
c->keyword = syntax_malloc (MAX_WORDS_PER_CONTEXT * sizeof (struct key_word *)); c->keyword = syntax_malloc (MAX_WORDS_PER_CONTEXT * sizeof (struct key_word *));
#if 0 #if 0
@ -742,7 +732,7 @@ static int edit_read_syntax_rules (WEdit * edit, FILE * f)
k->color = this_try_alloc_color_pair (fg, bg); k->color = this_try_alloc_color_pair (fg, bg);
check_not_a; check_not_a;
num_words++; num_words++;
} else if (!strncmp (args[0], "#", 1)) { } else if (*(args[0]) == '#') {
/* do nothing for comment */ /* do nothing for comment */
} else if (!strcmp (args[0], "file")) { } else if (!strcmp (args[0], "file")) {
break; break;