27 #include <sys/cdefs.h>
30 #include <sys/param.h>
31 #include <sys/kernel.h>
32 #include <sys/systm.h>
33 #include <sys/malloc.h>
34 #include <sys/iconv.h>
36 #include "iconv_converter_if.h"
57 struct iconv_cspair *csp,
struct iconv_cspair *cspf,
void **dpp)
61 dp = (
struct iconv_xlat *)kobj_create((
struct kobj_class*)dcp, M_ICONV, M_WAITOK);
74 dp->
d_csp->cp_refcount--;
75 kobj_delete((
struct kobj*)data, M_ICONV);
89 if (inbuf == NULL || *inbuf == NULL || outbuf == NULL || *outbuf == NULL)
96 r = n =
min(*inbytesleft, *outbytesleft);
100 *dst++ = dp->
d_table[(u_char)*src++];
119 KOBJMETHOD(iconv_converter_init, iconv_xlat_init),
120 KOBJMETHOD(iconv_converter_done, iconv_xlat_done),
static int iconv_xlat_open(struct iconv_converter_class *dcp, struct iconv_cspair *csp, struct iconv_cspair *cspf, void **dpp)
static int iconv_xlat_conv(void *d2p, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft, int convchar, int casetype)
struct iconv_cspair * d_csp
KICONV_CONVERTER(xlat, sizeof(struct iconv_xlat))
static const char * iconv_xlat_name(struct iconv_converter_class *dcp)
static int iconv_xlat_close(void *data)
static kobj_method_t iconv_xlat_methods[]