Deleted Added
full compact
cXXrtomb_iconv.h (252547) cXXrtomb_iconv.h (281550)
1/*-
2 * Copyright (c) 2013 Ed Schouten <ed@FreeBSD.org>
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

--- 11 unchanged lines hidden (view full) ---

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
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2013 Ed Schouten <ed@FreeBSD.org>
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

--- 11 unchanged lines hidden (view full) ---

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
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/lib/libc/locale/cXXrtomb_iconv.h 252547 2013-07-03 07:03:19Z peter $");
28__FBSDID("$FreeBSD: head/lib/libc/locale/cXXrtomb_iconv.h 281550 2015-04-15 09:09:20Z tijl $");
29
30#include <sys/queue.h>
31
32#include <assert.h>
33#include <errno.h>
34#include <langinfo.h>
35#include <uchar.h>
36

--- 15 unchanged lines hidden (view full) ---

52 "Size of _ConversionState must not exceed mbstate_t's size.");
53
54size_t
55cXXrtomb_l(char * __restrict s, charXX_t c, mbstate_t * __restrict ps,
56 locale_t locale)
57{
58 _ConversionState *cs;
59 struct _citrus_iconv *handle;
29
30#include <sys/queue.h>
31
32#include <assert.h>
33#include <errno.h>
34#include <langinfo.h>
35#include <uchar.h>
36

--- 15 unchanged lines hidden (view full) ---

52 "Size of _ConversionState must not exceed mbstate_t's size.");
53
54size_t
55cXXrtomb_l(char * __restrict s, charXX_t c, mbstate_t * __restrict ps,
56 locale_t locale)
57{
58 _ConversionState *cs;
59 struct _citrus_iconv *handle;
60 const char *src;
61 char *dst;
60 char *src, *dst;
62 size_t srcleft, dstleft, invlen;
63 int err;
64
65 FIX_LOCALE(locale);
66 if (ps == NULL)
67 ps = &locale->cXXrtomb;
68 cs = (_ConversionState *)ps;
69 handle = &cs->iconv;

--- 47 unchanged lines hidden ---
61 size_t srcleft, dstleft, invlen;
62 int err;
63
64 FIX_LOCALE(locale);
65 if (ps == NULL)
66 ps = &locale->cXXrtomb;
67 cs = (_ConversionState *)ps;
68 handle = &cs->iconv;

--- 47 unchanged lines hidden ---