Indentation fix, cleanup.
[AROS.git] / compiler / stdc / mbtowc.c
blobd660d8bd27ffdf7da43497fc6a547618c04a7403
1 /*
2 Copyright © 2007-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 C99 function mbtowc().
6 */
8 /*****************************************************************************
10 NAME
11 #include <stdlib.h>
13 int mbtowc(
15 SYNOPSIS
16 wchar_t * restrict pwc,
17 const char * restrict s,
18 size_t n)
20 FUNCTION
21 C99 mbtowc function; a function to convert one multi-byte character
22 to a wchar_t character and/or to determine the number of bytes for the
23 next multi-byte char.
25 INPUTS
26 pwc: pointer wide char string to put converted char in. When NULL
27 no char will be converted.
28 s: pointer to multi-byte char as input
29 n: maximum of bytes to look at for the multi-byte char.
31 RESULT
32 If s is not NULL the function returns the number of bytes the next
33 multi-byte character is made of; 0 if the char pointed to is NULL or
34 -1 if it is not a valid multi-byte char.
35 If s is NULL the function return zero or non-zero when multi-byte chars
36 resp. don't or do have state-dependent encodings.
38 NOTES
39 stdc.library currenlty only supports "C" locale
40 This means that the function returns 0 when s is NULL and only 0, 1 or -1
41 when s is not NULL.
43 EXAMPLE
45 BUGS
47 SEE ALSO
48 wctomb()
50 INTERNALS
51 Implemented as static inline function to adapt to changing wchar_t
52 definitions
54 ******************************************************************************/