MCPcopy Create free account
hub / github.com/Kitware/VTK / htmlEntityLookup

Function htmlEntityLookup

ThirdParty/libxml2/vtklibxml2/HTMLparser.c:2001–2012  ·  view source on GitHub ↗

* htmlEntityLookup: * @name: the entity name * * Lookup the given entity in EntitiesTable * * TODO: the linear scan is really ugly, an hash table is really needed. * * Returns the associated htmlEntityDescPtr if found, NULL otherwise. */

Source from the content-addressed store, hash-verified

1999 * Returns the associated htmlEntityDescPtr if found, NULL otherwise.
2000 */
2001const htmlEntityDesc *
2002htmlEntityLookup(const xmlChar *name) {
2003 unsigned int i;
2004
2005 for (i = 0;i < (sizeof(html40EntitiesTable)/
2006 sizeof(html40EntitiesTable[0]));i++) {
2007 if (xmlStrEqual(name, BAD_CAST html40EntitiesTable[i].name)) {
2008 return((htmlEntityDescPtr) &html40EntitiesTable[i]);
2009 }
2010 }
2011 return(NULL);
2012}
2013
2014static int
2015htmlCompareEntityDesc(const void *vkey, const void *vdesc) {

Callers 1

htmlParseEntityRefFunction · 0.85

Calls 1

xmlStrEqualFunction · 0.85

Tested by

no test coverage detected