| 783 | } |
| 784 | |
| 785 | int poptBitsDel(poptBits bits, const char * s) |
| 786 | { |
| 787 | size_t ns = (s ? strlen(s) : 0); |
| 788 | uint32_t h0 = 0; |
| 789 | uint32_t h1 = 0; |
| 790 | |
| 791 | if (bits == NULL || ns == 0) |
| 792 | return POPT_ERROR_NULLARG; |
| 793 | |
| 794 | poptJlu32lpair(s, ns, &h0, &h1); |
| 795 | |
| 796 | for (ns = 0; ns < (size_t)_poptBitsK; ns++) { |
| 797 | uint32_t h = h0 + ns * h1; |
| 798 | uint32_t ix = (h % _poptBitsM); |
| 799 | PBM_CLR(ix, bits); |
| 800 | } |
| 801 | return 0; |
| 802 | } |
| 803 | |
| 804 | int poptBitsIntersect(poptBits *ap, const poptBits b) |
| 805 | { |