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.5 2000/02/13 18:07:15 mast Exp $ + //! $Id: utils.pmod,v 1.6 2000/02/13 18:25:56 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);    sscanf (reverse (str), "%*[ \t\n\r]%s", str); -  RXML.rxml_parse_error ("Free text %O is not allowed in this context.\n", str); +  RXML.parse_error ("Free text %O is not allowed in this context.\n", str);    }    return ({});   }      int(1..1)|string|array unknown_tag_error (Parser.HTML p, string str)   { -  RXML.rxml_parse_error ("Unknown tag %O. Unknown tags are not " +  RXML.parse_error ("Unknown tag %O. Unknown tags are not "    "allowed in this context.\n", p->tag_name());    return ({});   }      int(1..1)|string|array output_error_cb (Parser.HTML p, string str)   {    if (p->errmsgs) str = p->errmsgs + str, p->errmsgs = 0;    if (p->type->free_text) p->_set_data_callback (0);    else p->_set_data_callback (free_text_error);    return ({str});