mbchar(3W) (MLX Addendum) (MLX) mbchar(3W) (MLX Addendum)
NAME
mbchar: mbtowc, wctomb, mblen - multibyte character conversion (MLX
addendum)
SYNOPSIS
#include <stdlib.h>
int mbtowc(wchart *pwc, char *s, sizet n);
int wctomb(char *s, wchart wchar);
int mblen(char *s, sizet n);
DESCRIPTION
All section 3W functions can conditionally support either
typedef unsigned short wchart;
or
typedef long wchart;
To use typedef long wchart it is only necessary to link with libw32:
cc -c long.c
cc -o long long.o -lw32
To use typedef unsigned short wchart the standard definition in the
header files must be disabled, a replacement definition supplied, and
a symbolic constant defined to indicate that 16 bit wide characters
are being used. The resulting object modules are linked with libw16:
cc -c -D_WCHAR_T -Dwchar_t="unsigned long" -D_WCHAR16 ushort.c
cc -o ushort ushort.o -lw16
SEE ALSO
wchrtbl(1M), mbchar(3C), mbstring(3W).
Page 1 Reliant UNIX 5.44 12, 196