pike.git / src / post_modules / CritBit / critbit / key_pikestring.h

version» Context lines:

pike.git/src/post_modules/CritBit/critbit/key_pikestring.h:1: Inside #if undefined(CB_KEY_PIKESTRING_H)
  #ifndef CB_KEY_PIKESTRING_H   #define CB_KEY_PIKESTRING_H   #include "bitvector.h"   #include "pike_int_types.h"      typedef struct pike_string * CB_NAME(string); - typedef p_wchar2 CB_NAME(char); + typedef unsigned INT32 CB_NAME(char);      #ifdef cb_string   # undef cb_string   #endif   #define cb_string CB_NAME(string)      #ifdef cb_char   # undef cb_char   #endif   #define cb_char CB_NAME(char)    -  + #define hton8(x) (x) + #define get_unaligned_be8(x) ((unsigned INT8 *)x)[0] +    #ifdef CB_SOURCE   #define CB_ADD_KEY_REF(x) do { if ((x).str) add_ref((x).str); } while(0)   #define CB_FREE_KEY(x) do { if ((x).str) free_string((x).str); } while(0)   #define CB_SET_KEY(node, x) \    do { CB_ADD_KEY_REF(x); \    CB_FREE_KEY((node)->key); (node)->key = (x); } while(0)      #define CB_KEY_EQ(k1, k2) (CB_S_EQ((k1).len, (k2).len) && (k1).str == (k2).str)   #define CB_KEY_LT(k1, k2) \    (CB_LT((k1).len, (k2).len) && my_quick_strcmp((k1).str, (k2).str) < 0)
pike.git/src/post_modules/CritBit/critbit/key_pikestring.h:61: Inside #if 0
   asm volatile(    "pushf\t\n"    "orl $(1<<18), (%esp)\t\n"    "popf\t\n"    );   #endif      #define PREFIX(n) do { \    size_t k = j/sizeof(unsigned INT ##n ); \    for (;k < len.chars/sizeof(unsigned INT ##n );k++) { \ -  unsigned INT ##n x = ((unsigned INT ##n *)p1)[k] \ -  ^ ((unsigned INT ##n *)p2)[k]; \ +  unsigned INT ##n x = get_unaligned_be ##n (p1 + k * sizeof(unsigned INT ##n))\ +  ^ get_unaligned_be ##n (p2 + k * sizeof(unsigned INT ##n));\    if (x) { \    unsigned INT32 a; \ -  a = clz ##n(hton ##n(x)); \ +  a = clz ##n(x); \    start.chars = k*sizeof(unsigned INT ##n ) + a/8; \    start.bits = 24 + a % 8; \    return start; \    } \    } \    j = k*sizeof(unsigned INT ##n); \    } while(0)   #ifdef lzc64    PREFIX(64);   #endif
pike.git/src/post_modules/CritBit/critbit/key_pikestring.h:126: Inside #if 0
   return cb_prefix_count_wide0(s1, s2, len, start);   #if 0    if (!CB_S_EQ(r, t)) {    rp = &r;    tp = &t;    fprintf(stderr, "%p(%p) and %p(%p) have prefix %lu,%lu. should "    + "have %lu,%lu (len: %lu, %lu start: %lu, %lu)\n",    s1->str, s1, s2->str, s2, t.chars, t.bits, r.chars,    r.bits, len.chars, len.bits, start.chars, start.bits);    fprintf(stderr, "here you die: %p, %lu\n", chrptr, -  r.bits/(unsigned INT64)zero); +  r.bits/(UINT64)zero);    fprintf(stderr, "%p %p %p", zero, n1, n2); -  n1 = n2 = (void*)(zero = (unsigned INT64)chrptr ^ (unsigned INT64)n1 -  ^ (unsigned INT64)n2); +  n1 = n2 = (void*)(zero = (UINT64)chrptr ^ (UINT64)n1 +  ^ (UINT64)n2);    fprintf(stderr, "%p %p %p %p %p %p", zero, n1, n2, rp, (void*)rp,    tp, (void*)tp);    }   #endif          return cb_prefix_count_fallback(s1, s2, len, start);   }      #define cb_prefix_count cb_prefix_count_widestring      #undef CB_WIDTH   #define CB_WIDTH(s) (32)      #endif /* CB_SOURCE */      #endif