/* mxmlEntityAddCallback() - Add a callback to convert entities to Unicode. mxmlEntityGetName() - Get the name that corresponds to the character value. mxmlEntityGetValue() - Get the character corresponding to a named entity. mxmlEntityRemoveCallback() - Remove a callback. _mxml_entity_cb() - Lookup standard (X)HTML entities. Include necessary headers... 'mxmlEntityAddCallback()' - Add a callback to convert entities to Unicode.  */
int mxmlEntityAddCallback(mxml_entity_cb_t cb)
/* mxmlEntityAddCallback() - Add a callback to convert entities to Unicode. mxmlEntityGetName() - Get the name that corresponds to the character value. mxmlEntityGetValue() - Get the character corresponding to a named entity. mxmlEntityRemoveCallback() - Remove a callback. _mxml_entity_cb() - Lookup standard (X)HTML entities. Include necessary headers... 'mxmlEntityAddCallback()' - Add a callback to convert entities to Unicode.  */
int mxmlEntityAddCallback(mxml_entity_cb_t cb)
{
  _mxml_global_t *global = _mxml_global();
  if (global->num_entity_cbs < (int)(sizeof(global->entity_cbs) / sizeof(global->entity_cbs[0])))
  {
    global->entity_cbs[global->num_entity_cbs] = cb;
    global->num_entity_cbs ++;
    return (0);
  }
  else
  {
    mxml_error("Unable to add entity callback!");
    return (-1);
  }
}