diff --git a/ChangeLog b/ChangeLog index 38a4e83..6e9902b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5117,3 +5117,12 @@ Changed -D/--desktop option to use EWMH-compliant desktop atom. Add support for EWMH icon property. ---------------------------------------------------------------------- +Fri Nov 7 12:26:11 2003 Michael Jennings (mej) + +Fixed stupid mathematical blunder in the font handling code pointed +out by Laurence J. Lane . + +Allow save_buff() script function to dump to stderr if no file is +specified. Note that script functions CANNOT be triggered by escape +sequences. +---------------------------------------------------------------------- diff --git a/src/options.c b/src/options.c index caf54f2..339fd0a 100644 --- a/src/options.c +++ b/src/options.c @@ -979,7 +979,7 @@ parse_attributes(char *buff, void *state) } else if (!BEG_STRCASECMP(buff, "font ")) { char *tmp = get_pword(2, buff); - unsigned char n; + unsigned long n; if (!BEG_STRCASECMP(tmp, "fx ") || !BEG_STRCASECMP(tmp, "effect")) { if (parse_font_fx(get_pword(2, tmp)) != 1) { @@ -997,7 +997,7 @@ parse_attributes(char *buff, void *state) file_peek_path(), file_peek_line()); } } else if (isdigit(*tmp)) { - n = (unsigned char) strtoul(tmp, (char **) NULL, 0); + n = strtoul(tmp, (char **) NULL, 0); if (n <= 255) { eterm_font_add(&etfonts, get_pword(2, tmp), n); } else { @@ -2351,7 +2351,7 @@ parse_multichar(char *buff, void *state) } else if (!BEG_STRCASECMP(buff, "font ")) { char *tmp = get_pword(2, buff); - unsigned char n; + unsigned long n; if (num_words(buff) != 3) { print_error("Parse error in file %s, line %lu: Invalid parameter list \"%s\" for attribute font\n", @@ -2359,7 +2359,7 @@ parse_multichar(char *buff, void *state) return NULL; } if (isdigit(*tmp)) { - n = (unsigned char) strtoul(tmp, (char **) NULL, 0); + n = strtoul(tmp, (char **) NULL, 0); if (n <= 255) { eterm_font_add(&etmfonts, get_pword(2, tmp), n); } else { diff --git a/src/script.c b/src/script.c index 8e97de3..123def6 100644 --- a/src/script.c +++ b/src/script.c @@ -316,6 +316,8 @@ script_handler_save_buff(char **params) { if (params && *params) { scr_dump_to_file(params[0]); + } else { + scr_dump(); } }