line |
true |
false |
branch |
50
|
0 |
11236 |
if (buf == NULL) { |
51
|
0 |
0 |
if ((buf = malloc(sizeof(unistr_t))) == NULL) |
53
|
0 |
11236 |
} else if (buf->str) |
58
|
0 |
11236 |
if (SvOK(str)) |
|
0 |
0 |
if (SvOK(str)) |
|
0 |
0 |
if (SvOK(str)) |
59
|
11236 |
0 |
utf8 = (U8 *)SvPV(str, utf8len); |
62
|
0 |
11236 |
if (utf8len <= 0) |
65
|
0 |
11236 |
if ((buf->str = (unichar_t *)malloc(sizeof(unichar_t) * unilen)) == NULL) |
70
|
87029 |
11236 |
while (utf8ptr < utf8 + utf8len) { |
72
|
87029 |
0 |
*uniptr = (unichar_t) NATIVE_TO_UNI( |
89
|
0 |
87029 |
if (len == 0) { |
111
|
0 |
35 |
if (buf == NULL) { |
112
|
0 |
0 |
if ((buf = malloc(sizeof(unistr_t))) == NULL) |
114
|
0 |
35 |
} else if (buf->str) |
119
|
0 |
35 |
if (SvOK(str)) |
|
0 |
0 |
if (SvOK(str)) |
|
0 |
0 |
if (SvOK(str)) |
120
|
33 |
2 |
s = SvPV(str, len); |
123
|
0 |
35 |
if (len == 0) |
125
|
0 |
35 |
if ((buf->str = malloc(sizeof(unichar_t) * len)) == NULL) |
128
|
62 |
35 |
for (i = 0; i < len; i++) |
145
|
14560 |
0 |
if (unistr == NULL || unistr->str == NULL || unilen == 0) { |
|
12334 |
2226 |
if (unistr == NULL || unistr->str == NULL || unilen == 0) { |
|
4 |
12330 |
if (unistr == NULL || unistr->str == NULL || unilen == 0) { |
153
|
102381 |
12330 |
while (uniptr < unistr->str + uniidx + unilen && |
|
102381 |
0 |
while (uniptr < unistr->str + uniidx + unilen && |
155
|
0 |
102381 |
if ((newbuf = realloc(buf, |
208
|
465 |
110 |
if (!sv_isobject(sv)) { |
211
|
110 |
0 |
} else if (sv_derived_from(sv, "Unicode::GCString")) |
212
|
110 |
0 |
return PerltoC(gcstring_t *, sv); |
214
|
0 |
0 |
croak("Unknown object %s", HvNAME(SvSTASH(SvRV(sv)))); |
|
0 |
0 |
croak("Unknown object %s", HvNAME(SvSTASH(SvRV(sv)))); |
|
0 |
0 |
croak("Unknown object %s", HvNAME(SvSTASH(SvRV(sv)))); |
|
0 |
0 |
croak("Unknown object %s", HvNAME(SvSTASH(SvRV(sv)))); |
|
0 |
0 |
croak("Unknown object %s", HvNAME(SvSTASH(SvRV(sv)))); |
|
0 |
0 |
croak("Unknown object %s", HvNAME(SvSTASH(SvRV(sv)))); |
241
|
2737 |
0 |
if (!sv || !SvOK(sv)) |
|
0 |
2737 |
if (!sv || !SvOK(sv)) |
|
0 |
0 |
if (!sv || !SvOK(sv)) |
|
0 |
0 |
if (!sv || !SvOK(sv)) |
243
|
2737 |
0 |
if (SvPOK(sv)) |
244
|
2737 |
0 |
return strcasecmp((str = SvPV_nolen(sv)), "YES") == 0 || |
246
|
0 |
0 |
return SvNV(sv) != 0.0; |
267
|
49 |
32 |
if (pregexec(rx, str_arg, str_end, str_beg, 0, screamer, 1)) { |
296
|
0 |
1040 |
if (sv == NULL) |
298
|
520 |
520 |
if (0 < d) |
300
|
520 |
0 |
else if (d < 0) |
317
|
130 |
0 |
if (dataref == NULL || |
|
0 |
130 |
if (dataref == NULL || |
323
|
81 |
49 |
if (text != NULL) { |
324
|
0 |
81 |
if ((pp = av_fetch(data, 0, 0)) == NULL) |
328
|
81 |
0 |
if (SvRXOK(*pp)) |
337
|
0 |
81 |
if (rx == NULL) |
346
|
0 |
49 |
if ((pp = av_fetch(data, 1, 0)) == NULL) |
348
|
0 |
49 |
else if (SvOK(*pp)) |
|
0 |
0 |
else if (SvOK(*pp)) |
|
0 |
0 |
else if (SvOK(*pp)) |
353
|
0 |
49 |
if (func == NULL) { |
354
|
0 |
0 |
if ((ret = gcstring_newcopy(str, lbobj)) == NULL) |
355
|
0 |
0 |
return (lbobj->errnum = errno ? errno : ENOMEM), NULL; |
360
|
0 |
49 |
PUSHMARK(SP); |
362
|
0 |
49 |
XPUSHs(sv_2mortal(CtoPerl("Unicode::LineBreak", lbobj))); |
363
|
0 |
49 |
XPUSHs(sv_2mortal(unistrtoSV(str, 0, str->len))); |
368
|
49 |
0 |
if (SvTRUE(ERRSV)) { |
|
49 |
0 |
if (SvTRUE(ERRSV)) { |
|
49 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
49 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
49 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
49 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
49 |
0 |
if (SvTRUE(ERRSV)) { |
|
49 |
0 |
if (SvTRUE(ERRSV)) { |
|
49 |
0 |
if (SvTRUE(ERRSV)) { |
|
49 |
0 |
if (SvTRUE(ERRSV)) { |
|
49 |
0 |
if (SvTRUE(ERRSV)) { |
|
49 |
0 |
if (SvTRUE(ERRSV)) { |
|
49 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
49 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
49 |
if (SvTRUE(ERRSV)) { |
369
|
0 |
0 |
if (!lbobj->errnum) |
374
|
0 |
49 |
if ((ret = gcstring_new(NULL, lbobj)) == NULL) |
375
|
0 |
0 |
return (lbobj->errnum = errno ? errno : ENOMEM), NULL; |
377
|
221 |
49 |
for (i = 0; i < count; i++) { |
379
|
0 |
221 |
if (!SvOK(sv)) |
|
0 |
0 |
if (!SvOK(sv)) |
|
0 |
0 |
if (!SvOK(sv)) |
383
|
2329 |
221 |
for (j = 0; j < gcstr->gclen; j++) { |
384
|
0 |
2329 |
if (gcstr->gcstr[j].flag & |
388
|
958 |
1371 |
if (i < count - 1 && j == 0) |
|
172 |
786 |
if (i < count - 1 && j == 0) |
390
|
2108 |
49 |
else if (0 < j) |
395
|
221 |
0 |
if (!sv_isobject(sv)) |
400
|
49 |
0 |
FREETMPS; |
424
|
756 |
0 |
if (action <= LINEBREAK_STATE_NONE || LINEBREAK_STATE_MAX <= action) |
|
0 |
756 |
if (action <= LINEBREAK_STATE_NONE || LINEBREAK_STATE_MAX <= action) |
429
|
0 |
756 |
PUSHMARK(SP); |
431
|
0 |
756 |
XPUSHs(sv_2mortal(CtoPerl("Unicode::LineBreak", lbobj))); |
432
|
0 |
756 |
XPUSHs(sv_2mortal(newSVpv(actionstr, 0))); |
433
|
0 |
756 |
XPUSHs(sv_2mortal(CtoPerl("Unicode::GCString", gcstring_copy(str)))); |
438
|
756 |
0 |
if (SvTRUE(ERRSV)) { |
|
756 |
0 |
if (SvTRUE(ERRSV)) { |
|
756 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
756 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
756 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
756 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
756 |
0 |
if (SvTRUE(ERRSV)) { |
|
756 |
0 |
if (SvTRUE(ERRSV)) { |
|
756 |
0 |
if (SvTRUE(ERRSV)) { |
|
756 |
0 |
if (SvTRUE(ERRSV)) { |
|
756 |
0 |
if (SvTRUE(ERRSV)) { |
|
756 |
0 |
if (SvTRUE(ERRSV)) { |
|
756 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
756 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
756 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
439
|
0 |
0 |
if (!lbobj->errnum) |
443
|
0 |
756 |
} else if (count != 1) |
447
|
402 |
354 |
if (!SvOK(sv)) |
|
402 |
0 |
if (!SvOK(sv)) |
|
402 |
0 |
if (!SvOK(sv)) |
451
|
110 |
646 |
if (sv_isobject(sv)) |
455
|
756 |
0 |
FREETMPS; |
474
|
0 |
2328 |
PUSHMARK(SP); |
476
|
0 |
2328 |
XPUSHs(sv_2mortal(CtoPerl("Unicode::LineBreak", lbobj))); |
477
|
0 |
2328 |
XPUSHs(sv_2mortal(newSVnv(len))); |
478
|
0 |
2328 |
XPUSHs(sv_2mortal(CtoPerl("Unicode::GCString", gcstring_copy(pre)))); |
479
|
0 |
2328 |
XPUSHs(sv_2mortal(CtoPerl("Unicode::GCString", gcstring_copy(spc)))); |
480
|
0 |
2328 |
XPUSHs(sv_2mortal(CtoPerl("Unicode::GCString", gcstring_copy(str)))); |
485
|
2328 |
0 |
if (SvTRUE(ERRSV)) { |
|
2328 |
0 |
if (SvTRUE(ERRSV)) { |
|
2328 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
2328 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
2328 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
2328 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
2328 |
0 |
if (SvTRUE(ERRSV)) { |
|
2328 |
0 |
if (SvTRUE(ERRSV)) { |
|
2328 |
0 |
if (SvTRUE(ERRSV)) { |
|
2328 |
0 |
if (SvTRUE(ERRSV)) { |
|
2328 |
0 |
if (SvTRUE(ERRSV)) { |
|
2328 |
0 |
if (SvTRUE(ERRSV)) { |
|
2328 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
2328 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
2328 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
486
|
0 |
0 |
if (!lbobj->errnum) |
490
|
0 |
2328 |
} else if (count != 1) |
493
|
0 |
2328 |
ret = POPn; |
496
|
2328 |
0 |
FREETMPS; |
516
|
0 |
0 |
PUSHMARK(SP); |
518
|
0 |
0 |
XPUSHs(sv_2mortal(CtoPerl("Unicode::LineBreak", lbobj))); |
519
|
0 |
0 |
XPUSHs(sv_2mortal(CtoPerl("Unicode::GCString", gcstring_copy(str)))); |
524
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
525
|
0 |
0 |
if (!lbobj->errnum) |
528
|
0 |
0 |
} if (count == 0) |
532
|
0 |
0 |
for (i = count; i; i--) { |
534
|
0 |
0 |
if (SvOK(sv)) { |
|
0 |
0 |
if (SvOK(sv)) { |
|
0 |
0 |
if (SvOK(sv)) { |
536
|
0 |
0 |
if (gcstr->gclen) |
539
|
0 |
0 |
if (!sv_isobject(sv)) |
545
|
0 |
0 |
FREETMPS; |
559
|
189 |
21 |
for (p = (char **)linebreak_propvals_EA; *p != NULL; p++) |
560
|
0 |
189 |
XPUSHs(sv_2mortal(newSVpv(*p, 0))); |
567
|
840 |
21 |
for (p = (char **)linebreak_propvals_LB; *p != NULL; p++) |
568
|
0 |
840 |
XPUSHs(sv_2mortal(newSVpv(*p, 0))); |
575
|
0 |
483 |
if ((RETVAL = linebreak_new(ref_func)) == NULL) |
609
|
0 |
1351 |
if (items < 2) |
611
|
353 |
998 |
else if (items < 3) { |
612
|
353 |
0 |
key = (char *)SvPV_nolen(ST(1)); |
614
|
0 |
353 |
if (strcasecmp(key, "BreakIndent") == 0) |
617
|
0 |
353 |
else if (strcasecmp(key, "CharMax") == 0) |
619
|
56 |
297 |
else if (strcasecmp(key, "ColMax") == 0) |
621
|
0 |
297 |
else if (strcasecmp(key, "ColMin") == 0) |
623
|
0 |
297 |
else if (strcasecmp(key, "ComplexBreaking") == 0) |
626
|
0 |
297 |
else if (strcasecmp(key, "Context") == 0) { |
627
|
0 |
0 |
if (self->options & LINEBREAK_OPTION_EASTASIAN_CONTEXT) |
631
|
0 |
297 |
} else if (strcasecmp(key, "EAWidth") == 0) { |
637
|
0 |
0 |
if (self->map == NULL || self->mapsiz == 0) |
|
0 |
0 |
if (self->map == NULL || self->mapsiz == 0) |
640
|
0 |
0 |
for (i = 0; i < self->mapsiz; i++) |
641
|
0 |
0 |
if (self->map[i].eaw != PROP_UNKNOWN) { |
642
|
0 |
0 |
if (p != self->map[i].eaw){ |
648
|
0 |
0 |
if (ret == NULL) |
652
|
0 |
0 |
for (c = self->map[i].beg; c <= self->map[i].end; c++) |
656
|
0 |
0 |
if (ret == NULL) |
659
|
0 |
297 |
} else if (strcasecmp(key, "Format") == 0) { |
661
|
0 |
0 |
if (func == NULL) |
663
|
0 |
0 |
else if (func == linebreak_format_NEWLINE) |
665
|
0 |
0 |
else if (func == linebreak_format_SIMPLE) |
667
|
0 |
0 |
else if (func == linebreak_format_TRIM) |
669
|
0 |
0 |
else if (func == format_func) { |
670
|
0 |
0 |
if ((val = (SV *)self->format_data) == NULL) |
676
|
0 |
297 |
} else if (strcasecmp(key, "HangulAsAL") == 0) |
679
|
0 |
297 |
else if (strcasecmp(key, "LBClass") == 0) { |
685
|
0 |
0 |
if (self->map == NULL || self->mapsiz == 0) |
|
0 |
0 |
if (self->map == NULL || self->mapsiz == 0) |
688
|
0 |
0 |
for (i = 0; i < self->mapsiz; i++) |
689
|
0 |
0 |
if (self->map[i].lbc != PROP_UNKNOWN) { |
690
|
0 |
0 |
if (p != self->map[i].lbc){ |
696
|
0 |
0 |
if (ret == NULL) |
700
|
0 |
0 |
for (c = self->map[i].beg; c <= self->map[i].end; c++) |
704
|
0 |
0 |
if (ret == NULL) |
707
|
0 |
297 |
} else if (strcasecmp(key, "LegacyCM") == 0) |
709
|
297 |
0 |
else if (strcasecmp(key, "Newline") == 0) { |
711
|
297 |
0 |
if (self->newline.str == NULL || self->newline.len == 0) |
|
0 |
297 |
if (self->newline.str == NULL || self->newline.len == 0) |
715
|
0 |
0 |
} else if (strcasecmp(key, "Prep") == 0) { |
717
|
0 |
0 |
if (self->prep_func == NULL || self->prep_func[0] == NULL) |
|
0 |
0 |
if (self->prep_func == NULL || self->prep_func[0] == NULL) |
720
|
0 |
0 |
for (i = 0; (func = self->prep_func[i]) != NULL; i++) |
721
|
0 |
0 |
if (func == linebreak_prep_URIBREAK) { |
722
|
0 |
0 |
if (self->prep_data == NULL || |
|
0 |
0 |
if (self->prep_data == NULL || |
727
|
0 |
0 |
} else if (func == prep_func) { |
728
|
0 |
0 |
if (self->prep_data == NULL || |
|
0 |
0 |
if (self->prep_data == NULL || |
736
|
0 |
0 |
} else if (strcasecmp(key, "Sizing") == 0) { |
738
|
0 |
0 |
if (func == NULL) |
740
|
0 |
0 |
else if (func == linebreak_sizing_UAX11) |
742
|
0 |
0 |
else if (func == sizing_func) { |
743
|
0 |
0 |
if ((val = (SV *)self->sizing_data) == NULL) |
749
|
0 |
0 |
} else if (strcasecmp(key, "Urgent") == 0) { |
751
|
0 |
0 |
if (func == NULL) |
753
|
0 |
0 |
else if (func == linebreak_urgent_ABORT) |
755
|
0 |
0 |
else if (func == linebreak_urgent_FORCE) |
757
|
0 |
0 |
else if (func == urgent_func) { |
758
|
0 |
0 |
if ((val = (SV *)self->urgent_data) == NULL) |
764
|
0 |
0 |
} else if (strcasecmp(key, "ViramaAsJoiner") == 0) |
770
|
0 |
998 |
} else if (!(items % 2)) |
772
|
8237 |
998 |
else for (RETVAL = NULL, i = 1; i < items; i += 2) { |
773
|
0 |
8237 |
if (!SvPOK(ST(i))) |
775
|
8237 |
0 |
key = (char *)SvPV_nolen(ST(i)); |
778
|
497 |
7740 |
if (strcasecmp(key, "Prep") == 0) { |
783
|
483 |
14 |
if (! SvOK(val)) |
|
483 |
0 |
if (! SvOK(val)) |
|
483 |
0 |
if (! SvOK(val)) |
785
|
11 |
3 |
else if (SvROK(val) && |
|
11 |
0 |
else if (SvROK(val) && |
786
|
11 |
0 |
SvTYPE(av = (AV *)SvRV(val)) == SVt_PVAV && |
790
|
10 |
1 |
if (SvRXOK(pattern)) |
799
|
10 |
1 |
if (rx != NULL) |
801
|
0 |
1 |
else if (SvOK(pattern)) { |
|
0 |
0 |
else if (SvOK(pattern)) { |
|
0 |
0 |
else if (SvOK(pattern)) { |
811
|
1 |
0 |
if (rx != NULL) { |
825
|
0 |
11 |
if (rx == NULL) |
828
|
0 |
11 |
if (av_fetch(av, 1, 0) == NULL) |
830
|
0 |
11 |
else if (SvOK(func = *av_fetch(av, 1, 0))) |
|
0 |
0 |
else if (SvOK(func = *av_fetch(av, 1, 0))) |
|
0 |
0 |
else if (SvOK(func = *av_fetch(av, 1, 0))) |
837
|
11 |
0 |
if (func != NULL) |
843
|
3 |
0 |
char *s = SvPV_nolen(val); |
845
|
1 |
2 |
if (strcasecmp(s, "BREAKURI") == 0) |
847
|
2 |
0 |
else if (strcasecmp(s, "NONBREAKURI") == 0) |
853
|
509 |
7231 |
} else if (strcasecmp(key, "Format") == 0) { |
854
|
1 |
508 |
if (! SvOK(val)) |
|
1 |
0 |
if (! SvOK(val)) |
|
1 |
0 |
if (! SvOK(val)) |
856
|
17 |
491 |
else if (sv_derived_from(val, "CODE")) |
859
|
491 |
0 |
char *s = SvPV_nolen(val); |
861
|
0 |
491 |
if (strcasecmp(s, "DEFAULT") == 0) { |
867
|
483 |
8 |
} else if (strcasecmp(s, "SIMPLE") == 0) |
870
|
4 |
4 |
else if (strcasecmp(s, "NEWLINE") == 0) |
873
|
4 |
0 |
else if (strcasecmp(s, "TRIM") == 0) |
879
|
491 |
6740 |
} else if (strcasecmp(key, "Sizing") == 0) { |
880
|
0 |
491 |
if (! SvOK(val)) |
|
0 |
0 |
if (! SvOK(val)) |
|
0 |
0 |
if (! SvOK(val)) |
882
|
8 |
483 |
else if (sv_derived_from(val, "CODE")) |
885
|
483 |
0 |
char *s = SvPV_nolen(val); |
887
|
0 |
483 |
if (strcasecmp(s, "DEFAULT") == 0) { |
893
|
483 |
0 |
} else if (strcasecmp(s, "UAX11") == 0) |
899
|
489 |
6251 |
} else if (strcasecmp(key, "Urgent") == 0) { |
900
|
483 |
6 |
if (! SvOK(val)) |
|
483 |
0 |
if (! SvOK(val)) |
|
483 |
0 |
if (! SvOK(val)) |
902
|
0 |
6 |
else if (sv_derived_from(val, "CODE")) |
905
|
6 |
0 |
char *s = SvPV_nolen(val); |
907
|
0 |
6 |
if (strcasecmp(s, "NONBREAK") == 0) { |
912
|
2 |
4 |
} else if (strcasecmp(s, "CROAK") == 0) |
915
|
4 |
0 |
else if (strcasecmp(s, "FORCE") == 0) |
921
|
358 |
5893 |
} else if (strcasecmp(key, "BreakIndent") == 0) { |
922
|
357 |
1 |
if (SVtoboolean(val)) |
926
|
485 |
5408 |
} else if (strcasecmp(key, "CharMax") == 0) |
927
|
0 |
485 |
self->charmax = SvUV(val); |
928
|
538 |
4870 |
else if (strcasecmp(key, "ColMax") == 0) |
929
|
31 |
507 |
self->colmax = (double)SvNV(val); |
930
|
485 |
4385 |
else if (strcasecmp(key, "ColMin") == 0) |
931
|
0 |
485 |
self->colmin = (double)SvNV(val); |
932
|
358 |
4027 |
else if (strcasecmp(key, "ComplexBreaking") == 0) { |
933
|
357 |
1 |
if (SVtoboolean(val)) |
937
|
546 |
3481 |
} else if (strcasecmp(key, "Context") == 0) { |
938
|
0 |
546 |
if (SvOK(val)) |
|
0 |
0 |
if (SvOK(val)) |
|
0 |
0 |
if (SvOK(val)) |
939
|
546 |
0 |
opt = (char *)SvPV_nolen(val); |
942
|
546 |
0 |
if (opt && strcasecmp(opt, "EASTASIAN") == 0) |
|
55 |
491 |
if (opt && strcasecmp(opt, "EASTASIAN") == 0) |
946
|
485 |
2996 |
} else if (strcasecmp(key, "EAWidth") == 0) { |
952
|
357 |
128 |
if (! SvOK(val)) |
|
357 |
0 |
if (! SvOK(val)) |
|
357 |
0 |
if (! SvOK(val)) |
954
|
128 |
0 |
else if (SvROK(val) && |
|
128 |
0 |
else if (SvROK(val) && |
955
|
128 |
0 |
SvTYPE(av = (AV *)SvRV(val)) == SVt_PVAV && |
956
|
128 |
0 |
av_len(av) + 1 == 2 && |
957
|
128 |
0 |
av_fetch(av, 0, 0) != NULL && av_fetch(av, 1, 0) != NULL) { |
959
|
128 |
0 |
if (SvIOK(sv)) |
960
|
128 |
0 |
p = (propval_t) SvIV(sv); |
965
|
128 |
0 |
if (SvROK(sv) && |
|
128 |
0 |
if (SvROK(sv) && |
967
|
65956 |
128 |
for (i = 0; i < av_len(codes) + 1; i++) { |
968
|
0 |
65956 |
if (av_fetch(codes, i, 0) == NULL) |
970
|
0 |
65956 |
if (! SvIOK(sv = *av_fetch(codes, i, 0))) |
972
|
0 |
65956 |
linebreak_update_eawidth(self, |
975
|
0 |
0 |
} else if (SvIOK(sv)) { |
976
|
0 |
0 |
linebreak_update_eawidth(self, (unichar_t) SvUV(sv), |
982
|
484 |
2512 |
} else if (strcasecmp(key, "HangulAsAL") == 0) { |
983
|
1 |
483 |
if (SVtoboolean(val)) |
987
|
492 |
2020 |
} else if (strcasecmp(key, "LBClass") == 0) { |
993
|
483 |
9 |
if (! SvOK(val)) |
|
483 |
0 |
if (! SvOK(val)) |
|
483 |
0 |
if (! SvOK(val)) |
995
|
9 |
0 |
else if (SvROK(val) && |
|
9 |
0 |
else if (SvROK(val) && |
996
|
9 |
0 |
SvTYPE(av = (AV *)SvRV(val)) == SVt_PVAV && |
997
|
9 |
0 |
av_len(av) + 1 == 2 && |
998
|
9 |
0 |
av_fetch(av, 0, 0) != NULL && av_fetch(av, 1, 0) != NULL) { |
1000
|
9 |
0 |
if (SvIOK(sv)) |
1001
|
9 |
0 |
p = (propval_t) SvIV(sv); |
1006
|
1 |
8 |
if (SvROK(sv) && |
|
1 |
0 |
if (SvROK(sv) && |
1008
|
58 |
1 |
for (i = 0; i < av_len(codes) + 1; i++) { |
1009
|
0 |
58 |
if (av_fetch(codes, i, 0) == NULL) |
1011
|
0 |
58 |
if (! SvIOK(sv = *av_fetch(codes, i, 0))) |
1013
|
0 |
58 |
linebreak_update_lbclass(self, |
1016
|
8 |
0 |
} else if (SvIOK(sv)) { |
1017
|
0 |
8 |
linebreak_update_lbclass(self, (unichar_t) SvUV(sv), |
1023
|
832 |
1188 |
} else if (strcasecmp(key, "LegacyCM") == 0) { |
1024
|
831 |
1 |
if (SVtoboolean(val)) |
1028
|
483 |
705 |
} else if (strcasecmp(key, "Newline") == 0) { |
1029
|
483 |
0 |
if (!sv_isobject(val)) { |
1034
|
0 |
0 |
} else if (sv_derived_from(val, "Unicode::GCString")) |
1035
|
0 |
0 |
linebreak_set_newline(self, |
1039
|
0 |
0 |
croak("_config: Unknown object %s", |
|
0 |
0 |
croak("_config: Unknown object %s", |
1040
|
0 |
0 |
HvNAME(SvSTASH(SvRV(val)))); |
|
0 |
0 |
HvNAME(SvSTASH(SvRV(val)))); |
|
0 |
0 |
HvNAME(SvSTASH(SvRV(val)))); |
|
0 |
0 |
HvNAME(SvSTASH(SvRV(val)))); |
1041
|
705 |
0 |
} else if (strcasecmp(key, "ViramaAsJoiner") == 0) { |
1042
|
357 |
348 |
if (SVtoboolean(val)) |
1056
|
0 |
2971 |
if (self->stash == NULL) |
1068
|
0 |
0 |
snprintf(buf, 64, "%s(0x%lx)", HvNAME(SvSTASH(SvRV(ST(0)))), |
|
0 |
0 |
snprintf(buf, 64, "%s(0x%lx)", HvNAME(SvSTASH(SvRV(ST(0)))), |
|
0 |
0 |
snprintf(buf, 64, "%s(0x%lx)", HvNAME(SvSTASH(SvRV(ST(0)))), |
|
0 |
0 |
snprintf(buf, 64, "%s(0x%lx)", HvNAME(SvSTASH(SvRV(ST(0)))), |
|
0 |
0 |
snprintf(buf, 64, "%s(0x%lx)", HvNAME(SvSTASH(SvRV(ST(0)))), |
|
0 |
0 |
snprintf(buf, 64, "%s(0x%lx)", HvNAME(SvSTASH(SvRV(ST(0)))), |
1081
|
0 |
0 |
snprintf(buf, 64, "%s(0x%lx)", HvNAME(SvSTASH(SvRV(ST(0)))), |
|
0 |
0 |
snprintf(buf, 64, "%s(0x%lx)", HvNAME(SvSTASH(SvRV(ST(0)))), |
|
0 |
0 |
snprintf(buf, 64, "%s(0x%lx)", HvNAME(SvSTASH(SvRV(ST(0)))), |
|
0 |
0 |
snprintf(buf, 64, "%s(0x%lx)", HvNAME(SvSTASH(SvRV(ST(0)))), |
|
0 |
0 |
snprintf(buf, 64, "%s(0x%lx)", HvNAME(SvSTASH(SvRV(ST(0)))), |
|
0 |
0 |
snprintf(buf, 64, "%s(0x%lx)", HvNAME(SvSTASH(SvRV(ST(0)))), |
1095
|
0 |
0 |
if (!SvOK(ST(1)) || !SvOK(ST(2))) |
|
0 |
0 |
if (!SvOK(ST(1)) || !SvOK(ST(2))) |
|
0 |
0 |
if (!SvOK(ST(1)) || !SvOK(ST(2))) |
|
0 |
0 |
if (!SvOK(ST(1)) || !SvOK(ST(2))) |
|
0 |
0 |
if (!SvOK(ST(1)) || !SvOK(ST(2))) |
|
0 |
0 |
if (!SvOK(ST(1)) || !SvOK(ST(2))) |
1097
|
0 |
0 |
if (self == NULL) |
1100
|
0 |
0 |
if (RETVAL == PROP_UNKNOWN) |
1114
|
0 |
18 |
if (!SvOK(ST(1)) || !SvOK(ST(2))) |
|
0 |
0 |
if (!SvOK(ST(1)) || !SvOK(ST(2))) |
|
0 |
0 |
if (!SvOK(ST(1)) || !SvOK(ST(2))) |
|
0 |
18 |
if (!SvOK(ST(1)) || !SvOK(ST(2))) |
|
0 |
0 |
if (!SvOK(ST(1)) || !SvOK(ST(2))) |
|
0 |
0 |
if (!SvOK(ST(1)) || !SvOK(ST(2))) |
1116
|
0 |
18 |
if (lbobj == NULL) |
1118
|
0 |
18 |
if ((blbc = gcstring_lbclass_ext(bgcstr, -1)) == PROP_UNKNOWN) |
1120
|
0 |
18 |
if ((albc = gcstring_lbclass(agcstr, 0)) == PROP_UNKNOWN) |
1123
|
0 |
18 |
if (RETVAL == PROP_UNKNOWN) |
1145
|
0 |
0 |
if (5 < items) |
1149
|
0 |
0 |
if (RETVAL == -1.0) |
1163
|
0 |
6382 |
if (input == NULL) |
1167
|
2 |
6380 |
if (ret == NULL) { |
1168
|
0 |
2 |
if (self->errnum == LINEBREAK_EEXTN) |
1169
|
0 |
0 |
croak("%s", SvPV_nolen(ERRSV)); |
|
0 |
0 |
croak("%s", SvPV_nolen(ERRSV)); |
|
0 |
0 |
croak("%s", SvPV_nolen(ERRSV)); |
|
0 |
0 |
croak("%s", SvPV_nolen(ERRSV)); |
1170
|
2 |
0 |
else if (self->errnum == LINEBREAK_ELONG) |
1172
|
0 |
0 |
else if (self->errnum) |
1178
|
6380 |
0 |
switch (GIMME_V) { |
1181
|
1119 |
51 |
for (i = 0; ret[i] != NULL; i++) |
1184
|
0 |
51 |
XPUSHs(sv_2mortal(unistrtoSV((unistr_t *)r, 0, r->len))); |
1189
|
10799 |
6329 |
for (i = 0; ret[i] != NULL; i++) |
1190
|
0 |
10799 |
XPUSHs(sv_2mortal(CtoPerl("Unicode::GCString", ret[i]))); |
1210
|
0 |
2346 |
if (ret == NULL) { |
1211
|
0 |
0 |
if (self->errnum == LINEBREAK_EEXTN) |
1212
|
0 |
0 |
croak("%s", SvPV_nolen(ERRSV)); |
|
0 |
0 |
croak("%s", SvPV_nolen(ERRSV)); |
|
0 |
0 |
croak("%s", SvPV_nolen(ERRSV)); |
|
0 |
0 |
croak("%s", SvPV_nolen(ERRSV)); |
1213
|
0 |
0 |
else if (self->errnum == LINEBREAK_ELONG) |
1215
|
0 |
0 |
else if (self->errnum) |
1221
|
2346 |
0 |
switch (GIMME_V) { |
1224
|
294 |
2346 |
for (i = 0; ret[i] != NULL; i++) |
1227
|
0 |
2346 |
XPUSHs(sv_2mortal(unistrtoSV((unistr_t *)r, 0, r->len))); |
1232
|
0 |
0 |
for (i = 0; ret[i] != NULL; i++) |
1233
|
0 |
0 |
XPUSHs(sv_2mortal(CtoPerl("Unicode::GCString", ret[i]))); |
1264
|
4 |
0 |
if (RETVAL == NULL) |
1278
|
0 |
416 |
if (str == NULL) |
1281
|
0 |
416 |
if ((RETVAL = gcstring_newcopy(str, lbobj)) == NULL) |
1300
|
356 |
0 |
if (self != NULL) |
1301
|
689 |
356 |
for (i = 0; i < self->gclen; i++) |
1302
|
0 |
689 |
XPUSHs(sv_2mortal( |
1313
|
0 |
0 |
snprintf(buf, 64, "%s(0x%lx)", HvNAME(SvSTASH(SvRV(ST(0)))), |
|
0 |
0 |
snprintf(buf, 64, "%s(0x%lx)", HvNAME(SvSTASH(SvRV(ST(0)))), |
|
0 |
0 |
snprintf(buf, 64, "%s(0x%lx)", HvNAME(SvSTASH(SvRV(ST(0)))), |
|
0 |
0 |
snprintf(buf, 64, "%s(0x%lx)", HvNAME(SvSTASH(SvRV(ST(0)))), |
|
0 |
0 |
snprintf(buf, 64, "%s(0x%lx)", HvNAME(SvSTASH(SvRV(ST(0)))), |
|
0 |
0 |
snprintf(buf, 64, "%s(0x%lx)", HvNAME(SvSTASH(SvRV(ST(0)))), |
1345
|
0 |
1035 |
if (swap == TRUE) |
1368
|
106 |
2351 |
if (swap == TRUE) |
1370
|
9 |
2342 |
else if (swap == -1) { |
1404
|
0 |
0 |
if (1 < items) |
1405
|
0 |
0 |
i = SvIV(ST(1)); |
1408
|
0 |
0 |
if (i < 0 || self == NULL || self->gclen <= i) |
|
0 |
0 |
if (i < 0 || self == NULL || self->gclen <= i) |
|
0 |
0 |
if (i < 0 || self == NULL || self->gclen <= i) |
1410
|
0 |
0 |
if (2 < items) { |
1411
|
0 |
0 |
flag = SvUV(ST(2)); |
1412
|
0 |
0 |
if (flag == (flag & 255)) |
1428
|
0 |
3311 |
if (1 < items) |
1429
|
0 |
0 |
i = SvIV(ST(1)); |
1432
|
3311 |
0 |
if (i < 0 || self == NULL || self->gclen <= i) |
|
3311 |
0 |
if (i < 0 || self == NULL || self->gclen <= i) |
|
0 |
3311 |
if (i < 0 || self == NULL || self->gclen <= i) |
1454
|
0 |
0 |
if (sv_isobject(ST(1))) |
1459
|
0 |
0 |
if (sv_isobject(ST(1))) |
1461
|
0 |
0 |
for (i = 2; i < items; i++) { |
1465
|
0 |
0 |
if (!sv_isobject(ST(i))) |
1478
|
0 |
3365 |
if ((RETVAL = gcstring_lbclass(self, 0)) == PROP_UNKNOWN) |
1488
|
0 |
0 |
if ((RETVAL = gcstring_lbclass_ext(self, -1)) == PROP_UNKNOWN) |
1501
|
0 |
0 |
if (1 < items) |
1502
|
0 |
0 |
i = SvIV(ST(1)); |
1506
|
0 |
0 |
if (RETVAL == PROP_UNKNOWN) |
1519
|
0 |
0 |
if (1 < items) |
1520
|
0 |
0 |
i = SvIV(ST(1)); |
1524
|
0 |
0 |
if (RETVAL == PROP_UNKNOWN) |
1545
|
1 |
1023 |
if (gcstring_eos(self)) |
1557
|
2328 |
2328 |
if (1 < items) |
1558
|
2328 |
0 |
gcstring_setpos(self, SvIV(ST(1))); |
1573
|
3 |
2331 |
if (replacement != NULL) |
1574
|
0 |
3 |
if (gcstring_replace(self, offset, length, replacement) == NULL) |
1576
|
0 |
2334 |
if (RETVAL == NULL) |