gb2312.c (ca2dae426e0f7fc55d81fc29422f24d47a193e35) | gb2312.c (fa02ee78c88a0293964700aae6b758c0b4959a11) |
---|---|
1/*- 2 * Copyright (c) 2004 Tim J. Robbins. All rights reserved. 3 * Copyright (c) 2003 David Xu <davidxu@freebsd.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 51 unchanged lines hidden (view full) --- 60 __mb_cur_max = 2; 61 return (0); 62} 63 64int 65_GB2312_mbsinit(const mbstate_t *ps) 66{ 67 | 1/*- 2 * Copyright (c) 2004 Tim J. Robbins. All rights reserved. 3 * Copyright (c) 2003 David Xu <davidxu@freebsd.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 51 unchanged lines hidden (view full) --- 60 __mb_cur_max = 2; 61 return (0); 62} 63 64int 65_GB2312_mbsinit(const mbstate_t *ps) 66{ 67 |
68 return (ps == NULL || ((_GB2312State *)ps)->count == 0); | 68 return (ps == NULL || ((const _GB2312State *)ps)->count == 0); |
69} 70 71static __inline int 72_GB2312_check(const char *str, size_t n) 73{ 74 const u_char *s = (const u_char *)str; 75 76 if (n == 0) --- 69 unchanged lines hidden --- | 69} 70 71static __inline int 72_GB2312_check(const char *str, size_t n) 73{ 74 const u_char *s = (const u_char *)str; 75 76 if (n == 0) --- 69 unchanged lines hidden --- |