blob: 525ad08d12f3119165743287719925e14957e624 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/* Sccsid @(#)mbtowi.h 1.2 (gritter) 7/16/04 */
#ifndef LIBCOMMON_MBTOWI_H
#define LIBCOMMON_MBTOWI_H
static
#if defined (__GNUC__) || defined (__USLC__) || defined (__INTEL_COMPILER) || \
defined (__IBMC__) || defined (__SUNPRO_C)
inline
#endif
int
mbtowi(wint_t *pwi, const char *s, size_t n)
{
wchar_t wc;
int i;
i = mbtowc(&wc, s, n);
*pwi = wc;
return i;
}
#endif /* !LIBCOMMON_MBTOWI_H */
|