1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

class -> class_ for C++ compatibility

This commit is contained in:
Witold Filipczyk 2016-04-20 18:18:27 +02:00
parent 2e721e051a
commit f4981bb553
5 changed files with 12 additions and 12 deletions

View File

@ -234,19 +234,19 @@ examine_element(struct html_context *html_context, struct css_selector *base,
process_found_selector(selector, CST_PSEUDO, base);
}
if (element->attr.class && seltype <= CST_CLASS) {
const unsigned char *class = element->attr.class;
if (element->attr.class_ && seltype <= CST_CLASS) {
const unsigned char *class_ = element->attr.class_;
for (;;) {
const unsigned char *begin;
while (*class == ' ') ++class;
if (*class == '\0') break;
begin = class;
while (*class != ' ' && *class != '\0') ++class;
while (*class_ == ' ') ++class_;
if (*class_ == '\0') break;
begin = class_;
while (*class_ != ' ' && *class_ != '\0') ++class_;
selector = find_css_selector(selectors, CST_CLASS, rel,
begin, class - begin);
begin, class_ - begin);
process_found_selector(selector, CST_CLASS, base);
}
}

View File

@ -54,7 +54,7 @@ struct text_attrib {
* these pointers if html_context->options->css_enable;
* otherwise they remain NULL. */
unsigned char *id;
unsigned char *class;
unsigned char *class_;
#endif
unsigned char *select;

View File

@ -689,7 +689,7 @@ struct hlink {
unsigned char *charset;
unsigned char *target;
unsigned char *id;
unsigned char *class;
unsigned char *class_;
unsigned char *dir;
*/
};

View File

@ -958,7 +958,7 @@ start_element(struct element_info *ei,
* in our own way. --pasky */
mem_free_set(&html_top->attr.id,
get_attr_val(attr, "id", html_context->doc_cp));
mem_free_set(&html_top->attr.class,
mem_free_set(&html_top->attr.class_,
get_attr_val(attr, "class", html_context->doc_cp));
/* Call it now to gain some of the stuff which might affect
* formatting of some elements. */

View File

@ -109,7 +109,7 @@ kill_html_stack_item(struct html_context *html_context, struct html_element *e)
#ifdef CONFIG_CSS
mem_free_if(e->attr.id);
mem_free_if(e->attr.class);
mem_free_if(e->attr.class_);
#endif
mem_free_if(e->attr.onclick);
@ -152,7 +152,7 @@ html_stack_dup(struct html_context *html_context, enum html_element_mortality_ty
if (ep->attr.select) e->attr.select = stracpy(ep->attr.select);
#ifdef CONFIG_CSS
e->attr.id = e->attr.class = NULL;
e->attr.id = e->attr.class_ = NULL;
#endif
/* We don't want to propagate these. */
/* XXX: For sure? --pasky */