• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/wget-1.12/src/

Lines Matching defs:tag

241 find_attr (struct taginfo *tag, const char *name, int *attrind)
244 for (i = 0; i < tag->nattrs; i++)
245 if (!strcasecmp (tag->attrs[i].name, name))
249 return tag->attrs[i].value;
255 #define ATTR_POS(tag, attrind, ctx) \
256 (tag->attrs[attrind].value_raw_beginning - ctx->text)
257 #define ATTR_SIZE(tag, attrind) \
258 (tag->attrs[attrind].value_raw_size)
351 check_style_attr (struct taginfo *tag, struct map_context *ctx)
354 char *style = find_attr (tag, "style", &attrind);
359 get_urls_css (ctx, ATTR_POS(tag,attrind,ctx)+1, ATTR_SIZE(tag,attrind)-2);
365 /* Default tag handler: collect URLs from attributes specified for
366 this tag by tag_url_attributes. */
369 tag_find_urls (int tagid, struct taginfo *tag, struct map_context *ctx)
379 attributes of our tag begin. */
385 /* Loop over the "interesting" attributes of this tag. In this
394 for (attrind = 0; attrind < tag->nattrs; attrind++)
398 char *link = tag->attrs[attrind].value;
403 items. The worst-case inner loop is for the IMG tag, which
407 if (0 == strcasecmp (tag->attrs[attrind].name,
410 struct urlpos *up = append_url (link, ATTR_POS(tag,attrind,ctx),
411 ATTR_SIZE(tag,attrind), ctx);
425 /* Handle the BASE tag, for <base href=...>. */
428 tag_handle_base (int tagid, struct taginfo *tag, struct map_context *ctx)
432 char *newbase = find_attr (tag, "href", &attrind);
436 base_urlpos = append_url (newbase, ATTR_POS(tag,attrind,ctx),
437 ATTR_SIZE(tag,attrind), ctx);
454 tag_handle_form (int tagid, struct taginfo *tag, struct map_context *ctx)
457 char *action = find_attr (tag, "action", &attrind);
461 struct urlpos *up = append_url (action, ATTR_POS(tag,attrind,ctx),
462 ATTR_SIZE(tag,attrind), ctx);
468 /* Handle the LINK tag. It requires special handling because how its
472 tag_handle_link (int tagid, struct taginfo *tag, struct map_context *ctx)
475 char *href = find_attr (tag, "href", &attrind);
485 struct urlpos *up = append_url (href, ATTR_POS(tag,attrind,ctx),
486 ATTR_SIZE(tag,attrind), ctx);
489 char *rel = find_attr (tag, "rel", NULL);
510 /* Handle the META tag. This requires special handling because of the
514 tag_handle_meta (int tagid, struct taginfo *tag, struct map_context *ctx)
516 char *name = find_attr (tag, "name", NULL);
517 char *http_equiv = find_attr (tag, "http-equiv", NULL);
521 /* Some pages use a META tag to specify that the page be
535 char *refresh = find_attr (tag, "content", &attrind);
555 entry = append_url (p, ATTR_POS(tag,attrind,ctx),
556 ATTR_SIZE(tag,attrind), ctx);
570 char *content = find_attr (tag, "content", NULL);
585 char *content = find_attr (tag, "content", NULL);
619 /* Dispatch the tag handler appropriate for the tag we're mapping
620 over. See known_tags[] for definition of tag handlers. */
623 collect_tags_mapper (struct taginfo *tag, void *arg)
627 /* Find the tag in our table of tags. This must not fail because
634 struct known_tag *t = hash_table_get (interesting_tags, tag->name);
637 t->handler (t->tagid, tag, ctx);
639 check_style_attr (tag, ctx);
641 if (tag->end_tag_p && (0 == strcasecmp (tag->name, "style")) &&
642 tag->contents_begin && tag->contents_end)
645 get_urls_css (ctx, tag->contents_begin - ctx->text,
646 tag->contents_end - tag->contents_begin);