Deleted Added
full compact
citrus_gbk2k.c (260003) citrus_gbk2k.c (281550)
1/* $FreeBSD: head/lib/libiconv_modules/GBK2K/citrus_gbk2k.c 260003 2013-12-28 13:49:48Z dim $ */
1/* $FreeBSD: head/lib/libiconv_modules/GBK2K/citrus_gbk2k.c 281550 2015-04-15 09:09:20Z tijl $ */
2/* $NetBSD: citrus_gbk2k.c,v 1.7 2008/06/14 16:01:07 tnozaki Exp $ */
3
4/*-
5 * Copyright (c)2003 Citrus Project,
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

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

144 return (4);
145}
146
147#define _PSENC (psenc->ch[psenc->chlen - 1])
148#define _PUSH_PSENC(c) (psenc->ch[psenc->chlen++] = (c))
149
150static int
151_citrus_GBK2K_mbrtowc_priv(_GBK2KEncodingInfo * __restrict ei,
2/* $NetBSD: citrus_gbk2k.c,v 1.7 2008/06/14 16:01:07 tnozaki Exp $ */
3
4/*-
5 * Copyright (c)2003 Citrus Project,
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

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

144 return (4);
145}
146
147#define _PSENC (psenc->ch[psenc->chlen - 1])
148#define _PUSH_PSENC(c) (psenc->ch[psenc->chlen++] = (c))
149
150static int
151_citrus_GBK2K_mbrtowc_priv(_GBK2KEncodingInfo * __restrict ei,
152 wchar_t * __restrict pwc, const char ** __restrict s, size_t n,
152 wchar_t * __restrict pwc, char ** __restrict s, size_t n,
153 _GBK2KState * __restrict psenc, size_t * __restrict nresult)
154{
153 _GBK2KState * __restrict psenc, size_t * __restrict nresult)
154{
155 const char *s0, *s1;
155 char *s0, *s1;
156 wchar_t wc;
157 int chlenbak, len;
158
159 s0 = *s;
160
161 if (s0 == NULL) {
162 /* _citrus_GBK2K_init_state(ei, psenc); */
163 psenc->chlen = 0;

--- 256 unchanged lines hidden ---
156 wchar_t wc;
157 int chlenbak, len;
158
159 s0 = *s;
160
161 if (s0 == NULL) {
162 /* _citrus_GBK2K_init_state(ei, psenc); */
163 psenc->chlen = 0;

--- 256 unchanged lines hidden ---