Ignore:
Timestamp:
Nov 7, 2011, 3:22:00 PM (8 years ago)
Author:
vla24
Message:

SymbolTable?: Update symtab library for dictionary div2 delimiter. Fixed some compile errors for log grouping

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/symtab/bitstream_log_hash_table.h

    r1653 r1665  
    4545{
    4646    unsigned int bucket = getBucket(hashvalue, m_tableSize);
    47     unsigned int chainlgth = m_table->size(bucket);
    4847
    49     // Look up the value in the chain
    50     for(unsigned int i = 0; i < chainlgth; i++) {
    51         CHAIN chain = m_table->get(bucket, i);
     48    for(CHAIN* chain = m_table[bucket]; chain != NULL; chain = chain->next) {
    5249#if DEBUG_BHT
    5350        printf ("Check symbol: %s\n", chain.key);
    5451#endif
    55         if( log_equal_compare_1 ((unsigned char*)chain.key, (unsigned char*)name) )
     52        if( log_equal_compare_1 ((unsigned char*)chain->key, (unsigned char*)name) )
    5653        {
    5754#if DEBUG_BHT
    58             printf ("Found GID: %i\n", chain.GID);
     55            printf ("Found GID: %i\n", chain->GID);
    5956#endif
    60             return chain.GID;
     57            return chain->GID;
    6158        }
    6259    }
     
    7168{
    7269    unsigned int bucket = getBucket(hashvalue, m_tableSize);
    73     unsigned int chainlgth = m_table->size(bucket);
    7470
    75     // Look up the value in the chain
    76     for(unsigned int i = 0; i < chainlgth; i++) {
    77         CHAIN chain = m_table->get(bucket, i);
     71    for(CHAIN* chain = m_table[bucket]; chain != NULL; chain = chain->next) {
    7872#if DEBUG_BHT
    7973        printf ("Check symbol: %s\n", chain.key);
    8074#endif
    81         if( log_equal_compare_2 ((unsigned char*)chain.key, (unsigned char*)name) )
     75        if( log_equal_compare_2 ((unsigned char*)chain->key, (unsigned char*)name) )
    8276        {
    8377#if DEBUG_BHT
    84             printf ("Found GID: %i\n", chain.GID);
     78            printf ("Found GID: %i\n", chain->GID);
    8579#endif
    86             return chain.GID;
     80            return chain->GID;
    8781        }
    8882    }
     
    9892{
    9993    unsigned int bucket = getBucket(hashvalue, m_tableSize);
    100     unsigned int chainlgth = m_table->size(bucket);
    10194
    102     // Look up the value in the chain
    103     for(unsigned int i = 0; i < chainlgth; i++) {
    104         CHAIN chain = m_table->get(bucket, i);
     95    for(CHAIN* chain = m_table[bucket]; chain != NULL; chain = chain->next) {
    10596#if DEBUG_BHT
    10697        printf ("Check symbol: %s\n", chain.key);
     
    10899
    109100#ifdef USE_MASK_COMPARE
    110         if( log_equal_compare_4 ((unsigned char*)chain.key, (unsigned char*)name, L) )
     101        if( log_equal_compare_4 ((unsigned char*)chain->key, (unsigned char*)name, L) )
    111102        {
    112103#else
    113         if( overlap_compare<uint16_t>((unsigned char*)chain.key, (unsigned char*)name, chain.lgth, L) )
     104        if( overlap_compare<uint16_t>((unsigned char*)chain->key, (unsigned char*)name, chain->lgth, L) )
    114105        {
    115106#endif
    116107#if DEBUG_BHT
    117             printf ("Found GID: %i\n", chain.GID);
     108            printf ("Found GID: %i\n", chain->GID);
    118109#endif
    119             return chain.GID;
     110            return chain->GID;
    120111        }
    121112    }
     
    131122{
    132123    unsigned int bucket = getBucket(hashvalue, m_tableSize);
    133     unsigned int chainlgth = m_table->size(bucket);
    134124
    135     // Look up the value in the chain
    136     for(unsigned int i = 0; i < chainlgth; i++) {
    137         CHAIN chain = m_table->get(bucket, i);
     125    for(CHAIN* chain = m_table[bucket]; chain != NULL; chain = chain->next) {
    138126#if DEBUG_BHT
    139         printf ("Check symbol: %s\n", chain.key);
     127        printf ("Check symbol: %s\n", chain->key);
    140128#endif
    141         if( overlap_compare<uint32_t> ((unsigned char*)chain.key, (unsigned char*)name, chain.lgth, L) )
     129        if( overlap_compare<uint32_t> ((unsigned char*)chain->key, (unsigned char*)name, chain->lgth, L) )
    142130        {
    143131#if DEBUG_BHT
    144132            printf ("Found GID: %i\n", chain.GID);
    145133#endif
    146             return chain.GID;
     134            return chain->GID;
    147135        }
    148136    }
     
    158146{
    159147    unsigned int bucket = getBucket(hashvalue, m_tableSize);
    160     unsigned int chainlgth = m_table->size(bucket);
    161148
    162     // Look up the value in the chain
    163     for(unsigned int i = 0; i < chainlgth; i++) {
    164         CHAIN chain = m_table->get(bucket, i);
     149    for(CHAIN* chain = m_table[bucket]; chain != NULL; chain = chain->next) {
    165150#if DEBUG_BHT
    166151        printf ("Check symbol: %s\n", chain.key);
    167152#endif
    168         if( overlap_compare<uint64_t> ((unsigned char*)chain.key, (unsigned char*)name, chain.lgth, L) )
     153        if( overlap_compare<uint64_t> ((unsigned char*)chain->key, (unsigned char*)name, chain->lgth, L) )
    169154        {
    170155#if DEBUG_BHT
    171             printf ("Found GID: %i\n", chain.GID);
     156            printf ("Found GID: %i\n", chain->GID);
    172157#endif
    173             return chain.GID;
     158            return chain->GID;
    174159        }
    175160    }
Note: See TracChangeset for help on using the changeset viewer.