1/*
2 * Copyright (c) 2000-2001, Boris Popov
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
--- 15 unchanged lines hidden (view full) ---
24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * $FreeBSD: head/sys/libkern/iconv_xlat.c 109623 2003-01-21 08:56:16Z alfred $
33 */
34#include <sys/param.h>
35#include <sys/kernel.h>
36#include <sys/systm.h>
37#include <sys/malloc.h>
38#include <sys/iconv.h>
39
40#include "iconv_converter_if.h"
--- 16 unchanged lines hidden (view full) ---
57};
58
59static int
60iconv_xlat_open(struct iconv_converter_class *dcp,
61 struct iconv_cspair *csp, struct iconv_cspair *cspf, void **dpp)
62{
63 struct iconv_xlat *dp;
64
65 dp = (struct iconv_xlat *)kobj_create((struct kobj_class*)dcp, M_ICONV, 0);
66 dp->d_table = csp->cp_data;
67 dp->d_csp = csp;
68 csp->cp_refcount++;
69 *dpp = (void*)dp;
70 return 0;
71}
72
73static int
--- 51 unchanged lines hidden ---
2 * Copyright (c) 2000-2001, Boris Popov
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
--- 15 unchanged lines hidden (view full) ---
24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * $FreeBSD: head/sys/libkern/iconv_xlat.c 109623 2003-01-21 08:56:16Z alfred $
33 */
34#include <sys/param.h>
35#include <sys/kernel.h>
36#include <sys/systm.h>
37#include <sys/malloc.h>
38#include <sys/iconv.h>
39
40#include "iconv_converter_if.h"
--- 16 unchanged lines hidden (view full) ---
57};
58
59static int
60iconv_xlat_open(struct iconv_converter_class *dcp,
61 struct iconv_cspair *csp, struct iconv_cspair *cspf, void **dpp)
62{
63 struct iconv_xlat *dp;
64
65 dp = (struct iconv_xlat *)kobj_create((struct kobj_class*)dcp, M_ICONV, 0);
66 dp->d_table = csp->cp_data;
67 dp->d_csp = csp;
68 csp->cp_refcount++;
69 *dpp = (void*)dp;
70 return 0;
71}
72
73static int
--- 51 unchanged lines hidden ---