Lines Matching refs:st

47 	_iconv_st *st;  in _icv_open()  local
48 if((st = (_iconv_st *) malloc(sizeof(_iconv_st))) == NULL){ in _icv_open()
52 st->_ustate = U0; in _icv_open()
53 st->_errno = 0; in _icv_open()
54 st->_count = 0; in _icv_open()
58 return ((void *) st); in _icv_open()
64 void _icv_close(_iconv_st* st) in _icv_close() argument
66 if(!st) in _icv_close()
69 free(st); in _icv_close()
75 size_t _icv_iconv(_iconv_st* st, char** inbuf, size_t* inbufleft, in _icv_iconv() argument
86 if(st == NULL){ in _icv_iconv()
92 st->_ustate = U0; in _icv_iconv()
93 st->_errno = 0; in _icv_iconv()
97 st->_errno = 0; in _icv_iconv()
109 switch(st->_ustate){ in _icv_iconv()
128 st->_errno = errno = EILSEQ; in _icv_iconv()
130 st->_ustate = U1; in _icv_iconv()
131 st->_buffer[0] = *ib; in _icv_iconv()
136 st->_ustate = U2; in _icv_iconv()
137 st->_buffer[0] = *ib; in _icv_iconv()
145 st->_errno = errno = EILSEQ; in _icv_iconv()
147 st->_ustate = U4; in _icv_iconv()
148 st->_buffer[0] = *ib; in _icv_iconv()
152 st->_count++; in _icv_iconv()
159 st->_ustate = UX; in _icv_iconv()
160 st->_buffer[1] = *ib; in _icv_iconv()
161 st->_count++; in _icv_iconv()
167 st->_errno = errno = EILSEQ; in _icv_iconv()
173 first_byte = (unsigned char) st->_buffer[0]; in _icv_iconv()
183 st->_errno = errno = EILSEQ; in _icv_iconv()
185 st->_ustate = U3; in _icv_iconv()
186 st->_buffer[1] = *ib; in _icv_iconv()
187 st->_count++; in _icv_iconv()
191 st->_errno = errno = EILSEQ; in _icv_iconv()
197 st->_ustate = UX; in _icv_iconv()
198 st->_buffer[2] = *ib; in _icv_iconv()
199 st->_count++; in _icv_iconv()
204 st->_errno = errno = EILSEQ; in _icv_iconv()
211 first_byte = st->_buffer[0]; in _icv_iconv()
215 st->_errno = errno = EILSEQ; in _icv_iconv()
217 st->_ustate = U5; in _icv_iconv()
218 st->_buffer[1] = *ib; in _icv_iconv()
219 st->_count++; in _icv_iconv()
222 st->_errno = errno = EILSEQ; in _icv_iconv()
228 st->_ustate = U6; in _icv_iconv()
229 st->_buffer[2] = *ib; in _icv_iconv()
230 st->_count++; in _icv_iconv()
232 st->_errno = errno = EILSEQ; in _icv_iconv()
239 st->_errno = errno = E2BIG; in _icv_iconv()
243 st->_ustate = U0; in _icv_iconv()
246 st->_errno = errno = EILSEQ; in _icv_iconv()
256 switch(st->_count){ in _icv_iconv()
258 utf8_code.byte.byte3 = st->_buffer[0]; in _icv_iconv()
259 utf8_code.byte.byte4 = st->_buffer[1]; in _icv_iconv()
262 utf8_code.byte.byte2 = st->_buffer[0]; in _icv_iconv()
263 utf8_code.byte.byte3 = st->_buffer[1]; in _icv_iconv()
264 utf8_code.byte.byte4 = st->_buffer[2]; in _icv_iconv()
286 st->_ustate = U0; in _icv_iconv()
287 st->_count = 0; in _icv_iconv()
292 st->_errno = errno = EILSEQ; in _icv_iconv()
293 st->_ustate = U0; in _icv_iconv()
294 st->_count = 0; in _icv_iconv()
298 if(st->_errno){ in _icv_iconv()
300 fprintf(stderr, "st->_errno=%d\tst->_ustate=%d\n", st->_errno, st->_ustate); in _icv_iconv()