Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions | Variables
nsStaticNameTable.cpp File Reference
#include "nsCRT.h"
#include "nscore.h"
#include "nsString.h"
#include "nsReadableUtils.h"
#include "nsStaticNameTable.h"

Go to the source code of this file.


struct  NameTableEntry




 matchNameKeysCaseInsensitive (PLDHashTable *, const PLDHashEntryHdr *aHdr, const void *key)
 caseInsensitiveStringHashKey (PLDHashTable *table, const void *key)
PRInt32 LookupFlatKeyword (const nsAFlatCString &aKeyword, PLDHashTable &aTable)


static struct PLDHashTableOps

Define Documentation

Definition at line 48 of file nsStaticNameTable.cpp.

Function Documentation

Definition at line 78 of file nsStaticNameTable.cpp.

    PLDHashNumber h = 0;
    for (const unsigned char* s =
           NS_STATIC_CAST(const unsigned char*, key);
         *s != '\0';
        h = (h >> (PL_DHASH_BITS - 4)) ^ (h << 4) ^ (*s & ~0x20);
    return h;
PRInt32 LookupFlatKeyword ( const nsAFlatCString aKeyword,
PLDHashTable aTable 
) [inline]

Definition at line 174 of file nsStaticNameTable.cpp.

    NameTableEntry *entry =
                     PL_DHashTableOperate(&aTable, aKeyword.get(), PL_DHASH_LOOKUP));

    if (PL_DHASH_ENTRY_IS_FREE(entry))
        return nsStaticCaseInsensitiveNameTable::NOT_FOUND;

    return entry->mIndex;

Here is the call graph for this function:

Definition at line 59 of file nsStaticNameTable.cpp.

    const NameTableEntry* entry =
        NS_STATIC_CAST(const NameTableEntry *, aHdr);
    const char *keyValue = NS_STATIC_CAST(const char*, key);

    return (nsCRT::strcasecmp(entry->mKey, keyValue)==0);

Here is the call graph for this function:

Variable Documentation

struct PLDHashTableOps [static]