line |
true |
false |
branch |
60
|
17 |
0 |
if (minimum < r) { |
65
|
0 |
0 |
if (r > STRING_MAX_CHARS) { |
81
|
17 |
50 |
if (! text_fuzzy->b.unicode) { |
86
|
0 |
17 |
get_memory (text_fuzzy->b.unicode, |
|
0 |
17 |
get_memory (text_fuzzy->b.unicode, |
89
|
0 |
50 |
else if (b_length > text_fuzzy->b_unicode_length) { |
97
|
0 |
0 |
Renew (text_fuzzy->b.unicode, text_fuzzy->b_unicode_length, int); |
113
|
82 |
0 |
utf = (const U8 *) SvPV (text, length); |
115
|
675 |
82 |
for (i = 0; i < tfs->ulength; i++) { |
117
|
675 |
0 |
tfs->unicode[i] = (int) utf8_to_uvchr_buf (utf, send, & len); |
118
|
675 |
0 |
if (len == -1 || tfs->unicode[i] == 0) { |
|
0 |
675 |
if (len == -1 || tfs->unicode[i] == 0) { |
139
|
0 |
43 |
get_memory (text_fuzzy, 1, text_fuzzy_t); |
143
|
43 |
0 |
stuff = (const unsigned char *) SvPV (text, length); |
144
|
0 |
43 |
get_memory (copy, length + 1, char); |
145
|
384 |
43 |
for (i = 0; i < (int) length; i++) { |
152
|
15 |
28 |
if (is_utf8) { |
160
|
0 |
15 |
get_memory (text_fuzzy->text.unicode, text_fuzzy->text.ulength, int); |
|
0 |
15 |
get_memory (text_fuzzy->text.unicode, text_fuzzy->text.ulength, int); |
162
|
0 |
15 |
TFPCALL(sv_to_int_ptr(text, & text_fuzzy->text)); |
164
|
15 |
0 |
if (text_fuzzy->text.ulength > 0) { |
167
|
0 |
15 |
TEXT_FUZZY (generate_ualphabet (text_fuzzy)); |
171
|
26 |
2 |
if (text_fuzzy->text.length > 0) { |
172
|
0 |
26 |
TEXT_FUZZY (generate_alphabet (text_fuzzy)); |
175
|
0 |
43 |
TEXT_FUZZY (allocate_edits (text_fuzzy)); |
185
|
149 |
0 |
text_fuzzy->b.text = SvPV (word, length); |
188
|
124 |
25 |
if (SvUTF8 (word) || text_fuzzy->unicode) { |
|
42 |
82 |
if (SvUTF8 (word) || text_fuzzy->unicode) { |
195
|
2 |
65 |
if (! text_fuzzy->unicode) { |
203
|
0 |
2 |
get_memory (nonu, text_fuzzy->b.length + 1, char); |
204
|
7 |
2 |
for (i = 0; i < text_fuzzy->b.ulength; i++) { |
208
|
1 |
6 |
if (c <= 0x80) { |
226
|
2 |
147 |
if (text_fuzzy->b.allocated) { |
244
|
0 |
42 |
TEXT_FUZZY (compare_single (text_fuzzy)); |
246
|
40 |
2 |
if (text_fuzzy->found) { |
261
|
5 |
12 |
if (wantarray) { |
264
|
0 |
17 |
TEXT_FUZZY (begin_scanning (text_fuzzy)); |
272
|
0 |
17 |
if (n_words == 0) { |
276
|
107 |
17 |
for (i = 0; i < n_words; i++) { |
281
|
0 |
107 |
TEXT_FUZZY (compare_single (text_fuzzy)); |
283
|
30 |
77 |
if (text_fuzzy->found) { |
285
|
20 |
10 |
if (! text_fuzzy->wantarray && text_fuzzy->distance == 0) { |
|
0 |
20 |
if (! text_fuzzy->wantarray && text_fuzzy->distance == 0) { |
298
|
0 |
17 |
TEXT_FUZZY (end_scanning (text_fuzzy)); |
306
|
6 |
11 |
if (text_fuzzy->wantarray) { |
310
|
0 |
6 |
TEXT_FUZZY (get_candidates (text_fuzzy, & n_candidates, |
312
|
3 |
3 |
if (n_candidates > 0) { |
313
|
10 |
3 |
for (i = 0; i < n_candidates; i++) { |
319
|
0 |
3 |
TEXT_FUZZY (free_candidates (text_fuzzy, candidates)); |
331
|
17 |
26 |
if (text_fuzzy->b.unicode) { |
339
|
0 |
43 |
TEXT_FUZZY (free_memory (text_fuzzy)); |
341
|
15 |
28 |
if (text_fuzzy->unicode) { |
349
|
0 |
43 |
if (text_fuzzy->n_mallocs != 1) { |