Roxen.git / server / etc / modules / RXML.pmod / utils.pmod

version» Context lines:

Roxen.git/server/etc/modules/RXML.pmod/utils.pmod:1:   //! Things that belong elsewhere but can't lie there for various silly reasons.   //!   //! E.g. one reason is to avoid circular references in the parser   //! objects when the callbacks are defined in them.   //!   //! Created 2000-01-21 by Martin Stjernholm   //! - //! $Id: utils.pmod,v 1.9 2000/03/06 13:02:17 mast Exp $ + //! $Id: utils.pmod,v 1.10 2000/03/06 17:50:29 mast Exp $         array return_zero (mixed... ignored) {return 0;}   array return_empty_array (mixed... ignored) {return ({});}      int(1..1)|string|array free_text_error (Parser.HTML p, string str)   {    sscanf (str, "%[ \t\n\r]", string ws);    if (str != ws) {    sscanf (reverse (str), "%*[ \t\n\r]%s", str);
Roxen.git/server/etc/modules/RXML.pmod/utils.pmod:36:    else p->_set_data_callback (free_text_error);    return ({str});   }         // PXml and PEnt callbacks.      int(1..1)|string|array p_xml_comment_cb (Parser.HTML p, string str)   // FIXME: This is a kludge until quote tags are handled like other tags.   { -  string name; -  sscanf (str, "%[^\t\n\r ]%s", name, str); +  string name = p->parse_tag_name (str);    if (sizeof (name)) {    name = p->tag_name() + name;    if (string|array|function tdef = p->tags()[name]) {    if (stringp (tdef))    return ({tdef});    else if (arrayp (tdef))    return tdef[0] (p, p->parse_tag_args (str), @tdef[1..]);    else    return tdef (p, p->parse_tag_args (str));    }