Deleted Added
full compact
iconv_xlat16.c (302408) iconv_xlat16.c (315221)
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

--- 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) 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

--- 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: stable/11/sys/libkern/iconv_xlat16.c 194638 2009-06-22 17:09:46Z delphij $");
28__FBSDID("$FreeBSD: stable/11/sys/libkern/iconv_xlat16.c 315221 2017-03-14 02:06:03Z pfg $");
29
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>
35
36#include "iconv_converter_if.h"

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

263 or--;
264 }
265
266 if (inlen == 2) {
267 /*
268 * there is a case that inbuf char is a single
269 * byte char while inlen == 2
270 */
29
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>
35
36#include "iconv_converter_if.h"

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

263 or--;
264 }
265
266 if (inlen == 2) {
267 /*
268 * there is a case that inbuf char is a single
269 * byte char while inlen == 2
270 */
271 if ((u_char)*(src+1) == 0 && !nullin ) {
271 if ((u_char)*(src+1) == '\0' && !nullin ) {
272 src++;
273 ir--;
274 } else {
275 src += 2;
276 ir -= 2;
277 }
278 } else {
279 src++;

--- 84 unchanged lines hidden ---
272 src++;
273 ir--;
274 } else {
275 src += 2;
276 ir -= 2;
277 }
278 } else {
279 src++;

--- 84 unchanged lines hidden ---