ReactOS 0.4.16-dev-199-g898cc56
|
#include "libxml.h"
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <libxml/parser.h>
#include <libxml/hash.h>
#include <libxml/xmlmemory.h>
#include <libxml/xmlerror.h>
#include <libxml/globals.h>
Go to the source code of this file.
Classes | |
struct | _xmlHashEntry |
struct | _xmlHashTable |
struct | stubData |
Macros | |
#define | IN_LIBXML |
#define | HASH_RANDOMIZATION |
#define | MAX_HASH_LEN 8 |
Typedefs | |
typedef struct _xmlHashEntry | xmlHashEntry |
typedef xmlHashEntry * | xmlHashEntryPtr |
Functions | |
static unsigned long | xmlHashComputeKey (xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3) |
static unsigned long | xmlHashComputeQKey (xmlHashTablePtr table, const xmlChar *prefix, const xmlChar *name, const xmlChar *prefix2, const xmlChar *name2, const xmlChar *prefix3, const xmlChar *name3) |
xmlHashTablePtr | xmlHashCreate (int size) |
xmlHashTablePtr | xmlHashCreateDict (int size, xmlDictPtr dict) |
static int | xmlHashGrow (xmlHashTablePtr table, int size) |
void | xmlHashFree (xmlHashTablePtr table, xmlHashDeallocator f) |
: the entry's name | |
xmlHashDefaultDeallocator: @entry: the hash table entry Free a hash table entry with xmlFree. | |
void | xmlHashDefaultDeallocator (void *entry, const xmlChar *name ATTRIBUTE_UNUSED) |
. Duplicate names generate errors. | |
Returns 0 the addition succeeded and -1 in case of error. | |
int | xmlHashAddEntry (xmlHashTablePtr table, const xmlChar *name, void *userdata) |
, @name2) tuple. Duplicate tuples generate errors. | |
Returns 0 the addition succeeded and -1 in case of error. | |
int | xmlHashAddEntry2 (xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, void *userdata) |
. Existing entry for this @name will be removed | |
and freed with @f if found. Returns 0 the addition succeeded and -1 in case of error. | |
int | xmlHashUpdateEntry (xmlHashTablePtr table, const xmlChar *name, void *userdata, xmlHashDeallocator f) |
, @name2) tuple. Existing entry for this tuple will | |
be removed and freed with @f if found. Returns 0 the addition succeeded and -1 in case of error. | |
int | xmlHashUpdateEntry2 (xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, void *userdata, xmlHashDeallocator f) |
. | |
Returns the pointer to the userdata | |
void * | xmlHashLookup (xmlHashTablePtr table, const xmlChar *name) |
, @name2) tuple. | |
Returns the pointer to the userdata | |
void * | xmlHashLookup2 (xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2) |
/@name. | |
Returns the pointer to the userdata | |
void * | xmlHashQLookup (xmlHashTablePtr table, const xmlChar *prefix, const xmlChar *name) |
2: a second name of the userdata | |
void * | xmlHashQLookup2 (xmlHashTablePtr table, const xmlChar *prefix, const xmlChar *name, const xmlChar *prefix2, const xmlChar *name2) |
, @name2, @name3). Duplicate entries generate | |
errors. Returns 0 the addition succeeded and -1 in case of error. | |
int | xmlHashAddEntry3 (xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, void *userdata) |
, @name2, @name3). Existing entry for this tuple | |
will be removed and freed with @f if found. Returns 0 the addition succeeded and -1 in case of error. | |
int | xmlHashUpdateEntry3 (xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, void *userdata, xmlHashDeallocator f) |
, @name2, @name3) tuple. | |
Returns the a pointer to the userdata | |
void * | xmlHashLookup3 (xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3) |
void * | xmlHashQLookup3 (xmlHashTablePtr table, const xmlChar *prefix, const xmlChar *name, const xmlChar *prefix2, const xmlChar *name2, const xmlChar *prefix3, const xmlChar *name3) |
static void | stubHashScannerFull (void *payload, void *data, const xmlChar *name, const xmlChar *name2 ATTRIBUTE_UNUSED, const xmlChar *name3 ATTRIBUTE_UNUSED) |
void | xmlHashScan (xmlHashTablePtr table, xmlHashScanner f, void *data) |
void | xmlHashScanFull (xmlHashTablePtr table, xmlHashScannerFull f, void *data) |
, @name2, @name3) tuple. If one of the names is null, | |
the comparison is considered to match. | |
void | xmlHashScan3 (xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, xmlHashScanner f, void *data) |
void | xmlHashScanFull3 (xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, xmlHashScannerFull f, void *data) |
xmlHashTablePtr | xmlHashCopy (xmlHashTablePtr table, xmlHashCopier f) |
int | xmlHashSize (xmlHashTablePtr table) |
and remove | |
it from the hash @table. Existing userdata for this tuple will be removed and freed with @f. Returns 0 if the removal succeeded and -1 in case of error or not found. | |
int | xmlHashRemoveEntry (xmlHashTablePtr table, const xmlChar *name, xmlHashDeallocator f) |
, @name2) tuple and remove | |
it from the hash @table. Existing userdata for this tuple will be removed and freed with @f. Returns 0 if the removal succeeded and -1 in case of error or not found. | |
int | xmlHashRemoveEntry2 (xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, xmlHashDeallocator f) |
, @name2, @name3) tuple and remove | |
it from the hash @table. Existing userdata for this tuple will be removed and freed with @f. Returns 0 if the removal succeeded and -1 in case of error or not found. | |
int | xmlHashRemoveEntry3 (xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, xmlHashDeallocator f) |
typedef struct _xmlHashEntry xmlHashEntry |
typedef xmlHashEntry* xmlHashEntryPtr |
|
static |
Definition at line 843 of file hash.c.
Referenced by xmlHashScan(), and xmlHashScan3().
int xmlHashAddEntry | ( | xmlHashTablePtr | table, |
const xmlChar * | name, | ||
void * | userdata | ||
) |
Definition at line 389 of file hash.c.
Referenced by xmlAddID(), xmlAddNotationDecl(), xmlAddRef(), xsltGetExtData(), xsltInitCtxtExt(), xsltInitCtxtKey(), xsltNamespaceAlias(), xsltRegisterExtModuleFull(), and xsltStyleInitializeStylesheetModule().
int xmlHashAddEntry2 | ( | xmlHashTablePtr | table, |
const xmlChar * | name, | ||
const xmlChar * | name2, | ||
void * | userdata | ||
) |
Definition at line 406 of file hash.c.
Referenced by xmlAddElementDecl(), xmlAddSpecialAttr(), xmlGetDtdElementDesc2(), xsltAddTemplate(), xsltDocumentElem(), xsltEvalGlobalVariables(), xsltParseStylesheetAttributeSet(), xsltParseStylesheetOutput(), xsltParseStylesheetPreserveSpace(), xsltParseStylesheetStripSpace(), xsltProcessUserParamInternal(), xsltRegisterExtElement(), xsltRegisterExtFunction(), and xsltResolveSASCallback().
int xmlHashAddEntry3 | ( | xmlHashTablePtr | table, |
const xmlChar * | name, | ||
const xmlChar * | name2, | ||
const xmlChar * | name3, | ||
void * | userdata | ||
) |
Definition at line 531 of file hash.c.
Referenced by xmlAddAttributeDecl(), xmlHashAddEntry(), xmlHashAddEntry2(), xmlHashCopy(), and xsltAddTemplate().
|
static |
Definition at line 81 of file hash.c.
Referenced by xmlHashAddEntry3(), xmlHashGrow(), xmlHashLookup3(), xmlHashRemoveEntry3(), and xmlHashUpdateEntry3().
|
static |
Definition at line 114 of file hash.c.
Referenced by xmlHashQLookup3().
xmlHashTablePtr xmlHashCopy | ( | xmlHashTablePtr | table, |
xmlHashCopier | f | ||
) |
xmlHashCopy: @table: the hash table @f: the copier function for items in the hash
Scan the hash @table and applied @f to each value.
Returns the new table or NULL in case of error.
Definition at line 992 of file hash.c.
xmlHashTablePtr xmlHashCreate | ( | int | size | ) |
xmlHashCreate: @size: the size of the hash table
Create a new xmlHashTablePtr.
Returns the newly created object, or NULL if an error occurred.
Definition at line 176 of file hash.c.
Referenced by xmlHashCopy(), xmlHashCreateDict(), xsltAddTemplate(), xsltApplyStylesheetInternal(), xsltDocumentElem(), xsltGatherNamespaces(), xsltGetExtData(), xsltInitCtxtExt(), xsltNamespaceAlias(), xsltNewKeyTable(), xsltParseStylesheetAttributeSet(), xsltParseStylesheetOutput(), xsltParseStylesheetPreserveSpace(), xsltParseStylesheetStripSpace(), xsltProcessUserParamInternal(), xsltRegisterExtElement(), xsltRegisterExtFunction(), xsltRegisterExtModuleElement(), xsltRegisterExtModuleFull(), xsltRegisterExtModuleFunction(), xsltRegisterExtModuleTopLevel(), xsltResolveStylesheetAttributeSet(), and xsltStyleInitializeStylesheetModule().
xmlHashTablePtr xmlHashCreateDict | ( | int | size, |
xmlDictPtr | dict | ||
) |
xmlHashCreateDict: @size: the size of the hash table @dict: a dictionary to use for the hash
Create a new xmlHashTablePtr which will use @dict as the internal dictionary
Returns the newly created object, or NULL if an error occurred.
Definition at line 210 of file hash.c.
Referenced by xmlAddAttributeDecl(), xmlAddDefAttrs(), xmlAddElementDecl(), xmlAddID(), xmlAddNotationDecl(), xmlAddRef(), xmlAddSpecialAttr(), and xmlGetDtdElementDesc2().
void xmlHashFree | ( | xmlHashTablePtr | table, |
xmlHashDeallocator | f | ||
) |
xmlHashFree: @table: the hash table @f: the deallocator function for items in the hash
Free the hash @table and its contents. The userdata is deallocated with @f if provided.
Definition at line 322 of file hash.c.
Referenced by xmlCleanSpecialAttr(), xmlCtxtReset(), xmlFreeAttributeTable(), xmlFreeElementTable(), xmlFreeIDTable(), xmlFreeNotationTable(), xmlFreeParserCtxt(), xmlFreeRefTable(), xsltCleanupGlobals(), xsltFreeAttributeSetsHashes(), xsltFreeCtxtExts(), xsltFreeGlobalVariables(), xsltFreeKeyTable(), xsltFreeNamespaceAliasHashes(), xsltFreeStylesheet(), xsltFreeTemplateHashes(), xsltResolveStylesheetAttributeSet(), xsltShutdownCtxtExts(), xsltShutdownExts(), xsltUnregisterAllExtModuleElement(), xsltUnregisterAllExtModuleFunction(), xsltUnregisterAllExtModules(), and xsltUnregisterAllExtModuleTopLevel().
|
static |
xmlHashGrow: @table: the hash table @size: the new size of the hash table
resize the hash table
Returns 0 in case of success, -1 in case of failure
Definition at line 231 of file hash.c.
Referenced by xmlHashAddEntry3().
void * xmlHashLookup | ( | xmlHashTablePtr | table, |
const xmlChar * | name | ||
) |
Definition at line 461 of file hash.c.
Referenced by xmlAddRef(), xmlGetDtdNotationDesc(), xmlGetID(), xmlGetRefs(), xmlRemoveID(), xmlRemoveRef(), xsltApplySequenceConstructor(), xsltCheckInstructionElement(), xsltCheckParentElement(), xsltCopyNamespaceList(), xsltGatherNamespaces(), xsltGetExtData(), xsltGetExtInfo(), xsltGetKey(), xsltGetNamespace(), xsltInitCtxtExt(), xsltInitCtxtKey(), xsltRegisterExtModuleFull(), xsltRegisterExtPrefix(), xsltStyleGetExtData(), and xsltStyleInitializeStylesheetModule().
Definition at line 476 of file hash.c.
Referenced by xmlAddDefAttrs(), xmlAddElementDecl(), xmlAddSpecialAttr(), xmlGetDtdElementDesc(), xmlGetDtdElementDesc2(), xmlGetDtdQElementDesc(), xmlParseStartTag2(), xsltAddTemplate(), xsltApplyAttributeSet(), xsltCopyText(), xsltCopyTextString(), xsltEvalGlobalVariables(), xsltExtElementLookup(), xsltExtModuleElementLookup(), xsltExtModuleElementPreComputeLookup(), xsltExtModuleFunctionLookup(), xsltExtModuleTopLevelLookup(), xsltFindElemSpaceHandling(), xsltFindTemplate(), xsltGlobalVariableLookup(), xsltParseStylesheetAttributeSet(), xsltPreComputeExtModuleElement(), xsltProcessUserParamInternal(), xsltResolveAttrSet(), xsltResolveUseAttrSets(), and xsltXPathFunctionLookup().
void * xmlHashLookup3 | ( | xmlHashTablePtr | table, |
const xmlChar * | name, | ||
const xmlChar * | name2, | ||
const xmlChar * | name3 | ||
) |
Definition at line 769 of file hash.c.
Referenced by xmlAddAttributeDecl(), xmlGetDtdAttrDesc(), xmlGetDtdQAttrDesc(), xmlHashLookup(), xmlHashLookup2(), xsltAddTemplate(), and xsltGetTemplate().
Definition at line 492 of file hash.c.
void * xmlHashQLookup2 | ( | xmlHashTablePtr | table, |
const xmlChar * | prefix, | ||
const xmlChar * | name, | ||
const xmlChar * | prefix2, | ||
const xmlChar * | name2 | ||
) |
Definition at line 510 of file hash.c.
Referenced by xmlParseAttribute2().
void * xmlHashQLookup3 | ( | xmlHashTablePtr | table, |
const xmlChar * | prefix, | ||
const xmlChar * | name, | ||
const xmlChar * | prefix2, | ||
const xmlChar * | name2, | ||
const xmlChar * | prefix3, | ||
const xmlChar * | name3 | ||
) |
Definition at line 813 of file hash.c.
Referenced by xmlHashQLookup(), and xmlHashQLookup2().
int xmlHashRemoveEntry | ( | xmlHashTablePtr | table, |
const xmlChar * | name, | ||
xmlHashDeallocator | f | ||
) |
Definition at line 1052 of file hash.c.
Referenced by xmlRemoveID(), and xsltUnregisterExtModule().
int xmlHashRemoveEntry2 | ( | xmlHashTablePtr | table, |
const xmlChar * | name, | ||
const xmlChar * | name2, | ||
xmlHashDeallocator | f | ||
) |
Definition at line 1071 of file hash.c.
Referenced by xmlAddElementDecl(), xmlCleanSpecialAttrCallback(), xsltResolveAttrSet(), xsltUnregisterExtModuleElement(), xsltUnregisterExtModuleFunction(), and xsltUnregisterExtModuleTopLevel().
int xmlHashRemoveEntry3 | ( | xmlHashTablePtr | table, |
const xmlChar * | name, | ||
const xmlChar * | name2, | ||
const xmlChar * | name3, | ||
xmlHashDeallocator | f | ||
) |
Definition at line 1091 of file hash.c.
Referenced by xmlHashRemoveEntry(), and xmlHashRemoveEntry2().
void xmlHashScan | ( | xmlHashTablePtr | table, |
xmlHashScanner | f, | ||
void * | data | ||
) |
xmlHashScan: @table: the hash table @f: the scanner function for items in the hash @data: extra data passed to f
Scan the hash @table and applied @f to each value.
Definition at line 859 of file hash.c.
Referenced by xsltCleanupGlobals(), xsltEvalGlobalVariables(), xsltFixImportedCompSteps(), xsltInitCtxtExts(), xsltShutdownCtxtExts(), and xsltShutdownExts().
void xmlHashScan3 | ( | xmlHashTablePtr | table, |
const xmlChar * | name, | ||
const xmlChar * | name2, | ||
const xmlChar * | name3, | ||
xmlHashScanner | f, | ||
void * | data | ||
) |
Definition at line 926 of file hash.c.
void xmlHashScanFull | ( | xmlHashTablePtr | table, |
xmlHashScannerFull | f, | ||
void * | data | ||
) |
xmlHashScanFull: @table: the hash table @f: the scanner function for items in the hash @data: extra data passed to f
Scan the hash @table and applied @f to each value.
Definition at line 875 of file hash.c.
Referenced by xmlCleanSpecialAttr(), xmlHashScan(), xsltDebugDumpExtensions(), and xsltResolveStylesheetAttributeSet().
void xmlHashScanFull3 | ( | xmlHashTablePtr | table, |
const xmlChar * | name, | ||
const xmlChar * | name2, | ||
const xmlChar * | name3, | ||
xmlHashScannerFull | f, | ||
void * | data | ||
) |
Definition at line 950 of file hash.c.
Referenced by xmlHashScan3().
int xmlHashSize | ( | xmlHashTablePtr | table | ) |
xmlHashSize: @table: the hash table
Query the number of elements installed in the hash @table.
Returns the number of elements in the hash table or -1 in case of error
Definition at line 1034 of file hash.c.
Referenced by xmlCleanSpecialAttr().
int xmlHashUpdateEntry | ( | xmlHashTablePtr | table, |
const xmlChar * | name, | ||
void * | userdata, | ||
xmlHashDeallocator | f | ||
) |
Definition at line 425 of file hash.c.
Referenced by xmlRemoveRef(), and xsltGatherNamespaces().
int xmlHashUpdateEntry2 | ( | xmlHashTablePtr | table, |
const xmlChar * | name, | ||
const xmlChar * | name2, | ||
void * | userdata, | ||
xmlHashDeallocator | f | ||
) |
Definition at line 445 of file hash.c.
Referenced by xmlAddDefAttrs(), xsltRegisterExtModuleElement(), xsltRegisterExtModuleFunction(), and xsltRegisterExtModuleTopLevel().
int xmlHashUpdateEntry3 | ( | xmlHashTablePtr | table, |
const xmlChar * | name, | ||
const xmlChar * | name2, | ||
const xmlChar * | name3, | ||
void * | userdata, | ||
xmlHashDeallocator | f | ||
) |
Definition at line 647 of file hash.c.
Referenced by xmlHashUpdateEntry(), xmlHashUpdateEntry2(), and xsltAddTemplate().