Deleted Added
full compact
citrus_none.c (219019) citrus_none.c (225678)
1/* $FreeBSD: head/lib/libc/iconv/citrus_none.c 219019 2011-02-25 00:04:39Z gabor $ */
1/* $FreeBSD: head/lib/libc/iconv/citrus_none.c 225678 2011-09-19 22:49:36Z gabor $ */
2/* $NetBSD: citrus_none.c,v 1.18 2008/06/14 16:01:07 tnozaki Exp $ */
3
4/*-
5 * Copyright (c) 2002 Citrus Project,
6 * Copyright (c) 2010 Gabor Kovesdan <gabor@FreeBSD.org>,
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without

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

185}
186
187static int
188_citrus_NONE_stdenc_wctomb(struct _citrus_stdenc * __restrict ce __unused,
189 char * __restrict s, size_t n, _wc_t wc,
190 void * __restrict pspriv __unused, size_t * __restrict nresult,
191 struct iconv_hooks *hooks __unused)
192{
2/* $NetBSD: citrus_none.c,v 1.18 2008/06/14 16:01:07 tnozaki Exp $ */
3
4/*-
5 * Copyright (c) 2002 Citrus Project,
6 * Copyright (c) 2010 Gabor Kovesdan <gabor@FreeBSD.org>,
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without

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

185}
186
187static int
188_citrus_NONE_stdenc_wctomb(struct _citrus_stdenc * __restrict ce __unused,
189 char * __restrict s, size_t n, _wc_t wc,
190 void * __restrict pspriv __unused, size_t * __restrict nresult,
191 struct iconv_hooks *hooks __unused)
192{
193 int ret;
194
195 if ((wc & ~0xFFU) != 0) {
196 *nresult = (size_t)-1;
197 return (EILSEQ);
198 }
199 if (n == 0) {
200 *nresult = (size_t)-1;
193
194 if ((wc & ~0xFFU) != 0) {
195 *nresult = (size_t)-1;
196 return (EILSEQ);
197 }
198 if (n == 0) {
199 *nresult = (size_t)-1;
201 ret = E2BIG;
200 return (E2BIG);
202 }
203
204 *nresult = 1;
205 if (s != NULL && n > 0)
206 *s = (char)wc;
207
208 return (0);
209}

--- 29 unchanged lines hidden ---
201 }
202
203 *nresult = 1;
204 if (s != NULL && n > 0)
205 *s = (char)wc;
206
207 return (0);
208}

--- 29 unchanged lines hidden ---