gbk.c (ca2dae426e0f7fc55d81fc29422f24d47a193e35) gbk.c (fa02ee78c88a0293964700aae6b758c0b4959a11)
1/*-
2 * Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved.
3 * Copyright (c) 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Paul Borman at Krystal Technologies.
8 *

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

70 __mb_cur_max = 2;
71 return (0);
72}
73
74int
75_GBK_mbsinit(const mbstate_t *ps)
76{
77
1/*-
2 * Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved.
3 * Copyright (c) 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Paul Borman at Krystal Technologies.
8 *

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

70 __mb_cur_max = 2;
71 return (0);
72}
73
74int
75_GBK_mbsinit(const mbstate_t *ps)
76{
77
78 return (ps == NULL || ((_GBKState *)ps)->count == 0);
78 return (ps == NULL || ((const _GBKState *)ps)->count == 0);
79}
80
81static __inline int
82_gbk_check(u_int c)
83{
84
85 c &= 0xff;
86 return ((c >= 0x81 && c <= 0xfe) ? 2 : 1);

--- 55 unchanged lines hidden ---
79}
80
81static __inline int
82_gbk_check(u_int c)
83{
84
85 c &= 0xff;
86 return ((c >= 0x81 && c <= 0xfe) ? 2 : 1);

--- 55 unchanged lines hidden ---