Deleted Added
full compact
citrus_gbk2k.c (252583) citrus_gbk2k.c (260003)
1/* $FreeBSD: head/lib/libiconv_modules/GBK2K/citrus_gbk2k.c 252583 2013-07-03 18:27:45Z peter $ */
1/* $FreeBSD: head/lib/libiconv_modules/GBK2K/citrus_gbk2k.c 260003 2013-12-28 13:49:48Z dim $ */
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

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

75/*ARGSUSED*/
76_citrus_GBK2K_init_state(_GBK2KEncodingInfo * __restrict ei __unused,
77 _GBK2KState * __restrict s)
78{
79
80 memset(s, 0, sizeof(*s));
81}
82
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

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

75/*ARGSUSED*/
76_citrus_GBK2K_init_state(_GBK2KEncodingInfo * __restrict ei __unused,
77 _GBK2KState * __restrict s)
78{
79
80 memset(s, 0, sizeof(*s));
81}
82
83#if 0
83static __inline void
84/*ARGSUSED*/
85_citrus_GBK2K_pack_state(_GBK2KEncodingInfo * __restrict ei __unused,
86 void * __restrict pspriv, const _GBK2KState * __restrict s)
87{
88
89 memcpy(pspriv, (const void *)s, sizeof(*s));
90}
91
92static __inline void
93/*ARGSUSED*/
94_citrus_GBK2K_unpack_state(_GBK2KEncodingInfo * __restrict ei __unused,
95 _GBK2KState * __restrict s, const void * __restrict pspriv)
96{
97
98 memcpy((void *)s, pspriv, sizeof(*s));
99}
84static __inline void
85/*ARGSUSED*/
86_citrus_GBK2K_pack_state(_GBK2KEncodingInfo * __restrict ei __unused,
87 void * __restrict pspriv, const _GBK2KState * __restrict s)
88{
89
90 memcpy(pspriv, (const void *)s, sizeof(*s));
91}
92
93static __inline void
94/*ARGSUSED*/
95_citrus_GBK2K_unpack_state(_GBK2KEncodingInfo * __restrict ei __unused,
96 _GBK2KState * __restrict s, const void * __restrict pspriv)
97{
98
99 memcpy((void *)s, pspriv, sizeof(*s));
100}
101#endif
100
101static __inline bool
102_mb_singlebyte(int c)
103{
104
105 return ((c & 0xff) <= 0x7f);
106}
107

--- 310 unchanged lines hidden ---
102
103static __inline bool
104_mb_singlebyte(int c)
105{
106
107 return ((c & 0xff) <= 0x7f);
108}
109

--- 310 unchanged lines hidden ---