1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-30 01:55:30 +00:00

Move code from get_color() to new extract_color().

This commit is contained in:
Laurent MONIN 2007-10-15 12:17:08 +02:00
parent 11dea66ff1
commit b709061864

View File

@ -50,17 +50,13 @@
/* TODO: This needs rewrite. Yes, no kidding. */
int
get_color(struct html_context *html_context, unsigned char *a,
unsigned char *c, color_T *rgb)
static int
extract_color(struct html_context *html_context, unsigned char *a,
unsigned char *c, color_T *rgb)
{
unsigned char *at;
int r;
if (!use_document_fg_colors(html_context->options))
return -1;
at = get_attr_val(a, c, html_context->doc_cp);
if (!at) return -1;
@ -70,6 +66,16 @@ get_color(struct html_context *html_context, unsigned char *a,
return r;
}
int
get_color(struct html_context *html_context, unsigned char *a,
unsigned char *c, color_T *rgb)
{
if (!use_document_fg_colors(html_context->options))
return -1;
return extract_color(html_context, a, c, rgb);
}
int
get_bgcolor(struct html_context *html_context, unsigned char *a, color_T *rgb)
{