mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Since is_drawing_subs_or_sups() macro is only used by put_chars(),
defined it in this function.
This commit is contained in:
parent
df065ead80
commit
728014118d
@ -1263,10 +1263,6 @@ get_link_state(struct html_context *html_context)
|
|||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define is_drawing_subs_or_sups() \
|
|
||||||
((format.style.attr & AT_SUBSCRIPT && html_context->options->display_subs) \
|
|
||||||
|| (format.style.attr & AT_SUPERSCRIPT && html_context->options->display_sups))
|
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
html_has_non_space_chars(unsigned char *chars, int charslen)
|
html_has_non_space_chars(unsigned char *chars, int charslen)
|
||||||
{
|
{
|
||||||
@ -1347,6 +1343,13 @@ put_chars(struct html_context *html_context, unsigned char *chars, int charslen)
|
|||||||
set_hline(html_context, chars, charslen, link_state);
|
set_hline(html_context, chars, charslen, link_state);
|
||||||
|
|
||||||
if (link_state != LINK_STATE_NONE) {
|
if (link_state != LINK_STATE_NONE) {
|
||||||
|
|
||||||
|
#define is_drawing_subs_or_sups() \
|
||||||
|
((format.style.attr & AT_SUBSCRIPT \
|
||||||
|
&& html_context->options->display_subs) \
|
||||||
|
|| (format.style.attr & AT_SUPERSCRIPT \
|
||||||
|
&& html_context->options->display_sups))
|
||||||
|
|
||||||
/* We need to update the current @link_state because <sub> and
|
/* We need to update the current @link_state because <sub> and
|
||||||
* <sup> tags will output to the canvas using an inner
|
* <sup> tags will output to the canvas using an inner
|
||||||
* put_chars() call which results in their process_link() call
|
* put_chars() call which results in their process_link() call
|
||||||
@ -1357,6 +1360,8 @@ put_chars(struct html_context *html_context, unsigned char *chars, int charslen)
|
|||||||
link_state = get_link_state(html_context);
|
link_state = get_link_state(html_context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef is_drawing_subs_or_sups
|
||||||
|
|
||||||
process_link(html_context, link_state, chars, charslen);
|
process_link(html_context, link_state, chars, charslen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user