mirror of
https://github.com/rkd77/elinks.git
synced 2024-10-02 03:46:21 -04:00
Move code from get_color() to new extract_color().
This commit is contained in:
parent
11dea66ff1
commit
b709061864
@ -50,17 +50,13 @@
|
|||||||
|
|
||||||
/* TODO: This needs rewrite. Yes, no kidding. */
|
/* TODO: This needs rewrite. Yes, no kidding. */
|
||||||
|
|
||||||
|
static int
|
||||||
int
|
extract_color(struct html_context *html_context, unsigned char *a,
|
||||||
get_color(struct html_context *html_context, unsigned char *a,
|
|
||||||
unsigned char *c, color_T *rgb)
|
unsigned char *c, color_T *rgb)
|
||||||
{
|
{
|
||||||
unsigned char *at;
|
unsigned char *at;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
if (!use_document_fg_colors(html_context->options))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
at = get_attr_val(a, c, html_context->doc_cp);
|
at = get_attr_val(a, c, html_context->doc_cp);
|
||||||
if (!at) return -1;
|
if (!at) return -1;
|
||||||
|
|
||||||
@ -70,6 +66,16 @@ get_color(struct html_context *html_context, unsigned char *a,
|
|||||||
return r;
|
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
|
int
|
||||||
get_bgcolor(struct html_context *html_context, unsigned char *a, color_T *rgb)
|
get_bgcolor(struct html_context *html_context, unsigned char *a, color_T *rgb)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user