Lines Matching refs:pc

497 	struct collector_strpos_data *pc = (struct collector_strpos_data*)data;  in collector_strpos()  local
499 if (pc->output >= pc->start) { in collector_strpos()
500 if (c == (int)pc->needle.buffer[pc->needle_pos]) { in collector_strpos()
501 if (pc->needle_pos == 0) { in collector_strpos()
502 pc->found_pos = pc->output; /* found position */ in collector_strpos()
504 pc->needle_pos++; /* needle pointer */ in collector_strpos()
505 if (pc->needle_pos >= pc->needle_len) { in collector_strpos()
506 pc->matched_pos = pc->found_pos; /* matched position */ in collector_strpos()
507 pc->needle_pos--; in collector_strpos()
510 } else if (pc->needle_pos != 0) { in collector_strpos()
512 h = (int *)pc->needle.buffer; in collector_strpos()
515 pc->found_pos++; in collector_strpos()
517 m = (int *)pc->needle.buffer; in collector_strpos()
518 n = pc->needle_pos - 1; in collector_strpos()
526 pc->needle_pos = 0; in collector_strpos()
531 pc->needle_pos--; in collector_strpos()
537 pc->output++; in collector_strpos()
684 struct collector_strpos_data pc; in mbfl_substr_count() local
687 mbfl_wchar_device_init(&pc.needle); in mbfl_substr_count()
691 mbfl_wchar_device_output, 0, &pc.needle); in mbfl_substr_count()
696 pc.needle_len = pc.needle.pos; in mbfl_substr_count()
697 if (pc.needle.buffer == NULL) { in mbfl_substr_count()
700 if (pc.needle_len == 0) { in mbfl_substr_count()
701 mbfl_wchar_device_clear(&pc.needle); in mbfl_substr_count()
708 collector_strpos, 0, &pc); in mbfl_substr_count()
710 pc.start = 0; in mbfl_substr_count()
711 pc.output = 0; in mbfl_substr_count()
712 pc.needle_pos = 0; in mbfl_substr_count()
713 pc.found_pos = 0; in mbfl_substr_count()
714 pc.matched_pos = MBFL_ERROR_NOT_FOUND; in mbfl_substr_count()
722 pc.matched_pos = MBFL_ERROR_ENCODING; in mbfl_substr_count()
725 if (pc.matched_pos != MBFL_ERROR_NOT_FOUND) { in mbfl_substr_count()
727 pc.matched_pos = MBFL_ERROR_NOT_FOUND; in mbfl_substr_count()
728 pc.needle_pos = 0; in mbfl_substr_count()
735 mbfl_wchar_device_clear(&pc.needle); in mbfl_substr_count()
753 struct collector_substr_data *pc = (struct collector_substr_data*)data; in collector_substr() local
755 if (pc->output >= pc->stop) { in collector_substr()
759 if (pc->output >= pc->start) { in collector_substr()
760 (*pc->next_filter->filter_function)(c, pc->next_filter); in collector_substr()
763 pc->output++; in collector_substr()
857 struct collector_substr_data pc; in mbfl_substr() local
877 collector_substr, 0, &pc); in mbfl_substr()
883 pc.next_filter = decoder; in mbfl_substr()
884 pc.start = from; in mbfl_substr()
885 pc.stop = from + length; in mbfl_substr()
886 pc.output = 0; in mbfl_substr()