xlat16_iconv.c (236028) | xlat16_iconv.c (254273) |
---|---|
1/*- 2 * Copyright (c) 2003, 2005 Ryuichiro Imura 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2003, 2005 Ryuichiro Imura 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/lib/libkiconv/xlat16_iconv.c 236028 2012-05-25 22:07:13Z gabor $ | 26 * $FreeBSD: head/lib/libkiconv/xlat16_iconv.c 254273 2013-08-13 07:15:01Z peter $ |
27 */ 28 29/* 30 * kiconv(3) requires shared linked, and reduce module size 31 * when statically linked. 32 */ 33 34#ifdef PIC --- 9 unchanged lines hidden (view full) --- 44#include <locale.h> 45#include <stdio.h> 46#include <stdlib.h> 47#include <string.h> 48#include <wctype.h> 49 50#include "quirks.h" 51 | 27 */ 28 29/* 30 * kiconv(3) requires shared linked, and reduce module size 31 * when statically linked. 32 */ 33 34#ifdef PIC --- 9 unchanged lines hidden (view full) --- 44#include <locale.h> 45#include <stdio.h> 46#include <stdlib.h> 47#include <string.h> 48#include <wctype.h> 49 50#include "quirks.h" 51 |
52typedef void *iconv_t; 53 | |
54struct xlat16_table { 55 uint32_t * idx[0x200]; 56 void * data; 57 size_t size; 58}; 59 60static struct xlat16_table kiconv_xlat16_open(const char *, const char *, int); 61static int chklocale(int, const char *); 62 63#ifdef ICONV_DLOPEN | 52struct xlat16_table { 53 uint32_t * idx[0x200]; 54 void * data; 55 size_t size; 56}; 57 58static struct xlat16_table kiconv_xlat16_open(const char *, const char *, int); 59static int chklocale(int, const char *); 60 61#ifdef ICONV_DLOPEN |
62typedef void *iconv_t; |
|
64static int my_iconv_init(void); 65static iconv_t (*my_iconv_open)(const char *, const char *); 66static size_t (*my_iconv)(iconv_t, const char **, size_t *, char **, size_t *); 67static int (*my_iconv_close)(iconv_t); 68#else 69#include <iconv.h> 70#define my_iconv_init() 0 71#define my_iconv_open iconv_open --- 395 unchanged lines hidden --- | 63static int my_iconv_init(void); 64static iconv_t (*my_iconv_open)(const char *, const char *); 65static size_t (*my_iconv)(iconv_t, const char **, size_t *, char **, size_t *); 66static int (*my_iconv_close)(iconv_t); 67#else 68#include <iconv.h> 69#define my_iconv_init() 0 70#define my_iconv_open iconv_open --- 395 unchanged lines hidden --- |