void HtmlStateWatcher::addText(const VfmdByteArray &text, bool *isEndOfAddedTextWithinHtmlQuotedAttribute) { if (m_callbackContext.isLookingAhead) { htmlparser_parse(m_htmlParserLookaheadContext, text.data(), text.size()); if (isEndOfAddedTextWithinHtmlQuotedAttribute) { (*isEndOfAddedTextWithinHtmlQuotedAttribute) = htmlparser_is_attr_quoted(m_htmlParserLookaheadContext); } } else { htmlparser_parse(m_htmlParserContext, text.data(), text.size()); if (isEndOfAddedTextWithinHtmlQuotedAttribute) { (*isEndOfAddedTextWithinHtmlQuotedAttribute) = htmlparser_is_attr_quoted(m_htmlParserContext); } } }
/* webclient_datahandler(): * * Callback function. Called from the webclient module when HTTP data * has arrived. */ void webclient_datahandler(char *data, u16_t len) { if(len > 0) { if(strcmp(webclient_mimetype(), http_texthtml) == 0) { count = (count + 1) & 3; show_statustext(receivingmsgs[count]); htmlparser_parse(data, len); redraw_window(); } else { uip_abort(); #if WWW_CONF_WITH_WGET ctk_dialog_open(&wgetdialog); #endif /* WWW_CONF_WITH_WGET */ } } else { /* Clear remaining parts of page. */ loading = 0; } if(data == NULL) { loading = 0; show_statustext("Done."); petsciiconv_topetscii(&webpage[(WWW_CONF_WEBPAGE_HEIGHT - 1) * WWW_CONF_WEBPAGE_WIDTH], WWW_CONF_WEBPAGE_WIDTH); CTK_WIDGET_FOCUS(&mainwindow, &urlentry); redraw_window(); } }