From 93c90b74bb8206de335914f94681fe5af2a4a80f Mon Sep 17 00:00:00 2001 From: Michael Jennings Date: Sun, 18 Jun 2000 02:35:07 +0000 Subject: [PATCH] Sat Jun 17 19:52:25 PDT 2000 Michael Jennings Patch from Martin Grimm to fix the parsing of the font fx stuff. SVN revision: 2818 --- ChangeLog | 6 ++++++ src/options.c | 15 +++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9a7c101..0ee25e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3692,3 +3692,9 @@ Fri Jun 16 13:29:59 PDT 2000 Michael Jennings image tiling in Esetroot. ------------------------------------------------------------------------------- +Sat Jun 17 19:52:25 PDT 2000 Michael Jennings + + Patch from Martin Grimm to fix the parsing of + the font fx stuff. + +------------------------------------------------------------------------------- diff --git a/src/options.c b/src/options.c index dce0f53..ddd372f 100644 --- a/src/options.c +++ b/src/options.c @@ -1999,12 +1999,16 @@ parse_attributes(char *buff, void *state) char *tmp = PWord(2, buff); unsigned char n; - if (NumWords(buff) != 3) { + if (!BEG_STRCASECMP(tmp, "fx ") || !BEG_STRCASECMP(tmp, "effect")) { + if (parse_font_fx(PWord(2, tmp)) != 1) { + print_error("Parse error in file %s, line %lu: Syntax error in font effects specification", + file_peek_path(), file_peek_line()); + } + } else if (NumWords(buff) != 3) { print_error("Parse error in file %s, line %lu: Invalid parameter list \"%s\" for " "attribute font", file_peek_path(), file_peek_line(), NONULL(tmp)); return NULL; - } - if (isdigit(*tmp)) { + } else if (isdigit(*tmp)) { n = (unsigned char) strtoul(tmp, (char **) NULL, 0); if (n <= 255) { eterm_font_add(&etfonts, PWord(2, tmp), n); @@ -2022,11 +2026,6 @@ parse_attributes(char *buff, void *state) } else if (!BEG_STRCASECMP(tmp, "default ")) { def_font_idx = strtoul(PWord(2, tmp), (char **) NULL, 0); - } else if (!BEG_STRCASECMP(tmp, "fx ") || !BEG_STRCASECMP(tmp, "effect")) { - if (parse_font_fx(PWord(2, tmp)) != 1) { - print_error("Parse error in file %s, line %lu: Syntax error in font effects specification", - file_peek_path(), file_peek_line()); - } } else { tmp = Word(1, tmp); print_error("Parse error in file %s, line %lu: Invalid font index \"%s\"",