diff options
-rw-r--r-- | src/colors.c | 6 | ||||
-rw-r--r-- | src/colors.h | 2 | ||||
-rw-r--r-- | src/html.cc | 8 | ||||
-rw-r--r-- | src/html_common.hh | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/colors.c b/src/colors.c index 264c7357..18bf6e09 100644 --- a/src/colors.c +++ b/src/colors.c @@ -248,14 +248,14 @@ static int32_t Color_parse_hex (const char *s, int32_t default_color, int *err) * 1 if the color is bare hex or can't be parsed at all. * 2 if a color beginning with 0[xX] is successfully parsed. */ -int32_t a_Color_parse (const char *subtag, int32_t default_color, int *err) +int32_t a_Color_parse (const char *str, int32_t default_color, int *err) { const char *cp; int32_t ret_color; int ret, low, mid, high, st = 1; /* skip leading spaces */ - for (cp = subtag; dIsspace(*cp); cp++); + for (cp = str; dIsspace(*cp); cp++); ret_color = default_color; if (*cp == '#') { @@ -289,7 +289,7 @@ int32_t a_Color_parse (const char *subtag, int32_t default_color, int *err) } } - _MSG("subtag: %s\n", subtag); + _MSG("color string: %s\n", str); _MSG("color : %X\n", ret_color); *err = st; diff --git a/src/colors.h b/src/colors.h index 21683205..4e8a9d0a 100644 --- a/src/colors.h +++ b/src/colors.h @@ -8,7 +8,7 @@ extern "C" { #endif /* __cplusplus */ -int32_t a_Color_parse (const char *subtag, int32_t default_color, int *err); +int32_t a_Color_parse (const char *str, int32_t default_color, int *err); int32_t a_Color_vc(int32_t candidate, int32_t c1, int32_t c2, int32_t c3); #ifdef __cplusplus diff --git a/src/html.cc b/src/html.cc index 20a7f7d5..aaca6d10 100644 --- a/src/html.cc +++ b/src/html.cc @@ -1430,14 +1430,14 @@ CssLength a_Html_parse_length (DilloHtml *html, const char *attr) * Parse a color attribute. * Return value: parsed color, or default_color (+ error msg) on error. */ -int32_t a_Html_color_parse(DilloHtml *html, - const char *subtag, int32_t default_color) +int32_t a_Html_color_parse(DilloHtml *html, const char *str, + int32_t default_color) { int err = 1; - int32_t color = a_Color_parse(subtag, default_color, &err); + int32_t color = a_Color_parse(str, default_color, &err); if (err) { - BUG_MSG("color \"%s\" is not in \"#RRGGBB\" format\n", subtag); + BUG_MSG("color \"%s\" is not in \"#RRGGBB\" format\n", str); } return color; } diff --git a/src/html_common.hh b/src/html_common.hh index 726fbd0e..a89e1cb5 100644 --- a/src/html_common.hh +++ b/src/html_common.hh @@ -245,8 +245,8 @@ DilloImage *a_Html_image_new(DilloHtml *html, const char *tag, int tagsize); char *a_Html_parse_entities(DilloHtml *html, const char *token, int toksize); void a_Html_pop_tag(DilloHtml *html, int TagIdx); void a_Html_stash_init(DilloHtml *html); -int32_t a_Html_color_parse(DilloHtml *html, - const char *subtag, int32_t default_color); +int32_t a_Html_color_parse(DilloHtml *html, const char *str, + int32_t default_color); dw::core::style::Length a_Html_parse_length (DilloHtml *html, const char *attr); void a_Html_tag_set_align_attr(DilloHtml *html, const char *tag, int tagsize); |