• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/apr-util/xlate/

Lines Matching defs:convset

82 static apr_status_t apr_xlate_cleanup(void *convset)
84 apr_xlate_t *old = convset;
106 static void check_sbcs(apr_xlate_t *convset)
120 translated = iconv(convset->ich, (ICONV_INBUF_TYPE)&inbufptr,
130 convset->sbcs_table = apr_palloc(convset->pool, sizeof(outbuf));
131 memcpy(convset->sbcs_table, outbuf, sizeof(outbuf));
132 iconv_close(convset->ich);
133 convset->ich = (iconv_t)-1;
140 iconv_close(convset->ich);
141 convset->ich = iconv_open(convset->topage, convset->frompage);
145 static void check_sbcs(apr_xlate_t *convset)
160 rv = apr_iconv(convset->ich, (ICONV_INBUF_TYPE)&inbufptr,
172 convset->sbcs_table = apr_palloc(convset->pool, sizeof(outbuf));
173 memcpy(convset->sbcs_table, outbuf, sizeof(outbuf));
174 apr_iconv_close(convset->ich, convset->pool);
175 convset->ich = (apr_iconv_t)-1;
182 apr_iconv_close(convset->ich, convset->pool);
183 rv = apr_iconv_open(convset->topage, convset->frompage,
184 convset->pool, &convset->ich);
189 static void make_identity_table(apr_xlate_t *convset)
193 convset->sbcs_table = apr_palloc(convset->pool, 256);
195 convset->sbcs_table[i] = i;
198 APU_DECLARE(apr_status_t) apr_xlate_open(apr_xlate_t **convset,
207 *convset = NULL;
264 *convset = new;
277 APU_DECLARE(apr_status_t) apr_xlate_sb_get(apr_xlate_t *convset, int *onoff)
279 *onoff = convset->sbcs_table != NULL;
283 APU_DECLARE(apr_status_t) apr_xlate_conv_buffer(apr_xlate_t *convset,
292 if (convset->ich != (apr_iconv_t)-1) {
296 status = apr_iconv(convset->ich, &inbufptr, inbytes_left,
339 if (convset->ich != (iconv_t)-1) {
343 translated = iconv(convset->ich, (ICONV_INBUF_TYPE)&inbufptr,
392 char *table = convset->sbcs_table;
407 APU_DECLARE(apr_int32_t) apr_xlate_conv_byte(apr_xlate_t *convset,
410 if (convset->sbcs_table) {
411 return convset->sbcs_table[inchar];
418 APU_DECLARE(apr_status_t) apr_xlate_close(apr_xlate_t *convset)
420 return apr_pool_cleanup_run(convset->pool, convset, apr_xlate_cleanup);
425 APU_DECLARE(apr_status_t) apr_xlate_open(apr_xlate_t **convset,
433 APU_DECLARE(apr_status_t) apr_xlate_sb_get(apr_xlate_t *convset, int *onoff)
438 APU_DECLARE(apr_int32_t) apr_xlate_conv_byte(apr_xlate_t *convset,
444 APU_DECLARE(apr_status_t) apr_xlate_conv_buffer(apr_xlate_t *convset,
453 APU_DECLARE(apr_status_t) apr_xlate_close(apr_xlate_t *convset)