Lines Matching refs:i
35 static uint32_t lv_text_utf8_next(const char * txt, uint32_t * i);
44 static uint32_t lv_text_iso8859_1_next(const char * txt, uint32_t * i);
211 uint32_t i = 0, i_next = 0, i_next_next = 0; /*Iterating index into txt*/ in lv_text_get_next_word() local
224 while(txt[i] != '\0') { in lv_text_get_next_word()
231 i = i_next; in lv_text_get_next_word()
247 break_index = i; in lv_text_get_next_word()
259 if(i == 0 && break_index == NO_BREAK_FOUND && word_w_ptr != NULL) *word_w_ptr = cur_w; in lv_text_get_next_word()
266 i = i_next; in lv_text_get_next_word()
273 i = i_next; in lv_text_get_next_word()
280 if(word_len == 0 || (letter == '\r' && letter_next == '\n')) i = i_next; in lv_text_get_next_word()
281 return i; in lv_text_get_next_word()
301 i = break_index; in lv_text_get_next_word()
305 lv_text_encoded_prev(txt, &i); in lv_text_get_next_word()
312 return i; in lv_text_get_next_word()
336 uint32_t i; in lv_text_get_next_line() local
337 for(i = 0; i < len && txt[i] != '\n' && txt[i] != '\r' && txt[i] != '\0'; i++) { in lv_text_get_next_line()
340 if(i < len && txt[i] != '\0') i++; /*To go beyond `\n`*/ in lv_text_get_next_line()
342 return i; in lv_text_get_next_line()
348 uint32_t i = 0; /*Iterating index into txt*/ in lv_text_get_next_line() local
350 while(i < len && txt[i] != '\0' && max_width > 0) { in lv_text_get_next_line()
352 if(i == 0) word_flag |= LV_TEXT_FLAG_BREAK_ALL; in lv_text_get_next_line()
355 …uint32_t advance = lv_text_get_next_word(&txt[i], font, letter_space, max_width, word_flag, &word_… in lv_text_get_next_line()
363 i += advance; in lv_text_get_next_line()
367 if(txt[i] == '\n' || txt[i] == '\r') { in lv_text_get_next_line()
368 i++; /*Include the following newline in the current line*/ in lv_text_get_next_line()
375 if(i == 0) { in lv_text_get_next_line()
376 uint32_t letter = lv_text_encoded_next(txt, &i); in lv_text_get_next_line()
386 return i; in lv_text_get_next_line()
395 uint32_t i = 0; in lv_text_get_width() local
399 while(i < length) { in lv_text_get_width()
402 lv_text_encoded_letter_next_2(txt, &letter, &letter_next, &i); in lv_text_get_width()
427 uint32_t i = 0; in lv_text_get_width_with_flags() local
432 while(i < length) { in lv_text_get_width_with_flags()
435 lv_text_encoded_letter_next_2(txt, &letter, &letter_next, &i); in lv_text_get_width_with_flags()
471 size_t i; in lv_text_ins() local
472 for(i = new_len; i >= pos + ins_len; i--) { in lv_text_ins()
473 txt_buf[i] = txt_buf[i - ins_len]; in lv_text_ins()
490 uint32_t i; in lv_text_cut() local
491 for(i = pos; i <= old_len - len; i++) { in lv_text_cut()
492 txt[i] = txt[i + len]; in lv_text_cut()
617 uint8_t i; in lv_text_utf8_conv_wc() local
618 for(i = 0; i < 4; i++) { in lv_text_utf8_conv_wc()
636 static uint32_t lv_text_utf8_next(const char * txt, uint32_t * i) in lv_text_utf8_next() argument
650 if(i == NULL) i = &i_tmp; in lv_text_utf8_next()
653 if(LV_IS_ASCII(txt[*i])) { in lv_text_utf8_next()
654 result = txt[*i]; in lv_text_utf8_next()
655 (*i)++; in lv_text_utf8_next()
660 if(LV_IS_2BYTES_UTF8_CODE(txt[*i])) { in lv_text_utf8_next()
661 result = (uint32_t)(txt[*i] & 0x1F) << 6; in lv_text_utf8_next()
662 (*i)++; in lv_text_utf8_next()
663 if(LV_IS_INVALID_UTF8_CODE(txt[*i])) return 0; in lv_text_utf8_next()
664 result += (txt[*i] & 0x3F); in lv_text_utf8_next()
665 (*i)++; in lv_text_utf8_next()
668 else if(LV_IS_3BYTES_UTF8_CODE(txt[*i])) { in lv_text_utf8_next()
669 result = (uint32_t)(txt[*i] & 0x0F) << 12; in lv_text_utf8_next()
670 (*i)++; in lv_text_utf8_next()
672 if(LV_IS_INVALID_UTF8_CODE(txt[*i])) return 0; in lv_text_utf8_next()
673 result += (uint32_t)(txt[*i] & 0x3F) << 6; in lv_text_utf8_next()
674 (*i)++; in lv_text_utf8_next()
676 if(LV_IS_INVALID_UTF8_CODE(txt[*i])) return 0; in lv_text_utf8_next()
677 result += (txt[*i] & 0x3F); in lv_text_utf8_next()
678 (*i)++; in lv_text_utf8_next()
681 else if(LV_IS_4BYTES_UTF8_CODE(txt[*i])) { in lv_text_utf8_next()
682 result = (uint32_t)(txt[*i] & 0x07) << 18; in lv_text_utf8_next()
683 (*i)++; in lv_text_utf8_next()
685 if(LV_IS_INVALID_UTF8_CODE(txt[*i])) return 0; in lv_text_utf8_next()
686 result += (uint32_t)(txt[*i] & 0x3F) << 12; in lv_text_utf8_next()
687 (*i)++; in lv_text_utf8_next()
689 if(LV_IS_INVALID_UTF8_CODE(txt[*i])) return 0; in lv_text_utf8_next()
690 result += (uint32_t)(txt[*i] & 0x3F) << 6; in lv_text_utf8_next()
691 (*i)++; in lv_text_utf8_next()
693 if(LV_IS_INVALID_UTF8_CODE(txt[*i])) return 0; in lv_text_utf8_next()
694 result += txt[*i] & 0x3F; in lv_text_utf8_next()
695 (*i)++; in lv_text_utf8_next()
698 (*i)++; /*Not UTF-8 char. Go the next.*/ in lv_text_utf8_next()
711 static uint32_t lv_text_utf8_prev(const char * txt, uint32_t * i) in lv_text_utf8_prev() argument
717 (*i)--; in lv_text_utf8_prev()
721 c_size = lv_text_encoded_size(&txt[*i]); in lv_text_utf8_prev()
723 if(*i != 0) in lv_text_utf8_prev()
724 (*i)--; in lv_text_utf8_prev()
731 uint32_t i_tmp = *i; in lv_text_utf8_prev()
746 uint32_t i; in lv_text_utf8_get_byte_id() local
748 for(i = 0; i < utf8_id && txt[byte_cnt] != '\0'; i++) { in lv_text_utf8_get_byte_id()
766 uint32_t i = 0; in lv_text_utf8_get_char_id() local
769 while(i < byte_id) { in lv_text_utf8_get_char_id()
770 lv_text_encoded_next(txt, &i); /*'i' points to the next letter so use the prev. value*/ in lv_text_utf8_get_char_id()
786 uint32_t i = 0; in lv_text_utf8_get_length() local
788 while(txt[i] != '\0') { in lv_text_utf8_get_length()
789 lv_text_encoded_next(txt, &i); in lv_text_utf8_get_length()
844 static uint32_t lv_text_iso8859_1_next(const char * txt, uint32_t * i) in lv_text_iso8859_1_next() argument
846 if(i == NULL) return txt[0]; /*Get the next char*/ in lv_text_iso8859_1_next()
848 uint8_t letter = txt[*i]; in lv_text_iso8859_1_next()
849 (*i)++; in lv_text_iso8859_1_next()
859 static uint32_t lv_text_iso8859_1_prev(const char * txt, uint32_t * i) in lv_text_iso8859_1_prev() argument
861 if(i == NULL) return *(txt - 1); /*Get the prev. char*/ in lv_text_iso8859_1_prev()
863 (*i)--; in lv_text_iso8859_1_prev()
864 uint8_t letter = txt[*i]; in lv_text_iso8859_1_prev()