• Home
  • Raw
  • Download

Lines Matching refs:iter

129 mbuiter_multi_next (struct mbuiter_multi *iter)  in mbuiter_multi_next()  argument
131 if (iter->next_done) in mbuiter_multi_next()
133 if (iter->in_shift) in mbuiter_multi_next()
136 if (is_basic (*iter->cur.ptr)) in mbuiter_multi_next()
141 iter->cur.bytes = 1; in mbuiter_multi_next()
142 iter->cur.wc = *iter->cur.ptr; in mbuiter_multi_next()
143 iter->cur.wc_valid = true; in mbuiter_multi_next()
147 assert (mbsinit (&iter->state)); in mbuiter_multi_next()
148 iter->in_shift = true; in mbuiter_multi_next()
150 iter->cur.bytes = mbrtowc (&iter->cur.wc, iter->cur.ptr, in mbuiter_multi_next()
151 strnlen1 (iter->cur.ptr, MB_CUR_MAX), in mbuiter_multi_next()
152 &iter->state); in mbuiter_multi_next()
153 if (iter->cur.bytes == (size_t) -1) in mbuiter_multi_next()
156 iter->cur.bytes = 1; in mbuiter_multi_next()
157 iter->cur.wc_valid = false; in mbuiter_multi_next()
161 else if (iter->cur.bytes == (size_t) -2) in mbuiter_multi_next()
164 iter->cur.bytes = strlen (iter->cur.ptr); in mbuiter_multi_next()
165 iter->cur.wc_valid = false; in mbuiter_multi_next()
171 if (iter->cur.bytes == 0) in mbuiter_multi_next()
174 iter->cur.bytes = 1; in mbuiter_multi_next()
175 assert (*iter->cur.ptr == '\0'); in mbuiter_multi_next()
176 assert (iter->cur.wc == 0); in mbuiter_multi_next()
178 iter->cur.wc_valid = true; in mbuiter_multi_next()
182 if (mbsinit (&iter->state)) in mbuiter_multi_next()
183 iter->in_shift = false; in mbuiter_multi_next()
186 iter->next_done = true; in mbuiter_multi_next()
190 mbuiter_multi_reloc (struct mbuiter_multi *iter, ptrdiff_t ptrdiff) in mbuiter_multi_reloc() argument
192 iter->cur.ptr += ptrdiff; in mbuiter_multi_reloc()
208 #define mbui_init(iter, startptr) \ argument
209 ((iter).cur.ptr = (startptr), \
210 (iter).in_shift = false, memset (&(iter).state, '\0', sizeof (mbstate_t)), \
211 (iter).next_done = false)
212 #define mbui_avail(iter) \ argument
213 (mbuiter_multi_next (&(iter)), !mb_isnul ((iter).cur))
214 #define mbui_advance(iter) \ argument
215 ((iter).cur.ptr += (iter).cur.bytes, (iter).next_done = false)
218 #define mbui_cur(iter) (iter).cur argument
219 #define mbui_cur_ptr(iter) (iter).cur.ptr argument
222 #define mbui_reloc(iter, ptrdiff) mbuiter_multi_reloc (&iter, ptrdiff) argument