Deleted Added
full compact
citrus_gbk2k.c (219019) citrus_gbk2k.c (252583)
1/* $FreeBSD: head/lib/libiconv_modules/GBK2K/citrus_gbk2k.c 219019 2011-02-25 00:04:39Z gabor $ */
1/* $FreeBSD: head/lib/libiconv_modules/GBK2K/citrus_gbk2k.c 252583 2013-07-03 18:27:45Z peter $ */
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

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

142 return (4);
143}
144
145#define _PSENC (psenc->ch[psenc->chlen - 1])
146#define _PUSH_PSENC(c) (psenc->ch[psenc->chlen++] = (c))
147
148static int
149_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

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

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

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

--- 256 unchanged lines hidden ---