utf8.c (ca2dae426e0f7fc55d81fc29422f24d47a193e35) utf8.c (fa02ee78c88a0293964700aae6b758c0b4959a11)
1/*-
2 * Copyright (c) 2002-2004 Tim J. Robbins
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

60
61 return (0);
62}
63
64int
65_UTF8_mbsinit(const mbstate_t *ps)
66{
67
1/*-
2 * Copyright (c) 2002-2004 Tim J. Robbins
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

60
61 return (0);
62}
63
64int
65_UTF8_mbsinit(const mbstate_t *ps)
66{
67
68 return (ps == NULL || ((_UTF8State *)ps)->count == 0);
68 return (ps == NULL || ((const _UTF8State *)ps)->count == 0);
69}
70
71size_t
72_UTF8_mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n,
73 mbstate_t * __restrict ps)
74{
75 _UTF8State *us;
76 int ch, i, len, mask, ocount;

--- 155 unchanged lines hidden ---
69}
70
71size_t
72_UTF8_mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n,
73 mbstate_t * __restrict ps)
74{
75 _UTF8State *us;
76 int ch, i, len, mask, ocount;

--- 155 unchanged lines hidden ---