Diff for /Amaya/amaya/fetchXMLname.c between versions 1.35 and 1.36

version 1.35, 2000/12/28 10:48:24 version 1.36, 2001/01/15 10:47:57
Line 326  ElementType      el; Line 326  ElementType      el;
   return ret;    return ret;
 }  }
   
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    MapXMLAttribute     MapXMLAttribute
    Generic function which searchs in the Attribute Mapping Table (table)     Generic function which searchs in the Attribute Mapping Table (table)
Line 457  Document          doc; Line 456  Document          doc;
   else    else
     return TEXT("???");      return TEXT("???");
 }  }
   
   /*----------------------------------------------------------------------
      MapXMLEntity
      Generic function which searchs in the Entity Mapping Table (table)
      the entry entityName and give the corresponding decimal value.
      Returns FALSE if entityName is not found.
     ----------------------------------------------------------------------*/
   #ifdef __STDC__
   ThotBool   MapXMLEntity (int XMLtype, STRING entityName, int *entityValue)
   #else
   ThotBool   MapXMLEntity (XMLtype, entityName, entityValue)
   int        XMLtype;
   STRING     entityName
   int       *entityValue
   #endif
   {
     int         i;
     XmlEntity  *ptr;
     ThotBool    found;
   
     i = 1;
     found = FALSE;
   
     /* Select the right table */
     if (XMLtype == XHTML_TYPE)
       ptr = XhtmlEntityTable;
     else if (XMLtype == MATH_TYPE)
       ptr = MathEntityTable;
     else
       ptr = NULL;
     
     if (ptr == NULL)
       return FALSE;
   
     /* look for the first concerned entry in the table */
     for (i = 0; ptr[i].charCode >= 0 && !found; i++)
       found = !ustrcmp (ptr[i].charName, entityName);
     
     if (found)
       {
         /* entity found */
         i--;
         *entityValue = ptr[i].charCode;
         return TRUE;
       }
     else
       return FALSE;
   }

Removed from v.1.35  
changed lines
  Added in v.1.36


Webmaster