Changeset 3084 for trunk/src/kmk/strcache2.c
- Timestamp:
- Oct 3, 2017, 12:24:58 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/strcache2.c
r3068 r3084 93 93 94 94 95 #ifndef STRCACHE2_USE_MASK 95 96 /** Finds the closest primary number for power of two value (or something else 96 97 * useful if not support). */ … … 124 125 } 125 126 } 127 #endif 126 128 127 129 /* The following is a bit experiment. It produces longer chains, i.e. worse … … 411 413 } 412 414 415 #if 0 413 416 MY_INLINE int 414 417 strcache2_memcmp_inline_short (const char *xs, const char *ys, unsigned int length) … … 485 488 return memcmp (xs, ys, length); 486 489 } 490 #endif 487 491 488 492 MY_INLINE int … … 612 616 } 613 617 618 #if defined(HAVE_CASE_INSENSITIVE_FS) 614 619 MY_INLINE int 615 620 strcache2_is_iequal (struct strcache2 *cache, struct strcache2_entry const *entry, … … 623 628 return 0; 624 629 625 # if defined(_MSC_VER) || defined(__OS2__)630 # if defined(_MSC_VER) || defined(__OS2__) 626 631 return _memicmp (entry + 1, str, length) == 0; 627 # else632 # else 628 633 return strncasecmp ((const char *)(entry + 1), str, length) == 0; 629 #endif 630 } 634 # endif 635 } 636 #endif /* HAVE_CASE_INSENSITIVE_FS */ 631 637 632 638 static void … … 915 921 if (!entry) 916 922 return strcache2_enter_string (cache, idx, str, length, hash); 917 if (strcache2_is_ equal (cache, entry, str, length, hash))923 if (strcache2_is_iequal (cache, entry, str, length, hash)) 918 924 return (const char *)(entry + 1); 919 925 MAKE_STATS (cache->collision_1st_count++); … … 922 928 if (!entry) 923 929 return strcache2_enter_string (cache, idx, str, length, hash); 924 if (strcache2_is_ equal (cache, entry, str, length, hash))930 if (strcache2_is_iequal (cache, entry, str, length, hash)) 925 931 return (const char *)(entry + 1); 926 932 MAKE_STATS (cache->collision_2nd_count++); … … 932 938 if (!entry) 933 939 return strcache2_enter_string (cache, idx, str, length, hash); 934 if (strcache2_is_ equal (cache, entry, str, length, hash))940 if (strcache2_is_iequal (cache, entry, str, length, hash)) 935 941 return (const char *)(entry + 1); 936 942 MAKE_STATS (cache->collision_3rd_count++); … … 964 970 if (!entry) 965 971 return strcache2_enter_string (cache, idx, str, length, hash); 966 if (strcache2_is_ equal (cache, entry, str, length, hash))972 if (strcache2_is_iequal (cache, entry, str, length, hash)) 967 973 return (const char *)(entry + 1); 968 974 MAKE_STATS (cache->collision_1st_count++); … … 971 977 if (!entry) 972 978 return strcache2_enter_string (cache, idx, str, length, hash); 973 if (strcache2_is_ equal (cache, entry, str, length, hash))979 if (strcache2_is_iequal (cache, entry, str, length, hash)) 974 980 return (const char *)(entry + 1); 975 981 MAKE_STATS (cache->collision_2nd_count++); … … 981 987 if (!entry) 982 988 return strcache2_enter_string (cache, idx, str, length, hash); 983 if (strcache2_is_ equal (cache, entry, str, length, hash))989 if (strcache2_is_iequal (cache, entry, str, length, hash)) 984 990 return (const char *)(entry + 1); 985 991 MAKE_STATS (cache->collision_3rd_count++); … … 1007 1013 if (!entry) 1008 1014 return NULL; 1009 if (strcache2_is_ equal (cache, entry, str, length, hash))1015 if (strcache2_is_iequal (cache, entry, str, length, hash)) 1010 1016 return (const char *)(entry + 1); 1011 1017 MAKE_STATS (cache->collision_1st_count++); … … 1014 1020 if (!entry) 1015 1021 return NULL; 1016 if (strcache2_is_ equal (cache, entry, str, length, hash))1022 if (strcache2_is_iequal (cache, entry, str, length, hash)) 1017 1023 return (const char *)(entry + 1); 1018 1024 MAKE_STATS (cache->collision_2nd_count++); … … 1024 1030 if (!entry) 1025 1031 return NULL; 1026 if (strcache2_is_ equal (cache, entry, str, length, hash))1032 if (strcache2_is_iequal (cache, entry, str, length, hash)) 1027 1033 return (const char *)(entry + 1); 1028 1034 MAKE_STATS (cache->collision_3rd_count++);
Note:
See TracChangeset
for help on using the changeset viewer.