void UT_svg::endElement (const gchar * name) { if (m_bContinue == false) return; if (strcmp(static_cast<const char*>(name),"text")==0 || strcmp(static_cast<const char*>(name),"svg:text")==0) { if (m_bIsText && (m_bIsTSpan==false)) { m_bIsText = false; if (m_pBB) { if (m_bHasTSpan==false) { if ((m_ePM==pm_parse) && cb_text) cb_text(cb_userdata, m_pBB); } else { delete m_pBB; } m_pBB = 0; } } else { UT_DEBUGMSG(("SVG: parse error: <text> </text> mismatch?\n")); m_bSVG = false; m_bContinue = false; return; } } if (strcmp(static_cast<const char*>(name),"tspan")==0 || strcmp(static_cast<const char*>(name),"svg:tspan")==0) { if (m_bIsTSpan) { m_bIsTSpan = false; if (m_pBB) { if ((m_ePM==pm_parse) && cb_text) cb_text(cb_userdata, m_pBB); m_pBB = 0; } } else { UT_DEBUGMSG(("SVG: parse error: <tspan> </tspan> mismatch?\n")); m_bSVG = false; m_bContinue = false; return; } } if ((m_ePM==pm_parse) && cb_end) cb_end(cb_userdata, static_cast<const char *>(name)); }
void IRCSession::on_privmsg(const IRCPrivateMessage &message) { if (message.get_text().is_ctcp()) { IRCRawString command, data; extract_ctcp_command(IRCText::from_raw(message.get_text().get_ctcp_data()), command, data); on_ctcp_privmsg(command, IRCText::from_raw(data), message); } else { if (message.get_target().is_channel()) cb_text(message.get_target(), message.get_sender(), message.get_text()); else cb_text(message.get_sender(), message.get_sender(), message.get_text()); } }
static void putValue(struct appData* appD, char *avalue) { t_ctxt *ctxt = &appD->ctxt; //printf ("putValue %s\n", avalue); // This is the attribute value if(appD->expectAttributeData) { char *aqname = appD->attribute; //printf ("AT(#%d) %s=%s\n", ctxt->atcount, aqname, avalue); ctxt->atname[ctxt->atcount] = aqname; ctxt->atvalue[ctxt->atcount] = strdup(avalue); ctxt->atcount++; appD->expectAttributeData = 0; appD->attribute = NULL; } else { //printf ("CH %s\n", avalue); checkCallback (appD, 0); cb_text (appD, avalue); } }