revert between 56095 -> 55830 in arch
[AROS.git] / compiler / stdc / wctomb.c
blob33054fcf759bf3a25ac6fc040c1aef535b79209d
1 /*
2 Copyright © 2007-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 C99 function wctomb().
6 */
8 /*****************************************************************************
10 NAME
11 #include <stdlib.h>
13 int wctomb(
15 SYNOPSIS
16 char *s,
17 wchar_t wchar)
19 FUNCTION
20 Converts one wide char to a multi-byte char.
22 INPUTS
23 wchar: wide char to convert
24 s: string pointer to put the converted char into.
26 RESULT
27 If s is not NULL it returns the number of chars written into s;
28 zero is returned when wchar is a NULL character; -1 when the character
29 is not valid.
30 If s is NULL the function returns zero or non-zero when multi-byte
31 string resp don't or do have state-dependent encodings.
33 NOTES
34 stdc.library currently only implements "C" locale.
35 This means that 0 is returned when s is NULL and 0, 1 or -1 when s is
36 not NULL.
38 EXAMPLE
40 BUGS
42 SEE ALSO
44 INTERNALS
45 Implemented as static inline function to adapt to changing wchar_t
46 definitions
48 ******************************************************************************/